From a74d6ca4757f528ba552149c71d665a275e8f738 Mon Sep 17 00:00:00 2001 From: Sam White Date: Mon, 12 Dec 2022 12:05:35 -0600 Subject: [PATCH 001/155] Update context ULTs to Boost v1.80.0 --- .../jump_arm64_aapcs_pe_armasm.asm | 133 +++++++++++ .../boost-context/jump_i386_ms_pe_gas.asm | 123 ++++++++++ .../boost-context/jump_x86_64_ms_pe_gas.asm | 209 +++++++++++++++++ .../boost-context/jump_x86_64_sysv_elf_gas.S | 7 +- .../make_arm64_aapcs_pe_armasm.asm | 107 +++++++++ .../boost-context/make_i386_ms_pe_gas.asm | 153 +++++++++++++ .../boost-context/make_x86_64_ms_pe_gas.asm | 174 +++++++++++++++ .../boost-context/make_x86_64_sysv_elf_gas.S | 9 +- .../ontop_arm64_aapcs_pe_armasm.asm | 132 +++++++++++ .../boost-context/ontop_i386_ms_pe_gas.asm | 131 +++++++++++ .../boost-context/ontop_x86_64_ms_pe_gas.asm | 211 ++++++++++++++++++ .../boost-context/ontop_x86_64_sysv_elf_gas.S | 7 +- 12 files changed, 1393 insertions(+), 3 deletions(-) create mode 100644 src/util/boost-context/jump_arm64_aapcs_pe_armasm.asm create mode 100644 src/util/boost-context/jump_i386_ms_pe_gas.asm create mode 100644 src/util/boost-context/jump_x86_64_ms_pe_gas.asm create mode 100644 src/util/boost-context/make_arm64_aapcs_pe_armasm.asm create mode 100644 src/util/boost-context/make_i386_ms_pe_gas.asm create mode 100644 src/util/boost-context/make_x86_64_ms_pe_gas.asm create mode 100644 src/util/boost-context/ontop_arm64_aapcs_pe_armasm.asm create mode 100644 src/util/boost-context/ontop_i386_ms_pe_gas.asm create mode 100644 src/util/boost-context/ontop_x86_64_ms_pe_gas.asm diff --git a/src/util/boost-context/jump_arm64_aapcs_pe_armasm.asm b/src/util/boost-context/jump_arm64_aapcs_pe_armasm.asm new file mode 100644 index 0000000000..3100243d68 --- /dev/null +++ b/src/util/boost-context/jump_arm64_aapcs_pe_armasm.asm @@ -0,0 +1,133 @@ +; Copyright Edward Nevill + Oliver Kowalke 2015 +; Distributed under the Boost Software License, Version 1.0. +; (See accompanying file LICENSE_1_0.txt or copy at +; http://www.boost.org/LICENSE_1_0.txt) + +;******************************************************* +;* * +;* ------------------------------------------------- * +;* | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | * +;* ------------------------------------------------- * +;* | 0x0 | 0x4 | 0x8 | 0xc | 0x10| 0x14| 0x18| 0x1c| * +;* ------------------------------------------------- * +;* | d8 | d9 | d10 | d11 | * +;* ------------------------------------------------- * +;* ------------------------------------------------- * +;* | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | * +;* ------------------------------------------------- * +;* | 0x20| 0x24| 0x28| 0x2c| 0x30| 0x34| 0x38| 0x3c| * +;* ------------------------------------------------- * +;* | d12 | d13 | d14 | d15 | * +;* ------------------------------------------------- * +;* ------------------------------------------------- * +;* | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | * +;* ------------------------------------------------- * +;* | 0x40| 0x44| 0x48| 0x4c| 0x50| 0x54| 0x58| 0x5c| * +;* ------------------------------------------------- * +;* | x19 | x20 | x21 | x22 | * +;* ------------------------------------------------- * +;* ------------------------------------------------- * +;* | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | * +;* ------------------------------------------------- * +;* | 0x60| 0x64| 0x68| 0x6c| 0x70| 0x74| 0x78| 0x7c| * +;* ------------------------------------------------- * +;* | x23 | x24 | x25 | x26 | * +;* ------------------------------------------------- * +;* ------------------------------------------------- * +;* | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | * +;* ------------------------------------------------- * +;* | 0x80| 0x84| 0x88| 0x8c| 0x90| 0x94| 0x98| 0x9c| * +;* ------------------------------------------------- * +;* | x27 | x28 | FP | LR | * +;* ------------------------------------------------- * +;* ------------------------------------------------- * +;* | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | * +;* ------------------------------------------------- * +;* | 0xa0| 0xa4| 0xa8| 0xac| 0xb0| 0xb4| 0xb8| 0xbc| * +;* ------------------------------------------------- * +;* | fiber data| base | limit | dealloc | * +;* ------------------------------------------------- * +;* ------------------------------------------------- * +;* | 48 | 49 | 50 | 51 | | | * +;* ------------------------------------------------- * +;* | 0xc0| 0xc4| 0xc8| 0xcc| | | * +;* ------------------------------------------------- * +;* | PC | align | | | * +;* ------------------------------------------------- * +;* * +;******************************************************* + + AREA |.text|, CODE, READONLY, ALIGN=4, CODEALIGN + EXPORT jump_fcontext + +jump_fcontext proc + ; prepare stack for GP + FPU + sub sp, sp, #0xd0 + + ; save d8 - d15 + stp d8, d9, [sp, #0x00] + stp d10, d11, [sp, #0x10] + stp d12, d13, [sp, #0x20] + stp d14, d15, [sp, #0x30] + + ; save x19-x30 + stp x19, x20, [sp, #0x40] + stp x21, x22, [sp, #0x50] + stp x23, x24, [sp, #0x60] + stp x25, x26, [sp, #0x70] + stp x27, x28, [sp, #0x80] + stp x29, x30, [sp, #0x90] + + ; save LR as PC + str x30, [sp, #0xc0] + + ; save current stack base and limit + ldp x5, x6, [x18, #0x08] ; TeStackBase and TeStackLimit at ksarm64.h + stp x5, x6, [sp, #0xa0] + ; save current fiber data and deallocation stack + ldr x5, [x18, #0x1478] ; TeDeallocationStack at ksarm64.h + ldr x6, [x18, #0x20] ; TeFiberData at ksarm64.h + stp x5, x6, [sp, #0xb0] + + ; store RSP (pointing to context-data) in X0 + mov x4, sp + + ; restore RSP (pointing to context-data) from X1 + mov sp, x0 + + ; restore stack base and limit + ldp x5, x6, [sp, #0xa0] + stp x5, x6, [x18, #0x08] ; TeStackBase and TeStackLimit at ksarm64.h + ; restore fiber data and deallocation stack + ldp x5, x6, [sp, #0xb0] + str x5, [x18, #0x1478] ; TeDeallocationStack at ksarm64.h + str x6, [x18, #0x20] ; TeFiberData at ksarm64.h + + ; load d8 - d15 + ldp d8, d9, [sp, #0x00] + ldp d10, d11, [sp, #0x10] + ldp d12, d13, [sp, #0x20] + ldp d14, d15, [sp, #0x30] + + ; load x19-x30 + ldp x19, x20, [sp, #0x40] + ldp x21, x22, [sp, #0x50] + ldp x23, x24, [sp, #0x60] + ldp x25, x26, [sp, #0x70] + ldp x27, x28, [sp, #0x80] + ldp x29, x30, [sp, #0x90] + + ; return transfer_t from jump + ; pass transfer_t as first arg in context function + ; X0 == FCTX, X1 == DATA + mov x0, x4 + + ; load pc + ldr x4, [sp, #0xc0] + + ; restore stack from GP + FPU + add sp, sp, #0xd0 + + ret x4 + ENDP + END \ No newline at end of file diff --git a/src/util/boost-context/jump_i386_ms_pe_gas.asm b/src/util/boost-context/jump_i386_ms_pe_gas.asm new file mode 100644 index 0000000000..6eb45326ce --- /dev/null +++ b/src/util/boost-context/jump_i386_ms_pe_gas.asm @@ -0,0 +1,123 @@ +/* + Copyright Oliver Kowalke 2009. + Copyright Thomas Sailer 2013. + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +*/ + +/************************************************************************************* +* --------------------------------------------------------------------------------- * +* | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | * +* --------------------------------------------------------------------------------- * +* | 0h | 04h | 08h | 0ch | 010h | 014h | 018h | 01ch | * +* --------------------------------------------------------------------------------- * +* | fc_mxcsr|fc_x87_cw| fc_strg |fc_deallo| limit | base | fc_seh | EDI | * +* --------------------------------------------------------------------------------- * +* --------------------------------------------------------------------------------- * +* | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | * +* --------------------------------------------------------------------------------- * +* | 020h | 024h | 028h | 02ch | 030h | 034h | 038h | 03ch | * +* --------------------------------------------------------------------------------- * +* | ESI | EBX | EBP | EIP | to | data | EH NXT |SEH HNDLR| * +* --------------------------------------------------------------------------------- * +**************************************************************************************/ + +.file "jump_i386_ms_pe_gas.asm" +.text +.p2align 4,,15 + +/* mark as using no unregistered SEH handlers */ +.globl @feat.00 +.def @feat.00; .scl 3; .type 0; .endef +.set @feat.00, 1 + +.globl _jump_fcontext +.def _jump_fcontext; .scl 2; .type 32; .endef +_jump_fcontext: + /* prepare stack */ + leal -0x2c(%esp), %esp + +#if !defined(BOOST_USE_TSX) + /* save MMX control- and status-word */ + stmxcsr (%esp) + /* save x87 control-word */ + fnstcw 0x4(%esp) +#endif + + /* load NT_TIB */ + movl %fs:(0x18), %edx + /* load fiber local storage */ + movl 0x10(%edx), %eax + movl %eax, 0x8(%esp) + /* load current dealloction stack */ + movl 0xe0c(%edx), %eax + movl %eax, 0xc(%esp) + /* load current stack limit */ + movl 0x8(%edx), %eax + movl %eax, 0x10(%esp) + /* load current stack base */ + movl 0x4(%edx), %eax + movl %eax, 0x14(%esp) + /* load current SEH exception list */ + movl (%edx), %eax + movl %eax, 0x18(%esp) + + movl %edi, 0x1c(%esp) /* save EDI */ + movl %esi, 0x20(%esp) /* save ESI */ + movl %ebx, 0x24(%esp) /* save EBX */ + movl %ebp, 0x28(%esp) /* save EBP */ + + /* store ESP (pointing to context-data) in EAX */ + movl %esp, %eax + + /* firstarg of jump_fcontext() == fcontext to jump to */ + movl 0x30(%esp), %ecx + + /* restore ESP (pointing to context-data) from ECX */ + movl %ecx, %esp + +#if !defined(BOOST_USE_TSX) + /* restore MMX control- and status-word */ + ldmxcsr (%esp) + /* restore x87 control-word */ + fldcw 0x4(%esp) +#endif + + /* restore NT_TIB into EDX */ + movl %fs:(0x18), %edx + /* restore fiber local storage */ + movl 0x8(%esp), %ecx + movl %ecx, 0x10(%edx) + /* restore current deallocation stack */ + movl 0xc(%esp), %ecx + movl %ecx, 0xe0c(%edx) + /* restore current stack limit */ + movl 0x10(%esp), %ecx + movl %ecx, 0x8(%edx) + /* restore current stack base */ + movl 0x14(%esp), %ecx + movl %ecx, 0x4(%edx) + /* restore current SEH exception list */ + movl 0x18(%esp), %ecx + movl %ecx, (%edx) + + movl 0x2c(%esp), %ecx /* restore EIP */ + + movl 0x1c(%esp), %edi /* restore EDI */ + movl 0x20(%esp), %esi /* restore ESI */ + movl 0x24(%esp), %ebx /* restore EBX */ + movl 0x28(%esp), %ebp /* restore EBP */ + + /* prepare stack */ + leal 0x30(%esp), %esp + + /* return transfer_t */ + /* FCTX == EAX, DATA == EDX */ + movl 0x34(%eax), %edx + + /* jump to context */ + jmp *%ecx + +.section .drectve +.ascii " -export:\"jump_fcontext\"" diff --git a/src/util/boost-context/jump_x86_64_ms_pe_gas.asm b/src/util/boost-context/jump_x86_64_ms_pe_gas.asm new file mode 100644 index 0000000000..ec4ecfe946 --- /dev/null +++ b/src/util/boost-context/jump_x86_64_ms_pe_gas.asm @@ -0,0 +1,209 @@ +/* + Copyright Oliver Kowalke 2009. + Copyright Thomas Sailer 2013. + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +*/ + +/************************************************************************************* +* ---------------------------------------------------------------------------------- * +* | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | * +* ---------------------------------------------------------------------------------- * +* | 0x0 | 0x4 | 0x8 | 0xc | 0x10 | 0x14 | 0x18 | 0x1c | * +* ---------------------------------------------------------------------------------- * +* | SEE registers (XMM6-XMM15) | * +* ---------------------------------------------------------------------------------- * +* ---------------------------------------------------------------------------------- * +* | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | * +* ---------------------------------------------------------------------------------- * +* | 0x20 | 0x24 | 0x28 | 0x2c | 0x30 | 0x34 | 0x38 | 0x3c | * +* ---------------------------------------------------------------------------------- * +* | SEE registers (XMM6-XMM15) | * +* ---------------------------------------------------------------------------------- * +* ---------------------------------------------------------------------------------- * +* | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | * +* ---------------------------------------------------------------------------------- * +* | 0xe40 | 0x44 | 0x48 | 0x4c | 0x50 | 0x54 | 0x58 | 0x5c | * +* ---------------------------------------------------------------------------------- * +* | SEE registers (XMM6-XMM15) | * +* ---------------------------------------------------------------------------------- * +* ---------------------------------------------------------------------------------- * +* | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | * +* ---------------------------------------------------------------------------------- * +* | 0x60 | 0x64 | 0x68 | 0x6c | 0x70 | 0x74 | 0x78 | 0x7c | * +* ---------------------------------------------------------------------------------- * +* | SEE registers (XMM6-XMM15) | * +* ---------------------------------------------------------------------------------- * +* ---------------------------------------------------------------------------------- * +* | 32 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | * +* ---------------------------------------------------------------------------------- * +* | 0x80 | 0x84 | 0x88 | 0x8c | 0x90 | 0x94 | 0x98 | 0x9c | * +* ---------------------------------------------------------------------------------- * +* | SEE registers (XMM6-XMM15) | * +* ---------------------------------------------------------------------------------- * +* ---------------------------------------------------------------------------------- * +* | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | * +* ---------------------------------------------------------------------------------- * +* | 0xa0 | 0xa4 | 0xa8 | 0xac | 0xb0 | 0xb4 | 0xb8 | 0xbc | * +* ---------------------------------------------------------------------------------- * +* | fc_mxcsr|fc_x87_cw| | fbr_strg | fc_dealloc | * +* ---------------------------------------------------------------------------------- * +* ---------------------------------------------------------------------------------- * +* | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | * +* ---------------------------------------------------------------------------------- * +* | 0xc0 | 0xc4 | 0xc8 | 0xcc | 0xd0 | 0xd4 | 0xd8 | 0xdc | * +* ---------------------------------------------------------------------------------- * +* | limit | base | R12 | R13 | * +* ---------------------------------------------------------------------------------- * +* ---------------------------------------------------------------------------------- * +* | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | * +* ---------------------------------------------------------------------------------- * +* | 0xe0 | 0xe4 | 0xe8 | 0xec | 0xf0 | 0xf4 | 0xf8 | 0xfc | * +* ---------------------------------------------------------------------------------- * +* | R14 | R15 | RDI | RSI | * +* ---------------------------------------------------------------------------------- * +* ---------------------------------------------------------------------------------- * +* | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | * +* ---------------------------------------------------------------------------------- * +* | 0x100 | 0x104 | 0x108 | 0x10c | 0x110 | 0x114 | 0x118 | 0x11c | * +* ---------------------------------------------------------------------------------- * +* | RBX | RBP | hidden | RIP | * +* ---------------------------------------------------------------------------------- * +* ---------------------------------------------------------------------------------- * +* | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | * +* ---------------------------------------------------------------------------------- * +* | 0x120 | 0x124 | 0x128 | 0x12c | 0x130 | 0x134 | 0x138 | 0x13c | * +* ---------------------------------------------------------------------------------- * +* | parameter area | * +* ---------------------------------------------------------------------------------- * +* ---------------------------------------------------------------------------------- * +* | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | * +* ---------------------------------------------------------------------------------- * +* | 0x140 | 0x144 | 0x148 | 0x14c | 0x150 | 0x154 | 0x158 | 0x15c | * +* ---------------------------------------------------------------------------------- * +* | FCTX | DATA | | * +* ---------------------------------------------------------------------------------- * +**************************************************************************************/ + +.file "jump_x86_64_ms_pe_gas.asm" +.text +.p2align 4,,15 +.globl jump_fcontext +.def jump_fcontext; .scl 2; .type 32; .endef +.seh_proc jump_fcontext +jump_fcontext: +.seh_endprologue + + leaq -0x118(%rsp), %rsp /* prepare stack */ + +#if !defined(BOOST_USE_TSX) + /* save XMM storage */ + movaps %xmm6, 0x0(%rsp) + movaps %xmm7, 0x10(%rsp) + movaps %xmm8, 0x20(%rsp) + movaps %xmm9, 0x30(%rsp) + movaps %xmm10, 0x40(%rsp) + movaps %xmm11, 0x50(%rsp) + movaps %xmm12, 0x60(%rsp) + movaps %xmm13, 0x70(%rsp) + movaps %xmm14, 0x80(%rsp) + movaps %xmm15, 0x90(%rsp) + stmxcsr 0xa0(%rsp) /* save MMX control- and status-word */ + fnstcw 0xa4(%rsp) /* save x87 control-word */ +#endif + + /* load NT_TIB */ + movq %gs:(0x30), %r10 + /* save fiber local storage */ + movq 0x20(%r10), %rax + movq %rax, 0xb0(%rsp) + /* save current deallocation stack */ + movq 0x1478(%r10), %rax + movq %rax, 0xb8(%rsp) + /* save current stack limit */ + movq 0x10(%r10), %rax + movq %rax, 0xc0(%rsp) + /* save current stack base */ + movq 0x08(%r10), %rax + movq %rax, 0xc8(%rsp) + + movq %r12, 0xd0(%rsp) /* save R12 */ + movq %r13, 0xd8(%rsp) /* save R13 */ + movq %r14, 0xe0(%rsp) /* save R14 */ + movq %r15, 0xe8(%rsp) /* save R15 */ + movq %rdi, 0xf0(%rsp) /* save RDI */ + movq %rsi, 0xf8(%rsp) /* save RSI */ + movq %rbx, 0x100(%rsp) /* save RBX */ + movq %rbp, 0x108(%rsp) /* save RBP */ + + movq %rcx, 0x110(%rsp) /* save hidden address of transport_t */ + + /* preserve RSP (pointing to context-data) in R9 */ + movq %rsp, %r9 + + /* restore RSP (pointing to context-data) from RDX */ + movq %rdx, %rsp + +#if !defined(BOOST_USE_TSX) + /* restore XMM storage */ + movaps 0x0(%rsp), %xmm6 + movaps 0x10(%rsp), %xmm7 + movaps 0x20(%rsp), %xmm8 + movaps 0x30(%rsp), %xmm9 + movaps 0x40(%rsp), %xmm10 + movaps 0x50(%rsp), %xmm11 + movaps 0x60(%rsp), %xmm12 + movaps 0x70(%rsp), %xmm13 + movaps 0x80(%rsp), %xmm14 + movaps 0x90(%rsp), %xmm15 + ldmxcsr 0xa0(%rsp) /* restore MMX control- and status-word */ + fldcw 0xa4(%rsp) /* restore x87 control-word */ +#endif + + /* load NT_TIB */ + movq %gs:(0x30), %r10 + /* restore fiber local storage */ + movq 0xb0(%rsp), %rax + movq %rax, 0x20(%r10) + /* restore current deallocation stack */ + movq 0xb8(%rsp), %rax + movq %rax, 0x1478(%r10) + /* restore current stack limit */ + movq 0xc0(%rsp), %rax + movq %rax, 0x10(%r10) + /* restore current stack base */ + movq 0xc8(%rsp), %rax + movq %rax, 0x08(%r10) + + movq 0xd0(%rsp), %r12 /* restore R12 */ + movq 0xd8(%rsp), %r13 /* restore R13 */ + movq 0xe0(%rsp), %r14 /* restore R14 */ + movq 0xe8(%rsp), %r15 /* restore R15 */ + movq 0xf0(%rsp), %rdi /* restore RDI */ + movq 0xf8(%rsp), %rsi /* restore RSI */ + movq 0x100(%rsp), %rbx /* restore RBX */ + movq 0x108(%rsp), %rbp /* restore RBP */ + + movq 0x110(%rsp), %rax /* restore hidden address of transport_t */ + + leaq 0x118(%rsp), %rsp /* prepare stack */ + + /* restore return-address */ + popq %r10 + + /* transport_t returned in RAX */ + /* return parent fcontext_t */ + movq %r9, 0x0(%rax) + /* return data */ + movq %r8, 0x8(%rax) + + /* transport_t as 1.arg of context-function */ + movq %rax, %rcx + + /* indirect jump to context */ + jmp *%r10 +.seh_endproc + +.section .drectve +.ascii " -export:\"jump_fcontext\"" diff --git a/src/util/boost-context/jump_x86_64_sysv_elf_gas.S b/src/util/boost-context/jump_x86_64_sysv_elf_gas.S index 0c4a1a39eb..49726699bc 100644 --- a/src/util/boost-context/jump_x86_64_sysv_elf_gas.S +++ b/src/util/boost-context/jump_x86_64_sysv_elf_gas.S @@ -23,13 +23,18 @@ * ---------------------------------------------------------------------------------- * * * ****************************************************************************************/ - +# if defined __CET__ +# include +# else +# define _CET_ENDBR +# endif .file "jump_x86_64_sysv_elf_gas.S" .text .globl jump_fcontext .type jump_fcontext,@function .align 16 jump_fcontext: + _CET_ENDBR leaq -0x38(%rsp), %rsp /* prepare stack */ #if !defined(BOOST_USE_TSX) diff --git a/src/util/boost-context/make_arm64_aapcs_pe_armasm.asm b/src/util/boost-context/make_arm64_aapcs_pe_armasm.asm new file mode 100644 index 0000000000..50f9b69876 --- /dev/null +++ b/src/util/boost-context/make_arm64_aapcs_pe_armasm.asm @@ -0,0 +1,107 @@ +; Copyright Edward Nevill + Oliver Kowalke 2015 +; Distributed under the Boost Software License, Version 1.0. +; (See accompanying file LICENSE_1_0.txt or copy at +; http://www.boost.org/LICENSE_1_0.txt) + +;******************************************************* +;* * +;* ------------------------------------------------- * +;* | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | * +;* ------------------------------------------------- * +;* | 0x0 | 0x4 | 0x8 | 0xc | 0x10| 0x14| 0x18| 0x1c| * +;* ------------------------------------------------- * +;* | d8 | d9 | d10 | d11 | * +;* ------------------------------------------------- * +;* ------------------------------------------------- * +;* | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | * +;* ------------------------------------------------- * +;* | 0x20| 0x24| 0x28| 0x2c| 0x30| 0x34| 0x38| 0x3c| * +;* ------------------------------------------------- * +;* | d12 | d13 | d14 | d15 | * +;* ------------------------------------------------- * +;* ------------------------------------------------- * +;* | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | * +;* ------------------------------------------------- * +;* | 0x40| 0x44| 0x48| 0x4c| 0x50| 0x54| 0x58| 0x5c| * +;* ------------------------------------------------- * +;* | x19 | x20 | x21 | x22 | * +;* ------------------------------------------------- * +;* ------------------------------------------------- * +;* | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | * +;* ------------------------------------------------- * +;* | 0x60| 0x64| 0x68| 0x6c| 0x70| 0x74| 0x78| 0x7c| * +;* ------------------------------------------------- * +;* | x23 | x24 | x25 | x26 | * +;* ------------------------------------------------- * +;* ------------------------------------------------- * +;* | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | * +;* ------------------------------------------------- * +;* | 0x80| 0x84| 0x88| 0x8c| 0x90| 0x94| 0x98| 0x9c| * +;* ------------------------------------------------- * +;* | x27 | x28 | FP | LR | * +;* ------------------------------------------------- * +;* ------------------------------------------------- * +;* | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | * +;* ------------------------------------------------- * +;* | 0xa0| 0xa4| 0xa8| 0xac| 0xb0| 0xb4| 0xb8| 0xbc| * +;* ------------------------------------------------- * +;* | base | limit | dealloc | fiber data| * +;* ------------------------------------------------- * +;* ------------------------------------------------- * +;* | 48 | 49 | 50 | 51 | | | * +;* ------------------------------------------------- * +;* | 0xc0| 0xc4| 0xc8| 0xcc| | | * +;* ------------------------------------------------- * +;* | PC | align | | | * +;* ------------------------------------------------- * +;* * +;******************************************************* + + AREA |.text|, CODE, READONLY, ALIGN=4, CODEALIGN + EXPORT make_fcontext + IMPORT _exit + +make_fcontext proc + ; save stack top address to x3 + mov x3, x0 + + ; shift address in x0 (allocated stack) to lower 16 byte boundary + and x0, x0, ~0xF + + ; reserve space for context-data on context-stack + sub x0, x0, #0xd0 + + ; save top address of context_stack as 'base' + str x3, [x0, #0xa0] + ; save bottom address of context-stack as 'limit' and 'dealloction stack' + sub x3, x3, x1 + stp x3, x3, [x0, #0xa8] + ; save 0 as 'fiber data' + str xzr, [x0, #0xb8] + + ; third arg of make_fcontext() == address of context-function + ; store address as x19 for trampoline + str x2, [x0, #0x40] + ; store trampoline address as pc + adr x2, trampoline + str x2, [x0, #0xc0] + + ; save address of finish as return-address for context-function + ; will be entered after context-function returns (LR register) + adr x1, finish + str x1, [x0, #0x98] + + ret x30 ; return pointer to context-data (x0) + +trampoline + stp fp, lr, [sp, #-0x10]! + mov fp, sp + blr x19 + +finish + ; exit code is zero + mov x0, #0 + ; exit application + bl _exit + ENDP + END diff --git a/src/util/boost-context/make_i386_ms_pe_gas.asm b/src/util/boost-context/make_i386_ms_pe_gas.asm new file mode 100644 index 0000000000..608ddf3af0 --- /dev/null +++ b/src/util/boost-context/make_i386_ms_pe_gas.asm @@ -0,0 +1,153 @@ +/* + Copyright Oliver Kowalke 2009. + Copyright Thomas Sailer 2013. + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +*/ + +/************************************************************************************* +* --------------------------------------------------------------------------------- * +* | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | * +* --------------------------------------------------------------------------------- * +* | 0h | 04h | 08h | 0ch | 010h | 014h | 018h | 01ch | * +* --------------------------------------------------------------------------------- * +* | fc_mxcsr|fc_x87_cw| fc_strg |fc_deallo| limit | base | fc_seh | EDI | * +* --------------------------------------------------------------------------------- * +* --------------------------------------------------------------------------------- * +* | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | * +* --------------------------------------------------------------------------------- * +* | 020h | 024h | 028h | 02ch | 030h | 034h | 038h | 03ch | * +* --------------------------------------------------------------------------------- * +* | ESI | EBX | EBP | EIP | to | data | EH NXT |SEH HNDLR| * +* --------------------------------------------------------------------------------- * +**************************************************************************************/ + +.file "make_i386_ms_pe_gas.asm" +.text +.p2align 4,,15 + +/* mark as using no unregistered SEH handlers */ +.globl @feat.00 +.def @feat.00; .scl 3; .type 0; .endef +.set @feat.00, 1 + +.globl _make_fcontext +.def _make_fcontext; .scl 2; .type 32; .endef +_make_fcontext: + /* first arg of make_fcontext() == top of context-stack */ + movl 0x04(%esp), %eax + + /* reserve space for first argument of context-function */ + /* EAX might already point to a 16byte border */ + leal -0x8(%eax), %eax + + /* shift address in EAX to lower 16 byte boundary */ + andl $-16, %eax + + /* reserve space for context-data on context-stack */ + /* size for fc_mxcsr .. EIP + return-address for context-function */ + /* on context-function entry: (ESP -0x4) % 8 == 0 */ + /* additional space is required for SEH */ + leal -0x40(%eax), %eax + + /* save MMX control- and status-word */ + stmxcsr (%eax) + /* save x87 control-word */ + fnstcw 0x4(%eax) + + /* first arg of make_fcontext() == top of context-stack */ + movl 0x4(%esp), %ecx + /* save top address of context stack as 'base' */ + movl %ecx, 0x14(%eax) + /* second arg of make_fcontext() == size of context-stack */ + movl 0x8(%esp), %edx + /* negate stack size for LEA instruction (== substraction) */ + negl %edx + /* compute bottom address of context stack (limit) */ + leal (%ecx,%edx), %ecx + /* save bottom address of context-stack as 'limit' */ + movl %ecx, 0x10(%eax) + /* save bottom address of context-stack as 'dealloction stack' */ + movl %ecx, 0xc(%eax) + /* set fiber-storage to zero */ + xorl %ecx, %ecx + movl %ecx, 0x8(%eax) + + /* third arg of make_fcontext() == address of context-function */ + /* stored in EBX */ + movl 0xc(%esp), %ecx + movl %ecx, 0x24(%eax) + + /* compute abs address of label trampoline */ + movl $trampoline, %ecx + /* save address of trampoline as return-address for context-function */ + /* will be entered after calling jump_fcontext() first time */ + movl %ecx, 0x2c(%eax) + + /* compute abs address of label finish */ + movl $finish, %ecx + /* save address of finish as return-address for context-function */ + /* will be entered after context-function returns */ + movl %ecx, 0x28(%eax) + + /* traverse current seh chain to get the last exception handler installed by Windows */ + /* note that on Windows Server 2008 and 2008 R2, SEHOP is activated by default */ + /* the exception handler chain is tested for the presence of ntdll.dll!FinalExceptionHandler */ + /* at its end by RaiseException all seh andlers are disregarded if not present and the */ + /* program is aborted */ + /* load NT_TIB into ECX */ + movl %fs:(0x0), %ecx + +walk: + /* load 'next' member of current SEH into EDX */ + movl (%ecx), %edx + /* test if 'next' of current SEH is last (== 0xffffffff) */ + incl %edx + jz found + decl %edx + /* exchange content; ECX contains address of next SEH */ + xchgl %ecx, %edx + /* inspect next SEH */ + jmp walk + +found: + /* load 'handler' member of SEH == address of last SEH handler installed by Windows */ + movl 0x04(%ecx), %ecx + /* save address in ECX as SEH handler for context */ + movl %ecx, 0x3c(%eax) + /* set ECX to -1 */ + movl $0xffffffff, %ecx + /* save ECX as next SEH item */ + movl %ecx, 0x38(%eax) + /* load address of next SEH item */ + leal 0x38(%eax), %ecx + /* save next SEH */ + movl %ecx, 0x18(%eax) + + /* return pointer to context-data */ + ret + +trampoline: + /* move transport_t for entering context-function */ + /* FCTX == EAX, DATA == EDX */ + movl %eax, (%esp) + movl %edx, 0x4(%esp) + /* label finish as return-address */ + pushl %ebp + /* jump to context-function */ + jmp *%ebx + +finish: + /* ESP points to same address as ESP on entry of context function + 0x4 */ + xorl %eax, %eax + /* exit code is zero */ + movl %eax, (%esp) + /* exit application */ + call __exit + hlt + +.def __exit; .scl 2; .type 32; .endef /* standard C library function */ + +.section .drectve +.ascii " -export:\"make_fcontext\"" diff --git a/src/util/boost-context/make_x86_64_ms_pe_gas.asm b/src/util/boost-context/make_x86_64_ms_pe_gas.asm new file mode 100644 index 0000000000..958a2a7b6d --- /dev/null +++ b/src/util/boost-context/make_x86_64_ms_pe_gas.asm @@ -0,0 +1,174 @@ +/* + Copyright Oliver Kowalke 2009. + Copyright Thomas Sailer 2013. + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +*/ + +/************************************************************************************* +* ---------------------------------------------------------------------------------- * +* | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | * +* ---------------------------------------------------------------------------------- * +* | 0x0 | 0x4 | 0x8 | 0xc | 0x10 | 0x14 | 0x18 | 0x1c | * +* ---------------------------------------------------------------------------------- * +* | SEE registers (XMM6-XMM15) | * +* ---------------------------------------------------------------------------------- * +* ---------------------------------------------------------------------------------- * +* | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | * +* ---------------------------------------------------------------------------------- * +* | 0x20 | 0x24 | 0x28 | 0x2c | 0x30 | 0x34 | 0x38 | 0x3c | * +* ---------------------------------------------------------------------------------- * +* | SEE registers (XMM6-XMM15) | * +* ---------------------------------------------------------------------------------- * +* ---------------------------------------------------------------------------------- * +* | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | * +* ---------------------------------------------------------------------------------- * +* | 0xe40 | 0x44 | 0x48 | 0x4c | 0x50 | 0x54 | 0x58 | 0x5c | * +* ---------------------------------------------------------------------------------- * +* | SEE registers (XMM6-XMM15) | * +* ---------------------------------------------------------------------------------- * +* ---------------------------------------------------------------------------------- * +* | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | * +* ---------------------------------------------------------------------------------- * +* | 0x60 | 0x64 | 0x68 | 0x6c | 0x70 | 0x74 | 0x78 | 0x7c | * +* ---------------------------------------------------------------------------------- * +* | SEE registers (XMM6-XMM15) | * +* ---------------------------------------------------------------------------------- * +* ---------------------------------------------------------------------------------- * +* | 32 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | * +* ---------------------------------------------------------------------------------- * +* | 0x80 | 0x84 | 0x88 | 0x8c | 0x90 | 0x94 | 0x98 | 0x9c | * +* ---------------------------------------------------------------------------------- * +* | SEE registers (XMM6-XMM15) | * +* ---------------------------------------------------------------------------------- * +* ---------------------------------------------------------------------------------- * +* | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | * +* ---------------------------------------------------------------------------------- * +* | 0xa0 | 0xa4 | 0xa8 | 0xac | 0xb0 | 0xb4 | 0xb8 | 0xbc | * +* ---------------------------------------------------------------------------------- * +* | fc_mxcsr|fc_x87_cw| | fbr_strg | fc_dealloc | * +* ---------------------------------------------------------------------------------- * +* ---------------------------------------------------------------------------------- * +* | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | * +* ---------------------------------------------------------------------------------- * +* | 0xc0 | 0xc4 | 0xc8 | 0xcc | 0xd0 | 0xd4 | 0xd8 | 0xdc | * +* ---------------------------------------------------------------------------------- * +* | limit | base | R12 | R13 | * +* ---------------------------------------------------------------------------------- * +* ---------------------------------------------------------------------------------- * +* | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | * +* ---------------------------------------------------------------------------------- * +* | 0xe0 | 0xe4 | 0xe8 | 0xec | 0xf0 | 0xf4 | 0xf8 | 0xfc | * +* ---------------------------------------------------------------------------------- * +* | R14 | R15 | RDI | RSI | * +* ---------------------------------------------------------------------------------- * +* ---------------------------------------------------------------------------------- * +* | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | * +* ---------------------------------------------------------------------------------- * +* | 0x100 | 0x104 | 0x108 | 0x10c | 0x110 | 0x114 | 0x118 | 0x11c | * +* ---------------------------------------------------------------------------------- * +* | RBX | RBP | hidden | RIP | * +* ---------------------------------------------------------------------------------- * +* ---------------------------------------------------------------------------------- * +* | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | * +* ---------------------------------------------------------------------------------- * +* | 0x120 | 0x124 | 0x128 | 0x12c | 0x130 | 0x134 | 0x138 | 0x13c | * +* ---------------------------------------------------------------------------------- * +* | parameter area | * +* ---------------------------------------------------------------------------------- * +* ---------------------------------------------------------------------------------- * +* | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | * +* ---------------------------------------------------------------------------------- * +* | 0x140 | 0x144 | 0x148 | 0x14c | 0x150 | 0x154 | 0x158 | 0x15c | * +* ---------------------------------------------------------------------------------- * +* | FCTX | DATA | | * +* ---------------------------------------------------------------------------------- * +**************************************************************************************/ + +.file "make_x86_64_ms_pe_gas.asm" +.text +.p2align 4,,15 +.globl make_fcontext +.def make_fcontext; .scl 2; .type 32; .endef +.seh_proc make_fcontext +make_fcontext: +.seh_endprologue + + /* first arg of make_fcontext() == top of context-stack */ + movq %rcx, %rax + + /* shift address in RAX to lower 16 byte boundary */ + /* == pointer to fcontext_t and address of context stack */ + andq $-16, %rax + + /* reserve space for context-data on context-stack */ + /* on context-function entry: (RSP -0x8) % 16 == 0 */ + leaq -0x150(%rax), %rax + + /* third arg of make_fcontext() == address of context-function */ + movq %r8, 0x100(%rax) + + /* first arg of make_fcontext() == top of context-stack */ + /* save top address of context stack as 'base' */ + movq %rcx, 0xc8(%rax) + /* second arg of make_fcontext() == size of context-stack */ + /* negate stack size for LEA instruction (== substraction) */ + negq %rdx + /* compute bottom address of context stack (limit) */ + leaq (%rcx,%rdx), %rcx + /* save bottom address of context stack as 'limit' */ + movq %rcx, 0xc0(%rax) + /* save address of context stack limit as 'dealloction stack' */ + movq %rcx, 0xb8(%rax) + /* set fiber-storage to zero */ + xorq %rcx, %rcx + movq %rcx, 0xb0(%rax) + + /* save MMX control- and status-word */ + stmxcsr 0xa0(%rax) + /* save x87 control-word */ + fnstcw 0xa4(%rax) + + /* compute address of transport_t */ + leaq 0x140(%rax), %rcx + /* store address of transport_t in hidden field */ + movq %rcx, 0x110(%rax) + + /* compute abs address of label trampoline */ + leaq trampoline(%rip), %rcx + /* save address of finish as return-address for context-function */ + /* will be entered after jump_fcontext() first time */ + movq %rcx, 0x118(%rax) + + /* compute abs address of label finish */ + leaq finish(%rip), %rcx + /* save address of finish as return-address for context-function */ + /* will be entered after context-function returns */ + movq %rcx, 0x108(%rax) + + ret /* return pointer to context-data */ + +trampoline: + /* store return address on stack */ + /* fix stack alignment */ + pushq %rbp + /* jump to context-function */ + jmp *%rbx + +finish: + /* 32byte shadow-space for _exit() */ + andq $-32, %rsp + /* 32byte shadow-space for _exit() are */ + /* already reserved by make_fcontext() */ + /* exit code is zero */ + xorq %rcx, %rcx + /* exit application */ + call _exit + hlt +.seh_endproc + +.def _exit; .scl 2; .type 32; .endef /* standard C library function */ + +.section .drectve +.ascii " -export:\"make_fcontext\"" diff --git a/src/util/boost-context/make_x86_64_sysv_elf_gas.S b/src/util/boost-context/make_x86_64_sysv_elf_gas.S index 0ef37569a0..7b760082c0 100644 --- a/src/util/boost-context/make_x86_64_sysv_elf_gas.S +++ b/src/util/boost-context/make_x86_64_sysv_elf_gas.S @@ -23,13 +23,18 @@ * ---------------------------------------------------------------------------------- * * * ****************************************************************************************/ - +# if defined __CET__ +# include +# else +# define _CET_ENDBR +# endif .file "make_x86_64_sysv_elf_gas.S" .text .globl make_fcontext .type make_fcontext,@function .align 16 make_fcontext: + _CET_ENDBR /* first arg of make_fcontext() == top of context-stack */ movq %rdi, %rax @@ -64,6 +69,7 @@ make_fcontext: ret /* return pointer to context-data */ trampoline: + _CET_ENDBR /* store return address on stack */ /* fix stack alignment */ push %rbp @@ -71,6 +77,7 @@ trampoline: jmp *%rbx finish: + _CET_ENDBR /* exit code is zero */ xorq %rdi, %rdi /* exit application */ diff --git a/src/util/boost-context/ontop_arm64_aapcs_pe_armasm.asm b/src/util/boost-context/ontop_arm64_aapcs_pe_armasm.asm new file mode 100644 index 0000000000..dc522c0a62 --- /dev/null +++ b/src/util/boost-context/ontop_arm64_aapcs_pe_armasm.asm @@ -0,0 +1,132 @@ +; Copyright Edward Nevill + Oliver Kowalke 2015 +; Distributed under the Boost Software License, Version 1.0. +; (See accompanying file LICENSE_1_0.txt or copy at +; http://www.boost.org/LICENSE_1_0.txt) + +;******************************************************* +;* * +;* ------------------------------------------------- * +;* | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | * +;* ------------------------------------------------- * +;* | 0x0 | 0x4 | 0x8 | 0xc | 0x10| 0x14| 0x18| 0x1c| * +;* ------------------------------------------------- * +;* | d8 | d9 | d10 | d11 | * +;* ------------------------------------------------- * +;* ------------------------------------------------- * +;* | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | * +;* ------------------------------------------------- * +;* | 0x20| 0x24| 0x28| 0x2c| 0x30| 0x34| 0x38| 0x3c| * +;* ------------------------------------------------- * +;* | d12 | d13 | d14 | d15 | * +;* ------------------------------------------------- * +;* ------------------------------------------------- * +;* | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | * +;* ------------------------------------------------- * +;* | 0x40| 0x44| 0x48| 0x4c| 0x50| 0x54| 0x58| 0x5c| * +;* ------------------------------------------------- * +;* | x19 | x20 | x21 | x22 | * +;* ------------------------------------------------- * +;* ------------------------------------------------- * +;* | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | * +;* ------------------------------------------------- * +;* | 0x60| 0x64| 0x68| 0x6c| 0x70| 0x74| 0x78| 0x7c| * +;* ------------------------------------------------- * +;* | x23 | x24 | x25 | x26 | * +;* ------------------------------------------------- * +;* ------------------------------------------------- * +;* | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | * +;* ------------------------------------------------- * +;* | 0x80| 0x84| 0x88| 0x8c| 0x90| 0x94| 0x98| 0x9c| * +;* ------------------------------------------------- * +;* | x27 | x28 | FP | LR | * +;* ------------------------------------------------- * +;* ------------------------------------------------- * +;* | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | * +;* ------------------------------------------------- * +;* | 0xa0| 0xa4| 0xa8| 0xac| 0xb0| 0xb4| 0xb8| 0xbc| * +;* ------------------------------------------------- * +;* | fiber data| base | limit | dealloc | * +;* ------------------------------------------------- * +;* ------------------------------------------------- * +;* | 48 | 49 | 50 | 51 | | | * +;* ------------------------------------------------- * +;* | 0xc0| 0xc4| 0xc8| 0xcc| | | * +;* ------------------------------------------------- * +;* | PC | align | | | * +;* ------------------------------------------------- * +;* * +;******************************************************* + + AREA |.text|, CODE, READONLY, ALIGN=4, CODEALIGN + EXPORT ontop_fcontext + +ontop_fcontext proc BOOST_CONTEXT_EXPORT + ; prepare stack for GP + FPU + sub sp, sp, #0xd0 + + ; save d8 - d15 + stp d8, d9, [sp, #0x00] + stp d10, d11, [sp, #0x10] + stp d12, d13, [sp, #0x20] + stp d14, d15, [sp, #0x30] + + ; save x19-x30 + stp x19, x20, [sp, #0x40] + stp x21, x22, [sp, #0x50] + stp x23, x24, [sp, #0x60] + stp x25, x26, [sp, #0x70] + stp x27, x28, [sp, #0x80] + stp x29, x30, [sp, #0x90] + + ; save LR as PC + str x30, [sp, #0xc0] + + ; save current stack base and limit + ldp x5, x6, [x18, #0x08] ; TeStackBase and TeStackLimit at ksarm64.h + stp x5, x6, [sp, #0xa0] + ; save current fiber data and deallocation stack + ldr x5, [x18, #0x1478] ; TeDeallocationStack at ksarm64.h + ldr x6, [x18, #0x20] ; TeFiberData at ksarm64.h + stp x5, x6, [sp, #0xb0] + + ; store RSP (pointing to context-data) in X5 + mov x4, sp + + ; restore RSP (pointing to context-data) from X1 + mov sp, x0 + + ; restore stack base and limit + ldp x5, x6, [sp, #0xa0] + stp x5, x6, [x18, #0x08] ; TeStackBase and TeStackLimit at ksarm64.h + ; restore fiber data and deallocation stack + ldp x5, x6, [sp, #0xb0] + str x5, [x18, #0x1478] ; TeDeallocationStack at ksarm64.h + str x6, [x18, #0x20] ; TeFiberData at ksarm64.h + + ; load d8 - d15 + ldp d8, d9, [sp, #0x00] + ldp d10, d11, [sp, #0x10] + ldp d12, d13, [sp, #0x20] + ldp d14, d15, [sp, #0x30] + + ; load x19-x30 + ldp x19, x20, [sp, #0x40] + ldp x21, x22, [sp, #0x50] + ldp x23, x24, [sp, #0x60] + ldp x25, x26, [sp, #0x70] + ldp x27, x28, [sp, #0x80] + ldp x29, x30, [sp, #0x90] + + ; return transfer_t from jump + ; pass transfer_t as first arg in context function + ; X0 == FCTX, X1 == DATA + mov x0, x4 + + ; skip pc + ; restore stack from GP + FPU + add sp, sp, #0xc0 + + ; jump to ontop-function + ret x2 + ENDP + END diff --git a/src/util/boost-context/ontop_i386_ms_pe_gas.asm b/src/util/boost-context/ontop_i386_ms_pe_gas.asm new file mode 100644 index 0000000000..abe9002a4b --- /dev/null +++ b/src/util/boost-context/ontop_i386_ms_pe_gas.asm @@ -0,0 +1,131 @@ +/* + Copyright Oliver Kowalke 2009. + Copyright Thomas Sailer 2013. + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +*/ + +/************************************************************************************* +* --------------------------------------------------------------------------------- * +* | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | * +* --------------------------------------------------------------------------------- * +* | 0h | 04h | 08h | 0ch | 010h | 014h | 018h | 01ch | * +* --------------------------------------------------------------------------------- * +* | fc_mxcsr|fc_x87_cw| fc_strg |fc_deallo| limit | base | fc_seh | EDI | * +* --------------------------------------------------------------------------------- * +* --------------------------------------------------------------------------------- * +* | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | * +* --------------------------------------------------------------------------------- * +* | 020h | 024h | 028h | 02ch | 030h | 034h | 038h | 03ch | * +* --------------------------------------------------------------------------------- * +* | ESI | EBX | EBP | EIP | to | data | EH NXT |SEH HNDLR| * +* --------------------------------------------------------------------------------- * +**************************************************************************************/ + +.file "ontop_i386_ms_pe_gas.asm" +.text +.p2align 4,,15 + +/* mark as using no unregistered SEH handlers */ +.globl @feat.00 +.def @feat.00; .scl 3; .type 0; .endef +.set @feat.00, 1 + +.globl _ontop_fcontext +.def _ontop_fcontext; .scl 2; .type 32; .endef +_ontop_fcontext: + /* prepare stack */ + leal -0x2c(%esp), %esp + +#if !defined(BOOST_USE_TSX) + /* save MMX control- and status-word */ + stmxcsr (%esp) + /* save x87 control-word */ + fnstcw 0x4(%esp) +#endif + + /* load NT_TIB */ + movl %fs:(0x18), %edx + /* load fiber local storage */ + movl 0x10(%edx), %eax + movl %eax, 0x8(%esp) + /* load current dealloction stack */ + movl 0xe0c(%edx), %eax + movl %eax, 0xc(%esp) + /* load current stack limit */ + movl 0x8(%edx), %eax + movl %eax, 0x10(%esp) + /* load current stack base */ + movl 0x4(%edx), %eax + movl %eax, 0x14(%esp) + /* load current SEH exception list */ + movl (%edx), %eax + movl %eax, 0x18(%esp) + + movl %edi, 0x1c(%esp) /* save EDI */ + movl %esi, 0x20(%esp) /* save ESI */ + movl %ebx, 0x24(%esp) /* save EBX */ + movl %ebp, 0x28(%esp) /* save EBP */ + + /* store ESP (pointing to context-data) in ECX */ + movl %esp, %ecx + + /* first arg of ontop_fcontext() == fcontext to jump to */ + movl 0x30(%esp), %eax + + /* pass parent fcontext_t */ + movl %ecx, 0x30(%eax) + + /* second arg of ontop_fcontext() == data to be transferred */ + movl 0x34(%esp), %ecx + + /* pass data */ + movl %ecx, 0x34(%eax) + + /* third arg of ontop_fcontext() == ontop-function */ + movl 0x38(%esp), %ecx + + /* restore ESP (pointing to context-data) from EDX */ + movl %eax, %esp + +#if !defined(BOOST_USE_TSX) + /* restore MMX control- and status-word */ + ldmxcsr (%esp) + /* restore x87 control-word */ + fldcw 0x4(%esp) +#endif + + /* restore NT_TIB into EDX */ + movl %fs:(0x18), %edx + /* restore fiber local storage */ + movl 0x8(%esp), %eax + movl %eax, 0x10(%edx) + /* restore current deallocation stack */ + movl 0xc(%esp), %eax + movl %eax, 0xe0c(%edx) + /* restore current stack limit */ + movl 0x10(%esp), %eax + movl %eax, 0x08(%edx) + /* restore current stack base */ + movl 0x14(%esp), %eax + movl %eax, 0x04(%edx) + /* restore current SEH exception list */ + movl 0x18(%esp), %eax + movl %eax, (%edx) + + movl 0x1c(%esp), %edi /* restore EDI */ + movl 0x20(%esp), %esi /* restore ESI */ + movl 0x24(%esp), %ebx /* restore EBX */ + movl 0x28(%esp), %ebp /* restore EBP */ + + /* prepare stack */ + leal 0x2c(%esp), %esp + + /* keep return-address on stack */ + + /* jump to context */ + jmp *%ecx + +.section .drectve +.ascii " -export:\"ontop_fcontext\"" diff --git a/src/util/boost-context/ontop_x86_64_ms_pe_gas.asm b/src/util/boost-context/ontop_x86_64_ms_pe_gas.asm new file mode 100644 index 0000000000..02e040c9dc --- /dev/null +++ b/src/util/boost-context/ontop_x86_64_ms_pe_gas.asm @@ -0,0 +1,211 @@ +/* + Copyright Oliver Kowalke 2009. + Copyright Thomas Sailer 2013. + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +*/ + +/************************************************************************************* +* ---------------------------------------------------------------------------------- * +* | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | * +* ---------------------------------------------------------------------------------- * +* | 0x0 | 0x4 | 0x8 | 0xc | 0x10 | 0x14 | 0x18 | 0x1c | * +* ---------------------------------------------------------------------------------- * +* | SEE registers (XMM6-XMM15) | * +* ---------------------------------------------------------------------------------- * +* ---------------------------------------------------------------------------------- * +* | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | * +* ---------------------------------------------------------------------------------- * +* | 0x20 | 0x24 | 0x28 | 0x2c | 0x30 | 0x34 | 0x38 | 0x3c | * +* ---------------------------------------------------------------------------------- * +* | SEE registers (XMM6-XMM15) | * +* ---------------------------------------------------------------------------------- * +* ---------------------------------------------------------------------------------- * +* | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | * +* ---------------------------------------------------------------------------------- * +* | 0xe40 | 0x44 | 0x48 | 0x4c | 0x50 | 0x54 | 0x58 | 0x5c | * +* ---------------------------------------------------------------------------------- * +* | SEE registers (XMM6-XMM15) | * +* ---------------------------------------------------------------------------------- * +* ---------------------------------------------------------------------------------- * +* | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | * +* ---------------------------------------------------------------------------------- * +* | 0x60 | 0x64 | 0x68 | 0x6c | 0x70 | 0x74 | 0x78 | 0x7c | * +* ---------------------------------------------------------------------------------- * +* | SEE registers (XMM6-XMM15) | * +* ---------------------------------------------------------------------------------- * +* ---------------------------------------------------------------------------------- * +* | 32 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | * +* ---------------------------------------------------------------------------------- * +* | 0x80 | 0x84 | 0x88 | 0x8c | 0x90 | 0x94 | 0x98 | 0x9c | * +* ---------------------------------------------------------------------------------- * +* | SEE registers (XMM6-XMM15) | * +* ---------------------------------------------------------------------------------- * +* ---------------------------------------------------------------------------------- * +* | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | * +* ---------------------------------------------------------------------------------- * +* | 0xa0 | 0xa4 | 0xa8 | 0xac | 0xb0 | 0xb4 | 0xb8 | 0xbc | * +* ---------------------------------------------------------------------------------- * +* | fc_mxcsr|fc_x87_cw| | fbr_strg | fc_dealloc | * +* ---------------------------------------------------------------------------------- * +* ---------------------------------------------------------------------------------- * +* | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | * +* ---------------------------------------------------------------------------------- * +* | 0xc0 | 0xc4 | 0xc8 | 0xcc | 0xd0 | 0xd4 | 0xd8 | 0xdc | * +* ---------------------------------------------------------------------------------- * +* | limit | base | R12 | R13 | * +* ---------------------------------------------------------------------------------- * +* ---------------------------------------------------------------------------------- * +* | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | * +* ---------------------------------------------------------------------------------- * +* | 0xe0 | 0xe4 | 0xe8 | 0xec | 0xf0 | 0xf4 | 0xf8 | 0xfc | * +* ---------------------------------------------------------------------------------- * +* | R14 | R15 | RDI | RSI | * +* ---------------------------------------------------------------------------------- * +* ---------------------------------------------------------------------------------- * +* | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | * +* ---------------------------------------------------------------------------------- * +* | 0x100 | 0x104 | 0x108 | 0x10c | 0x110 | 0x114 | 0x118 | 0x11c | * +* ---------------------------------------------------------------------------------- * +* | RBX | RBP | hidden | RIP | * +* ---------------------------------------------------------------------------------- * +* ---------------------------------------------------------------------------------- * +* | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | * +* ---------------------------------------------------------------------------------- * +* | 0x120 | 0x124 | 0x128 | 0x12c | 0x130 | 0x134 | 0x138 | 0x13c | * +* ---------------------------------------------------------------------------------- * +* | parameter area | * +* ---------------------------------------------------------------------------------- * +* ---------------------------------------------------------------------------------- * +* | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | * +* ---------------------------------------------------------------------------------- * +* | 0x140 | 0x144 | 0x148 | 0x14c | 0x150 | 0x154 | 0x158 | 0x15c | * +* ---------------------------------------------------------------------------------- * +* | FCTX | DATA | | * +* ---------------------------------------------------------------------------------- * +**************************************************************************************/ + +.file "ontop_x86_64_ms_pe_gas.asm" +.text +.p2align 4,,15 +.globl ontop_fcontext +.def ontop_fcontext; .scl 2; .type 32; .endef +.seh_proc ontop_fcontext +ontop_fcontext: +.seh_endprologue + + leaq -0x118(%rsp), %rsp /* prepare stack */ + +#if !defined(BOOST_USE_TSX) + /* save XMM storage */ + movaps %xmm6, 0x0(%rsp) + movaps %xmm7, 0x10(%rsp) + movaps %xmm8, 0x20(%rsp) + movaps %xmm9, 0x30(%rsp) + movaps %xmm10, 0x40(%rsp) + movaps %xmm11, 0x50(%rsp) + movaps %xmm12, 0x60(%rsp) + movaps %xmm13, 0x70(%rsp) + movaps %xmm14, 0x80(%rsp) + movaps %xmm15, 0x90(%rsp) + stmxcsr 0xa0(%rsp) /* save MMX control- and status-word */ + fnstcw 0xa4(%rsp) /* save x87 control-word */ +#endif + + /* load NT_TIB */ + movq %gs:(0x30), %r10 + /* save fiber local storage */ + movq 0x20(%r10), %rax + movq %rax, 0xb0(%rsp) + /* save current deallocation stack */ + movq 0x1478(%r10), %rax + movq %rax, 0xb8(%rsp) + /* save current stack limit */ + movq 0x10(%r10), %rax + movq %rax, 0xc0(%rsp) + /* save current stack base */ + movq 0x08(%r10), %rax + movq %rax, 0xc8(%rsp) + + movq %r12, 0xd0(%rsp) /* save R12 */ + movq %r13, 0xd8(%rsp) /* save R13 */ + movq %r14, 0xe0(%rsp) /* save R14 */ + movq %r15, 0xe8(%rsp) /* save R15 */ + movq %rdi, 0xf0(%rsp) /* save RDI */ + movq %rsi, 0xf8(%rsp) /* save RSI */ + movq %rbx, 0x100(%rsp) /* save RBX */ + movq %rbp, 0x108(%rsp) /* save RBP */ + + movq %rcx, 0x110(%rsp) /* save hidden address of transport_t */ + + /* preserve RSP (pointing to context-data) in RCX */ + movq %rsp, %rcx + + /* restore RSP (pointing to context-data) from RDX */ + movq %rdx, %rsp + +#if !defined(BOOST_USE_TSX) + /* restore XMM storage */ + movaps 0x0(%rsp), %xmm6 + movaps 0x10(%rsp), %xmm7 + movaps 0x20(%rsp), %xmm8 + movaps 0x30(%rsp), %xmm9 + movaps 0x40(%rsp), %xmm10 + movaps 0x50(%rsp), %xmm11 + movaps 0x60(%rsp), %xmm12 + movaps 0x70(%rsp), %xmm13 + movaps 0x80(%rsp), %xmm14 + movaps 0x90(%rsp), %xmm15 + ldmxcsr 0xa0(%rsp) /* restore MMX control- and status-word */ + fldcw 0xa4(%rsp) /* restore x87 control-word */ +#endif + + /* load NT_TIB */ + movq %gs:(0x30), %r10 + /* restore fiber local storage */ + movq 0xb0(%rsp), %rax + movq %rax, 0x20(%r10) + /* restore current deallocation stack */ + movq 0xb8(%rsp), %rax + movq %rax, 0x1478(%r10) + /* restore current stack limit */ + movq 0xc0(%rsp), %rax + movq %rax, 0x10(%r10) + /* restore current stack base */ + movq 0xc8(%rsp), %rax + movq %rax, 0x08(%r10) + + movq 0xd0(%rsp), %r12 /* restore R12 */ + movq 0xd8(%rsp), %r13 /* restore R13 */ + movq 0xe0(%rsp), %r14 /* restore R14 */ + movq 0xe8(%rsp), %r15 /* restore R15 */ + movq 0xf0(%rsp), %rdi /* restore RDI */ + movq 0xf8(%rsp), %rsi /* restore RSI */ + movq 0x100(%rsp), %rbx /* restore RBX */ + movq 0x108(%rsp), %rbp /* restore RBP */ + + movq 0x110(%rsp), %rax /* restore hidden address of transport_t */ + + leaq 0x118(%rsp), %rsp /* prepare stack */ + + /* keep return-address on stack */ + + /* transport_t returned in RAX */ + /* return parent fcontext_t */ + movq %rcx, 0x0(%rax) + /* return data */ + movq %r8, 0x8(%rax) + + /* transport_t as 1.arg of context-function */ + /* RCX contains address of returned (hidden) transfer_t */ + movq %rax, %rcx + /* RDX contains address of passed transfer_t */ + movq %rax, %rdx + + /* indirect jump to context */ + jmp *%r9 +.seh_endproc + +.section .drectve +.ascii " -export:\"ontop_fcontext\"" diff --git a/src/util/boost-context/ontop_x86_64_sysv_elf_gas.S b/src/util/boost-context/ontop_x86_64_sysv_elf_gas.S index 4cdba400f1..2b764d355f 100644 --- a/src/util/boost-context/ontop_x86_64_sysv_elf_gas.S +++ b/src/util/boost-context/ontop_x86_64_sysv_elf_gas.S @@ -23,13 +23,18 @@ * ---------------------------------------------------------------------------------- * * * ****************************************************************************************/ - +# if defined __CET__ +# include +# else +# define _CET_ENDBR +# endif .file "ontop_x86_64_sysv_elf_gas.S" .text .globl ontop_fcontext .type ontop_fcontext,@function .align 16 ontop_fcontext: + _CET_ENDBR /* preserve ontop-function in R8 */ movq %rdx, %r8 From 0504518eff7cb63999f25c12176383e5472ecb40 Mon Sep 17 00:00:00 2001 From: Ronak Buch Date: Wed, 23 Nov 2022 12:08:03 -0500 Subject: [PATCH 002/155] CI: Install UCX from apt This keeps UCX reasonably up to date rather than using a fixed version as we previously did. --- .github/workflows/ucx.yml | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ucx.yml b/.github/workflows/ucx.yml index d6cd5bc3c7..3d867907d3 100644 --- a/.github/workflows/ucx.yml +++ b/.github/workflows/ucx.yml @@ -1,4 +1,4 @@ -name: UCX 1.9.0 Linux +name: UCX Linux on: pull_request @@ -6,7 +6,7 @@ jobs: build: timeout-minutes: 60 - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v1 @@ -19,15 +19,7 @@ jobs: - name: install-prerequisites run: | sudo apt-get update - sudo apt-get install libevent-dev libhwloc-dev - - name: build-ucx - run: | - git clone --recursive --depth 1 --shallow-submodules --branch v1.9.0 https://github.com/openucx/ucx.git - cd ucx - ./autogen.sh - ./contrib/configure-release --disable-numa --without-java - make -j4 - sudo make install + sudo apt-get install libucx-dev libevent-dev libhwloc-dev - name: build-openpmix run: | wget https://github.com/openpmix/openpmix/releases/download/v3.1.5/pmix-3.1.5.tar.gz From 17505055dd9c214c5ed4f687cac2f251a18a945f Mon Sep 17 00:00:00 2001 From: Zane Fink Date: Tue, 3 Jan 2023 11:23:32 -0600 Subject: [PATCH 003/155] Option to Disable TLS (#3663) --- CMakeLists.txt | 9 ++++++++- buildcmake | 5 +++++ cmake/detect-features-cxx.cmake | 2 +- src/scripts/charmc | 7 ++++++- src/scripts/configure.ac | 26 +++++++++++++++++++++----- 5 files changed, 41 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e0bbc69f1b..47c2ead332 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -954,6 +954,13 @@ endif() file(APPEND ${optfile_sh} "CMK_NO_BUILD_SHARED=${CMK_NO_BUILD_SHARED}\n") +if(DISABLE_TLS) + set(CMK_SUPPORTS_TLSGLOBALS "0") + set(CMK_USER_DISABLED_TLS "1") +else() + set(CMK_USER_DISABLED_TLS "0") +endif() + foreach(l BUILDOPTS CMK_AMPI_WITH_ROMIO CMK_BUILD_PYTHON CMK_CAN_LINK_FORTRAN CMK_CHARMDEBUG CMK_COMPILER_KNOWS_TLSDIRECTSEGREFS CMK_HAS_INT16 CMK_HAS_MMAP CMK_LIBJPEG CMK_MOD_EXT CMK_SUPPORTS_FSGLOBALS CMK_SUPPORTS_PIPGLOBALS @@ -963,7 +970,7 @@ foreach(l BUILDOPTS CMK_AMPI_WITH_ROMIO CMK_BUILD_PYTHON CMK_CAN_LINK_FORTRAN CXX_NO_AS_NEEDED LDXX_WHOLE_ARCHIVE_PRE LDXX_WHOLE_ARCHIVE_POST CMK_MACOSX CMK_POST_EXE CMK_SHARED_SUF CMK_USER_SUFFIX OPTS_LD CMK_COMPILER_KNOWS_FVISIBILITY CMK_LINKER_KNOWS_UNDEFINED - CMK_SUPPORTS_MEMORY_ISOMALLOC CUDA_DIR) + CMK_SUPPORTS_MEMORY_ISOMALLOC CUDA_DIR CMK_USER_DISABLED_TLS) file(APPEND ${optfile_sh} "${l}=\"${${l}}\"\n" ) endforeach(l) diff --git a/buildcmake b/buildcmake index 8feb52b67d..a7bd9a621e 100755 --- a/buildcmake +++ b/buildcmake @@ -103,6 +103,7 @@ opt_charmdebug=0 opt_controlpoint=0 opt_cuda=0 opt_destination="" +opt_disabletls=0 opt_install_prefix="" opt_drone_mode=0 opt_error_checking= #undef @@ -410,6 +411,9 @@ function processArgs() { --destination=*) opt_destination=${arg#*=} ;; + --disable-tls) + opt_disabletls=1 + ;; --install-prefix=*) opt_install_prefix=${arg#*=} ;; @@ -611,6 +615,7 @@ CC=$opt_CC CXX=$opt_CXX FC=$opt_FC cmake "$my_srcdir" \ -DCHARMDEBUG="$opt_charmdebug" \ -DCONTROLPOINT="$opt_controlpoint" \ -DCUDA="$opt_cuda" \ + -DDISABLE_TLS="$opt_disabletls" \ -DDRONE_MODE="$opt_drone_mode" \ -DERROR_CHECKING="$opt_error_checking" \ -DEXTRA_OPTS="${opt_extra_opts[*]}" \ diff --git a/cmake/detect-features-cxx.cmake b/cmake/detect-features-cxx.cmake index d3aa6ab947..f982d9abca 100644 --- a/cmake/detect-features-cxx.cmake +++ b/cmake/detect-features-cxx.cmake @@ -39,7 +39,7 @@ endif() # Needed so that tlsglobals works correctly with --build-shared # See https://github.com/UIUC-PPL/charm/issues/3168 for details. check_cxx_compiler_flag("-ftls-model=initial-exec" CMK_COMPILER_KNOWS_FTLS_MODEL) -if(CMK_COMPILER_KNOWS_FTLS_MODEL) +if(CMK_COMPILER_KNOWS_FTLS_MODEL AND NOT DISABLE_TLS) set(OPTS_CC "${OPTS_CC} -ftls-model=initial-exec") set(OPTS_CXX "${OPTS_CXX} -ftls-model=initial-exec") set(OPTS_LD "${OPTS_LD} -ftls-model=initial-exec") diff --git a/src/scripts/charmc b/src/scripts/charmc index c1dfb7d210..30733b63b8 100755 --- a/src/scripts/charmc +++ b/src/scripts/charmc @@ -1472,7 +1472,12 @@ if [ "$TLSGLOBALS" = "1" ] then if [[ "$CMK_SUPPORTS_TLSGLOBALS" = '0' ]] then - echo "Error: -tlsglobals is not supported on $CMK_VDIR" + if [[ "$CMK_USER_DISABLED_TLS" = '1' ]] + then + echo "Error: Charm was built with '--disable-tls' and -tlsglobals is not available." + else + echo "Error: -tlsglobals is not supported on $CMK_VDIR" + fi exit 1 elif [[ "$CMK_SUPPORTS_TLSGLOBALS" = '2' ]] then diff --git a/src/scripts/configure.ac b/src/scripts/configure.ac index f6cdcf2d40..3cb724c2cc 100644 --- a/src/scripts/configure.ac +++ b/src/scripts/configure.ac @@ -210,6 +210,12 @@ else add_make_flag 'CMK_TRACE_ENABLED:=1' 'tracing' fi +AC_ARG_ENABLE([tls], + [AS_HELP_STRING([--enable-tls], + [enable tls support])], + [enable_tls=$enableval], + [enable_tls=yes]) + AC_ARG_ENABLE([tracing-commthread], [AS_HELP_STRING([--enable-tracing-commthread], [enable tracing communication thread])], , @@ -823,10 +829,13 @@ fi test_cxx "whether C++ compiler accepts -ftls-model=initial-exec" "yes" "no" "-ftls-model=initial-exec" if test $strictpass -eq 1 then - add_flag 'CMK_COMPILER_KNOWS_FTLS_MODEL="1"' "tlsglobals" - OPTS_CC="$OPTS_CC -ftls-model=initial-exec" - OPTS_CXX="$OPTS_CXX -ftls-model=initial-exec" - OPTS_LD="$OPTS_LD -ftls-model=initial-exec" + if test "$enable_tls" = "yes" + then + add_flag 'CMK_COMPILER_KNOWS_FTLS_MODEL="1"' "tlsglobals" + OPTS_CC="$OPTS_CC -ftls-model=initial-exec" + OPTS_CXX="$OPTS_CXX -ftls-model=initial-exec" + OPTS_LD="$OPTS_LD -ftls-model=initial-exec" + fi fi # Test for a flag important for shared linking @@ -2582,6 +2591,14 @@ then fi fi +if test "$enable_tls" = "yes" +then + add_flag 'CMK_USER_DISABLED_TLS="0"' "tlsglobals" +else + add_flag 'CMK_USER_DISABLED_TLS="1"' "tlsglobals" + CMK_SUPPORTS_TLSGLOBALS='0' +fi + AC_DEFINE_UNQUOTED(CMK_SUPPORTS_SWAPGLOBALS, $CMK_SUPPORTS_SWAPGLOBALS, [whether supports swapglobals]) add_flag "CMK_SUPPORTS_SWAPGLOBALS=$CMK_SUPPORTS_SWAPGLOBALS" 'swapglobals' add_make_flag "CMK_SUPPORTS_SWAPGLOBALS:=$CMK_SUPPORTS_SWAPGLOBALS" 'swapglobals' @@ -2589,7 +2606,6 @@ AC_DEFINE_UNQUOTED(CMK_SUPPORTS_TLSGLOBALS, $CMK_SUPPORTS_TLSGLOBALS, [whether s add_flag "CMK_SUPPORTS_TLSGLOBALS=$CMK_SUPPORTS_TLSGLOBALS" 'tlsglobals' add_make_flag "CMK_SUPPORTS_TLSGLOBALS:=$CMK_SUPPORTS_TLSGLOBALS" 'tlsglobals' - #### test if has Multiprocessing.h for apple #### cat > $t < From 6de291bcc9ba8ac33a3c06f706522955834773af Mon Sep 17 00:00:00 2001 From: Thomas Quinn Date: Tue, 17 Jan 2023 08:34:38 -0800 Subject: [PATCH 004/155] BcastQueue: fill shuffle space with nullptr (#3681) Co-authored-by: Zane Fink --- src/ck-core/ckarray.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ck-core/ckarray.h b/src/ck-core/ckarray.h index d87b053491..968500935f 100644 --- a/src/ck-core/ckarray.h +++ b/src/ck-core/ckarray.h @@ -991,6 +991,8 @@ class CkArrayBroadcaster : public CkArrayListener storage.begin()); std::move(storage.begin() + oldSize, storage.begin() + oldSize + headIndex, storage.begin() + oldSize - headIndex); + std::fill(storage.begin() + oldSize, storage.begin() + oldSize + headIndex, + nullptr); headIndex = 0; } } From 77b861f674bf7c644a4dc4f93fb7d4fad9c74a72 Mon Sep 17 00:00:00 2001 From: Ronak Buch Date: Wed, 23 Nov 2022 03:54:48 -0500 Subject: [PATCH 005/155] CUDA: Add to buddy_allocator for size_t --- src/arch/cuda/hybridAPI/buddy_allocator.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/arch/cuda/hybridAPI/buddy_allocator.h b/src/arch/cuda/hybridAPI/buddy_allocator.h index 29d8707fd3..5c7fa17c36 100644 --- a/src/arch/cuda/hybridAPI/buddy_allocator.h +++ b/src/arch/cuda/hybridAPI/buddy_allocator.h @@ -1,6 +1,7 @@ #ifndef __BUDDY_ALLOCATOR_H_ #define __BUDDY_ALLOCATOR_H_ +#include #include #include #include From db72e7370eedcbc695460c9141327f36feccc102 Mon Sep 17 00:00:00 2001 From: Ronak Buch Date: Tue, 24 Jan 2023 17:53:01 -0500 Subject: [PATCH 006/155] Deprecate "atomic" SDAG keyword (#3685) Replaces usages of "atomic" with "serial" and documents "atomic" as being deprecated. --- doc/charm++/manual.rst | 21 +++++++--------- src/langs/sdag/examples/ex0/ex0.sdag | 10 ++++---- src/langs/sdag/examples/ex1/ex1.sdag | 12 ++++----- src/langs/sdag/examples/ex2/ex2.sdag | 4 +-- src/langs/sdag/examples/ex3/ex3.sdag | 10 ++++---- src/langs/sdag/examples/ex4/ex4.sdag | 12 ++++----- src/langs/sdag/examples/ex5/ex5.sdag | 8 +++--- src/langs/sdag/examples/lu/lu.sdag | 30 +++++++++++------------ src/langs/sdag/examples/ring/ring.sdag | 8 +++--- src/libs/ck-libs/completion/completion.ci | 14 +++++------ 10 files changed, 63 insertions(+), 66 deletions(-) diff --git a/doc/charm++/manual.rst b/doc/charm++/manual.rst index ea83217e06..2648d42189 100644 --- a/doc/charm++/manual.rst +++ b/doc/charm++/manual.rst @@ -1659,17 +1659,14 @@ and code blocks that they define. These definitions appear in the ``.ci`` file definition of the enclosing chare class as a ‘body’ of an entry method following its signature. -The most basic construct in SDAG is the ``serial`` (aka the ``atomic``) -block. Serial blocks contain sequential C++ code. They’re also called -atomic because the code within them executes without returning control -to the Charm++ runtime scheduler, and thus avoiding interruption from -incoming messages. The keywords atomic and serial are synonymous, and -you can find example programs that use atomic. However, we recommend the -use of serial and are considering the deprecation of the atomic keyword. -Typically serial blocks hold the code that actually deals with incoming -messages in a ``when`` statement, or to do local operations before a -message is sent or after it’s received. The earlier example can be -adapted to use serial blocks as follows: +The most basic construct in SDAG is the ``serial`` block (previously also +denoted by ``atomic``, this usage is now deprecated). Serial blocks contain +sequential C++ code, and the code within them executes to completion without +returning control to the Charm++ runtime scheduler, thus avoiding interruption +from incoming messages. Typically, serial blocks hold the code that actually +deals with incoming messages in a ``when`` statement or performs local +operations before a message is sent or after it is received. The earlier example +can be adapted to use serial blocks as follows: .. code-block:: charmci @@ -12697,7 +12694,7 @@ and cannot appear as variable or entry method names in a ``.ci`` file: - SDAG constructs - - atomic + - atomic (deprecated) - serial diff --git a/src/langs/sdag/examples/ex0/ex0.sdag b/src/langs/sdag/examples/ex0/ex0.sdag index 0aa558dd28..63bed456c2 100644 --- a/src/langs/sdag/examples/ex0/ex0.sdag +++ b/src/langs/sdag/examples/ex0/ex0.sdag @@ -1,16 +1,16 @@ class example1 sdagentry init (INIT *m) { - atomic + serial { initialize(m); i = 0; j = 1; } when rcv(MSG *m1) - atomic{process(m1);} - atomic { i++; } - atomic { j++; } - atomic { i--; } + serial{process(m1);} + serial { i++; } + serial { j++; } + serial { i--; } } diff --git a/src/langs/sdag/examples/ex1/ex1.sdag b/src/langs/sdag/examples/ex1/ex1.sdag index c5df0fc1de..f2fca899b2 100644 --- a/src/langs/sdag/examples/ex1/ex1.sdag +++ b/src/langs/sdag/examples/ex1/ex1.sdag @@ -1,21 +1,21 @@ class example1 sdagentry init (INIT *m) { - atomic { initialize(m); } + serial { initialize(m); } overlap { when e1(MSGTYPE1 *m1) - atomic {c1(m1);} + serial {c1(m1);} when e2(MSGTYPE2 *m2) - atomic {c2(m2);} + serial {c2(m2);} { when e3(MSGTYPE *m3) - atomic {c3(m3);} + serial {c3(m3);} when e4(MSGTYPE *m4) - atomic {c4(m4);} + serial {c4(m4);} } } when e3(MSGTYPE *m3) - atomic{c3(m3);} + serial{c3(m3);} } diff --git a/src/langs/sdag/examples/ex2/ex2.sdag b/src/langs/sdag/examples/ex2/ex2.sdag index 027c20f691..c11b25b155 100644 --- a/src/langs/sdag/examples/ex2/ex2.sdag +++ b/src/langs/sdag/examples/ex2/ex2.sdag @@ -1,12 +1,12 @@ class mult_chare sdagentry init(MSG *msg) { - atomic + serial { MyChareID(&mychareid); TblFind(ATable, msg->row_index, recv_row, &mychareid, TBL_NEVER_WAIT); TblFind(BTable, msg->col_index, revc_col, &mychareid, TBL_NEVER_WAIT); } when recv_row(TBL_MSG *row), recv_col(TBL_MSG *col) - atomic { multiply(row->data, col->data); } + serial { multiply(row->data, col->data); } } diff --git a/src/langs/sdag/examples/ex3/ex3.sdag b/src/langs/sdag/examples/ex3/ex3.sdag index 7190db130f..3ca5737998 100644 --- a/src/langs/sdag/examples/ex3/ex3.sdag +++ b/src/langs/sdag/examples/ex3/ex3.sdag @@ -2,12 +2,12 @@ class jacobi sdagentry init(MSGINIT *msg) { - atomic { + serial { initialize(); convdone = FALSE; } while(!convdone) { - atomic { + serial { for (dir=0; dir<4; dir++) { m[dir] = copy_boundary(dir); SendMsgBranch(entry_no[dir],m[dir],nbr[dir]); @@ -15,13 +15,13 @@ sdagentry init(MSGINIT *msg) } when NORTH(BOUNDARY *north), SOUTH(BOUNDARY *south), EAST(BOUNDARY *east), WEST(BOUNDARY *west) { - atomic { + serial { update(north, south, east, west); reduction(my_conv, CONVERGE, &mycid); } } when CONVERGE(CONV *conv) - atomic{convdone = conv->done;} + serial{convdone = conv->done;} } - atomic { print_results(); } + serial { print_results(); } } diff --git a/src/langs/sdag/examples/ex4/ex4.sdag b/src/langs/sdag/examples/ex4/ex4.sdag index 7f9619da19..47a946c6de 100644 --- a/src/langs/sdag/examples/ex4/ex4.sdag +++ b/src/langs/sdag/examples/ex4/ex4.sdag @@ -2,12 +2,12 @@ class Harlow_Welch sdagentry init(MSGINIT *msg) { - atomic { initialize(); } + serial { initialize(); } forall[i](0:Z-1,1) - atomic { convdone[i] = FALSE; } + serial { convdone[i] = FALSE; } forall[i](0:Z-1,1) { while(!convdone[i]) { - atomic { + serial { for (dir=0; dir<4; dir++) { m[i][dir] = copy_boundary(i,dir); SendMsgBranch(entry_no[dir],m[i][dir],nbr[i][dir]); @@ -15,15 +15,15 @@ sdagentry init(MSGINIT *msg) } when NORTH(BOUNDARY *north), SOUTH(BOUNDARY *south), EAST(BOUNDARY *east), WEST(BOUNDARY *west) { - atomic { + serial { update(i, north, south, east, west); reduction(my_conv, i, CONVERGE, &mycid); } } when CONVERGE[i](CONV *conv) - atomic{convdone[i] = conv->done;} + serial{convdone[i] = conv->done;} } } - atomic { print_results(); } + serial { print_results(); } } diff --git a/src/langs/sdag/examples/ex5/ex5.sdag b/src/langs/sdag/examples/ex5/ex5.sdag index 2b21dc822e..ce8bef7f39 100644 --- a/src/langs/sdag/examples/ex5/ex5.sdag +++ b/src/langs/sdag/examples/ex5/ex5.sdag @@ -2,7 +2,7 @@ class example sdagentry sample (M *msg) { - atomic{ + serial{ i=0; MyChareID(&thisID); buf1 = (M *) CkAllocMsg(M); @@ -14,11 +14,11 @@ sdagentry sample (M *msg) } overlap { when ep1(M *m1), ep2(M *m2) { - atomic { i++; } + serial { i++; } } when ep3(M *m3) { - atomic { i += 2; } + serial { i += 2; } } } - atomic{CkPrintf("i = %d\n");} + serial{CkPrintf("i = %d\n");} } diff --git a/src/langs/sdag/examples/lu/lu.sdag b/src/langs/sdag/examples/lu/lu.sdag index 34b5847458..cc4991b03e 100644 --- a/src/langs/sdag/examples/lu/lu.sdag +++ b/src/langs/sdag/examples/lu/lu.sdag @@ -2,7 +2,7 @@ class cube sdagentry iterations (InitMessage *mesg) { - atomic { + serial { Initialization(); SendMessage(xmnbr,rhs_entry_xp1,xmmsg); SendMessage(xpnbr,rhs_entry_xm1,xpmsg); @@ -12,23 +12,23 @@ sdagentry iterations (InitMessage *mesg) SendMessage(zpnbr,rhs_entry_zm1,zpmsg); } while(iter 0) { - atomic { + serial { int counts[2]; counts[0] = produced; // Move up to first reduction loop counts[1] = consumed; @@ -44,12 +44,12 @@ module completion { CkCallback(CkReductionTarget(CompletionDetector, count_consumed), thisgroup)); } - when count_consumed(int produced_global, int consumed_global) atomic { + when count_consumed(int produced_global, int consumed_global) serial { unconsumed = produced_global - consumed_global; } } - atomic "completion finished" { + serial "completion finished" { init(); CkAssert(!finish.isInvalid()); contribute(finish); From 089db1a11e571e334352363067701e1cb6a6655f Mon Sep 17 00:00:00 2001 From: Ronak Buch Date: Thu, 9 Feb 2023 18:47:39 -0500 Subject: [PATCH 007/155] CI: Trigger on "merge_group" event to support GitHub merge queues --- .github/workflows/buildold.yml | 2 +- .github/workflows/changa.yml | 2 +- .github/workflows/charm4py.yml | 2 +- .github/workflows/cuda.yml | 2 +- .github/workflows/doc.yml | 1 + .github/workflows/mpi_linux_smp.yml | 2 +- .github/workflows/multicore_darwin.yml | 2 +- .github/workflows/namd.yml | 2 +- .github/workflows/netlrts_darwin.yml | 2 +- .github/workflows/netlrts_linux_i386.yml | 2 +- .github/workflows/shellcheck.yml | 2 +- .github/workflows/spack.yml | 7 +++++-- .github/workflows/syncft_mpi.yml | 2 +- .github/workflows/syncft_netlrts.yml | 2 +- .github/workflows/ucx.yml | 2 +- .github/workflows/verbs.yml | 2 +- .github/workflows/windows.yml | 2 +- 17 files changed, 21 insertions(+), 17 deletions(-) diff --git a/.github/workflows/buildold.yml b/.github/workflows/buildold.yml index 2b8ebe04d8..244cc26270 100644 --- a/.github/workflows/buildold.yml +++ b/.github/workflows/buildold.yml @@ -1,6 +1,6 @@ name: NetLRTS Linux buildold -on: pull_request +on: [pull_request, merge_group] jobs: build: diff --git a/.github/workflows/changa.yml b/.github/workflows/changa.yml index 8f4d0746bf..d3d3bd6762 100644 --- a/.github/workflows/changa.yml +++ b/.github/workflows/changa.yml @@ -1,6 +1,6 @@ name: ChaNGa -on: pull_request +on: [pull_request, merge_group] jobs: build: diff --git a/.github/workflows/charm4py.yml b/.github/workflows/charm4py.yml index 9c04244608..eb8f5723f2 100644 --- a/.github/workflows/charm4py.yml +++ b/.github/workflows/charm4py.yml @@ -1,6 +1,6 @@ name: Charm4py -on: pull_request +on: [pull_request, merge_group] jobs: build: diff --git a/.github/workflows/cuda.yml b/.github/workflows/cuda.yml index 061fc4bce0..1b921c3cdb 100644 --- a/.github/workflows/cuda.yml +++ b/.github/workflows/cuda.yml @@ -2,7 +2,7 @@ name: NetLRTS Linux CUDA buildonly # Buildonly test, as CUDA needs an actual device to run. -on: pull_request +on: [pull_request, merge_group] jobs: build: diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index c6fabd9e04..866616fdf5 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -4,6 +4,7 @@ name: Sphinx-doc # in doc/ is changed. on: + merge_group: pull_request: paths: - 'doc/**' diff --git a/.github/workflows/mpi_linux_smp.yml b/.github/workflows/mpi_linux_smp.yml index 899aca78be..9bfede622e 100644 --- a/.github/workflows/mpi_linux_smp.yml +++ b/.github/workflows/mpi_linux_smp.yml @@ -1,6 +1,6 @@ name: MPI Linux SMP -on: pull_request +on: [pull_request, merge_group] jobs: build: diff --git a/.github/workflows/multicore_darwin.yml b/.github/workflows/multicore_darwin.yml index 653ab6556f..31d2c3f0e9 100644 --- a/.github/workflows/multicore_darwin.yml +++ b/.github/workflows/multicore_darwin.yml @@ -1,6 +1,6 @@ name: Multicore Darwin tracing -on: pull_request +on: [pull_request, merge_group] jobs: build: diff --git a/.github/workflows/namd.yml b/.github/workflows/namd.yml index cd9145ac8b..550981b81b 100644 --- a/.github/workflows/namd.yml +++ b/.github/workflows/namd.yml @@ -1,6 +1,6 @@ name: NAMD -on: pull_request +on: [pull_request, merge_group] jobs: # Not named 'build' since 'build' is used by our CI for builds that must succeed before merge. diff --git a/.github/workflows/netlrts_darwin.yml b/.github/workflows/netlrts_darwin.yml index f4ebaa8727..73f7167bd3 100644 --- a/.github/workflows/netlrts_darwin.yml +++ b/.github/workflows/netlrts_darwin.yml @@ -1,6 +1,6 @@ name: NetLRTS Darwin -on: pull_request +on: [pull_request, merge_group] jobs: build: diff --git a/.github/workflows/netlrts_linux_i386.yml b/.github/workflows/netlrts_linux_i386.yml index 6e2ac17ec8..49f2b87c5e 100644 --- a/.github/workflows/netlrts_linux_i386.yml +++ b/.github/workflows/netlrts_linux_i386.yml @@ -1,6 +1,6 @@ name: NetLRTS Linux i386 -on: pull_request +on: [pull_request, merge_group] jobs: build: diff --git a/.github/workflows/shellcheck.yml b/.github/workflows/shellcheck.yml index 86ca22c0cf..ff175a4994 100644 --- a/.github/workflows/shellcheck.yml +++ b/.github/workflows/shellcheck.yml @@ -3,7 +3,7 @@ name: ShellCheck # See https://github.com/koalaman/shellcheck/wiki # for explanations of ShellCheck error codes -on: pull_request +on: [pull_request, merge_group] jobs: build: diff --git a/.github/workflows/spack.yml b/.github/workflows/spack.yml index 8b70b7cf38..b9bbf03e48 100644 --- a/.github/workflows/spack.yml +++ b/.github/workflows/spack.yml @@ -1,6 +1,6 @@ name: Spack -on: pull_request +on: [pull_request, merge_group] jobs: build: @@ -27,7 +27,10 @@ jobs: sed -i -e 's,="main",="${{ github.head_ref }}",' var/spack/repos/builtin/packages/charmpp/package.py # Use a fork, not the main repo - sed -i -e 's,UIUC-PPL/charm.git,${{github.event.pull_request.head.repo.full_name}},' var/spack/repos/builtin/packages/charmpp/package.py + # If in merge_group mode, the branch should be created in the main repo + if [[ ${{ github.event_name }} == 'pull_request' ]]; then + sed -i -e 's,UIUC-PPL/charm.git,${{github.event.pull_request.head.repo.full_name}},' var/spack/repos/builtin/packages/charmpp/package.py + fi # Compile with debug symbols sed -i -e 's,build(target,options.append("-g"); build(target,' var/spack/repos/builtin/packages/charmpp/package.py diff --git a/.github/workflows/syncft_mpi.yml b/.github/workflows/syncft_mpi.yml index 87b5d5d932..27f27f8878 100644 --- a/.github/workflows/syncft_mpi.yml +++ b/.github/workflows/syncft_mpi.yml @@ -1,6 +1,6 @@ name: MPI Linux SyncFT -on: pull_request +on: [pull_request, merge_group] jobs: build: diff --git a/.github/workflows/syncft_netlrts.yml b/.github/workflows/syncft_netlrts.yml index d24526d885..c2157d7040 100644 --- a/.github/workflows/syncft_netlrts.yml +++ b/.github/workflows/syncft_netlrts.yml @@ -1,6 +1,6 @@ name: NetLRTS Linux SyncFT -on: pull_request +on: [pull_request, merge_group] jobs: build: diff --git a/.github/workflows/ucx.yml b/.github/workflows/ucx.yml index 3d867907d3..121c9f1be5 100644 --- a/.github/workflows/ucx.yml +++ b/.github/workflows/ucx.yml @@ -1,6 +1,6 @@ name: UCX Linux -on: pull_request +on: [pull_request, merge_group] jobs: build: diff --git a/.github/workflows/verbs.yml b/.github/workflows/verbs.yml index 6a4caccd1a..de709936f8 100644 --- a/.github/workflows/verbs.yml +++ b/.github/workflows/verbs.yml @@ -4,7 +4,7 @@ name: Verbs Linux Buildonly Tarball # Also test packaging a tarball and building from it. # Since it is buildonly, test both build and buildold with the tarball. -on: pull_request +on: [pull_request, merge_group] jobs: build: diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 4740ad4b86..bc753b5495 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -1,6 +1,6 @@ name: NetLRTS Windows -on: pull_request +on: [pull_request, merge_group] jobs: build: From 9cf58e35b34afb94dbdbd5d9700374bee59914aa Mon Sep 17 00:00:00 2001 From: Sam White Date: Fri, 25 Feb 2022 11:42:39 -0600 Subject: [PATCH 008/155] AMPI: sort neighbor ranks by PE-local or not for better comm overlap --- src/libs/ck-libs/ampi/ampi.C | 37 +++++++++++++++++++++++--------- src/libs/ck-libs/ampi/ampiimpl.h | 7 ++++++ 2 files changed, 34 insertions(+), 10 deletions(-) diff --git a/src/libs/ck-libs/ampi/ampi.C b/src/libs/ck-libs/ampi/ampi.C index e17ae90d53..38ecb785b3 100644 --- a/src/libs/ck-libs/ampi/ampi.C +++ b/src/libs/ck-libs/ampi/ampi.C @@ -2460,6 +2460,13 @@ void ampi::commCreatePhase1(int nextComm, int commType) noexcept { } /* Virtual topology communicator creation */ +void ampiTopology::sortnbors(CProxy_ampi arrProxy, std::vector &nbors_) noexcept { + if (nbors_.size() > 1) { + // Sort neighbors so that non-PE-local ranks are before PE-local ranks, so that + // we can overlap non-local messages with local ones which happen inline + std::partition(nbors_.begin(), nbors_.end(), [&](int idx) { return !arrProxy[idx].ckLocal(); } ); + } +} // 0-dimensional cart comm: rank 0 creates a dup of COMM_SELF with topo info. MPI_Comm ampi::cartCreate0D() noexcept { @@ -9012,7 +9019,8 @@ AMPI_API_IMPL(int, MPI_Neighbor_alltoall, const void* sendbuf, int sendcount, MP if (ptr->getSize() == 1) return copyDatatype(sendtype, sendcount, recvtype, recvcount, sendbuf, recvbuf); - const std::vector& neighbors = ptr->getNeighbors(); + std::vector& neighbors = ptr->getNeighbors(); + ptr->sortNeighborsByLocality(neighbors); int num_neighbors = neighbors.size(); int itemsize = getDDT()->getSize(sendtype) * sendcount; int extent = getDDT()->getExtent(recvtype) * recvcount; @@ -9067,7 +9075,8 @@ AMPI_API_IMPL(int, MPI_Ineighbor_alltoall, const void* sendbuf, int sendcount, M return copyDatatype(sendtype, sendcount, recvtype, recvcount, sendbuf, recvbuf); } - const std::vector& neighbors = ptr->getNeighbors(); + std::vector& neighbors = ptr->getNeighbors(); + ptr->sortNeighborsByLocality(neighbors); int num_neighbors = neighbors.size(); int itemsize = getDDT()->getSize(sendtype) * sendcount; int extent = getDDT()->getExtent(recvtype) * recvcount; @@ -9117,7 +9126,8 @@ AMPI_API_IMPL(int, MPI_Neighbor_alltoallv, const void* sendbuf, const int *sendc if (ptr->getSize() == 1) return copyDatatype(sendtype, sendcounts[0], recvtype, recvcounts[0], sendbuf, recvbuf); - const std::vector& neighbors = ptr->getNeighbors(); + std::vector& neighbors = ptr->getNeighbors(); + ptr->sortNeighborsByLocality(neighbors); int num_neighbors = neighbors.size(); int itemsize = getDDT()->getSize(sendtype); int extent = getDDT()->getExtent(recvtype); @@ -9173,7 +9183,8 @@ AMPI_API_IMPL(int, MPI_Ineighbor_alltoallv, const void* sendbuf, const int *send return copyDatatype(sendtype, sendcounts[0], recvtype, recvcounts[0], sendbuf, recvbuf); } - const std::vector& neighbors = ptr->getNeighbors(); + std::vector& neighbors = ptr->getNeighbors(); + ptr->sortNeighborsByLocality(neighbors); int num_neighbors = neighbors.size(); int itemsize = getDDT()->getSize(sendtype); int extent = getDDT()->getExtent(recvtype); @@ -9223,7 +9234,8 @@ AMPI_API_IMPL(int, MPI_Neighbor_alltoallw, const void* sendbuf, const int *sendc if (ptr->getSize() == 1) return copyDatatype(sendtypes[0], sendcounts[0], recvtypes[0], recvcounts[0], sendbuf, recvbuf); - const std::vector& neighbors = ptr->getNeighbors(); + std::vector& neighbors = ptr->getNeighbors(); + ptr->sortNeighborsByLocality(neighbors); int num_neighbors = neighbors.size(); std::vector reqs(num_neighbors*2); @@ -9277,7 +9289,8 @@ AMPI_API_IMPL(int, MPI_Ineighbor_alltoallw, const void* sendbuf, const int *send return copyDatatype(sendtypes[0], sendcounts[0], recvtypes[0], recvcounts[0], sendbuf, recvbuf); } - const std::vector& neighbors = ptr->getNeighbors(); + std::vector& neighbors = ptr->getNeighbors(); + ptr->sortNeighborsByLocality(neighbors); int num_neighbors = neighbors.size(); // use an ATAReq to non-block the caller and get a request ptr @@ -9325,7 +9338,8 @@ AMPI_API_IMPL(int, MPI_Neighbor_allgather, const void* sendbuf, int sendcount, M if (ptr->getSize() == 1) return copyDatatype(sendtype, sendcount, recvtype, recvcount, sendbuf, recvbuf); - const std::vector& neighbors = ptr->getNeighbors(); + std::vector& neighbors = ptr->getNeighbors(); + ptr->sortNeighborsByLocality(neighbors); int num_neighbors = neighbors.size(); int extent = getDDT()->getExtent(recvtype) * recvcount; @@ -9379,7 +9393,8 @@ AMPI_API_IMPL(int, MPI_Ineighbor_allgather, const void* sendbuf, int sendcount, return copyDatatype(sendtype, sendcount, recvtype, recvcount, sendbuf, recvbuf); } - const std::vector& neighbors = ptr->getNeighbors(); + std::vector& neighbors = ptr->getNeighbors(); + ptr->sortNeighborsByLocality(neighbors); int num_neighbors = neighbors.size(); // use an ATAReq to non-block the caller and get a request ptr @@ -9428,7 +9443,8 @@ AMPI_API_IMPL(int, MPI_Neighbor_allgatherv, const void* sendbuf, int sendcount, if (ptr->getSize() == 1) return copyDatatype(sendtype, sendcount, recvtype, recvcounts[0], sendbuf, recvbuf); - const std::vector& neighbors = ptr->getNeighbors(); + std::vector& neighbors = ptr->getNeighbors(); + ptr->sortNeighborsByLocality(neighbors); int num_neighbors = neighbors.size(); int extent = getDDT()->getExtent(recvtype); std::vector reqs(num_neighbors*2); @@ -9480,7 +9496,8 @@ AMPI_API_IMPL(int, MPI_Ineighbor_allgatherv, const void* sendbuf, int sendcount, return copyDatatype(sendtype, sendcount, recvtype, recvcounts[0], sendbuf, recvbuf); } - const std::vector& neighbors = ptr->getNeighbors(); + std::vector& neighbors = ptr->getNeighbors(); + ptr->sortNeighborsByLocality(neighbors); int num_neighbors = neighbors.size(); // use an ATAReq to non-block the caller and get a request ptr diff --git a/src/libs/ck-libs/ampi/ampiimpl.h b/src/libs/ck-libs/ampi/ampiimpl.h index b3eeb85b4b..37c4f59400 100644 --- a/src/libs/ck-libs/ampi/ampiimpl.h +++ b/src/libs/ck-libs/ampi/ampiimpl.h @@ -575,8 +575,10 @@ class ampiTopology { virtual void pup(PUP::er &p) noexcept =0; virtual int getType() const noexcept =0; virtual void dup(ampiTopology* topo) noexcept =0; + virtual std::vector &getnbors() noexcept =0; virtual const std::vector &getnbors() const noexcept =0; virtual void setnbors(const std::vector &nbors_) noexcept =0; + virtual void sortnbors(CProxy_ampi arrProxy, std::vector &nbors_) noexcept; virtual const std::vector &getdims() const noexcept {CkAbort("AMPI: instance of invalid Virtual Topology class."); return v;} virtual const std::vector &getperiods() const noexcept {CkAbort("AMPI: instance of invalid Virtual Topology class."); return v;} @@ -637,6 +639,7 @@ class ampiCartTopology final : public ampiTopology { inline const std::vector &getdims() const noexcept {return dims;} inline const std::vector &getperiods() const noexcept {return periods;} inline int getndims() const noexcept {return ndims;} + inline std::vector &getnbors() noexcept {return nbors;} inline const std::vector &getnbors() const noexcept {return nbors;} inline void setdims(const std::vector &d) noexcept {dims = d; dims.shrink_to_fit();} @@ -672,6 +675,7 @@ class ampiGraphTopology final : public ampiTopology { inline int getnvertices() const noexcept {return nvertices;} inline const std::vector &getindex() const noexcept {return index;} inline const std::vector &getedges() const noexcept {return edges;} + inline std::vector &getnbors() noexcept {return nbors;} inline const std::vector &getnbors() const noexcept {return nbors;} inline void setnvertices(int nv) noexcept {nvertices = nv;} @@ -723,6 +727,7 @@ class ampiDistGraphTopology final : public ampiTopology { inline const std::vector &getDestWeights() const noexcept {return destWeights;} inline bool areSourcesWeighted() const noexcept {return sourcesWeighted;} inline bool areDestsWeighted() const noexcept {return destsWeighted;} + inline std::vector &getnbors() noexcept {return nbors;} inline const std::vector &getnbors() const noexcept {return nbors;} inline void setAreSourcesWeighted(bool v) noexcept {sourcesWeighted = v ? 1 : 0;} @@ -2881,6 +2886,8 @@ class ampi final : public CBase_ampi { inline int getIndexForRank(int r) const noexcept {return myComm->getIndexForRank(r);} inline int getIndexForRemoteRank(int r) const noexcept {return myComm->getIndexForRemoteRank(r);} void findNeighbors(MPI_Comm comm, int rank, std::vector& neighbors) const noexcept; + inline void sortNeighborsByLocality(std::vector& nbors) noexcept { myComm->getTopology()->sortnbors(thisProxy, nbors); } + inline std::vector& getNeighbors() noexcept { return myComm->getTopology()->getnbors(); } inline const std::vector& getNeighbors() const noexcept { return myComm->getTopology()->getnbors(); } inline bool opIsCommutative(MPI_Op op) const noexcept { return parent->opIsCommutative(op); } inline MPI_User_function* op2User_function(MPI_Op op) const noexcept { return parent->op2User_function(op); } From f9f1f096fac3d61424fb527f15d2ee1840c40514 Mon Sep 17 00:00:00 2001 From: Jim Phillips Date: Thu, 23 Feb 2023 13:17:49 -0600 Subject: [PATCH 009/155] Charmrun: Support ++mpiexec with PMIX, fix/add error checks Get CmiMyNode from PMIX_RANK environment variable. Ensure node count in environment (if available) matches node count expected by charmrun. Ensure CmiMyNode is less than node count. Fix calling exit in a subshell as it only exits the subshell. --- src/util/charmrun-src/charmrun.C | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/src/util/charmrun-src/charmrun.C b/src/util/charmrun-src/charmrun.C index a579e0f170..908fc62f20 100644 --- a/src/util/charmrun-src/charmrun.C +++ b/src/util/charmrun-src/charmrun.C @@ -4753,10 +4753,14 @@ static void ssh_script(FILE *f, const nodetab_process & p, const char **argv) fprintf(f, "test -z \"$CmiMyNode\" && CmiMyNode=$MPIRUN_RANK\n"); fprintf(f, "test -z \"$CmiMyNode\" && CmiMyNode=$PMI_RANK\n"); fprintf(f, "test -z \"$CmiMyNode\" && CmiMyNode=$PMI_ID\n"); + fprintf(f, "test -z \"$CmiMyNode\" && CmiMyNode=$PMIX_RANK\n"); fprintf(f, "test -z \"$CmiMyNode\" && CmiMyNode=$MP_CHILD\n"); fprintf(f, "test -z \"$CmiMyNode\" && CmiMyNode=$SLURM_PROCID\n"); - fprintf(f, "test -z \"$CmiMyNode\" && (Echo Could not detect rank from " - "environment ; Exit 1)\n"); + fprintf(f, "if test -z \"$CmiMyNode\"\n" + "then\n" + " Echo \"Could not detect rank from environment\"\n" + " Exit 1\n" + "fi\n"); fprintf(f, "export CmiMyNode\n"); } #ifdef HSTART @@ -4825,8 +4829,18 @@ static void ssh_script(FILE *f, const nodetab_process & p, const char **argv) fprintf(f, "test -z \"$CmiNumNodes\" && CmiNumNodes=$MP_PROCS\n"); fprintf(f, "test -z \"$CmiNumNodes\" && CmiNumNodes=$SLURM_NTASKS\n"); fprintf(f, "test -z \"$CmiNumNodes\" && CmiNumNodes=$SLURM_NPROCS\n"); - fprintf(f, "test -z \"$CmiNumNodes\" && (Echo Could not detect node count " - "from environment ; Exit 1)\n"); + const int processes = get_old_style_process_count(); + fprintf(f, "test -z \"$CmiNumNodes\" && CmiNumNodes=%d\n", processes); + fprintf(f, "if test %d != \"$CmiNumNodes\"\n", processes); + fprintf(f, "then\n" + " Echo \"Node count $CmiNumNodes from environment is not %d requested\"\n" + " Exit 1\n" + "fi\n", processes); + fprintf(f, "if test $CmiMyNode -ge %d\n", processes); + fprintf(f, "then\n" + " Echo \"Rank $CmiMyNode is not less than requested node count %d\"\n" + " Exit 1\n" + "fi\n", processes); fprintf(f, "export CmiNumNodes\n"); } #ifdef HSTART From 724b2a02084e288bbd6cbdd22b60891b504ec333 Mon Sep 17 00:00:00 2001 From: Sam White Date: Thu, 9 Mar 2023 16:01:53 -0600 Subject: [PATCH 010/155] MPI layer: add build-time option to use MPI_Alloc_mem inside CmiAlloc --- src/arch/mpi/machine.C | 5 +++++ src/conv-core/convcore.C | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/arch/mpi/machine.C b/src/arch/mpi/machine.C index 1dec8b8e6c..e525f18701 100644 --- a/src/arch/mpi/machine.C +++ b/src/arch/mpi/machine.C @@ -222,6 +222,11 @@ static void reportMsgHistogramInfo(void); #define USE_MPI_CTRLMSG_SCHEME 0 +/* to use MPI_Alloc_mem inside CmiAlloc */ +#ifndef CMK_USE_MPI_ALLOC_MEM +#define CMK_USE_MPI_ALLOC_MEM USE_MPI_CTRLMSG_SCHEME +#endif + /* Defining this macro will use MPI_Irecv instead of MPI_Recv for * large messages. This could save synchronization overhead caused by * the rzv protocol used by MPI diff --git a/src/conv-core/convcore.C b/src/conv-core/convcore.C index 4ecd5f5442..83805d4769 100644 --- a/src/conv-core/convcore.C +++ b/src/conv-core/convcore.C @@ -160,7 +160,7 @@ void CldModuleInit(char **); #include "quiescence.h" -#if USE_MPI_CTRLMSG_SCHEME && CMK_CONVERSE_MPI +#if CMK_CONVERSE_MPI && CMK_USE_MPI_ALLOC_MEM #include #endif @@ -3227,7 +3227,7 @@ void *CmiAlloc(int size) res =(char *) LrtsAlloc(size, sizeof(CmiChunkHeader)); #elif CONVERSE_POOL res =(char *) CmiPoolAlloc(size+sizeof(CmiChunkHeader)); -#elif USE_MPI_CTRLMSG_SCHEME && CMK_CONVERSE_MPI +#elif CMK_CONVERSE_MPI && CMK_USE_MPI_ALLOC_MEM MPI_Alloc_mem(size+sizeof(CmiChunkHeader), MPI_INFO_NULL, &res); #elif CMK_SMP && CMK_PPC_ATOMIC_QUEUE res = (char *) CmiAlloc_ppcq(size+sizeof(CmiChunkHeader)); @@ -3373,7 +3373,7 @@ void CmiFree(void *blk) LrtsFree(BLKSTART(parentBlk)); #elif CONVERSE_POOL CmiPoolFree(BLKSTART(parentBlk)); -#elif USE_MPI_CTRLMSG_SCHEME && CMK_CONVERSE_MPI +#elif CMK_CONVERSE_MPI && CMK_USE_MPI_ALLOC_MEM MPI_Free_mem(parentBlk); #elif CMK_SMP && CMK_PPC_ATOMIC_QUEUE CmiFree_ppcq(BLKSTART(parentBlk)); From eba4893cb0466670043b0937fe6aa27b554e62c4 Mon Sep 17 00:00:00 2001 From: Ronak Buch Date: Fri, 3 Mar 2023 03:28:07 -0500 Subject: [PATCH 011/155] Converse: Fix and cleanup padding Use alignas instead of error-prone explicit padding with char[]. --- src/conv-core/cmishmem.h | 26 ++++++++------------------ src/conv-core/converse.h | 37 ++++++++----------------------------- 2 files changed, 16 insertions(+), 47 deletions(-) diff --git a/src/conv-core/cmishmem.h b/src/conv-core/cmishmem.h index e04803bd63..5d9c1d15a6 100644 --- a/src/conv-core/cmishmem.h +++ b/src/conv-core/cmishmem.h @@ -33,28 +33,18 @@ constexpr auto defaultTimeout = 4; } // namespace ipc } // namespace cmi -// TODO ( find better names than src/dst? ) -#define CMK_IPC_BLOCK_FIELDS \ - int src; \ - std::uintptr_t orig; \ - int dst; \ - std::uintptr_t next; \ - std::size_t size; - -struct CmiIpcBlock { +struct alignas(ALIGN_BYTES) CmiIpcBlock { + // TODO ( find better names than src/dst? ) +public: // "home" rank of the block - private: - class blockSizeHelper_ { - CMK_IPC_BLOCK_FIELDS; - }; - - public: - CMK_IPC_BLOCK_FIELDS; + int src; + std::uintptr_t orig; + int dst; + std::uintptr_t next; + std::size_t size; CmiIpcBlock(std::size_t size_, std::uintptr_t orig_) : orig(orig_), next(cmi::ipc::nil), size(size_) {} - - char padding[(sizeof(blockSizeHelper_) % ALIGN_BYTES)]; }; struct CmiIpcManager; diff --git a/src/conv-core/converse.h b/src/conv-core/converse.h index 7939140640..f3749fe6bd 100644 --- a/src/conv-core/converse.h +++ b/src/conv-core/converse.h @@ -780,7 +780,11 @@ CpvExtern(int, _curRestartPhase); /* number of restarts */ /** This header goes before each chunk of memory allocated with CmiAlloc. See the comment in convcore.C for details on the fields. */ -struct CmiChunkHeader { +struct +#if !(CMK_USE_IBVERBS | CMK_USE_IBUD) + alignas(ALIGN_BYTES) // If in verbs mode, align in infiCmiChunkHeader instead +#endif +CmiChunkHeader { int size; private: #if CMK_SMP @@ -788,24 +792,6 @@ struct CmiChunkHeader { #else int ref; #endif -#if ALIGN_BYTES > 8 - #if defined(__GNUC__) || defined(__clang__) - #pragma GCC diagnostic push - #pragma GCC diagnostic ignored "-Wpedantic" - #if defined(__clang__) - #pragma GCC diagnostic ignored "-Wunused-private-field" - #endif - #endif - char align[ALIGN_BYTES - - sizeof(int)*2 -#if (CMK_USE_IBVERBS || CMK_USE_IBUD) - - sizeof(void *) -#endif - ]; - #if defined(__GNUC__) || defined(__clang__) - #pragma GCC diagnostic pop - #endif -#endif public: CmiChunkHeader() = default; CmiChunkHeader(const CmiChunkHeader & x) @@ -838,16 +824,9 @@ struct CmiChunkHeader { #if CMK_USE_IBVERBS | CMK_USE_IBUD struct infiCmiChunkMetaDataStruct; -#define CMI_INFI_CHUNK_HEADER_FIELDS \ -struct infiCmiChunkMetaDataStruct *metaData;\ -CmiChunkHeader chunkHeader; - -struct infiCmiChunkHeaderHelper{ - CMI_INFI_CHUNK_HEADER_FIELDS -}; - -typedef struct infiCmiChunkHeaderStruct{ - CMI_INFI_CHUNK_HEADER_FIELDS +typedef struct alignas(ALIGN_BYTES) infiCmiChunkHeaderStruct { + struct infiCmiChunkMetaDataStruct *metaData; + CmiChunkHeader chunkHeader; } infiCmiChunkHeader; struct infiCmiChunkMetaDataStruct *registerMultiSendMesg(char *msg,int msgSize); From f1cead02372ab7232cde24eff16b621d36d8b631 Mon Sep 17 00:00:00 2001 From: Ronak Buch Date: Fri, 3 Mar 2023 20:18:33 -0500 Subject: [PATCH 012/155] Update padding for envelope --- src/ck-core/envelope.h | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/src/ck-core/envelope.h b/src/ck-core/envelope.h index 381406680f..ade576527f 100644 --- a/src/ck-core/envelope.h +++ b/src/ck-core/envelope.h @@ -200,14 +200,9 @@ namespace ck { UShort epIdx; /* Entry point to call */ \ ck::impl::s_attribs attribs; -class envelope { +class alignas(ALIGN_BYTES) envelope { private: - class envelopeSizeHelper { - CMK_ENVELOPE_FIELDS - CMK_ENVELOPE_FT_FIELDS - }; - #ifdef __clang__ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-private-field" @@ -221,19 +216,6 @@ class envelope { CMK_ENVELOPE_FT_FIELDS - #if defined(__GNUC__) || defined(__clang__) - #pragma GCC diagnostic push - #pragma GCC diagnostic ignored "-Wpedantic" - #if defined(__clang__) - #pragma GCC diagnostic ignored "-Wunused-private-field" - #endif - #endif - // padding to ensure ALIGN_BYTES alignment - UChar align[CkMsgAlignOffset(sizeof(envelopeSizeHelper))]; - #if defined(__GNUC__) || defined(__clang__) - #pragma GCC diagnostic pop - #endif - void pup(PUP::er &p); #if CMK_REPLAYSYSTEM || CMK_TRACE_ENABLED UInt getEvent(void) const { return event; } From b3929938b359d11c82ff2093cd633fdf15e87847 Mon Sep 17 00:00:00 2001 From: Ronak Buch Date: Fri, 3 Mar 2023 20:19:56 -0500 Subject: [PATCH 013/155] fixup! Converse: Fix and cleanup padding --- src/conv-core/cmishmem.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/conv-core/cmishmem.h b/src/conv-core/cmishmem.h index 5d9c1d15a6..d5e3f09fa6 100644 --- a/src/conv-core/cmishmem.h +++ b/src/conv-core/cmishmem.h @@ -38,8 +38,8 @@ struct alignas(ALIGN_BYTES) CmiIpcBlock { public: // "home" rank of the block int src; - std::uintptr_t orig; int dst; + std::uintptr_t orig; std::uintptr_t next; std::size_t size; From 0e41312a45ee391cac2f3e56ec084160a00b6381 Mon Sep 17 00:00:00 2001 From: Ronak Buch Date: Wed, 8 Mar 2023 11:07:53 -0500 Subject: [PATCH 014/155] Add comments to explain alignas use --- src/ck-core/envelope.h | 3 +++ src/conv-core/cmishmem.h | 2 ++ src/conv-core/converse.h | 3 +++ 3 files changed, 8 insertions(+) diff --git a/src/ck-core/envelope.h b/src/ck-core/envelope.h index ade576527f..fa21e185d3 100644 --- a/src/ck-core/envelope.h +++ b/src/ck-core/envelope.h @@ -200,6 +200,9 @@ namespace ck { UShort epIdx; /* Entry point to call */ \ ck::impl::s_attribs attribs; +// alignas is used for padding here, rather than for alignment of the envelope +// itself, to ensure that the message following the envelope is aligned relative +// to the start of the envelope. class alignas(ALIGN_BYTES) envelope { private: diff --git a/src/conv-core/cmishmem.h b/src/conv-core/cmishmem.h index d5e3f09fa6..1a959732e4 100644 --- a/src/conv-core/cmishmem.h +++ b/src/conv-core/cmishmem.h @@ -33,6 +33,8 @@ constexpr auto defaultTimeout = 4; } // namespace ipc } // namespace cmi +// alignas is used for padding here, rather than for alignment of the +// CmiIpcBlock itself. struct alignas(ALIGN_BYTES) CmiIpcBlock { // TODO ( find better names than src/dst? ) public: diff --git a/src/conv-core/converse.h b/src/conv-core/converse.h index f3749fe6bd..339f84f352 100644 --- a/src/conv-core/converse.h +++ b/src/conv-core/converse.h @@ -782,6 +782,9 @@ CpvExtern(int, _curRestartPhase); /* number of restarts */ */ struct #if !(CMK_USE_IBVERBS | CMK_USE_IBUD) +// alignas is used for padding here, rather than for alignment of the +// CmiChunkHeader itself, to ensure that the chunk following the envelope is +// aligned relative to the start of the header. alignas(ALIGN_BYTES) // If in verbs mode, align in infiCmiChunkHeader instead #endif CmiChunkHeader { From c59cadd6325631cce62a7db5ca35d9e18ad6c606 Mon Sep 17 00:00:00 2001 From: Ronak Buch Date: Fri, 3 Mar 2023 22:35:20 -0500 Subject: [PATCH 015/155] Infiniband: Subsume infiCmiChunkHeader into CmiChunkHeader --- src/arch/verbs/machine-ibud.C | 32 ++++------- src/arch/verbs/machine-ibverbs.C | 73 +++++++++++------------- src/conv-core/convcore.C | 55 +++++------------- src/conv-core/converse.h | 24 +++----- tests/charm++/alignment/alignmentCheck.C | 4 -- 5 files changed, 68 insertions(+), 120 deletions(-) diff --git a/src/arch/verbs/machine-ibud.C b/src/arch/verbs/machine-ibud.C index 661d601c78..e55c20be26 100644 --- a/src/arch/verbs/machine-ibud.C +++ b/src/arch/verbs/machine-ibud.C @@ -32,7 +32,7 @@ #define INFIDUMMYPACKET 64 #define INFIBARRIERPACKET 128 -#define METADATAFIELD(m) (((infiCmiChunkHeader *)m)[-1].metaData) +#define METADATAFIELD(m) (((CmiChunkHeader *)m)[-1].metaData) enum ibv_mtu mtu = IBV_MTU_2048; @@ -137,7 +137,7 @@ typedef struct infiCmiChunkMetaDataStruct { struct ibv_mr *key; int poolIdx; void *nextBuf; - struct infiCmiChunkHeaderStruct *owner; + struct CmiChunkHeader *owner; int count; } infiCmiChunkMetaData; @@ -148,15 +148,6 @@ struct infiBufferPool{ }; -/* -typedef struct infiCmiChunkHeaderStruct{ - struct infiCmiChunkMetaDataStruct *metaData; - CmiChunkHeader chunkHeader; -} infiCmiChunkHeader; - -struct infiCmiChunkMetaDataStruct *registerMultiSendMesg(char *msg,int msgSize); -*/ - // FIXME: temp for error reading static const char *const __ibv_wc_status_str[] = { "Success", @@ -190,7 +181,7 @@ const char *ibv_wc_status_str(enum ibv_wc_status status) { /***** BEGIN MEMORY MANAGEMENT STUFF *****/ typedef struct { - int size;//without infiCmiChunkHeader + int size;//without CmiChunkHeader void *startBuf; int count; } infiCmiChunkPool; @@ -237,7 +228,7 @@ static inline void *getInfiCmiChunk(int dataSize){ MACHSTATE2(2,"getInfiCmiChunk for size %d in poolIdx %d",dataSize,poolIdx); if((poolIdx < INFINUMPOOLS && infiCmiChunkPools[poolIdx].startBuf == NULL) || poolIdx >= INFINUMPOOLS){ infiCmiChunkMetaData *metaData; - infiCmiChunkHeader *hdr; + CmiChunkHeader *hdr; int allocSize; int count=1; int i; @@ -255,13 +246,13 @@ static inline void *getInfiCmiChunk(int dataSize){ if(poolIdx < blockThreshold){ count = blockAllocRatio; } - res = malloc((allocSize+sizeof(infiCmiChunkHeader))*count); + res = malloc((allocSize+sizeof(CmiChunkHeader))*count); hdr = res; - key = ibv_reg_mr(context->pd,res,(allocSize+sizeof(infiCmiChunkHeader))*count,IBV_ACCESS_LOCAL_WRITE); + key = ibv_reg_mr(context->pd,res,(allocSize+sizeof(CmiChunkHeader))*count,IBV_ACCESS_LOCAL_WRITE); CmiAssert(key != NULL); - origres = (res += sizeof(infiCmiChunkHeader)); + origres = (res += sizeof(CmiChunkHeader)); for(i=0;iowner->metaData->count = count; metaData->nextBuf = NULL; }else{ - void *startBuf = res - sizeof(infiCmiChunkHeader); + void *startBuf = res - sizeof(CmiChunkHeader); metaData->nextBuf = infiCmiChunkPools[poolIdx].startBuf; infiCmiChunkPools[poolIdx].startBuf = startBuf; infiCmiChunkPools[poolIdx].count++; } if(i != count-1){ - res += (allocSize+sizeof(infiCmiChunkHeader)); + res += (allocSize+sizeof(CmiChunkHeader)); } } MACHSTATE3(2,"AllocSize %d buf %p key %p",allocSize,res,metaData->key); @@ -291,7 +282,7 @@ static inline void *getInfiCmiChunk(int dataSize){ infiCmiChunkMetaData *metaData; res = infiCmiChunkPools[poolIdx].startBuf; - res += sizeof(infiCmiChunkHeader); + res += sizeof(CmiChunkHeader); MACHSTATE2(2,"Reusing old pool %d buf %p",poolIdx,res); metaData = METADATAFIELD(res); @@ -337,8 +328,7 @@ void infi_CmiFree(void *ptr){ #endif ptr += sizeof(CmiChunkHeader); size = SIZEFIELD (ptr); - //there is a infiniband specific header - freePtr = ptr - sizeof(infiCmiChunkHeader); + freePtr = ptr - sizeof(CmiChunkHeader); metaData = METADATAFIELD(ptr); poolIdx = metaData->poolIdx; if(poolIdx == INFIMULTIPOOL){ diff --git a/src/arch/verbs/machine-ibverbs.C b/src/arch/verbs/machine-ibverbs.C index 7e2e4d637a..e6eecaf424 100644 --- a/src/arch/verbs/machine-ibverbs.C +++ b/src/arch/verbs/machine-ibverbs.C @@ -306,13 +306,12 @@ struct infiOtherNodeData{ Memory management structures and types *****************/ -struct infiCmiChunkHeaderStruct; typedef struct infiCmiChunkMetaDataStruct { struct ibv_mr *key; int poolIdx; void *nextBuf; - struct infiCmiChunkHeaderStruct *owner; + struct CmiChunkHeader *owner; int count; #if THREAD_MULTI_POOL @@ -323,14 +322,14 @@ typedef struct infiCmiChunkMetaDataStruct { -#define METADATAFIELD(m) (((infiCmiChunkHeader *)m)[-1].metaData) +#define METADATAFIELD(m) (((CmiChunkHeader *)m)[-1].metaData) #if CMK_ONESIDED_IMPL #include "machine-onesided.h" #endif typedef struct { - int size;//without infiCmiChunkHeader + int size;//without CmiChunkHeader void *startBuf; int count; } infiCmiChunkPool; @@ -2439,8 +2438,8 @@ Register memory for a part of a received multisend message *************/ infiCmiChunkMetaData *registerMultiSendMesg(char *msg,int size){ infiCmiChunkMetaData *metaData = (infiCmiChunkMetaData *)malloc(sizeof(infiCmiChunkMetaData)); - char *res=msg-sizeof(infiCmiChunkHeader); - metaData->key = ibv_reg_mr(context->pd,res,(size+sizeof(infiCmiChunkHeader)),IBV_ACCESS_REMOTE_READ | IBV_ACCESS_LOCAL_WRITE | IBV_ACCESS_REMOTE_WRITE); + char *res=msg-sizeof(CmiChunkHeader); + metaData->key = ibv_reg_mr(context->pd,res,(size+sizeof(CmiChunkHeader)),IBV_ACCESS_REMOTE_READ | IBV_ACCESS_LOCAL_WRITE | IBV_ACCESS_REMOTE_WRITE); #if CMK_IBVERBS_STATS numCurReg++; numReg++; @@ -2460,7 +2459,7 @@ infiCmiChunkMetaData *registerMultiSendMesg(char *msg,int size){ static inline void fillBufferPools(void){ int nodeSize, poolIdx, thread; infiCmiChunkMetaData *metaData; - infiCmiChunkHeader *hdr; + CmiChunkHeader *hdr; int allocSize; int count=1; int i; @@ -2479,15 +2478,15 @@ static inline void fillBufferPools(void){ }else{ count = 1; } - posix_memalign((void **)&res, ALIGN_BYTES, (allocSize+sizeof(infiCmiChunkHeader))*count); - hdr = (infiCmiChunkHeader *)res; - key = ibv_reg_mr(context->pd,res,(allocSize+sizeof(infiCmiChunkHeader))*count,IBV_ACCESS_REMOTE_READ | IBV_ACCESS_LOCAL_WRITE | IBV_ACCESS_REMOTE_WRITE); + posix_memalign((void **)&res, ALIGN_BYTES, (allocSize+sizeof(CmiChunkHeader))*count); + hdr = (CmiChunkHeader *)res; + key = ibv_reg_mr(context->pd,res,(allocSize+sizeof(CmiChunkHeader))*count,IBV_ACCESS_REMOTE_READ | IBV_ACCESS_LOCAL_WRITE | IBV_ACCESS_REMOTE_WRITE); CmiAssert(key != NULL); #if CMK_IBVERBS_STATS numCurReg++; numReg++; #endif - res += sizeof(infiCmiChunkHeader); + res += sizeof(CmiChunkHeader); for(i=0;ikey = key; @@ -2497,16 +2496,16 @@ static inline void fillBufferPools(void){ if(i == 0){ metaData->owner->metaData->count = count; metaData->nextBuf = NULL; - infiCmiChunkPools[thread][poolIdx].startBuf = res - sizeof(infiCmiChunkHeader); + infiCmiChunkPools[thread][poolIdx].startBuf = res - sizeof(CmiChunkHeader); infiCmiChunkPools[thread][poolIdx].count++; }else{ - void *startBuf = res - sizeof(infiCmiChunkHeader); + void *startBuf = res - sizeof(CmiChunkHeader); metaData->nextBuf = infiCmiChunkPools[thread][poolIdx].startBuf; infiCmiChunkPools[thread][poolIdx].startBuf = startBuf; infiCmiChunkPools[thread][poolIdx].count++; } if(i != count-1){ - res += (allocSize+sizeof(infiCmiChunkHeader)); + res += (allocSize+sizeof(CmiChunkHeader)); } } } @@ -2549,7 +2548,7 @@ static inline void *getInfiCmiChunkThread(int dataSize){ if((poolIdx < INFINUMPOOLS && infiCmiChunkPools[CmiMyRank()][poolIdx].startBuf == NULL) || poolIdx >= INFINUMPOOLS){ infiCmiChunkMetaData *metaData; - infiCmiChunkHeader *hdr; + CmiChunkHeader *hdr; int allocSize; int count=1; int i; @@ -2566,11 +2565,11 @@ static inline void *getInfiCmiChunkThread(int dataSize){ if(poolIdx < blockThreshold){ count = blockAllocRatio; } - posix_memalign((void **)&res, ALIGN_BYTES, (allocSize+sizeof(infiCmiChunkHeader))*count); + posix_memalign((void **)&res, ALIGN_BYTES, (allocSize+sizeof(CmiChunkHeader))*count); _MEMCHECK(res); - hdr = (infiCmiChunkHeader *)res; + hdr = (CmiChunkHeader *)res; - key = ibv_reg_mr(context->pd,res,(allocSize+sizeof(infiCmiChunkHeader))*count,IBV_ACCESS_REMOTE_READ | IBV_ACCESS_LOCAL_WRITE | IBV_ACCESS_REMOTE_WRITE); + key = ibv_reg_mr(context->pd,res,(allocSize+sizeof(CmiChunkHeader))*count,IBV_ACCESS_REMOTE_READ | IBV_ACCESS_LOCAL_WRITE | IBV_ACCESS_REMOTE_WRITE); if(key == NULL) CmiAbort("ibv_reg_mr failed to pin memory\n"); #if CMK_IBVERBS_STATS @@ -2578,7 +2577,7 @@ static inline void *getInfiCmiChunkThread(int dataSize){ numReg++; #endif - origres = (res += sizeof(infiCmiChunkHeader)); + origres = (res += sizeof(CmiChunkHeader)); for(i=0;iowner->metaData->count = count; metaData->nextBuf = NULL; }else{ - void *startBuf = res - sizeof(infiCmiChunkHeader); + void *startBuf = res - sizeof(CmiChunkHeader); metaData->nextBuf = infiCmiChunkPools[CmiMyRank()][poolIdx].startBuf; infiCmiChunkPools[CmiMyRank()][poolIdx].startBuf = startBuf; infiCmiChunkPools[CmiMyRank()][poolIdx].count++; } if(i != count-1){ - res += (allocSize+sizeof(infiCmiChunkHeader)); + res += (allocSize+sizeof(CmiChunkHeader)); } } @@ -2612,7 +2611,7 @@ static inline void *getInfiCmiChunkThread(int dataSize){ infiCmiChunkMetaData *metaData; res = (char *)infiCmiChunkPools[CmiMyRank()][poolIdx].startBuf; - res += sizeof(infiCmiChunkHeader); + res += sizeof(CmiChunkHeader); MACHSTATE2(2,"Reusing old pool %d buf %p",poolIdx,res); metaData = METADATAFIELD(res); @@ -2652,7 +2651,7 @@ static inline void *getInfiCmiChunk(int dataSize){ MACHSTATE2(2,"getInfiCmiChunk for size %d in poolIdx %d",dataSize,poolIdx); if((poolIdx < INFINUMPOOLS && infiCmiChunkPools[poolIdx].startBuf == NULL) || poolIdx >= INFINUMPOOLS){ infiCmiChunkMetaData *metaData; - infiCmiChunkHeader *hdr; + CmiChunkHeader *hdr; int allocSize; int count=1; int i; @@ -2669,16 +2668,16 @@ static inline void *getInfiCmiChunk(int dataSize){ if(poolIdx < blockThreshold){ count = blockAllocRatio; } - posix_memalign((void **)&res, ALIGN_BYTES, (allocSize+sizeof(infiCmiChunkHeader))*count); - hdr = (infiCmiChunkHeader *)res; + posix_memalign((void **)&res, ALIGN_BYTES, (allocSize+sizeof(CmiChunkHeader))*count); + hdr = (CmiChunkHeader *)res; - key = ibv_reg_mr(context->pd,res,(allocSize+sizeof(infiCmiChunkHeader))*count,IBV_ACCESS_REMOTE_READ | IBV_ACCESS_LOCAL_WRITE | IBV_ACCESS_REMOTE_WRITE); + key = ibv_reg_mr(context->pd,res,(allocSize+sizeof(CmiChunkHeader))*count,IBV_ACCESS_REMOTE_READ | IBV_ACCESS_LOCAL_WRITE | IBV_ACCESS_REMOTE_WRITE); CmiAssert(key != NULL); #if CMK_IBVERBS_STATS numCurReg++; numReg++; #endif - origres = (res += sizeof(infiCmiChunkHeader)); + origres = (res += sizeof(CmiChunkHeader)); for(i=0;iowner->metaData->count = count; metaData->nextBuf = NULL; }else{ - void *startBuf = res - sizeof(infiCmiChunkHeader); + void *startBuf = res - sizeof(CmiChunkHeader); metaData->nextBuf = infiCmiChunkPools[poolIdx].startBuf; infiCmiChunkPools[poolIdx].startBuf = startBuf; infiCmiChunkPools[poolIdx].count++; } if(i != count-1){ - res += (allocSize+sizeof(infiCmiChunkHeader)); + res += (allocSize+sizeof(CmiChunkHeader)); } } @@ -2710,7 +2709,7 @@ static inline void *getInfiCmiChunk(int dataSize){ infiCmiChunkMetaData *metaData; res = (char *)infiCmiChunkPools[poolIdx].startBuf; - res += sizeof(infiCmiChunkHeader); + res += sizeof(CmiChunkHeader); MACHSTATE2(2,"Reusing old pool %d buf %p",poolIdx,res); metaData = METADATAFIELD(res); @@ -2738,8 +2737,7 @@ void * infi_CmiAlloc(int size){ numAlloc++; #endif if (Cmi_charmrun_fd == -1) { - posix_memalign((void **)&res, ALIGN_BYTES, size + sizeof(void*)); - res += sizeof(void*); + posix_memalign((void **)&res, ALIGN_BYTES, size); return res; } #if THREAD_MULTI_POOL @@ -2782,8 +2780,7 @@ void infi_CmiFreeDirect(void *ptr){ /* if(size > firstBinSize){*/ infiCmiChunkMetaData *metaData; int poolIdx; - //there is a infiniband specific header - freePtr = (char *)ptr - sizeof(infiCmiChunkHeader); + freePtr = (char *)ptr - sizeof(CmiChunkHeader); metaData = METADATAFIELD(ptr); poolIdx = metaData->poolIdx; infiCmiChunkPool *pool = infiCmiChunkPools[CmiMyRank()] + poolIdx; @@ -2846,14 +2843,13 @@ void infi_CmiFree(void *ptr){ MACHSTATE(3,"Freeing"); - if (Cmi_charmrun_fd == -1) { char *res = (char *)ptr; res -= sizeof(void*); free(res); return; } + if (Cmi_charmrun_fd == -1) { free(ptr); return; } ptr = (char *)ptr + sizeof(CmiChunkHeader); size = SIZEFIELD (ptr); /* if(size > firstBinSize){*/ infiCmiChunkMetaData *metaData; int poolIdx; - //there is a infiniband specific header - freePtr = (char *)ptr - sizeof(infiCmiChunkHeader); + freePtr = (char *)ptr - sizeof(CmiChunkHeader); metaData = METADATAFIELD(ptr); poolIdx = metaData->poolIdx; @@ -2897,8 +2893,7 @@ void infi_CmiFree(void *ptr){ /* if(size > firstBinSize){*/ infiCmiChunkMetaData *metaData; int poolIdx; - //there is a infiniband specific header - freePtr = (char*)ptr - sizeof(infiCmiChunkHeader); + freePtr = (char*)ptr - sizeof(CmiChunkHeader); metaData = METADATAFIELD(ptr); poolIdx = metaData->poolIdx; if(poolIdx == INFIMULTIPOOL){ diff --git a/src/conv-core/convcore.C b/src/conv-core/convcore.C index 83805d4769..9b8115e7d6 100644 --- a/src/conv-core/convcore.C +++ b/src/conv-core/convcore.C @@ -2280,11 +2280,7 @@ void CsdInit(char **argv) void CmiSyncVectorSend(int destPE, int n, int *sizes, char **msgs) { int total; char *mesg; -#if CMK_USE_IBVERBS - VECTOR_COMPACT(total, mesg, n, sizes, msgs,sizeof(infiCmiChunkHeader)); -#else VECTOR_COMPACT(total, mesg, n, sizes, msgs,sizeof(CmiChunkHeader)); -#endif CmiSyncSendAndFree(destPE, total, mesg); } @@ -3575,11 +3571,11 @@ void infi_freeMultipleSend(void *msgWhole) /*unreg meta, free meta, move the ptr */ /* note these weird little things are not pooled */ /* do NOT free the message here, we are only a part of this buffer*/ - infiCmiChunkHeader *ch = (infiCmiChunkHeader *)((char *)msgWhole + offset); - char *msg = (char *)msgWhole + offset + sizeof(infiCmiChunkHeader); - int msgSize=ch->chunkHeader.size; /* Size of user portion of message (plus padding at end) */ + CmiChunkHeader *ch = (CmiChunkHeader *)((char *)msgWhole + offset); + char *msg = (char *)msgWhole + offset + sizeof(CmiChunkHeader); + int msgSize=ch->size; /* Size of user portion of message (plus padding at end) */ infi_unregAndFreeMeta(ch->metaData); - offset+= sizeof(infiCmiChunkHeader) + msgSize; + offset+= sizeof(CmiChunkHeader) + msgSize; } } #endif @@ -3591,23 +3587,15 @@ static void _CmiMultipleSend(unsigned int destPE, int len, int sizes[], char *ms int m; /* Outgoing message */ CmiInitMsgHeader(header.convHeader, sizeof(CmiMultipleSendHeader)); -#if CMK_USE_IBVERBS - infiCmiChunkHeader *msgHdr; -#else CmiChunkHeader *msgHdr; /* Chunk headers for each message */ -#endif - + double pad = 0; /* padding required */ int vecLen; /* Number of pieces in outgoing message vector */ int *vecSizes; /* Sizes of each piece we're sending out. */ char **vecPtrs; /* Pointers to each piece we're sending out. */ int vec; /* Entry we're currently filling out in above array */ -#if CMK_USE_IBVERBS - msgHdr = (infiCmiChunkHeader *)CmiTmpAlloc(len * sizeof(infiCmiChunkHeader)); -#else msgHdr = (CmiChunkHeader *)CmiTmpAlloc(len * sizeof(CmiChunkHeader)); -#endif /* Allocate memory for the outgoing vector*/ vecLen=1+3*len; /* Header and 3 parts per message */ @@ -3629,22 +3617,16 @@ static void _CmiMultipleSend(unsigned int destPE, int len, int sizes[], char *ms | CmiChunkHeader | Message data | Message padding | ...next message entry ... */ for (m=0;mchunkHeader.size; /* Size of user portion of message (plus padding at end) */ - ch->chunkHeader.setRef(msgWhole-msg); - ch->metaData = registerMultiSendMesg(msg,msgSize); -#else CmiChunkHeader *ch=(CmiChunkHeader *)(msgWhole+offset); char *msg=(msgWhole+offset+sizeof(CmiChunkHeader)); int msgSize=ch->size; /* Size of user portion of message (plus padding at end) */ ch->setRef(msgWhole-msg); -#endif +#if CMK_USE_IBVERBS + ch->metaData = registerMultiSendMesg(msg,msgSize); +#endif /* Link new message to owner via a negative ref pointer */ CmiReference(msg); /* Follows link & increases reference count of *msgWhole* */ CmiSyncSendAndFree(CmiMyPe(), msgSize, msg); -#if CMK_USE_IBVERBS - offset+= sizeof(infiCmiChunkHeader) + msgSize; -#else offset+= sizeof(CmiChunkHeader) + msgSize; -#endif } /* Release our reference to the whole message. The message will only actually be deleted once all its sub-messages are free'd as well. */ diff --git a/src/conv-core/converse.h b/src/conv-core/converse.h index 339f84f352..d10e23d29c 100644 --- a/src/conv-core/converse.h +++ b/src/conv-core/converse.h @@ -780,14 +780,19 @@ CpvExtern(int, _curRestartPhase); /* number of restarts */ /** This header goes before each chunk of memory allocated with CmiAlloc. See the comment in convcore.C for details on the fields. */ -struct -#if !(CMK_USE_IBVERBS | CMK_USE_IBUD) + +#if CMK_USE_IBVERBS | CMK_USE_IBUD +struct infiCmiChunkMetaDataStruct; +struct infiCmiChunkMetaDataStruct* registerMultiSendMesg(char* msg, int msgSize); +#endif + // alignas is used for padding here, rather than for alignment of the // CmiChunkHeader itself, to ensure that the chunk following the envelope is // aligned relative to the start of the header. - alignas(ALIGN_BYTES) // If in verbs mode, align in infiCmiChunkHeader instead +struct alignas(ALIGN_BYTES) CmiChunkHeader { +#if CMK_USE_IBVERBS | CMK_USE_IBUD + struct infiCmiChunkMetaDataStruct *metaData; #endif -CmiChunkHeader { int size; private: #if CMK_SMP @@ -824,17 +829,6 @@ CmiChunkHeader { #endif }; -#if CMK_USE_IBVERBS | CMK_USE_IBUD -struct infiCmiChunkMetaDataStruct; - -typedef struct alignas(ALIGN_BYTES) infiCmiChunkHeaderStruct { - struct infiCmiChunkMetaDataStruct *metaData; - CmiChunkHeader chunkHeader; -} infiCmiChunkHeader; - -struct infiCmiChunkMetaDataStruct *registerMultiSendMesg(char *msg,int msgSize); -#endif - /* Given a user chunk m, extract the enclosing chunk header fields: */ #define BLKSTART(m) ((CmiChunkHeader *) (((intptr_t)m) - sizeof(CmiChunkHeader))) #define SIZEFIELD(m) ((BLKSTART(m))->size) diff --git a/tests/charm++/alignment/alignmentCheck.C b/tests/charm++/alignment/alignmentCheck.C index b60910d100..77f619a769 100644 --- a/tests/charm++/alignment/alignmentCheck.C +++ b/tests/charm++/alignment/alignmentCheck.C @@ -36,11 +36,7 @@ void alignmentTest(std::vector &allMsgs, const std::string &identi TestMessage *msg = allMsgs[i]; envelope *env = UsrToEnv(msg); -#if CMK_USE_IBVERBS | CMK_USE_IBUD - intptr_t startHdr = (intptr_t) &(((infiCmiChunkHeader *) env)[-1]); -#else intptr_t startHdr = (intptr_t) BLKSTART(env); -#endif intptr_t startEnv = (intptr_t) env; intptr_t startUsr = (intptr_t) msg; intptr_t startVar1 = (intptr_t) msg->varArray1; From 6c8749b666f8f88feb989c664af73f141c4c9dc5 Mon Sep 17 00:00:00 2001 From: Sam White Date: Wed, 22 Mar 2023 19:59:05 -0500 Subject: [PATCH 016/155] Cleanup: remove old MPI conv-mach files --- src/arch/mpi/conv-mach-gm.h | 6 ------ src/arch/mpi/conv-mach-gm.sh | 0 src/arch/mpi/conv-mach-lam.h | 0 src/arch/mpi/conv-mach-lam.sh | 5 ----- src/arch/mpi/conv-mach-mpt.h | 6 ------ src/arch/mpi/conv-mach-mpt.sh | 3 --- 6 files changed, 20 deletions(-) delete mode 100644 src/arch/mpi/conv-mach-gm.h delete mode 100644 src/arch/mpi/conv-mach-gm.sh delete mode 100644 src/arch/mpi/conv-mach-lam.h delete mode 100644 src/arch/mpi/conv-mach-lam.sh delete mode 100644 src/arch/mpi/conv-mach-mpt.h delete mode 100644 src/arch/mpi/conv-mach-mpt.sh diff --git a/src/arch/mpi/conv-mach-gm.h b/src/arch/mpi/conv-mach-gm.h deleted file mode 100644 index 5edb428080..0000000000 --- a/src/arch/mpi/conv-mach-gm.h +++ /dev/null @@ -1,6 +0,0 @@ - -#undef CMK_MALLOC_USE_GNU_MALLOC -#undef CMK_MALLOC_USE_OS_BUILTIN -#undef CMK_MALLOC_USE_GNUOLD_MALLOC -#define CMK_MALLOC_USE_OS_BUILTIN 1 - diff --git a/src/arch/mpi/conv-mach-gm.sh b/src/arch/mpi/conv-mach-gm.sh deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/src/arch/mpi/conv-mach-lam.h b/src/arch/mpi/conv-mach-lam.h deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/src/arch/mpi/conv-mach-lam.sh b/src/arch/mpi/conv-mach-lam.sh deleted file mode 100644 index 0f7ba6598e..0000000000 --- a/src/arch/mpi/conv-mach-lam.sh +++ /dev/null @@ -1,5 +0,0 @@ -CMK_LIBS="-lckqt " -if test "$CMK_CXX" != "mpiCC" -then -CMK_LIBS="$CMK_LIBS -llammpio -llammpi++ -llamf77mpi -lmpi -llam -laio -laio -lutil" -fi diff --git a/src/arch/mpi/conv-mach-mpt.h b/src/arch/mpi/conv-mach-mpt.h deleted file mode 100644 index 5e6f64e021..0000000000 --- a/src/arch/mpi/conv-mach-mpt.h +++ /dev/null @@ -1,6 +0,0 @@ -/* config for SGI Message Passing Toolkit(MPT) */ - -#undef CMK_MALLOC_USE_OS_BUILTIN -#undef CMK_MALLOC_USE_GNUOLD_MALLOC -#define CMK_MALLOC_USE_OS_BUILTIN 1 -#define CMK_MALLOC_USE_GNUOLD_MALLOC 0 diff --git a/src/arch/mpi/conv-mach-mpt.sh b/src/arch/mpi/conv-mach-mpt.sh deleted file mode 100644 index ab95e8f0de..0000000000 --- a/src/arch/mpi/conv-mach-mpt.sh +++ /dev/null @@ -1,3 +0,0 @@ -COMMENT="config for SGI Message Passing Toolkit(MPT)" - -CMK_LIBS="-lckqt -lmpi" From 3c781e2cffbd845369a053e3e6a36b2607b0e1c0 Mon Sep 17 00:00:00 2001 From: Evan Ramos Date: Thu, 13 Apr 2023 19:51:35 -0500 Subject: [PATCH 017/155] Improve portability of `-Werror` build parameter Fixes #3604 --- src/arch/common/cc-clang.sh | 3 ++- src/arch/common/cc-gcc.sh | 2 ++ src/arch/common/cc-icc.sh | 2 ++ src/arch/common/cc-iccstatic.sh | 2 ++ src/arch/common/cc-icx.sh | 3 ++- src/arch/common/cc-msvc.sh | 2 ++ src/arch/mpi-linux-arm7/conv-mach.sh | 1 - src/arch/mpi-linux-arm8/conv-mach.sh | 1 - src/arch/multicore-linux-arm7/conv-mach.sh | 1 - src/arch/multicore-linux-arm8/conv-mach.sh | 1 - src/arch/netlrts-linux-arm7/conv-mach.sh | 1 - src/arch/netlrts-linux-arm8/conv-mach.sh | 1 - src/arch/netlrts-linux-ppc64le/conv-mach.sh | 1 - src/arch/netlrts-linux-x86_64/conv-mach.sh | 1 - src/arch/verbs-linux-ppc64le/conv-mach.sh | 1 - src/arch/verbs-linux-x86_64/conv-mach.sh | 1 - src/scripts/charmc | 2 +- 17 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/arch/common/cc-clang.sh b/src/arch/common/cc-clang.sh index 47fc85d4bc..70ee622794 100644 --- a/src/arch/common/cc-clang.sh +++ b/src/arch/common/cc-clang.sh @@ -22,5 +22,6 @@ fi CMK_PIC='' # empty string: will be reset to default by conv-config.sh CMK_PIE='-fPIE' -CMK_COMPILER='clang' CMK_WARNINGS_ARE_ERRORS="-Werror" + +CMK_COMPILER='clang' diff --git a/src/arch/common/cc-gcc.sh b/src/arch/common/cc-gcc.sh index 608e02ed13..43a7071508 100644 --- a/src/arch/common/cc-gcc.sh +++ b/src/arch/common/cc-gcc.sh @@ -14,6 +14,8 @@ CMK_LIBS="$CMK_LIBS -lckqt" CMK_PIC='-fPIC' CMK_PIE='' # empty string: will be reset to default by conv-config.sh +CMK_WARNINGS_ARE_ERRORS="-Werror" + if [ "$CMK_MACOSX" ]; then if [ -z "$CMK_COMPILER_SUFFIX" ]; then # find real gcc (not Apple's clang) in $PATH on darwin, works with homebrew/macports diff --git a/src/arch/common/cc-icc.sh b/src/arch/common/cc-icc.sh index 13397242eb..0b8c59a071 100644 --- a/src/arch/common/cc-icc.sh +++ b/src/arch/common/cc-icc.sh @@ -12,6 +12,8 @@ CMK_LD_LIBRARY_PATH="-Wl,-rpath,$CHARMLIBSO/" CPPFLAGS="$CPPFLAGS -fpic " LDFLAGS="$LDFLAGS -shared-intel " +CMK_WARNINGS_ARE_ERRORS="-Werror" + CMK_CF77="ifort -auto -fPIC " CMK_CF90="ifort -auto -fPIC " #CMK_CF90_FIXED="$CMK_CF90 -132 -FI " diff --git a/src/arch/common/cc-iccstatic.sh b/src/arch/common/cc-iccstatic.sh index 7a3a91402f..df82c01961 100644 --- a/src/arch/common/cc-iccstatic.sh +++ b/src/arch/common/cc-iccstatic.sh @@ -9,6 +9,8 @@ CMK_LD="icc $ICCOPTS" CMK_LDXX="icpc $ICCOPTS" CMK_LD_LIBRARY_PATH="-Wl,-rpath,$CHARMLIBSO/" +CMK_WARNINGS_ARE_ERRORS="-Werror" + . $CHARMINC/conv-mach-ifort.sh CMK_COMPILER='icc' diff --git a/src/arch/common/cc-icx.sh b/src/arch/common/cc-icx.sh index c48721c17d..1d48478718 100644 --- a/src/arch/common/cc-icx.sh +++ b/src/arch/common/cc-icx.sh @@ -21,5 +21,6 @@ fi CMK_PIC='' # empty string: will be reset to default by conv-config.sh CMK_PIE='-fPIE' -CMK_COMPILER='icx' CMK_WARNINGS_ARE_ERRORS="-Werror" + +CMK_COMPILER='icx' diff --git a/src/arch/common/cc-msvc.sh b/src/arch/common/cc-msvc.sh index 19b898d600..2d574a3f4b 100644 --- a/src/arch/common/cc-msvc.sh +++ b/src/arch/common/cc-msvc.sh @@ -19,4 +19,6 @@ CMK_MOD_EXT="vo" CMK_PIC=' ' CMK_PIE=' ' +CMK_WARNINGS_ARE_ERRORS="-WX" + CMK_COMPILER='msvc' diff --git a/src/arch/mpi-linux-arm7/conv-mach.sh b/src/arch/mpi-linux-arm7/conv-mach.sh index 9f629c2ad1..1f62b708d5 100644 --- a/src/arch/mpi-linux-arm7/conv-mach.sh +++ b/src/arch/mpi-linux-arm7/conv-mach.sh @@ -1,7 +1,6 @@ . $CHARMINC/cc-mpiopts.sh CMK_XIOPTS='' -CMK_WARNINGS_ARE_ERRORS='-Werror' CMK_CXX_OPTIMIZE='-O3' CMK_QT='generic64-light' diff --git a/src/arch/mpi-linux-arm8/conv-mach.sh b/src/arch/mpi-linux-arm8/conv-mach.sh index 9f629c2ad1..1f62b708d5 100644 --- a/src/arch/mpi-linux-arm8/conv-mach.sh +++ b/src/arch/mpi-linux-arm8/conv-mach.sh @@ -1,7 +1,6 @@ . $CHARMINC/cc-mpiopts.sh CMK_XIOPTS='' -CMK_WARNINGS_ARE_ERRORS='-Werror' CMK_CXX_OPTIMIZE='-O3' CMK_QT='generic64-light' diff --git a/src/arch/multicore-linux-arm7/conv-mach.sh b/src/arch/multicore-linux-arm7/conv-mach.sh index 223ea91f1d..acd05040ee 100644 --- a/src/arch/multicore-linux-arm7/conv-mach.sh +++ b/src/arch/multicore-linux-arm7/conv-mach.sh @@ -5,7 +5,6 @@ CMK_DEFS="$CMK_DEFS -D_REENTRANT" CMK_XIOPTS="" CMK_LIBS="-lpthread $CMK_LIBS" -CMK_WARNINGS_ARE_ERRORS="-Werror" CMK_CXX_OPTIMIZE="-O3" CMK_NO_PARTITIONS="1" diff --git a/src/arch/multicore-linux-arm8/conv-mach.sh b/src/arch/multicore-linux-arm8/conv-mach.sh index 223ea91f1d..acd05040ee 100644 --- a/src/arch/multicore-linux-arm8/conv-mach.sh +++ b/src/arch/multicore-linux-arm8/conv-mach.sh @@ -5,7 +5,6 @@ CMK_DEFS="$CMK_DEFS -D_REENTRANT" CMK_XIOPTS="" CMK_LIBS="-lpthread $CMK_LIBS" -CMK_WARNINGS_ARE_ERRORS="-Werror" CMK_CXX_OPTIMIZE="-O3" CMK_NO_PARTITIONS="1" diff --git a/src/arch/netlrts-linux-arm7/conv-mach.sh b/src/arch/netlrts-linux-arm7/conv-mach.sh index 874d277a85..b6c394a016 100644 --- a/src/arch/netlrts-linux-arm7/conv-mach.sh +++ b/src/arch/netlrts-linux-arm7/conv-mach.sh @@ -3,7 +3,6 @@ #CMK_DEFS="$CMK_DEFS -DHAVE_USR_INCLUDE_MALLOC_H=1 " CMK_XIOPTS='' -CMK_WARNINGS_ARE_ERRORS='-Werror' CMK_CXX_OPTIMIZE='-O3' CMK_QT='generic64-light' diff --git a/src/arch/netlrts-linux-arm8/conv-mach.sh b/src/arch/netlrts-linux-arm8/conv-mach.sh index 874d277a85..b6c394a016 100644 --- a/src/arch/netlrts-linux-arm8/conv-mach.sh +++ b/src/arch/netlrts-linux-arm8/conv-mach.sh @@ -3,7 +3,6 @@ #CMK_DEFS="$CMK_DEFS -DHAVE_USR_INCLUDE_MALLOC_H=1 " CMK_XIOPTS='' -CMK_WARNINGS_ARE_ERRORS='-Werror' CMK_CXX_OPTIMIZE='-O3' CMK_QT='generic64-light' diff --git a/src/arch/netlrts-linux-ppc64le/conv-mach.sh b/src/arch/netlrts-linux-ppc64le/conv-mach.sh index 44990dff10..100fc95868 100644 --- a/src/arch/netlrts-linux-ppc64le/conv-mach.sh +++ b/src/arch/netlrts-linux-ppc64le/conv-mach.sh @@ -2,7 +2,6 @@ #CMK_DEFS="$CMK_DEFS -DHAVE_USR_INCLUDE_MALLOC_H=1 " CMK_XIOPTS='' -CMK_WARNINGS_ARE_ERRORS='-Werror' CMK_CXX_OPTIMIZE='-O3' CMK_QT='generic64-light' diff --git a/src/arch/netlrts-linux-x86_64/conv-mach.sh b/src/arch/netlrts-linux-x86_64/conv-mach.sh index 44990dff10..100fc95868 100644 --- a/src/arch/netlrts-linux-x86_64/conv-mach.sh +++ b/src/arch/netlrts-linux-x86_64/conv-mach.sh @@ -2,7 +2,6 @@ #CMK_DEFS="$CMK_DEFS -DHAVE_USR_INCLUDE_MALLOC_H=1 " CMK_XIOPTS='' -CMK_WARNINGS_ARE_ERRORS='-Werror' CMK_CXX_OPTIMIZE='-O3' CMK_QT='generic64-light' diff --git a/src/arch/verbs-linux-ppc64le/conv-mach.sh b/src/arch/verbs-linux-ppc64le/conv-mach.sh index 4e07c94508..c058cdc5ab 100644 --- a/src/arch/verbs-linux-ppc64le/conv-mach.sh +++ b/src/arch/verbs-linux-ppc64le/conv-mach.sh @@ -3,7 +3,6 @@ #CMK_DEFS="$CMK_DEFS -DHAVE_USR_INCLUDE_MALLOC_H=1 " CMK_XIOPTS='' CMK_LIBS="$CMK_LIBS -libverbs" -CMK_WARNINGS_ARE_ERRORS='-Werror' CMK_CXX_OPTIMIZE='-O3' CMK_QT='generic64-light' diff --git a/src/arch/verbs-linux-x86_64/conv-mach.sh b/src/arch/verbs-linux-x86_64/conv-mach.sh index 4e07c94508..c058cdc5ab 100644 --- a/src/arch/verbs-linux-x86_64/conv-mach.sh +++ b/src/arch/verbs-linux-x86_64/conv-mach.sh @@ -3,7 +3,6 @@ #CMK_DEFS="$CMK_DEFS -DHAVE_USR_INCLUDE_MALLOC_H=1 " CMK_XIOPTS='' CMK_LIBS="$CMK_LIBS -libverbs" -CMK_WARNINGS_ARE_ERRORS='-Werror' CMK_CXX_OPTIMIZE='-O3' CMK_QT='generic64-light' diff --git a/src/scripts/charmc b/src/scripts/charmc index 30733b63b8..4614615521 100755 --- a/src/scripts/charmc +++ b/src/scripts/charmc @@ -1066,7 +1066,7 @@ fi PROCESSED_MODULES=() -if [ "$WERROR" = "1" ] +if [[ "$WERROR" = "1" && -n "$CMK_WARNINGS_ARE_ERRORS" ]] then OPTS+=("$CMK_WARNINGS_ARE_ERRORS") fi From 0a05f1678f9d2e341e16e3ad147b82a65b49d97c Mon Sep 17 00:00:00 2001 From: Evan Ramos Date: Sat, 15 Apr 2023 20:53:31 -0500 Subject: [PATCH 018/155] Cleanup: Remove more vestiges of Blue Gene --- CMakeLists.txt | 2 +- README.md | 2 +- benchmarks/charm++/streamingAllToAll/Makefile | 4 - buildold | 2 +- doc/ampi/03-using.rst | 20 +- doc/charm++/manual.rst | 25 +- doc/projections/manual.rst | 3 - examples/ampi/Cjacobi3D/bg_config | 17 -- examples/ampi/Cjacobi3D/jacobi-cpp.C | 3 - examples/ampi/Cjacobi3D/jacobi-get.C | 3 - examples/ampi/Cjacobi3D/jacobi.C | 3 - examples/charm++/TRAM/Makefile | 4 - examples/charm++/topology/matmul3d/Makefile | 18 +- src/arch/pami/machine.C | 4 +- src/arch/pamilrts/conv-mach-async.h | 2 +- src/arch/pamilrts/lrtsqueue.h | 241 ------------------ src/arch/pamilrts/machine.C | 26 +- src/arch/util/cmiqueue.h | 8 - src/ck-core/qd.C | 7 - src/ck-perf/trace-controlPoints.C | 2 +- src/conv-core/convcore.C | 4 - src/conv-core/converse.h | 9 +- src/libs/ck-libs/ckloop/CkLoop.C | 2 +- src/scripts/Makefile | 2 +- src/scripts/charmc | 11 +- src/scripts/configure.ac | 4 +- src/util/cmimemcpy.h | 98 ------- src/util/cmimemcpy_qpx.c | 111 -------- src/util/cmimemcpy_qpx.h | 15 -- src/util/topomanager/TopoManager.C | 5 - src/util/topomanager/TopoManager.h | 7 +- src/xlat-i/sdag/CSdagConstruct.C | 1 - tests/charm++/jacobi3d/jacobi3d.C | 1 - 33 files changed, 37 insertions(+), 629 deletions(-) delete mode 100644 examples/ampi/Cjacobi3D/bg_config delete mode 100644 src/arch/pamilrts/lrtsqueue.h delete mode 100644 src/util/cmimemcpy.h delete mode 100644 src/util/cmimemcpy_qpx.c delete mode 100644 src/util/cmimemcpy_qpx.h diff --git a/CMakeLists.txt b/CMakeLists.txt index 47c2ead332..fa57fb912b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -765,7 +765,7 @@ set(src-util-h-sources src/util/SSE-Double.h src/util/SSE-Float.h src/util/ckimage.h src/util/cklists.h src/util/ckliststring.h src/util/ckregex.h src/util/cksequence.h src/util/cksequence_factory.h src/util/cksequence_internal.h src/util/ckstatistics.h src/util/ckvector3d.h - src/util/cmimemcpy.h src/util/cmimemcpy_qpx.h src/util/cmirdmautils.h + src/util/cmirdmautils.h src/util/cmitls.h src/util/conv-lists.h src/util/crc32.h src/util/hilbert.h src/util/partitioning_strategies.h src/util/pup.h src/util/pup_c.h src/util/pup_cmialloc.h src/util/pup_mpi.h src/util/pup_paged.h diff --git a/README.md b/README.md index f42cc336ca..34bca9e4ea 100644 --- a/README.md +++ b/README.md @@ -152,7 +152,7 @@ for more information: * `tcp` - The `netlrts-` version communicates via UDP by default. The `tcp` option will use TCP instead. The TCP version of Charm++ is usually slower than UDP, but it is more reliable. -* `async` - For Blue Gene/Q, this option enables use of hardware communication +* `async` - On PAMI systems, this option enables use of hardware communication threads. For applications with significant communication on large scale, this option typically improves performance. * `regularpages` - On Cray systems, Charm++'s default is to use `hugepages`. This diff --git a/benchmarks/charm++/streamingAllToAll/Makefile b/benchmarks/charm++/streamingAllToAll/Makefile index 00a9d56297..30973814bc 100644 --- a/benchmarks/charm++/streamingAllToAll/Makefile +++ b/benchmarks/charm++/streamingAllToAll/Makefile @@ -6,10 +6,6 @@ OBJS = ataTest.o TARGET = ataTest -ifeq ($(CMK_COMPILER),bgxlc) - TARGET = -endif - all: $(TARGET) test: $(foreach i,$(TARGET),test-$i) diff --git a/buildold b/buildold index bbd54a5ec2..f33e59fe12 100755 --- a/buildold +++ b/buildold @@ -49,7 +49,7 @@ syntax() { echo ' icc, iccstatic Intel compilers (default or static linking)' echo ' xlc, xlc64 IBM XL compilers (with 64-bit option on architectures with 32-bit modes)' echo ' gcc GNU compiler collection (on platforms where the default differs)' - echo ' clang Clang C/C++ compiler (including bgclang)' + echo ' clang Clang C/C++ compiler' echo ' icx Intel oneAPI DPC++/C++ compiler' echo ' pgcc Portland Group compilers' echo '' diff --git a/doc/ampi/03-using.rst b/doc/ampi/03-using.rst index 3a96151d5c..5dac6dd65d 100644 --- a/doc/ampi/03-using.rst +++ b/doc/ampi/03-using.rst @@ -570,13 +570,13 @@ different schemes. .. _tab:portability: .. table:: Portability of current implementations of three privatization schemes. "Yes" means we have implemented this technique. "Maybe" indicates there are no theoretical problems, but no implementation exists. "No" indicates the technique is impossible on this platform. - ==================== ===== ====== ==== ======= === ====== ===== ===== - Privatization Scheme Linux Mac OS BG/Q Windows x86 x86_64 PPC ARM7 - ==================== ===== ====== ==== ======= === ====== ===== ===== - Manual Code Editing Yes Yes Yes Yes Yes Yes Yes Yes - PIEglobals Yes No No No Yes Yes Yes Yes - TLSglobals Yes Yes No Maybe Yes Yes Maybe Maybe - PiPglobals Yes No No No Yes Yes Yes Yes - FSglobals Yes Yes No Yes Yes Yes Yes Yes - Swapglobals Yes No No No Yes Yes Yes Yes - ==================== ===== ====== ==== ======= === ====== ===== ===== + ==================== ===== ====== ======= === ====== ===== ===== + Privatization Scheme Linux Mac OS Windows x86 x86_64 PPC ARM7 + ==================== ===== ====== ======= === ====== ===== ===== + Manual Code Editing Yes Yes Yes Yes Yes Yes Yes + PIEglobals Yes No No Yes Yes Yes Yes + TLSglobals Yes Yes Maybe Yes Yes Maybe Maybe + PiPglobals Yes No No Yes Yes Yes Yes + FSglobals Yes Yes Yes Yes Yes Yes Yes + Swapglobals Yes No No Yes Yes Yes Yes + ==================== ===== ====== ======= === ====== ===== ===== diff --git a/doc/charm++/manual.rst b/doc/charm++/manual.rst index 2648d42189..a00c37287d 100644 --- a/doc/charm++/manual.rst +++ b/doc/charm++/manual.rst @@ -8198,30 +8198,21 @@ from zero: PEs are ranked from ``0`` to ``CmiNumPes()``, and nodes are ranked from ``0`` to ``CmiNumNodes()``. Charm++ provides a unified abstraction for querying topology information of -IBM's BG/Q and Cray's XE6. The ``TopoManager`` singleton object, which can be +Cray's XE6. The ``TopoManager`` singleton object, which can be used by including ``TopoManager.h``, contains the following methods: getDimNX(), getDimNY(), getDimNZ(): - Returns the length of X, Y and Z dimensions (except BG/Q). - -getDimNA(), getDimNB(), getDimNC(), getDimND(), getDimNE(): - Returns the length of A, B, C, D and E dimensions on BG/Q. + Returns the length of X, Y and Z dimensions. getDimNT(): Returns the length of T dimension. TopoManager uses the T dimension to represent different cores that reside within a physical node. rankToCoordinates(int pe, int &x, int &y, int &z, int &t): - Get the coordinates of PE with rank *pe* (except BG/Q). - -rankToCoordinates(int pe, int &a, int &b, int &c, int &d, int &e, int &t): - Get the coordinates of PE with rank *pe* on BG/Q. + Get the coordinates of PE with rank *pe*. coordinatesToRank(int x, int y, int z, int t): - Returns the rank of PE with given coordinates (except BG/Q). - -coordinatesToRank(int a, int b, int c, int d, int e, int t): - Returns the rank of PE with given coordinates on BG/Q. + Returns the rank of PE with given coordinates. getHopsBetweenRanks(int pe1, int pe2): Returns the distance between the given PEs in terms of the hops count @@ -8897,10 +8888,6 @@ this integrated library on Linux. - Clang: 3.7 or newer -You can use this integrated OpenMP with *clang* on IBM Blue Gene machines -without special compilation flags (don't need to add -fopenmp or --openmp on Blue Gene clang). - On Linux, the OpenMP supported version of clang has been installed in default recently. For example, Ubuntu has been released with clang higher than 3.7 since 15.10. Depending on which version of clang is @@ -9522,9 +9509,7 @@ compiler used to build charm. In the linking step, it is required to pass ``-mpi`` as an argument because of which *charmc* performs the linking for interoperation. The charm libraries, which one wants to be linked, should be passed using ``-module`` option. Refer to -``examples/charm++/mpi-coexist/Makefile`` to view a working example. For -execution on BG/Q systems, the following additional argument should be -added to the launch command: ``-envs PAMI_CLIENTS=MPI,Converse``. +``examples/charm++/mpi-coexist/Makefile`` to view a working example. User Driven Mode ~~~~~~~~~~~~~~~~ diff --git a/doc/projections/manual.rst b/doc/projections/manual.rst index f8780db032..9b1ad3575f 100644 --- a/doc/projections/manual.rst +++ b/doc/projections/manual.rst @@ -1724,9 +1724,6 @@ Known Issues This section lists known issues and bugs with the Projections framework that we have not resolved at this time. -- Charm++ scheduler idle time is known to be incorrectly recorded on - the BG/L machine at IBM TJ Watson. - - End-of-Run analysis techniques (while tracing applications) are currently known to hang for applications that make multiple calls to traceBegin() and traceEnd() on the same processor through multiple diff --git a/examples/ampi/Cjacobi3D/bg_config b/examples/ampi/Cjacobi3D/bg_config deleted file mode 100644 index a06bfe07ad..0000000000 --- a/examples/ampi/Cjacobi3D/bg_config +++ /dev/null @@ -1,17 +0,0 @@ -x 2 -y 2 -z 1 -cth 1 -wth 1 -stacksize 10000 -timing walltime -#timing bgelapse -#timing counter -cpufactor 1.0 -fpfactor 5e-7 -traceroot . -log no -correct no -network lemieux -#projections 2,4-8 - diff --git a/examples/ampi/Cjacobi3D/jacobi-cpp.C b/examples/ampi/Cjacobi3D/jacobi-cpp.C index be17811856..9f2489ce95 100644 --- a/examples/ampi/Cjacobi3D/jacobi-cpp.C +++ b/examples/ampi/Cjacobi3D/jacobi-cpp.C @@ -5,8 +5,6 @@ #include "charm++.h" #endif -#define BGPRINTF(x) - int DIM, DIMX, DIMY, DIMZ, NX, NY, NZ; class chunk { @@ -241,7 +239,6 @@ int main(int ac, char** av) starttime = MPI_Wtime(); for(iter=1; iter<=niter; iter++) { - BGPRINTF("interation starts at %f\n"); maxerr = 0.0; cp->copyout(); diff --git a/examples/ampi/Cjacobi3D/jacobi-get.C b/examples/ampi/Cjacobi3D/jacobi-get.C index d9d1fb4c65..1e13f1ad33 100644 --- a/examples/ampi/Cjacobi3D/jacobi-get.C +++ b/examples/ampi/Cjacobi3D/jacobi-get.C @@ -3,8 +3,6 @@ #include "mpi.h" #include -#define BGPRINTF(x) - #define DIMX 100 #define DIMY 100 #define DIMZ 100 @@ -148,7 +146,6 @@ int main(int ac, char** av) maxerr = 0.0; for(iter=1; iter<=niter; iter++) { - BGPRINTF("interation starts at %f\n"); maxerr = 0.0; /* copyout(cp->sbxm, cp->t, 1, 1, 1, DIMY, 1, DIMZ); diff --git a/examples/ampi/Cjacobi3D/jacobi.C b/examples/ampi/Cjacobi3D/jacobi.C index 10d6b0b74b..37d0cc7e7a 100644 --- a/examples/ampi/Cjacobi3D/jacobi.C +++ b/examples/ampi/Cjacobi3D/jacobi.C @@ -2,8 +2,6 @@ #include #include "mpi.h" -#define BGPRINTF(x) - #define DIMX 100 #define DIMY 100 #define DIMZ 100 @@ -155,7 +153,6 @@ int main(int ac, char** av) starttime = MPI_Wtime(); for(iter=1; iter<=niter; iter++) { - BGPRINTF("interation starts at %f\n"); maxerr = 0.0; copyout(cp->sbxm, cp->t, 1, 1, 1, DIMY, 1, DIMZ); copyout(cp->sbxp, cp->t, DIMX, DIMX, 1, DIMY, 1, DIMZ); diff --git a/examples/charm++/TRAM/Makefile b/examples/charm++/TRAM/Makefile index 6ce6f4c1e0..8834650aaa 100644 --- a/examples/charm++/TRAM/Makefile +++ b/examples/charm++/TRAM/Makefile @@ -6,10 +6,6 @@ DIRS = aggregateRandomAccessArray \ TESTDIRS = $(DIRS) -ifeq ($(CMK_COMPILER),bgxlc) - TESTDIRS = -endif - all: $(foreach i,$(DIRS),build-$i) test: $(foreach i,$(TESTDIRS),test-$i) diff --git a/examples/charm++/topology/matmul3d/Makefile b/examples/charm++/topology/matmul3d/Makefile index cd94947380..90b0f07b79 100644 --- a/examples/charm++/topology/matmul3d/Makefile +++ b/examples/charm++/topology/matmul3d/Makefile @@ -1,27 +1,17 @@ CHARMC=../../../../bin/charmc $(OPTS) -MATH_LIB = -lesslbg -lesslsmpbg -lxlf90_r \ - -lmass -lmassv -lxlfmath -lxlomp_ser -lxlsmp -lpthread - -LOCAL_LIBS = -L/soft/apps/LAPACK \ - -L/opt/ibmcmp/xlf/bg/11.1/bglib \ - -L/opt/ibmcmp/xlsmp/bg/1.7/bglib \ - -L/bgsys/ibm_essl/sles10/prod/opt/ibmmath/lib \ - -L/bgsys/drivers/ppcfloor/gnu-linux/powerpc-bgp-linux/lib \ - -L/gpfs/home/bohm/zlib/lib - OBJS = matmul3d.o all: matmul3d matmul3d: $(OBJS) - $(CHARMC) -O3 -language charm++ $(LOCAL_LIBS) $(MATH_LIB) -o matmul3d $(OBJS) + $(CHARMC) -language charm++ -o matmul3d $(OBJS) projections: $(OBJS) - $(CHARMC) -O3 -language charm++ -tracemode projections -lz -o matmul3d.prj $(OBJS) + $(CHARMC) -language charm++ -tracemode projections -o matmul3d.prj $(OBJS) summary: $(OBJS) - $(CHARMC) -O3 -language charm++ -tracemode summary -lz -o matmul3d.sum $(OBJS) + $(CHARMC) -language charm++ -tracemode summary -lz -o matmul3d.sum $(OBJS) matmul3d.decl.h: matmul3d.ci $(CHARMC) matmul3d.ci @@ -30,4 +20,4 @@ clean: rm -f *.decl.h *.def.h conv-host *.o matmul3d matmul3d.prj charmrun *~ matmul3d.o: matmul3d.C matmul3d.h matmul3d.decl.h - $(CHARMC) -c -O3 -I/bgsys/ibm_essl/sles10/prod/opt/ibmmath/include matmul3d.C + $(CHARMC) -c matmul3d.C diff --git a/src/arch/pami/machine.C b/src/arch/pami/machine.C index c5968f4844..b6474c139e 100644 --- a/src/arch/pami/machine.C +++ b/src/arch/pami/machine.C @@ -155,7 +155,7 @@ static PPCAtomicMutex *node_recv_mutex; #if CMK_SMP && !CMK_MULTICORE //The random seed to pick destination context CMK_THREADLOCAL uint32_t r_seed = 0xdeadbeef; -CMK_THREADLOCAL int32_t _cmi_bgq_incommthread = 0; +CMK_THREADLOCAL int32_t _cmi_async_incommthread = 0; CMK_THREADLOCAL int32_t _comm_thread_id = 0; #endif @@ -575,7 +575,7 @@ pami_result_t init_comm_thread (pami_context_t context, rseedl |= (uint64_t)context; r_seed = ((uint32_t)rseedl)^((uint32_t)(rseedl >> 32)); - _cmi_bgq_incommthread = 1; + _cmi_async_incommthread = 1; return PAMI_SUCCESS; } diff --git a/src/arch/pamilrts/conv-mach-async.h b/src/arch/pamilrts/conv-mach-async.h index a4d2a6d6fd..07e158caee 100644 --- a/src/arch/pamilrts/conv-mach-async.h +++ b/src/arch/pamilrts/conv-mach-async.h @@ -3,7 +3,7 @@ //#define DELTA_COMPRESS 1 #undef CMK_MSG_HEADER_EXT_ -#if DELTA_COMPRESkS +#if DELTA_COMPRESS #define CMK_MSG_HEADER_EXT_ CmiUInt2 rank, hdl,xhdl,info, type; unsigned char cksum, magic; int root, size, dstnode; CmiUInt2 redID, padding; char work[6*sizeof(void *)]; CmiUInt4 compressStart; CmiUInt2 compress_flag,xxhdl; CmiUInt8 persistRecvHandler; CmiUInt1 cmaMsgType:2, nokeep:1; #else #define CMK_MSG_HEADER_EXT_ CmiUInt2 rank, hdl,xhdl,info, type; unsigned char cksum, magic; int root, size, dstnode; CmiUInt2 redID, padding; char work[6*sizeof(void *)]; CmiUInt1 cmaMsgType:2, nokeep:1; diff --git a/src/arch/pamilrts/lrtsqueue.h b/src/arch/pamilrts/lrtsqueue.h deleted file mode 100644 index 6b003c36f6..0000000000 --- a/src/arch/pamilrts/lrtsqueue.h +++ /dev/null @@ -1,241 +0,0 @@ - -#ifndef __L2_ATOMIC_QUEUE__ -#define __L2_ATOMIC_QUEUE__ - -#include -#include -#include -#include -#include "spi/include/l2/atomic.h" -#include "spi/include/l1p/flush.h" -#include "pcqueue.h" - -#define DEFAULT_SIZE 1024 -#define L2_ATOMIC_FULL 0x8000000000000000UL -#define L2_ATOMIC_EMPTY 0x8000000000000000UL - -#define L2A_SUCCESS 0 -#define L2A_EAGAIN -1 -#define L2A_FAIL -2 - -typedef void* LRTSQueueElement; -static void *l2atomicbuf; - -typedef struct _l2atomicstate { - volatile uint64_t Consumer; // not used atomically - volatile uint64_t Producer; - volatile uint64_t UpperBound; - volatile uint64_t Flush; // contents not used -} L2AtomicState; - -typedef struct _l2atomicq { - L2AtomicState * _l2state; - volatile void * volatile * _array; - int _useOverflowQ; - int _qsize; - PCQueue _overflowQ; - pthread_mutex_t _overflowMutex; -} L2AtomicQueue; - -typedef L2AtomicQueue* LRTSQueue; - -void LRTSQueueInit (void * l2mem, - size_t l2memsize, - LRTSQueue queue, - int use_overflow, - int nelem) -{ - pami_result_t rc; - - //Verify counter array is 64-byte aligned - assert( (((uintptr_t) l2mem) & (0x1F)) == 0 ); - assert (sizeof(L2AtomicState) <= l2memsize); - - queue->_useOverflowQ = use_overflow; - - int qsize = 2; - while (qsize < nelem) - qsize *= 2; - queue->_qsize = qsize; - - queue->_l2state = (L2AtomicState *)l2mem; - pthread_mutex_init(&queue->_overflowMutex, NULL); - queue->_overflowQ = PCQueueCreate(); - L2_AtomicStore(&queue->_l2state->Consumer, 0); - L2_AtomicStore(&queue->_l2state->Producer, 0); - L2_AtomicStore(&queue->_l2state->UpperBound, qsize); - - rc = (pami_result_t)posix_memalign ((void **)&queue->_array, - 64, /*L1 line size for BG/Q */ - sizeof(LRTSQueueElement) * qsize); - - assert(rc == PAMI_SUCCESS); - memset((void*)queue->_array, 0, sizeof(LRTSQueueElement)*qsize); -} - -int LRTSQueuePush(LRTSQueue queue, - void * element) -{ - //fprintf(stderr,"Insert message %p\n", element); - int qsize_1 = queue->_qsize - 1; - uint64_t index = L2_AtomicLoadIncrementBounded(&queue->_l2state->Producer); - L1P_FlushRequests(); - if (index != L2_ATOMIC_FULL) { - queue->_array[index & qsize_1] = element; - return L2A_SUCCESS; - } - - //We dont want to use the overflow queue - if (!queue->_useOverflowQ) - return L2A_EAGAIN; //Q is full, try later - - //No ordering is guaranteed if there is overflow - pthread_mutex_lock(&queue->_overflowMutex); - PCQueuePush(queue->_overflowQ, (char *)element); - pthread_mutex_unlock(&queue->_overflowMutex); - - return L2A_SUCCESS; -} - -void * LRTSQueuePop(LRTSQueue queue) -{ - uint64_t head, tail; - tail = queue->_l2state->Producer; - head = queue->_l2state->Consumer; - int qsize_1 = queue->_qsize-1; - - volatile void *e = NULL; - if (head < tail) { - e = queue->_array[head & qsize_1]; - while (e == NULL) - e = queue->_array[head & qsize_1]; - - //fprintf(stderr,"Found message %p\n", e); - - queue->_array[head & qsize_1] = NULL; - ppc_msync(); - - head ++; - queue->_l2state->Consumer = head; - - //Charm++ does not require message ordering - //So we dont acquire overflow mutex here - uint64_t n = head + queue->_qsize; - // is atomic-store needed? - L2_AtomicStore(&queue->_l2state->UpperBound, n); - return (void*) e; - } - - //We dont have an overflowQ - if (!queue->_useOverflowQ) - return NULL; - - /* head == tail (head cannot be greater than tail) */ - if (PCQueueLength(queue->_overflowQ) > 0) { - pthread_mutex_lock(&queue->_overflowMutex); - e = PCQueuePop (queue->_overflowQ); - pthread_mutex_unlock(&queue->_overflowMutex); - - return (void *) e; - } - - return (void *) e; -} - -int LRTSQueueEmpty (LRTSQueue queue) { - return ( (PCQueueLength(queue->_overflowQ) == 0) && - (queue->_l2state->Producer == queue->_l2state->Consumer) ); -} - -//spin block in the L2 atomic queue till there is a message. fail and -//return after n iterations -int LRTSQueueSpinWait (LRTSQueue queue, - int n) -{ - if (!LRTSQueueEmpty(queue)) - return 0; //queue is not empty so return - - uint64_t head, tail; - head = queue->_l2state->Consumer; - - size_t i = n; - do { - tail = queue->_l2state->Producer; - i--; - } - //While the queue is empty and i < n - while (head == tail && i != 0); - - return 0; //fail queue is empty -} - -//spin block in the L2 atomic queue till there is a message. fail and -//return after n iterations -int LRTSQueue2QSpinWait (LRTSQueue queue0, - LRTSQueue queue1, - int n) -{ - if (!LRTSQueueEmpty(queue0)) - return 0; //queue0 is not empty so return - - if (!LRTSQueueEmpty(queue1)) - return 0; //queue is not empty so return - - uint64_t head0, tail0; - uint64_t head1, tail1; - - head0 = queue0->_l2state->Consumer; - head1 = queue1->_l2state->Consumer; - - size_t i = n; - do { - tail0 = queue0->_l2state->Producer; - tail1 = queue1->_l2state->Producer; - i --; - } while (head0==tail0 && head1==tail1 && i!=0); - - return 0; -} - -typedef pami_result_t (*pamix_proc_memalign_fn) (void**, size_t, size_t, const char*); -void LRTSQueuePreInit(void) -{ - pami_result_t rc; - int actualNodeSize = 64/Kernel_ProcessCount(); - pami_extension_t l2; - pamix_proc_memalign_fn PAMIX_L2_proc_memalign; - size_t size = (QUEUE_NUMS + 2*actualNodeSize) * sizeof(L2AtomicState); - // each rank, node, immediate - //size_t size = (4*actualNodeSize+1) * sizeof(L2AtomicState); - rc = PAMI_Extension_open(NULL, "EXT_bgq_l2atomic", &l2); - CmiAssert (rc == 0); - PAMIX_L2_proc_memalign = (pamix_proc_memalign_fn)PAMI_Extension_symbol(l2, "proc_memalign"); - rc = PAMIX_L2_proc_memalign(&l2atomicbuf, 64, size, NULL); - CmiAssert (rc == 0); -} - -LRTSQueue LRTSQueueCreate(void) -{ - static int position=0; - int place; - if(CmiMyRank() == 0) - place = position; - else - place = CmiMyRank(); - LRTSQueue Q; - Q = (LRTSQueue)calloc(1, sizeof( struct _l2atomicq )); - LRTSQueueInit ((char *) l2atomicbuf + sizeof(L2AtomicState)*place, - sizeof(L2AtomicState), - Q, - 1, /*use overflow*/ - DEFAULT_SIZE /*1024 entries*/); - if(CmiMyRank() == 0) { - if(position == 0) { - position = CmiMyNodeSize(); - } else { - position++; - } - } - return Q; -} -#endif diff --git a/src/arch/pamilrts/machine.C b/src/arch/pamilrts/machine.C index ea9802e4e5..7feafd1186 100644 --- a/src/arch/pamilrts/machine.C +++ b/src/arch/pamilrts/machine.C @@ -110,16 +110,10 @@ static PPCAtomicMutex *node_recv_mutex; //The random seed to pick destination context CMK_THREADLOCAL uint32_t r_seed = 0xdeadbeef; -CMK_THREADLOCAL int32_t _cmi_bgq_incommthread = 0; +CMK_THREADLOCAL int32_t _cmi_async_incommthread = 0; CMK_THREADLOCAL int32_t _comm_thread_id = 0; #endif -//int CmiInCommThread () { -// //if (_cmi_bgq_incommthread) -// //printf ("CmiInCommThread: %d\n", _cmi_bgq_incommthread); -// return _cmi_bgq_incommthread; -//} - #if CMK_SMP && CMK_PPC_ATOMIC_QUEUE void LrtsSpecializedQueuePush(int pe, void *msg) { PPCAtomicEnqueue(&procState[pe].atomic_queue, (char *)msg); @@ -155,11 +149,6 @@ void LrtsSpecializedMutexRelease() { #endif static void CmiNetworkBarrier(int async); -#if SPECIFIC_PCQUEUE && CMK_SMP -#define QUEUE_NUMS _Cmi_mynodesize + 3 -#include "lrtsqueue.h" -#include "memalloc.C" -#endif #include "machine-lrts.h" #include "machine-common-core.C" @@ -459,7 +448,7 @@ pami_result_t init_comm_thread (pami_context_t context, rseedl |= (uint64_t)context; r_seed = ((uint32_t)rseedl)^((uint32_t)(rseedl >> 32)); - _cmi_bgq_incommthread = 1; + _cmi_async_incommthread = 1; return PAMI_SUCCESS; } @@ -631,17 +620,6 @@ void LrtsInit(int *argc, char ***argv, int *numNodes, int *myNodeID) #if CMK_SMP posix_memalign((void**)&procState, 128, (_Cmi_mynodesize) * sizeof(ProcState)); -#if SPECIFIC_PCQUEUE - //if(CmiMyPe() == 0) - // printf(" in L2Atomic Queue\n"); - LRTSQueuePreInit(); - //reserve for pe queues and node queue first - int actualNodeSize = 64/Kernel_ProcessCount(); - CmiMemAllocInit_bgq ((char*)l2atomicbuf + - (QUEUE_NUMS)*sizeof(L2AtomicState), - 2*actualNodeSize*sizeof(L2AtomicState)); -#else - #if CMK_PPC_ATOMIC_QUEUE int actualNodeSize = _Cmi_mynodesize; diff --git a/src/arch/util/cmiqueue.h b/src/arch/util/cmiqueue.h index 642bfae41e..cc97875105 100644 --- a/src/arch/util/cmiqueue.h +++ b/src/arch/util/cmiqueue.h @@ -1,18 +1,10 @@ #ifndef _CMI_QUEUE_DECL_H #define _CMI_QUEUE_DECL_H -#if SPECIFIC_PCQUEUE && CMK_SMP -#define CMIQueue LRTSQueue -#define CMIQueuePush LRTSQueuePush -#define CMIQueueCreate LRTSQueueCreate -#define CMIQueuePop LRTSQueuePop -#define CMIQueueEmpty LRTSQueueEmpty -#else #define CMIQueue PCQueue #define CMIQueuePush PCQueuePush #define CMIQueueCreate PCQueueCreate #define CMIQueuePop PCQueuePop #define CMIQueueEmpty PCQueueEmpty -#endif #endif /* _CMI_QUEUE_DECL_H */ diff --git a/src/ck-core/qd.C b/src/ck-core/qd.C index 00beb253ea..f940a967cc 100644 --- a/src/ck-core/qd.C +++ b/src/ck-core/qd.C @@ -39,14 +39,7 @@ class QdCallback { QdCallback(CkCallback cb_) : cb(cb_) {} // void send(void) { CkSendMsg(ep,CkAllocMsg(0,0,0),&cid); } void send(void) { - // pretending pe 0 in blue gene mode, switch back after the call. -#if CMK_CONDS_USE_SPECIAL_CODE - int old = CmiSwitchToPE(0); -#endif cb.send(NULL); -#if CMK_CONDS_USE_SPECIAL_CODE - CmiSwitchToPE(old); -#endif } }; diff --git a/src/ck-perf/trace-controlPoints.C b/src/ck-perf/trace-controlPoints.C index 0ceeccc481..588cbed6d9 100644 --- a/src/ck-perf/trace-controlPoints.C +++ b/src/ck-perf/trace-controlPoints.C @@ -190,7 +190,7 @@ void TraceControlPoints::free(void *where, int size) { void TraceControlPoints::traceClose(void) { - // Print out some performance counters on BG/P + // Print out some performance counters where available CProxy_TraceControlPointsBOC myProxy(traceControlPointsGID); diff --git a/src/conv-core/convcore.C b/src/conv-core/convcore.C index 9b8115e7d6..66d045d5f1 100644 --- a/src/conv-core/convcore.C +++ b/src/conv-core/convcore.C @@ -113,10 +113,6 @@ void initQd(char **argv); void CmiPoolAllocInit(int numBins); #endif -#if CMK_CONDS_USE_SPECIAL_CODE -CmiSwitchToPEFnPtr CmiSwitchToPE; -#endif - CpvExtern(int, _traceCoreOn); /* projector */ void CcdModuleInit(char **); void CmiMemoryInit(char **); diff --git a/src/conv-core/converse.h b/src/conv-core/converse.h index d10e23d29c..34c7b4780e 100644 --- a/src/conv-core/converse.h +++ b/src/conv-core/converse.h @@ -472,8 +472,8 @@ extern CmiNodeLock CmiMemLock_lock; #if CMK_PAMI_LINUX_PPC8 && CMK_ENABLE_ASYNC_PROGRESS -extern CMK_THREADLOCAL int32_t _cmi_bgq_incommthread; -#define CmiInCommThread() (_cmi_bgq_incommthread) +extern CMK_THREADLOCAL int32_t _cmi_async_incommthread; +#define CmiInCommThread() (_cmi_async_incommthread) #else #define CmiInCommThread() (CmiMyRank() == CmiMyNodeSize()) #endif @@ -1834,12 +1834,7 @@ typedef void (*CcdVoidFn)(void *userParam,double curWallTime); #endif #define CcdIGNOREPE -2 -#if CMK_CONDS_USE_SPECIAL_CODE -typedef int (*CmiSwitchToPEFnPtr)(int pe); -extern CmiSwitchToPEFnPtr CmiSwitchToPE; -#else #define CmiSwitchToPE(pe) pe -#endif void CcdCallFnAfter(CcdVoidFn fnp, void *arg, double msecs); int CcdCallOnCondition(int condnum, CcdCondFn fnp, void *arg); int CcdCallOnConditionKeep(int condnum, CcdCondFn fnp, void *arg); diff --git a/src/libs/ck-libs/ckloop/CkLoop.C b/src/libs/ck-libs/ckloop/CkLoop.C index b5d318313b..5f424c8cee 100644 --- a/src/libs/ck-libs/ckloop/CkLoop.C +++ b/src/libs/ck-libs/ckloop/CkLoop.C @@ -34,7 +34,7 @@ static pthread_t *ndhThreads = NULL; static volatile int gCrtCnt = 0; static volatile int exitFlag = 0; -#if CMK_OS_IS_LINUX || CMK_USING_BGCLANG +#if CMK_OS_IS_LINUX #include #endif diff --git a/src/scripts/Makefile b/src/scripts/Makefile index cb72856a4f..69ca8804a8 100644 --- a/src/scripts/Makefile +++ b/src/scripts/Makefile @@ -184,7 +184,7 @@ UTILHEADERS=pup.h pupf.h pup_c.h pup_stl.h pup_mpi.h pup_toNetwork.h pup_toNetwo pup_c_functions.h \ ckimage.h ckdll.h ckhashtable.h ckbitvector.h cklists.h ckliststring.h \ cksequence.h ckstatistics.h ckvector3d.h conv-lists.h ckcomplex.h \ - sockRoutines.h sockRoutines.C cmimemcpy.h simd.h SSE-Double.h SSE-Float.h \ + sockRoutines.h sockRoutines.C simd.h SSE-Double.h SSE-Float.h \ crc32.h ckBIconfig.h rand48_replacement.h ckregex.h spanningTree.h json.hpp json_fwd.hpp cmirdmautils.h CKHEADERS=ck.h ckstream.h objid.h envelope.h init.h qd.h charm.h charm++.h \ diff --git a/src/scripts/charmc b/src/scripts/charmc index 4614615521..3902856284 100755 --- a/src/scripts/charmc +++ b/src/scripts/charmc @@ -67,7 +67,6 @@ OPTS=() #Specific options #charm internal flag, only pass to c and cxx, not f90 OPTS_CPP_INTERNAL=('-D__CHARMC__=1') -OPTS_CC_GENCPM=() OPTS_CPP='' OPTS_LDRO='' OPTS_CC='' @@ -1434,14 +1433,6 @@ then FORTRAN_SEQ_LIBRARIES+=($CMK_F90LIBS) fi -# GEN-CPM options -if [ "$CMK_COMPILER" = "bgclang" ] -then - OPTS_CC_GENCPM=(-x c) # -x c is only applied for the preprocessing of the GEN-CPM files on BG/Q -fi - -OPTS_CC_GENCPM=("${OPTS_CC[@]}" "${OPTS_CC_GENCPM[@]}") - ############ Determine the language and libraries ########## MIDDLE_LIBS=() @@ -1794,7 +1785,7 @@ CHARM_CXX="$CMK_CXX" CHARM_LD="$CMK_LD" CHARM_LDXX="$CMK_LDXX" -CHARM_CPP_C_FLAGS=($CMK_CPP_C_FLAGS "-I$CHARMINC" $CMK_INCDIR $CMK_SYSINC "${OPTS_CC_GENCPM[@]}" "${OPTS_CPP[@]}") +CHARM_CPP_C_FLAGS=($CMK_CPP_C_FLAGS "-I$CHARMINC" $CMK_INCDIR $CMK_SYSINC "${OPTS_CPP[@]}") CHARM_CC_FLAGS=($CMK_CC_FLAGS "-I$CHARMINC" $CMK_INCDIR $CMK_SYSINC "${OPTS_CPP_INTERNAL[@]}" "${OPTS_CPP[@]}" "${OPTS_CC[@]}") CHARM_CXX_FLAGS=($CMK_CXX_FLAGS "-I$CHARMINC" $CMK_INCDIR $CMK_SYSINC "${OPTS_CPP_INTERNAL[@]}" "${OPTS_CPP[@]}" "${OPTS_CXX[@]}") CHARM_LD_FLAGS=($CMK_LD_FLAGS $CMK_LINK_BINARY $CMK_LIBDIR "${OPTS_LD[@]}" "${ALL_LIBS[@]}") diff --git a/src/scripts/configure.ac b/src/scripts/configure.ac index 3cb724c2cc..d81a5651fe 100644 --- a/src/scripts/configure.ac +++ b/src/scripts/configure.ac @@ -789,8 +789,6 @@ then echo "For Intel's compiler please see" echo "https://github.com/UIUC-PPL/charm/issues/1560" echo "about making a suitable version of gcc/g++/libstdc++ available" - echo - echo "For Blue Gene/Q please use the Clang compiler" test_finish 1 fi @@ -1211,7 +1209,7 @@ test_cxx "whether C++ library has " "yes" "no" "" AC_DEFINE_UNQUOTED(CMK_HAS_CXX0X_CSTDATOMIC, $pass, [whether C++ library has ]) fi -if test $pass -ne 1 -a "$CMK_COMPILER" != "bgxlc" +if test $pass -ne 1 then echo "Charm++ requires C++11 atomic support" test_finish 1 diff --git a/src/util/cmimemcpy.h b/src/util/cmimemcpy.h deleted file mode 100644 index 4a01b0fc7e..0000000000 --- a/src/util/cmimemcpy.h +++ /dev/null @@ -1,98 +0,0 @@ - -#ifndef __CMI_MEMCPY_H__ -#define __CMI_MEMCPY_H__ - -/************************************************************** -* Optimized version of memory copy designed for Blue Gene/L * -* It inlines short memory copy operations and optimizes * -* 8 byte aligned copies larger than 128 bytes * -* - Sameer (04/07) * -* It has two functions : * -* inlined cmi_memcpy and __dcopy128 (dcopy.h) * -***************************************************************/ - -#include -#include - -#if !defined(__xlC__) && !defined(__xlc__) -#if !defined(__cplusplus) //for gcc to compile c programs -static -#endif -#endif -inline void *bg_bcopy( void *dest, const void *src, size_t bytes ) -{ - const unsigned char *r1 = (const unsigned char *)src; - unsigned char *r2 = (unsigned char *)dest; - size_t b4 = bytes >> 2; - size_t remainder = bytes & 3; - - while ( b4-- ) { - unsigned char u1 = *(r1+0); - unsigned char u2 = *(r1+1); - unsigned char u3 = *(r1+2); - unsigned char u4 = *(r1+3); - *(r2+0) = u1; - *(r2+1) = u2; - *(r2+2) = u3; - *(r2+3) = u4; - r1 += 4; - r2 += 4; - } - - while( remainder -- ) - *r2++ = *r1++; - - return( dest ); -} - -#if !defined(__xlC__) && !defined(__xlc__) -#if !defined(__cplusplus) //for gcc to compile c programs -static -#endif -#endif -inline void *bg_wcopy ( void *dest, const void *src , size_t bytes ) -{ - const unsigned *r1 = (const unsigned *)src; - unsigned *r2 = (unsigned *)dest; - size_t nw = bytes >> 3; - size_t remainder = bytes & 0x7; - - while ( nw -- ) { - unsigned u1 = *(r1+0); - unsigned u2 = *(r1+1); - *(r2+0) = u1; - *(r2+1) = u2; - r1 += 2; - r2 += 2; - } - - if ( remainder ) - bg_bcopy ( r2, r1, remainder ); - - return( dest ); -} - -void *bg_dcopy128 ( void * dest, const void *src, size_t n ); - -#if !defined(__xlC__) && !defined(__xlc__) -#if !defined(__cplusplus) //for gcc to compile c programs -static -#endif -#endif -inline void *CmiMemcpy ( void * dest, const void *src, size_t n ) { - unsigned long daddr = (unsigned long) dest; - unsigned long saddr = (unsigned long) src; - - if ( (n >= 128) && ( ((daddr & 0x07) == 0) && ((saddr & 0x07) == 0) )) - return bg_dcopy128 (dest, src, n); - else if ( ((daddr & 0x03) == 0) && ((saddr & 0x03) == 0) ) { - return bg_wcopy (dest, src, n); - } - else { - return bg_bcopy (dest, src, n); - } - - return 0; -} - -#endif diff --git a/src/util/cmimemcpy_qpx.c b/src/util/cmimemcpy_qpx.c deleted file mode 100644 index 6a7c17f66e..0000000000 --- a/src/util/cmimemcpy_qpx.c +++ /dev/null @@ -1,111 +0,0 @@ -#include -#include "cmimemcpy_qpx.h" - -#define QPX_LOAD(si,sb,fp) \ - do { \ - asm volatile("qvlfdx %0,%1,%2": "=f"(fp) : "b" (si), "r" (sb)); \ - } while(0); - -#define QPX_STORE(si,sb,fp) \ - do { \ - asm volatile("qvstfdx %2,%0,%1": : "b" (si), "r" (sb), "f"(fp) :"memory"); \ - } while(0); - -#ifndef __GNUC__ -#define FP_REG(i) asm("f"#i) -#define FP_REG1(i) "fr"#i -#else -#define FP_REG(i) asm("fr"#i) -#define FP_REG1(i) "fr"#i -#endif - -//Copy 512 bytes from a 32b aligned pointers -static inline size_t quad_copy_512( char* dest, const char* src ) { - register const double *fpp1_1, *fpp1_2; - register double *fpp2_1, *fpp2_2; - - register double f0 FP_REG(0); - register double f1 FP_REG(1); - register double f2 FP_REG(2); - register double f3 FP_REG(3); - register double f4 FP_REG(4); - register double f5 FP_REG(5); - register double f6 FP_REG(6); - register double f7 FP_REG(7); - - int r0; - int r1; - int r2; - int r3; - int r4; - int r5; - int r6; - int r7; - r0 = 0; - r1 = 64; - r2 = 128; - r3 = 192; - r4 = 256; - r5 = 320; - r6 = 384; - r7 = 448; - - fpp1_1 = (const double *)src; - fpp1_2 = (const double *)src +4; - - fpp2_1 = (double *)dest; - fpp2_2 = (double *)dest +4; - - QPX_LOAD(fpp1_1,r0,f0); - //asm volatile("qvlfdx 0,%0,%1": : "Ob" (fpp1_1), "r"(r0) :"memory"); - QPX_LOAD(fpp1_1,r1,f1); - QPX_LOAD(fpp1_1,r2,f2); - QPX_LOAD(fpp1_1,r3,f3); - QPX_LOAD(fpp1_1,r4,f4); - QPX_LOAD(fpp1_1,r5,f5); - QPX_LOAD(fpp1_1,r6,f6); - QPX_LOAD(fpp1_1,r7,f7); - - QPX_STORE(fpp2_1,r0,f0); - QPX_LOAD(fpp1_2,r0,f0); - QPX_STORE(fpp2_1,r1,f1); - QPX_LOAD(fpp1_2,r1,f1); - QPX_STORE(fpp2_1,r2,f2); - QPX_LOAD(fpp1_2,r2,f2); - QPX_STORE(fpp2_1,r3,f3); - QPX_LOAD(fpp1_2,r3,f3); - QPX_STORE(fpp2_1,r4,f4); - QPX_LOAD(fpp1_2,r4,f4); - QPX_STORE(fpp2_1,r5,f5); - QPX_LOAD(fpp1_2,r5,f5); - QPX_STORE(fpp2_1,r6,f6); - QPX_LOAD(fpp1_2,r6,f6); - QPX_STORE(fpp2_1,r7,f7); - QPX_LOAD(fpp1_2,r7,f7); - - QPX_STORE(fpp2_2,r0,f0); - QPX_STORE(fpp2_2,r1,f1); - QPX_STORE(fpp2_2,r2,f2); - QPX_STORE(fpp2_2,r3,f3); - QPX_STORE(fpp2_2,r4,f4); - QPX_STORE(fpp2_2,r5,f5); - QPX_STORE(fpp2_2,r6,f6); - QPX_STORE(fpp2_2,r7,f7); - - return 0; -} - -void CmiMemcpy_qpx (void *dst, const void *src, size_t n) -{ - const char *s = src; - char *d = dst; - int n512 = n >> 9; - while (n512 --) { - quad_copy_512(d, s); - d += 512; - s += 512; - } - - if ( (n & 511UL) != 0 ) - memcpy (d, s, n & 511UL); -} diff --git a/src/util/cmimemcpy_qpx.h b/src/util/cmimemcpy_qpx.h deleted file mode 100644 index e38ef54528..0000000000 --- a/src/util/cmimemcpy_qpx.h +++ /dev/null @@ -1,15 +0,0 @@ - -#ifndef __CMI_MEMCPY_QPX__ -#define __CMI_MEMCPY_QPX__ - -#ifdef __cplusplus -extern "C" { -#endif - -void CmiMemcpy_qpx (void *dst, const void *src, size_t n); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/src/util/topomanager/TopoManager.C b/src/util/topomanager/TopoManager.C index 98736a80fc..8ec7f62479 100644 --- a/src/util/topomanager/TopoManager.C +++ b/src/util/topomanager/TopoManager.C @@ -1,11 +1,6 @@ /** \file TopoManager.C * Author: Abhinav S Bhatele * Date Created: March 19th, 2007 - * - * This would be the top level interface for all topology managers we - * will write for different machines (cray, bg/l ... for tori, meshes ...) - * Currently we have functionality for Blue Gene, Cray XT/XE, - * and non-topo machines. */ #include "TopoManager.h" diff --git a/src/util/topomanager/TopoManager.h b/src/util/topomanager/TopoManager.h index 568bc72176..3cc9bb2634 100644 --- a/src/util/topomanager/TopoManager.h +++ b/src/util/topomanager/TopoManager.h @@ -3,10 +3,9 @@ * Date Created: March 19th, 2007 * * This would be the top level interface for all topology managers we - * will write for different machines (Cray, IBM ... for tori, meshes ...) - * Currently we have functionality for Blue Gene, Cray XT/XE, and - * non-topo machines. - * + * will write for specific machines. + * Currently we have functionality for Cray XT/XE, + * and non-topo machines. */ #ifndef _TOPO_MANAGER_H_ diff --git a/src/xlat-i/sdag/CSdagConstruct.C b/src/xlat-i/sdag/CSdagConstruct.C index ae4468ae03..9319f5914f 100644 --- a/src/xlat-i/sdag/CSdagConstruct.C +++ b/src/xlat-i/sdag/CSdagConstruct.C @@ -641,7 +641,6 @@ void SdagConstruct::generateTlineEndCall(XStr& op) { void SdagConstruct::generateEndSeq(XStr& op) { op << " void* _bgParentLog = NULL;\n"; op << " CkElapse(0.01e-6);\n"; - // op<< " BgElapse(1e-6);\n"; generateTlineEndCall(op); generateTraceEndCall(op, 1); generateEndExec(op); diff --git a/tests/charm++/jacobi3d/jacobi3d.C b/tests/charm++/jacobi3d/jacobi3d.C index 49f66892d1..b8bebbed00 100644 --- a/tests/charm++/jacobi3d/jacobi3d.C +++ b/tests/charm++/jacobi3d/jacobi3d.C @@ -273,7 +273,6 @@ class Jacobi: public CBase_Jacobi { void doStep(void) { if (thisIndex.x == 0 && thisIndex.y == 0 && thisIndex.z == 0 && iterations % PRINT_FREQ == 0) { CkPrintf("Start of iteration %d at %f\n", iterations,CmiWallTimer()); - //BgPrintf("BgPrint> Start of iteration at %f\n"); } iterations++; imsg++; From 12c08bbded430e47c4009c841d254b2459d8b626 Mon Sep 17 00:00:00 2001 From: Sam White Date: Sun, 16 Apr 2023 17:19:42 -0500 Subject: [PATCH 019/155] Update Boost ULTs to Boost v1.82.0 --- .../boost-context/jump_i386_ms_pe_gas.asm | 123 ---------- .../boost-context/jump_i386_sysv_elf_gas.S | 44 ++-- .../boost-context/jump_ppc32_sysv_macho_gas.S | 184 +++++++-------- .../boost-context/jump_ppc64_sysv_macho_gas.S | 18 +- .../boost-context/jump_x86_64_ms_pe_gas.asm | 209 ----------------- .../boost-context/jump_x86_64_sysv_elf_gas.S | 80 +++++-- .../boost-context/make_i386_ms_pe_gas.asm | 153 ------------- .../boost-context/make_i386_sysv_elf_gas.S | 24 +- .../boost-context/make_ppc32_sysv_macho_gas.S | 56 ++--- .../boost-context/make_ppc64_sysv_macho_gas.S | 16 +- .../boost-context/make_x86_64_ms_pe_gas.asm | 174 --------------- .../boost-context/make_x86_64_sysv_elf_gas.S | 70 +++++- .../boost-context/ontop_i386_ms_pe_gas.asm | 131 ----------- .../boost-context/ontop_i386_sysv_elf_gas.S | 48 ++-- .../ontop_ppc32_sysv_macho_gas.S | 186 +++++++-------- .../ontop_ppc64_sysv_macho_gas.S | 4 +- .../boost-context/ontop_x86_64_ms_pe_gas.asm | 211 ------------------ .../boost-context/ontop_x86_64_sysv_elf_gas.S | 71 ++++-- 18 files changed, 485 insertions(+), 1317 deletions(-) delete mode 100644 src/util/boost-context/jump_i386_ms_pe_gas.asm delete mode 100644 src/util/boost-context/jump_x86_64_ms_pe_gas.asm delete mode 100644 src/util/boost-context/make_i386_ms_pe_gas.asm delete mode 100644 src/util/boost-context/make_x86_64_ms_pe_gas.asm delete mode 100644 src/util/boost-context/ontop_i386_ms_pe_gas.asm delete mode 100644 src/util/boost-context/ontop_x86_64_ms_pe_gas.asm diff --git a/src/util/boost-context/jump_i386_ms_pe_gas.asm b/src/util/boost-context/jump_i386_ms_pe_gas.asm deleted file mode 100644 index 6eb45326ce..0000000000 --- a/src/util/boost-context/jump_i386_ms_pe_gas.asm +++ /dev/null @@ -1,123 +0,0 @@ -/* - Copyright Oliver Kowalke 2009. - Copyright Thomas Sailer 2013. - Distributed under the Boost Software License, Version 1.0. - (See accompanying file LICENSE_1_0.txt or copy at - http://www.boost.org/LICENSE_1_0.txt) -*/ - -/************************************************************************************* -* --------------------------------------------------------------------------------- * -* | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | * -* --------------------------------------------------------------------------------- * -* | 0h | 04h | 08h | 0ch | 010h | 014h | 018h | 01ch | * -* --------------------------------------------------------------------------------- * -* | fc_mxcsr|fc_x87_cw| fc_strg |fc_deallo| limit | base | fc_seh | EDI | * -* --------------------------------------------------------------------------------- * -* --------------------------------------------------------------------------------- * -* | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | * -* --------------------------------------------------------------------------------- * -* | 020h | 024h | 028h | 02ch | 030h | 034h | 038h | 03ch | * -* --------------------------------------------------------------------------------- * -* | ESI | EBX | EBP | EIP | to | data | EH NXT |SEH HNDLR| * -* --------------------------------------------------------------------------------- * -**************************************************************************************/ - -.file "jump_i386_ms_pe_gas.asm" -.text -.p2align 4,,15 - -/* mark as using no unregistered SEH handlers */ -.globl @feat.00 -.def @feat.00; .scl 3; .type 0; .endef -.set @feat.00, 1 - -.globl _jump_fcontext -.def _jump_fcontext; .scl 2; .type 32; .endef -_jump_fcontext: - /* prepare stack */ - leal -0x2c(%esp), %esp - -#if !defined(BOOST_USE_TSX) - /* save MMX control- and status-word */ - stmxcsr (%esp) - /* save x87 control-word */ - fnstcw 0x4(%esp) -#endif - - /* load NT_TIB */ - movl %fs:(0x18), %edx - /* load fiber local storage */ - movl 0x10(%edx), %eax - movl %eax, 0x8(%esp) - /* load current dealloction stack */ - movl 0xe0c(%edx), %eax - movl %eax, 0xc(%esp) - /* load current stack limit */ - movl 0x8(%edx), %eax - movl %eax, 0x10(%esp) - /* load current stack base */ - movl 0x4(%edx), %eax - movl %eax, 0x14(%esp) - /* load current SEH exception list */ - movl (%edx), %eax - movl %eax, 0x18(%esp) - - movl %edi, 0x1c(%esp) /* save EDI */ - movl %esi, 0x20(%esp) /* save ESI */ - movl %ebx, 0x24(%esp) /* save EBX */ - movl %ebp, 0x28(%esp) /* save EBP */ - - /* store ESP (pointing to context-data) in EAX */ - movl %esp, %eax - - /* firstarg of jump_fcontext() == fcontext to jump to */ - movl 0x30(%esp), %ecx - - /* restore ESP (pointing to context-data) from ECX */ - movl %ecx, %esp - -#if !defined(BOOST_USE_TSX) - /* restore MMX control- and status-word */ - ldmxcsr (%esp) - /* restore x87 control-word */ - fldcw 0x4(%esp) -#endif - - /* restore NT_TIB into EDX */ - movl %fs:(0x18), %edx - /* restore fiber local storage */ - movl 0x8(%esp), %ecx - movl %ecx, 0x10(%edx) - /* restore current deallocation stack */ - movl 0xc(%esp), %ecx - movl %ecx, 0xe0c(%edx) - /* restore current stack limit */ - movl 0x10(%esp), %ecx - movl %ecx, 0x8(%edx) - /* restore current stack base */ - movl 0x14(%esp), %ecx - movl %ecx, 0x4(%edx) - /* restore current SEH exception list */ - movl 0x18(%esp), %ecx - movl %ecx, (%edx) - - movl 0x2c(%esp), %ecx /* restore EIP */ - - movl 0x1c(%esp), %edi /* restore EDI */ - movl 0x20(%esp), %esi /* restore ESI */ - movl 0x24(%esp), %ebx /* restore EBX */ - movl 0x28(%esp), %ebp /* restore EBP */ - - /* prepare stack */ - leal 0x30(%esp), %esp - - /* return transfer_t */ - /* FCTX == EAX, DATA == EDX */ - movl 0x34(%eax), %edx - - /* jump to context */ - jmp *%ecx - -.section .drectve -.ascii " -export:\"jump_fcontext\"" diff --git a/src/util/boost-context/jump_i386_sysv_elf_gas.S b/src/util/boost-context/jump_i386_sysv_elf_gas.S index b96d4b5c0e..47be9e7782 100644 --- a/src/util/boost-context/jump_i386_sysv_elf_gas.S +++ b/src/util/boost-context/jump_i386_sysv_elf_gas.S @@ -12,14 +12,14 @@ * ---------------------------------------------------------------------------------- * * | 0x0 | 0x4 | 0x8 | 0xc | 0x10 | 0x14 | 0x18 | 0x1c | * * ---------------------------------------------------------------------------------- * - * | fc_mxcsr|fc_x87_cw| EDI | ESI | EBX | EBP | EIP | hidden | * + * | fc_mxcsr|fc_x87_cw| guard | EDI | ESI | EBX | EBP | EIP | * * ---------------------------------------------------------------------------------- * * ---------------------------------------------------------------------------------- * * | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | * * ---------------------------------------------------------------------------------- * - * | 0x20 | 0x24 | | * + * | 0x20 | 0x24 | 0x28 | | * * ---------------------------------------------------------------------------------- * - * | to | data | | * + * | hidden | to | data | | * * ---------------------------------------------------------------------------------- * * * ****************************************************************************************/ @@ -30,50 +30,60 @@ .align 2 .type jump_fcontext,@function jump_fcontext: - leal -0x18(%esp), %esp /* prepare stack */ + leal -0x1c(%esp), %esp /* prepare stack */ #if !defined(BOOST_USE_TSX) stmxcsr (%esp) /* save MMX control- and status-word */ fnstcw 0x4(%esp) /* save x87 control-word */ #endif - movl %edi, 0x8(%esp) /* save EDI */ - movl %esi, 0xc(%esp) /* save ESI */ - movl %ebx, 0x10(%esp) /* save EBX */ - movl %ebp, 0x14(%esp) /* save EBP */ +#if defined(BOOST_CONTEXT_TLS_STACK_PROTECTOR) + movl %gs:0x14, %ecx /* read stack guard from TLS record */ + movl %ecx, 0x8(%esp) /* save stack guard */ +#endif + + movl %edi, 0xc(%esp) /* save EDI */ + movl %esi, 0x10(%esp) /* save ESI */ + movl %ebx, 0x14(%esp) /* save EBX */ + movl %ebp, 0x18(%esp) /* save EBP */ /* store ESP (pointing to context-data) in ECX */ movl %esp, %ecx /* first arg of jump_fcontext() == fcontext to jump to */ - movl 0x20(%esp), %eax + movl 0x24(%esp), %eax /* second arg of jump_fcontext() == data to be transferred */ - movl 0x24(%esp), %edx + movl 0x28(%esp), %edx /* restore ESP (pointing to context-data) from EAX */ movl %eax, %esp /* address of returned transport_t */ - movl 0x1c(%esp), %eax + movl 0x20(%esp), %eax /* return parent fcontext_t */ movl %ecx, (%eax) /* return data */ movl %edx, 0x4(%eax) - movl 0x18(%esp), %ecx /* restore EIP */ + movl 0x1c(%esp), %ecx /* restore EIP */ #if !defined(BOOST_USE_TSX) ldmxcsr (%esp) /* restore MMX control- and status-word */ fldcw 0x4(%esp) /* restore x87 control-word */ #endif - movl 0x8(%esp), %edi /* restore EDI */ - movl 0xc(%esp), %esi /* restore ESI */ - movl 0x10(%esp), %ebx /* restore EBX */ - movl 0x14(%esp), %ebp /* restore EBP */ +#if defined(BOOST_CONTEXT_TLS_STACK_PROTECTOR) + movl 0x8(%esp), %edx /* load stack guard */ + movl %edx, %gs:0x14 /* restore stack guard to TLS record */ +#endif + + movl 0xc(%esp), %edi /* restore EDI */ + movl 0x10(%esp), %esi /* restore ESI */ + movl 0x14(%esp), %ebx /* restore EBX */ + movl 0x18(%esp), %ebp /* restore EBP */ - leal 0x20(%esp), %esp /* prepare stack */ + leal 0x24(%esp), %esp /* prepare stack */ /* jump to context */ jmp *%ecx diff --git a/src/util/boost-context/jump_ppc32_sysv_macho_gas.S b/src/util/boost-context/jump_ppc32_sysv_macho_gas.S index c555237afa..fef90c295f 100644 --- a/src/util/boost-context/jump_ppc32_sysv_macho_gas.S +++ b/src/util/boost-context/jump_ppc32_sysv_macho_gas.S @@ -80,122 +80,122 @@ _jump_fcontext: ; reserve space on stack subi r1, r1, 244 - stfd f14, 0(r1) # save F14 - stfd f15, 8(r1) # save F15 - stfd f16, 16(r1) # save F16 - stfd f17, 24(r1) # save F17 - stfd f18, 32(r1) # save F18 - stfd f19, 40(r1) # save F19 - stfd f20, 48(r1) # save F20 - stfd f21, 56(r1) # save F21 - stfd f22, 64(r1) # save F22 - stfd f23, 72(r1) # save F23 - stfd f24, 80(r1) # save F24 - stfd f25, 88(r1) # save F25 - stfd f26, 96(r1) # save F26 - stfd f27, 104(r1) # save F27 - stfd f28, 112(r1) # save F28 - stfd f29, 120(r1) # save F29 - stfd f30, 128(r1) # save F30 - stfd f31, 136(r1) # save F31 - mffs f0 # load FPSCR - stfd f0, 144(r1) # save FPSCR + stfd f14, 0(r1) ; save F14 + stfd f15, 8(r1) ; save F15 + stfd f16, 16(r1) ; save F16 + stfd f17, 24(r1) ; save F17 + stfd f18, 32(r1) ; save F18 + stfd f19, 40(r1) ; save F19 + stfd f20, 48(r1) ; save F20 + stfd f21, 56(r1) ; save F21 + stfd f22, 64(r1) ; save F22 + stfd f23, 72(r1) ; save F23 + stfd f24, 80(r1) ; save F24 + stfd f25, 88(r1) ; save F25 + stfd f26, 96(r1) ; save F26 + stfd f27, 104(r1) ; save F27 + stfd f28, 112(r1) ; save F28 + stfd f29, 120(r1) ; save F29 + stfd f30, 128(r1) ; save F30 + stfd f31, 136(r1) ; save F31 + mffs f0 ; load FPSCR + stfd f0, 144(r1) ; save FPSCR - stw r13, 152(r1) # save R13 - stw r14, 156(r1) # save R14 - stw r15, 160(r1) # save R15 - stw r16, 164(r1) # save R16 - stw r17, 168(r1) # save R17 - stw r18, 172(r1) # save R18 - stw r19, 176(r1) # save R19 - stw r20, 180(r1) # save R20 - stw r21, 184(r1) # save R21 - stw r22, 188(r1) # save R22 - stw r23, 192(r1) # save R23 - stw r24, 196(r1) # save R24 - stw r25, 200(r1) # save R25 - stw r26, 204(r1) # save R26 - stw r27, 208(r1) # save R27 - stw r28, 212(r1) # save R28 - stw r29, 216(r1) # save R29 - stw r30, 220(r1) # save R30 - stw r31, 224(r1) # save R31 - stw r3, 228(r1) # save hidden + stw r13, 152(r1) ; save R13 + stw r14, 156(r1) ; save R14 + stw r15, 160(r1) ; save R15 + stw r16, 164(r1) ; save R16 + stw r17, 168(r1) ; save R17 + stw r18, 172(r1) ; save R18 + stw r19, 176(r1) ; save R19 + stw r20, 180(r1) ; save R20 + stw r21, 184(r1) ; save R21 + stw r22, 188(r1) ; save R22 + stw r23, 192(r1) ; save R23 + stw r24, 196(r1) ; save R24 + stw r25, 200(r1) ; save R25 + stw r26, 204(r1) ; save R26 + stw r27, 208(r1) ; save R27 + stw r28, 212(r1) ; save R28 + stw r29, 216(r1) ; save R29 + stw r30, 220(r1) ; save R30 + stw r31, 224(r1) ; save R31 + stw r3, 228(r1) ; save hidden - # save CR + ; save CR mfcr r0 stw r0, 232(r1) - # save LR + ; save LR mflr r0 stw r0, 236(r1) - # save LR as PC + ; save LR as PC stw r0, 240(r1) - # store RSP (pointing to context-data) in R6 + ; store RSP (pointing to context-data) in R6 mr r6, r1 - # restore RSP (pointing to context-data) from R4 + ; restore RSP (pointing to context-data) from R4 mr r1, r4 - lfd f14, 0(r1) # restore F14 - lfd f15, 8(r1) # restore F15 - lfd f16, 16(r1) # restore F16 - lfd f17, 24(r1) # restore F17 - lfd f18, 32(r1) # restore F18 - lfd f19, 40(r1) # restore F19 - lfd f20, 48(r1) # restore F20 - lfd f21, 56(r1) # restore F21 - lfd f22, 64(r1) # restore F22 - lfd f23, 72(r1) # restore F23 - lfd f24, 80(r1) # restore F24 - lfd f25, 88(r1) # restore F25 - lfd f26, 96(r1) # restore F26 - lfd f27, 104(r1) # restore F27 - lfd f28, 112(r1) # restore F28 - lfd f29, 120(r1) # restore F29 - lfd f30, 128(r1) # restore F30 - lfd f31, 136(r1) # restore F31 - lfd f0, 144(r1) # load FPSCR - mtfsf 0xff, f0 # restore FPSCR + lfd f14, 0(r1) ; restore F14 + lfd f15, 8(r1) ; restore F15 + lfd f16, 16(r1) ; restore F16 + lfd f17, 24(r1) ; restore F17 + lfd f18, 32(r1) ; restore F18 + lfd f19, 40(r1) ; restore F19 + lfd f20, 48(r1) ; restore F20 + lfd f21, 56(r1) ; restore F21 + lfd f22, 64(r1) ; restore F22 + lfd f23, 72(r1) ; restore F23 + lfd f24, 80(r1) ; restore F24 + lfd f25, 88(r1) ; restore F25 + lfd f26, 96(r1) ; restore F26 + lfd f27, 104(r1) ; restore F27 + lfd f28, 112(r1) ; restore F28 + lfd f29, 120(r1) ; restore F29 + lfd f30, 128(r1) ; restore F30 + lfd f31, 136(r1) ; restore F31 + lfd f0, 144(r1) ; load FPSCR + mtfsf 0xff, f0 ; restore FPSCR - lwz r13, 152(r1) # restore R13 - lwz r14, 156(r1) # restore R14 - lwz r15, 160(r1) # restore R15 - lwz r16, 164(r1) # restore R16 - lwz r17, 168(r1) # restore R17 - lwz r18, 172(r1) # restore R18 - lwz r19, 176(r1) # restore R19 - lwz r20, 180(r1) # restore R20 - lwz r21, 184(r1) # restore R21 - lwz r22, 188(r1) # restore R22 - lwz r23, 192(r1) # restore R23 - lwz r24, 196(r1) # restore R24 - lwz r25, 200(r1) # restore R25 - lwz r26, 204(r1) # restore R26 - lwz r27, 208(r1) # restore R27 - lwz r28, 212(r1) # restore R28 - lwz r29, 216(r1) # restore R29 - lwz r30, 220(r1) # restore R30 - lwz r31, 224(r1) # restore R31 - lwz r3, 228(r1) # restore hidden + lwz r13, 152(r1) ; restore R13 + lwz r14, 156(r1) ; restore R14 + lwz r15, 160(r1) ; restore R15 + lwz r16, 164(r1) ; restore R16 + lwz r17, 168(r1) ; restore R17 + lwz r18, 172(r1) ; restore R18 + lwz r19, 176(r1) ; restore R19 + lwz r20, 180(r1) ; restore R20 + lwz r21, 184(r1) ; restore R21 + lwz r22, 188(r1) ; restore R22 + lwz r23, 192(r1) ; restore R23 + lwz r24, 196(r1) ; restore R24 + lwz r25, 200(r1) ; restore R25 + lwz r26, 204(r1) ; restore R26 + lwz r27, 208(r1) ; restore R27 + lwz r28, 212(r1) ; restore R28 + lwz r29, 216(r1) ; restore R29 + lwz r30, 220(r1) ; restore R30 + lwz r31, 224(r1) ; restore R31 + lwz r3, 228(r1) ; restore hidden - # restore CR + ; restore CR lwz r0, 232(r1) mtcr r0 - # restore LR + ; restore LR lwz r0, 236(r1) mtlr r0 - # load PC + ; load PC lwz r0, 240(r1) - # restore CTR + ; restore CTR mtctr r0 - # adjust stack + ; adjust stack addi r1, r1, 244 - # return transfer_t + ; return transfer_t stw r6, 0(r3) stw r5, 4(r3) - # jump to context + ; jump to context bctr diff --git a/src/util/boost-context/jump_ppc64_sysv_macho_gas.S b/src/util/boost-context/jump_ppc64_sysv_macho_gas.S index 74fcb2ab35..dcc6c645db 100644 --- a/src/util/boost-context/jump_ppc64_sysv_macho_gas.S +++ b/src/util/boost-context/jump_ppc64_sysv_macho_gas.S @@ -12,7 +12,7 @@ * ------------------------------------------------- * * | 0 | 4 | 8 | 12 | 16 | 20 | 24 | 28 | * * ------------------------------------------------- * - * | TOC | R14 | R15 | R16 | * + * | R13 | R14 | R15 | R16 | * * ------------------------------------------------- * * ------------------------------------------------- * * | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | * @@ -61,7 +61,7 @@ * ------------------------------------------------- * * | 224 | 228 | 232 | 236 | 240 | 244 | 248 | 252 | * * ------------------------------------------------- * - * | TOC saved | FCTX | DATA | | * + * | FCTX | DATA | | | * * ------------------------------------------------- * * * *******************************************************/ @@ -138,27 +138,27 @@ _jump_fcontext: ; load PC ld r12, 176(r1) - # restore CTR + ; restore CTR mtctr r12 - # adjust stack + ; adjust stack addi r1, r1, 184 - # zero in r3 indicates first jump to context-function + ; zero in r3 indicates first jump to context-function cmpdi r3, 0 beq use_entry_arg - # return transfer_t + ; return transfer_t std r6, 0(r3) std r5, 8(r3) - # jump to context + ; jump to context bctr use_entry_arg: - # copy transfer_t into transfer_fn arg registers + ; copy transfer_t into transfer_fn arg registers mr r3, r6 mr r4, r5 - # jump to context + ; jump to context bctr diff --git a/src/util/boost-context/jump_x86_64_ms_pe_gas.asm b/src/util/boost-context/jump_x86_64_ms_pe_gas.asm deleted file mode 100644 index ec4ecfe946..0000000000 --- a/src/util/boost-context/jump_x86_64_ms_pe_gas.asm +++ /dev/null @@ -1,209 +0,0 @@ -/* - Copyright Oliver Kowalke 2009. - Copyright Thomas Sailer 2013. - Distributed under the Boost Software License, Version 1.0. - (See accompanying file LICENSE_1_0.txt or copy at - http://www.boost.org/LICENSE_1_0.txt) -*/ - -/************************************************************************************* -* ---------------------------------------------------------------------------------- * -* | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | * -* ---------------------------------------------------------------------------------- * -* | 0x0 | 0x4 | 0x8 | 0xc | 0x10 | 0x14 | 0x18 | 0x1c | * -* ---------------------------------------------------------------------------------- * -* | SEE registers (XMM6-XMM15) | * -* ---------------------------------------------------------------------------------- * -* ---------------------------------------------------------------------------------- * -* | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | * -* ---------------------------------------------------------------------------------- * -* | 0x20 | 0x24 | 0x28 | 0x2c | 0x30 | 0x34 | 0x38 | 0x3c | * -* ---------------------------------------------------------------------------------- * -* | SEE registers (XMM6-XMM15) | * -* ---------------------------------------------------------------------------------- * -* ---------------------------------------------------------------------------------- * -* | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | * -* ---------------------------------------------------------------------------------- * -* | 0xe40 | 0x44 | 0x48 | 0x4c | 0x50 | 0x54 | 0x58 | 0x5c | * -* ---------------------------------------------------------------------------------- * -* | SEE registers (XMM6-XMM15) | * -* ---------------------------------------------------------------------------------- * -* ---------------------------------------------------------------------------------- * -* | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | * -* ---------------------------------------------------------------------------------- * -* | 0x60 | 0x64 | 0x68 | 0x6c | 0x70 | 0x74 | 0x78 | 0x7c | * -* ---------------------------------------------------------------------------------- * -* | SEE registers (XMM6-XMM15) | * -* ---------------------------------------------------------------------------------- * -* ---------------------------------------------------------------------------------- * -* | 32 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | * -* ---------------------------------------------------------------------------------- * -* | 0x80 | 0x84 | 0x88 | 0x8c | 0x90 | 0x94 | 0x98 | 0x9c | * -* ---------------------------------------------------------------------------------- * -* | SEE registers (XMM6-XMM15) | * -* ---------------------------------------------------------------------------------- * -* ---------------------------------------------------------------------------------- * -* | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | * -* ---------------------------------------------------------------------------------- * -* | 0xa0 | 0xa4 | 0xa8 | 0xac | 0xb0 | 0xb4 | 0xb8 | 0xbc | * -* ---------------------------------------------------------------------------------- * -* | fc_mxcsr|fc_x87_cw| | fbr_strg | fc_dealloc | * -* ---------------------------------------------------------------------------------- * -* ---------------------------------------------------------------------------------- * -* | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | * -* ---------------------------------------------------------------------------------- * -* | 0xc0 | 0xc4 | 0xc8 | 0xcc | 0xd0 | 0xd4 | 0xd8 | 0xdc | * -* ---------------------------------------------------------------------------------- * -* | limit | base | R12 | R13 | * -* ---------------------------------------------------------------------------------- * -* ---------------------------------------------------------------------------------- * -* | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | * -* ---------------------------------------------------------------------------------- * -* | 0xe0 | 0xe4 | 0xe8 | 0xec | 0xf0 | 0xf4 | 0xf8 | 0xfc | * -* ---------------------------------------------------------------------------------- * -* | R14 | R15 | RDI | RSI | * -* ---------------------------------------------------------------------------------- * -* ---------------------------------------------------------------------------------- * -* | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | * -* ---------------------------------------------------------------------------------- * -* | 0x100 | 0x104 | 0x108 | 0x10c | 0x110 | 0x114 | 0x118 | 0x11c | * -* ---------------------------------------------------------------------------------- * -* | RBX | RBP | hidden | RIP | * -* ---------------------------------------------------------------------------------- * -* ---------------------------------------------------------------------------------- * -* | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | * -* ---------------------------------------------------------------------------------- * -* | 0x120 | 0x124 | 0x128 | 0x12c | 0x130 | 0x134 | 0x138 | 0x13c | * -* ---------------------------------------------------------------------------------- * -* | parameter area | * -* ---------------------------------------------------------------------------------- * -* ---------------------------------------------------------------------------------- * -* | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | * -* ---------------------------------------------------------------------------------- * -* | 0x140 | 0x144 | 0x148 | 0x14c | 0x150 | 0x154 | 0x158 | 0x15c | * -* ---------------------------------------------------------------------------------- * -* | FCTX | DATA | | * -* ---------------------------------------------------------------------------------- * -**************************************************************************************/ - -.file "jump_x86_64_ms_pe_gas.asm" -.text -.p2align 4,,15 -.globl jump_fcontext -.def jump_fcontext; .scl 2; .type 32; .endef -.seh_proc jump_fcontext -jump_fcontext: -.seh_endprologue - - leaq -0x118(%rsp), %rsp /* prepare stack */ - -#if !defined(BOOST_USE_TSX) - /* save XMM storage */ - movaps %xmm6, 0x0(%rsp) - movaps %xmm7, 0x10(%rsp) - movaps %xmm8, 0x20(%rsp) - movaps %xmm9, 0x30(%rsp) - movaps %xmm10, 0x40(%rsp) - movaps %xmm11, 0x50(%rsp) - movaps %xmm12, 0x60(%rsp) - movaps %xmm13, 0x70(%rsp) - movaps %xmm14, 0x80(%rsp) - movaps %xmm15, 0x90(%rsp) - stmxcsr 0xa0(%rsp) /* save MMX control- and status-word */ - fnstcw 0xa4(%rsp) /* save x87 control-word */ -#endif - - /* load NT_TIB */ - movq %gs:(0x30), %r10 - /* save fiber local storage */ - movq 0x20(%r10), %rax - movq %rax, 0xb0(%rsp) - /* save current deallocation stack */ - movq 0x1478(%r10), %rax - movq %rax, 0xb8(%rsp) - /* save current stack limit */ - movq 0x10(%r10), %rax - movq %rax, 0xc0(%rsp) - /* save current stack base */ - movq 0x08(%r10), %rax - movq %rax, 0xc8(%rsp) - - movq %r12, 0xd0(%rsp) /* save R12 */ - movq %r13, 0xd8(%rsp) /* save R13 */ - movq %r14, 0xe0(%rsp) /* save R14 */ - movq %r15, 0xe8(%rsp) /* save R15 */ - movq %rdi, 0xf0(%rsp) /* save RDI */ - movq %rsi, 0xf8(%rsp) /* save RSI */ - movq %rbx, 0x100(%rsp) /* save RBX */ - movq %rbp, 0x108(%rsp) /* save RBP */ - - movq %rcx, 0x110(%rsp) /* save hidden address of transport_t */ - - /* preserve RSP (pointing to context-data) in R9 */ - movq %rsp, %r9 - - /* restore RSP (pointing to context-data) from RDX */ - movq %rdx, %rsp - -#if !defined(BOOST_USE_TSX) - /* restore XMM storage */ - movaps 0x0(%rsp), %xmm6 - movaps 0x10(%rsp), %xmm7 - movaps 0x20(%rsp), %xmm8 - movaps 0x30(%rsp), %xmm9 - movaps 0x40(%rsp), %xmm10 - movaps 0x50(%rsp), %xmm11 - movaps 0x60(%rsp), %xmm12 - movaps 0x70(%rsp), %xmm13 - movaps 0x80(%rsp), %xmm14 - movaps 0x90(%rsp), %xmm15 - ldmxcsr 0xa0(%rsp) /* restore MMX control- and status-word */ - fldcw 0xa4(%rsp) /* restore x87 control-word */ -#endif - - /* load NT_TIB */ - movq %gs:(0x30), %r10 - /* restore fiber local storage */ - movq 0xb0(%rsp), %rax - movq %rax, 0x20(%r10) - /* restore current deallocation stack */ - movq 0xb8(%rsp), %rax - movq %rax, 0x1478(%r10) - /* restore current stack limit */ - movq 0xc0(%rsp), %rax - movq %rax, 0x10(%r10) - /* restore current stack base */ - movq 0xc8(%rsp), %rax - movq %rax, 0x08(%r10) - - movq 0xd0(%rsp), %r12 /* restore R12 */ - movq 0xd8(%rsp), %r13 /* restore R13 */ - movq 0xe0(%rsp), %r14 /* restore R14 */ - movq 0xe8(%rsp), %r15 /* restore R15 */ - movq 0xf0(%rsp), %rdi /* restore RDI */ - movq 0xf8(%rsp), %rsi /* restore RSI */ - movq 0x100(%rsp), %rbx /* restore RBX */ - movq 0x108(%rsp), %rbp /* restore RBP */ - - movq 0x110(%rsp), %rax /* restore hidden address of transport_t */ - - leaq 0x118(%rsp), %rsp /* prepare stack */ - - /* restore return-address */ - popq %r10 - - /* transport_t returned in RAX */ - /* return parent fcontext_t */ - movq %r9, 0x0(%rax) - /* return data */ - movq %r8, 0x8(%rax) - - /* transport_t as 1.arg of context-function */ - movq %rax, %rcx - - /* indirect jump to context */ - jmp *%r10 -.seh_endproc - -.section .drectve -.ascii " -export:\"jump_fcontext\"" diff --git a/src/util/boost-context/jump_x86_64_sysv_elf_gas.S b/src/util/boost-context/jump_x86_64_sysv_elf_gas.S index 49726699bc..58f0e241d7 100644 --- a/src/util/boost-context/jump_x86_64_sysv_elf_gas.S +++ b/src/util/boost-context/jump_x86_64_sysv_elf_gas.S @@ -12,19 +12,29 @@ * ---------------------------------------------------------------------------------- * * | 0x0 | 0x4 | 0x8 | 0xc | 0x10 | 0x14 | 0x18 | 0x1c | * * ---------------------------------------------------------------------------------- * - * | fc_mxcsr|fc_x87_cw| R12 | R13 | R14 | * + * | fc_mxcsr|fc_x87_cw| guard | R12 | R13 | * * ---------------------------------------------------------------------------------- * * ---------------------------------------------------------------------------------- * * | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | * * ---------------------------------------------------------------------------------- * * | 0x20 | 0x24 | 0x28 | 0x2c | 0x30 | 0x34 | 0x38 | 0x3c | * * ---------------------------------------------------------------------------------- * - * | R15 | RBX | RBP | RIP | * + * | R14 | R15 | RBX | RBP | * + * ---------------------------------------------------------------------------------- * + * ---------------------------------------------------------------------------------- * + * | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | * + * ---------------------------------------------------------------------------------- * + * | 0x40 | 0x44 | | * + * ---------------------------------------------------------------------------------- * + * | RIP | | * * ---------------------------------------------------------------------------------- * * * ****************************************************************************************/ + # if defined __CET__ # include +# define SHSTK_ENABLED (__CET__ & 0x2) +# define BOOST_CONTEXT_SHADOW_STACK (SHSTK_ENABLED && SHADOW_STACK_SYSCALL) # else # define _CET_ENDBR # endif @@ -35,19 +45,32 @@ .align 16 jump_fcontext: _CET_ENDBR - leaq -0x38(%rsp), %rsp /* prepare stack */ + leaq -0x40(%rsp), %rsp /* prepare stack */ #if !defined(BOOST_USE_TSX) stmxcsr (%rsp) /* save MMX control- and status-word */ fnstcw 0x4(%rsp) /* save x87 control-word */ #endif - movq %r12, 0x8(%rsp) /* save R12 */ - movq %r13, 0x10(%rsp) /* save R13 */ - movq %r14, 0x18(%rsp) /* save R14 */ - movq %r15, 0x20(%rsp) /* save R15 */ - movq %rbx, 0x28(%rsp) /* save RBX */ - movq %rbp, 0x30(%rsp) /* save RBP */ +#if defined(BOOST_CONTEXT_TLS_STACK_PROTECTOR) + movq %fs:0x28, %rcx /* read stack guard from TLS record */ + movq %rcx, 0x8(%rsp) /* save stack guard */ +#endif + + movq %r12, 0x10(%rsp) /* save R12 */ + movq %r13, 0x18(%rsp) /* save R13 */ + movq %r14, 0x20(%rsp) /* save R14 */ + movq %r15, 0x28(%rsp) /* save R15 */ + movq %rbx, 0x30(%rsp) /* save RBX */ + movq %rbp, 0x38(%rsp) /* save RBP */ + +#if BOOST_CONTEXT_SHADOW_STACK + /* grow the stack to reserve space for shadow stack pointer(SSP) */ + leaq -0x8(%rsp), %rsp + /* read the current SSP and store it */ + rdsspq %rcx + movq %rcx, (%rsp) +#endif /* store RSP (pointing to context-data) in RAX */ movq %rsp, %rax @@ -55,21 +78,44 @@ jump_fcontext: /* restore RSP (pointing to context-data) from RDI */ movq %rdi, %rsp - movq 0x38(%rsp), %r8 /* restore return-address */ +#if BOOST_CONTEXT_SHADOW_STACK + /* first 8 bytes are SSP */ + movq (%rsp), %rcx + leaq 0x8(%rsp), %rsp + + /* Restore target(new) shadow stack */ + rstorssp -8(%rcx) + /* restore token for previous shadow stack is pushed */ + /* on previous shadow stack after saveprevssp */ + saveprevssp + + /* when return, jump_fcontext jump to restored return address */ + /* (r8) instead of RET. This miss of RET implies us to unwind */ + /* shadow stack accordingly. Otherwise mismatch occur */ + movq $1, %rcx + incsspq %rcx +#endif + + movq 0x40(%rsp), %r8 /* restore return-address */ #if !defined(BOOST_USE_TSX) ldmxcsr (%rsp) /* restore MMX control- and status-word */ fldcw 0x4(%rsp) /* restore x87 control-word */ #endif - movq 0x8(%rsp), %r12 /* restore R12 */ - movq 0x10(%rsp), %r13 /* restore R13 */ - movq 0x18(%rsp), %r14 /* restore R14 */ - movq 0x20(%rsp), %r15 /* restore R15 */ - movq 0x28(%rsp), %rbx /* restore RBX */ - movq 0x30(%rsp), %rbp /* restore RBP */ +#if defined(BOOST_CONTEXT_TLS_STACK_PROTECTOR) + movq 0x8(%rsp), %rdx /* load stack guard */ + movq %rdx, %fs:0x28 /* restore stack guard to TLS record */ +#endif + + movq 0x10(%rsp), %r12 /* restore R12 */ + movq 0x18(%rsp), %r13 /* restore R13 */ + movq 0x20(%rsp), %r14 /* restore R14 */ + movq 0x28(%rsp), %r15 /* restore R15 */ + movq 0x30(%rsp), %rbx /* restore RBX */ + movq 0x38(%rsp), %rbp /* restore RBP */ - leaq 0x40(%rsp), %rsp /* prepare stack */ + leaq 0x48(%rsp), %rsp /* prepare stack */ /* return transfer_t from jump */ #if !defined(_ILP32) diff --git a/src/util/boost-context/make_i386_ms_pe_gas.asm b/src/util/boost-context/make_i386_ms_pe_gas.asm deleted file mode 100644 index 608ddf3af0..0000000000 --- a/src/util/boost-context/make_i386_ms_pe_gas.asm +++ /dev/null @@ -1,153 +0,0 @@ -/* - Copyright Oliver Kowalke 2009. - Copyright Thomas Sailer 2013. - Distributed under the Boost Software License, Version 1.0. - (See accompanying file LICENSE_1_0.txt or copy at - http://www.boost.org/LICENSE_1_0.txt) -*/ - -/************************************************************************************* -* --------------------------------------------------------------------------------- * -* | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | * -* --------------------------------------------------------------------------------- * -* | 0h | 04h | 08h | 0ch | 010h | 014h | 018h | 01ch | * -* --------------------------------------------------------------------------------- * -* | fc_mxcsr|fc_x87_cw| fc_strg |fc_deallo| limit | base | fc_seh | EDI | * -* --------------------------------------------------------------------------------- * -* --------------------------------------------------------------------------------- * -* | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | * -* --------------------------------------------------------------------------------- * -* | 020h | 024h | 028h | 02ch | 030h | 034h | 038h | 03ch | * -* --------------------------------------------------------------------------------- * -* | ESI | EBX | EBP | EIP | to | data | EH NXT |SEH HNDLR| * -* --------------------------------------------------------------------------------- * -**************************************************************************************/ - -.file "make_i386_ms_pe_gas.asm" -.text -.p2align 4,,15 - -/* mark as using no unregistered SEH handlers */ -.globl @feat.00 -.def @feat.00; .scl 3; .type 0; .endef -.set @feat.00, 1 - -.globl _make_fcontext -.def _make_fcontext; .scl 2; .type 32; .endef -_make_fcontext: - /* first arg of make_fcontext() == top of context-stack */ - movl 0x04(%esp), %eax - - /* reserve space for first argument of context-function */ - /* EAX might already point to a 16byte border */ - leal -0x8(%eax), %eax - - /* shift address in EAX to lower 16 byte boundary */ - andl $-16, %eax - - /* reserve space for context-data on context-stack */ - /* size for fc_mxcsr .. EIP + return-address for context-function */ - /* on context-function entry: (ESP -0x4) % 8 == 0 */ - /* additional space is required for SEH */ - leal -0x40(%eax), %eax - - /* save MMX control- and status-word */ - stmxcsr (%eax) - /* save x87 control-word */ - fnstcw 0x4(%eax) - - /* first arg of make_fcontext() == top of context-stack */ - movl 0x4(%esp), %ecx - /* save top address of context stack as 'base' */ - movl %ecx, 0x14(%eax) - /* second arg of make_fcontext() == size of context-stack */ - movl 0x8(%esp), %edx - /* negate stack size for LEA instruction (== substraction) */ - negl %edx - /* compute bottom address of context stack (limit) */ - leal (%ecx,%edx), %ecx - /* save bottom address of context-stack as 'limit' */ - movl %ecx, 0x10(%eax) - /* save bottom address of context-stack as 'dealloction stack' */ - movl %ecx, 0xc(%eax) - /* set fiber-storage to zero */ - xorl %ecx, %ecx - movl %ecx, 0x8(%eax) - - /* third arg of make_fcontext() == address of context-function */ - /* stored in EBX */ - movl 0xc(%esp), %ecx - movl %ecx, 0x24(%eax) - - /* compute abs address of label trampoline */ - movl $trampoline, %ecx - /* save address of trampoline as return-address for context-function */ - /* will be entered after calling jump_fcontext() first time */ - movl %ecx, 0x2c(%eax) - - /* compute abs address of label finish */ - movl $finish, %ecx - /* save address of finish as return-address for context-function */ - /* will be entered after context-function returns */ - movl %ecx, 0x28(%eax) - - /* traverse current seh chain to get the last exception handler installed by Windows */ - /* note that on Windows Server 2008 and 2008 R2, SEHOP is activated by default */ - /* the exception handler chain is tested for the presence of ntdll.dll!FinalExceptionHandler */ - /* at its end by RaiseException all seh andlers are disregarded if not present and the */ - /* program is aborted */ - /* load NT_TIB into ECX */ - movl %fs:(0x0), %ecx - -walk: - /* load 'next' member of current SEH into EDX */ - movl (%ecx), %edx - /* test if 'next' of current SEH is last (== 0xffffffff) */ - incl %edx - jz found - decl %edx - /* exchange content; ECX contains address of next SEH */ - xchgl %ecx, %edx - /* inspect next SEH */ - jmp walk - -found: - /* load 'handler' member of SEH == address of last SEH handler installed by Windows */ - movl 0x04(%ecx), %ecx - /* save address in ECX as SEH handler for context */ - movl %ecx, 0x3c(%eax) - /* set ECX to -1 */ - movl $0xffffffff, %ecx - /* save ECX as next SEH item */ - movl %ecx, 0x38(%eax) - /* load address of next SEH item */ - leal 0x38(%eax), %ecx - /* save next SEH */ - movl %ecx, 0x18(%eax) - - /* return pointer to context-data */ - ret - -trampoline: - /* move transport_t for entering context-function */ - /* FCTX == EAX, DATA == EDX */ - movl %eax, (%esp) - movl %edx, 0x4(%esp) - /* label finish as return-address */ - pushl %ebp - /* jump to context-function */ - jmp *%ebx - -finish: - /* ESP points to same address as ESP on entry of context function + 0x4 */ - xorl %eax, %eax - /* exit code is zero */ - movl %eax, (%esp) - /* exit application */ - call __exit - hlt - -.def __exit; .scl 2; .type 32; .endef /* standard C library function */ - -.section .drectve -.ascii " -export:\"make_fcontext\"" diff --git a/src/util/boost-context/make_i386_sysv_elf_gas.S b/src/util/boost-context/make_i386_sysv_elf_gas.S index b76de260d2..0b7ab81188 100644 --- a/src/util/boost-context/make_i386_sysv_elf_gas.S +++ b/src/util/boost-context/make_i386_sysv_elf_gas.S @@ -12,14 +12,14 @@ * ---------------------------------------------------------------------------------- * * | 0x0 | 0x4 | 0x8 | 0xc | 0x10 | 0x14 | 0x18 | 0x1c | * * ---------------------------------------------------------------------------------- * - * | fc_mxcsr|fc_x87_cw| EDI | ESI | EBX | EBP | EIP | hidden | * + * | fc_mxcsr|fc_x87_cw| guard | EDI | ESI | EBX | EBP | EIP | * * ---------------------------------------------------------------------------------- * * ---------------------------------------------------------------------------------- * * | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | * * ---------------------------------------------------------------------------------- * - * | 0x20 | 0x24 | | * + * | 0x20 | 0x24 | 0x28 | | * * ---------------------------------------------------------------------------------- * - * | to | data | | * + * | hidden | to | data | | * * ---------------------------------------------------------------------------------- * * * ****************************************************************************************/ @@ -41,22 +41,28 @@ make_fcontext: andl $-16, %eax /* reserve space for context-data on context-stack */ - leal -0x28(%eax), %eax + leal -0x2c(%eax), %eax /* third arg of make_fcontext() == address of context-function */ /* stored in EBX */ movl 0xc(%esp), %ecx - movl %ecx, 0x10(%eax) + movl %ecx, 0x14(%eax) /* save MMX control- and status-word */ stmxcsr (%eax) /* save x87 control-word */ fnstcw 0x4(%eax) +#if defined(BOOST_CONTEXT_TLS_STACK_PROTECTOR) + /* save stack guard */ + movl %gs:0x14, %ecx /* read stack guard from TLS record */ + movl %ecx, 0x8(%eax) /* save stack guard */ +#endif + /* return transport_t */ /* FCTX == EDI, DATA == ESI */ - leal 0x8(%eax), %ecx - movl %ecx, 0x1c(%eax) + leal 0xc(%eax), %ecx + movl %ecx, 0x20(%eax) /* compute abs address of label trampoline */ call 1f @@ -66,7 +72,7 @@ make_fcontext: addl $trampoline-1b, %ecx /* save address of trampoline as return address */ /* will be entered after calling jump_fcontext() first time */ - movl %ecx, 0x18(%eax) + movl %ecx, 0x1c(%eax) /* compute abs address of label finish */ call 2f @@ -76,7 +82,7 @@ make_fcontext: addl $finish-2b, %ecx /* save address of finish as return-address for context-function */ /* will be entered after context-function returns */ - movl %ecx, 0x14(%eax) + movl %ecx, 0x18(%eax) ret /* return pointer to context-data */ diff --git a/src/util/boost-context/make_ppc32_sysv_macho_gas.S b/src/util/boost-context/make_ppc32_sysv_macho_gas.S index 8f35eff9ab..672f3c2b64 100644 --- a/src/util/boost-context/make_ppc32_sysv_macho_gas.S +++ b/src/util/boost-context/make_ppc32_sysv_macho_gas.S @@ -77,61 +77,61 @@ .globl _make_fcontext .align 2 _make_fcontext: - # save return address into R6 + ; save return address into R6 mflr r6 - # first arg of make_fcontext() == top address of context-function - # shift address in R3 to lower 16 byte boundary + ; first arg of make_fcontext() == top address of context-function + ; shift address in R3 to lower 16 byte boundary clrrwi r3, r3, 4 - # reserve space for context-data on context-stack - # including 64 byte of linkage + parameter area (R1 16 == 0) + ; reserve space for context-data on context-stack + ; including 64 byte of linkage + parameter area (R1 16 == 0) subi r3, r3, 336 - # third arg of make_fcontext() == address of context-function + ; third arg of make_fcontext() == address of context-function stw r5, 240(r3) - # set back-chain to zero + ; set back-chain to zero li r0, 0 stw r0, 244(r3) - mffs f0 # load FPSCR - stfd f0, 144(r3) # save FPSCR + mffs f0 ; load FPSCR + stfd f0, 144(r3) ; save FPSCR - # compute address of returned transfer_t + ; compute address of returned transfer_t addi r0, r3, 252 mr r4, r0 stw r4, 228(r3) - # load LR + ; load LR mflr r0 - # jump to label 1 - bl 1f -1: - # load LR into R4 + ; jump to label 1 + bl l1 +l1: + ; load LR into R4 mflr r4 - # compute abs address of label finish - addi r4, r4, finish - 1b - # restore LR + ; compute abs address of label finish + addi r4, r4, lo16((finish - .) + 4) + ; restore LR mtlr r0 - # save address of finish as return-address for context-function - # will be entered after context-function returns + ; save address of finish as return-address for context-function + ; will be entered after context-function returns stw r4, 236(r3) - # restore return address from R6 + ; restore return address from R6 mtlr r6 - blr # return pointer to context-data + blr ; return pointer to context-data finish: - # save return address into R0 + ; save return address into R0 mflr r0 - # save return address on stack, set up stack frame + ; save return address on stack, set up stack frame stw r0, 4(r1) - # allocate stack space, R1 16 == 0 + ; allocate stack space, R1 16 == 0 stwu r1, -16(r1) - # exit code is zero + ; exit code is zero li r3, 0 - # exit application - bl _exit@plt + ; exit application + bl _exit diff --git a/src/util/boost-context/make_ppc64_sysv_macho_gas.S b/src/util/boost-context/make_ppc64_sysv_macho_gas.S index 7b947bb6b0..fb5cada265 100644 --- a/src/util/boost-context/make_ppc64_sysv_macho_gas.S +++ b/src/util/boost-context/make_ppc64_sysv_macho_gas.S @@ -12,7 +12,7 @@ * ------------------------------------------------- * * | 0 | 4 | 8 | 12 | 16 | 20 | 24 | 28 | * * ------------------------------------------------- * - * | TOC | R14 | R15 | R16 | * + * | R13 | R14 | R15 | R16 | * * ------------------------------------------------- * * ------------------------------------------------- * * | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | * @@ -61,7 +61,7 @@ * ------------------------------------------------- * * | 224 | 228 | 232 | 236 | 240 | 244 | 248 | 252 | * * ------------------------------------------------- * - * | TOC saved | FCTX | DATA | | * + * | FCTX | DATA | | | * * ------------------------------------------------- * * * @@ -77,19 +77,19 @@ _make_fcontext: ; reserve space for context-data on context-stack ; including 64 byte of linkage + parameter area (R1 16 == 0) - subi r3, r3, 248 + subi r3, r3, 240 ; third arg of make_fcontext() == address of context-function stw r5, 176(r3) ; set back-chain to zero - li %r0, 0 - std %r0, 184(%r3) + li r0, 0 + std r0, 184(r3) ; compute address of returned transfer_t - addi %r0, %r3, 232 - mr %r4, %r0 - std %r4, 152(%r3) + addi r0, r3, 224 + mr r4, r0 + std r4, 152(r3) ; load LR mflr r0 diff --git a/src/util/boost-context/make_x86_64_ms_pe_gas.asm b/src/util/boost-context/make_x86_64_ms_pe_gas.asm deleted file mode 100644 index 958a2a7b6d..0000000000 --- a/src/util/boost-context/make_x86_64_ms_pe_gas.asm +++ /dev/null @@ -1,174 +0,0 @@ -/* - Copyright Oliver Kowalke 2009. - Copyright Thomas Sailer 2013. - Distributed under the Boost Software License, Version 1.0. - (See accompanying file LICENSE_1_0.txt or copy at - http://www.boost.org/LICENSE_1_0.txt) -*/ - -/************************************************************************************* -* ---------------------------------------------------------------------------------- * -* | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | * -* ---------------------------------------------------------------------------------- * -* | 0x0 | 0x4 | 0x8 | 0xc | 0x10 | 0x14 | 0x18 | 0x1c | * -* ---------------------------------------------------------------------------------- * -* | SEE registers (XMM6-XMM15) | * -* ---------------------------------------------------------------------------------- * -* ---------------------------------------------------------------------------------- * -* | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | * -* ---------------------------------------------------------------------------------- * -* | 0x20 | 0x24 | 0x28 | 0x2c | 0x30 | 0x34 | 0x38 | 0x3c | * -* ---------------------------------------------------------------------------------- * -* | SEE registers (XMM6-XMM15) | * -* ---------------------------------------------------------------------------------- * -* ---------------------------------------------------------------------------------- * -* | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | * -* ---------------------------------------------------------------------------------- * -* | 0xe40 | 0x44 | 0x48 | 0x4c | 0x50 | 0x54 | 0x58 | 0x5c | * -* ---------------------------------------------------------------------------------- * -* | SEE registers (XMM6-XMM15) | * -* ---------------------------------------------------------------------------------- * -* ---------------------------------------------------------------------------------- * -* | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | * -* ---------------------------------------------------------------------------------- * -* | 0x60 | 0x64 | 0x68 | 0x6c | 0x70 | 0x74 | 0x78 | 0x7c | * -* ---------------------------------------------------------------------------------- * -* | SEE registers (XMM6-XMM15) | * -* ---------------------------------------------------------------------------------- * -* ---------------------------------------------------------------------------------- * -* | 32 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | * -* ---------------------------------------------------------------------------------- * -* | 0x80 | 0x84 | 0x88 | 0x8c | 0x90 | 0x94 | 0x98 | 0x9c | * -* ---------------------------------------------------------------------------------- * -* | SEE registers (XMM6-XMM15) | * -* ---------------------------------------------------------------------------------- * -* ---------------------------------------------------------------------------------- * -* | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | * -* ---------------------------------------------------------------------------------- * -* | 0xa0 | 0xa4 | 0xa8 | 0xac | 0xb0 | 0xb4 | 0xb8 | 0xbc | * -* ---------------------------------------------------------------------------------- * -* | fc_mxcsr|fc_x87_cw| | fbr_strg | fc_dealloc | * -* ---------------------------------------------------------------------------------- * -* ---------------------------------------------------------------------------------- * -* | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | * -* ---------------------------------------------------------------------------------- * -* | 0xc0 | 0xc4 | 0xc8 | 0xcc | 0xd0 | 0xd4 | 0xd8 | 0xdc | * -* ---------------------------------------------------------------------------------- * -* | limit | base | R12 | R13 | * -* ---------------------------------------------------------------------------------- * -* ---------------------------------------------------------------------------------- * -* | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | * -* ---------------------------------------------------------------------------------- * -* | 0xe0 | 0xe4 | 0xe8 | 0xec | 0xf0 | 0xf4 | 0xf8 | 0xfc | * -* ---------------------------------------------------------------------------------- * -* | R14 | R15 | RDI | RSI | * -* ---------------------------------------------------------------------------------- * -* ---------------------------------------------------------------------------------- * -* | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | * -* ---------------------------------------------------------------------------------- * -* | 0x100 | 0x104 | 0x108 | 0x10c | 0x110 | 0x114 | 0x118 | 0x11c | * -* ---------------------------------------------------------------------------------- * -* | RBX | RBP | hidden | RIP | * -* ---------------------------------------------------------------------------------- * -* ---------------------------------------------------------------------------------- * -* | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | * -* ---------------------------------------------------------------------------------- * -* | 0x120 | 0x124 | 0x128 | 0x12c | 0x130 | 0x134 | 0x138 | 0x13c | * -* ---------------------------------------------------------------------------------- * -* | parameter area | * -* ---------------------------------------------------------------------------------- * -* ---------------------------------------------------------------------------------- * -* | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | * -* ---------------------------------------------------------------------------------- * -* | 0x140 | 0x144 | 0x148 | 0x14c | 0x150 | 0x154 | 0x158 | 0x15c | * -* ---------------------------------------------------------------------------------- * -* | FCTX | DATA | | * -* ---------------------------------------------------------------------------------- * -**************************************************************************************/ - -.file "make_x86_64_ms_pe_gas.asm" -.text -.p2align 4,,15 -.globl make_fcontext -.def make_fcontext; .scl 2; .type 32; .endef -.seh_proc make_fcontext -make_fcontext: -.seh_endprologue - - /* first arg of make_fcontext() == top of context-stack */ - movq %rcx, %rax - - /* shift address in RAX to lower 16 byte boundary */ - /* == pointer to fcontext_t and address of context stack */ - andq $-16, %rax - - /* reserve space for context-data on context-stack */ - /* on context-function entry: (RSP -0x8) % 16 == 0 */ - leaq -0x150(%rax), %rax - - /* third arg of make_fcontext() == address of context-function */ - movq %r8, 0x100(%rax) - - /* first arg of make_fcontext() == top of context-stack */ - /* save top address of context stack as 'base' */ - movq %rcx, 0xc8(%rax) - /* second arg of make_fcontext() == size of context-stack */ - /* negate stack size for LEA instruction (== substraction) */ - negq %rdx - /* compute bottom address of context stack (limit) */ - leaq (%rcx,%rdx), %rcx - /* save bottom address of context stack as 'limit' */ - movq %rcx, 0xc0(%rax) - /* save address of context stack limit as 'dealloction stack' */ - movq %rcx, 0xb8(%rax) - /* set fiber-storage to zero */ - xorq %rcx, %rcx - movq %rcx, 0xb0(%rax) - - /* save MMX control- and status-word */ - stmxcsr 0xa0(%rax) - /* save x87 control-word */ - fnstcw 0xa4(%rax) - - /* compute address of transport_t */ - leaq 0x140(%rax), %rcx - /* store address of transport_t in hidden field */ - movq %rcx, 0x110(%rax) - - /* compute abs address of label trampoline */ - leaq trampoline(%rip), %rcx - /* save address of finish as return-address for context-function */ - /* will be entered after jump_fcontext() first time */ - movq %rcx, 0x118(%rax) - - /* compute abs address of label finish */ - leaq finish(%rip), %rcx - /* save address of finish as return-address for context-function */ - /* will be entered after context-function returns */ - movq %rcx, 0x108(%rax) - - ret /* return pointer to context-data */ - -trampoline: - /* store return address on stack */ - /* fix stack alignment */ - pushq %rbp - /* jump to context-function */ - jmp *%rbx - -finish: - /* 32byte shadow-space for _exit() */ - andq $-32, %rsp - /* 32byte shadow-space for _exit() are */ - /* already reserved by make_fcontext() */ - /* exit code is zero */ - xorq %rcx, %rcx - /* exit application */ - call _exit - hlt -.seh_endproc - -.def _exit; .scl 2; .type 32; .endef /* standard C library function */ - -.section .drectve -.ascii " -export:\"make_fcontext\"" diff --git a/src/util/boost-context/make_x86_64_sysv_elf_gas.S b/src/util/boost-context/make_x86_64_sysv_elf_gas.S index 7b760082c0..4294398a2e 100644 --- a/src/util/boost-context/make_x86_64_sysv_elf_gas.S +++ b/src/util/boost-context/make_x86_64_sysv_elf_gas.S @@ -12,19 +12,29 @@ * ---------------------------------------------------------------------------------- * * | 0x0 | 0x4 | 0x8 | 0xc | 0x10 | 0x14 | 0x18 | 0x1c | * * ---------------------------------------------------------------------------------- * - * | fc_mxcsr|fc_x87_cw| R12 | R13 | R14 | * + * | fc_mxcsr|fc_x87_cw| guard | R12 | R13 | * * ---------------------------------------------------------------------------------- * * ---------------------------------------------------------------------------------- * * | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | * * ---------------------------------------------------------------------------------- * * | 0x20 | 0x24 | 0x28 | 0x2c | 0x30 | 0x34 | 0x38 | 0x3c | * * ---------------------------------------------------------------------------------- * - * | R15 | RBX | RBP | RIP | * + * | R14 | R15 | RBX | RBP | * + * ---------------------------------------------------------------------------------- * + * ---------------------------------------------------------------------------------- * + * | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | * + * ---------------------------------------------------------------------------------- * + * | 0x40 | 0x44 | | * + * ---------------------------------------------------------------------------------- * + * | RIP | | * * ---------------------------------------------------------------------------------- * * * ****************************************************************************************/ + # if defined __CET__ # include +# define SHSTK_ENABLED (__CET__ & 0x2) +# define BOOST_CONTEXT_SHADOW_STACK (SHSTK_ENABLED && SHADOW_STACK_SYSCALL) # else # define _CET_ENDBR # endif @@ -35,6 +45,11 @@ .align 16 make_fcontext: _CET_ENDBR +#if BOOST_CONTEXT_SHADOW_STACK + /* the new shadow stack pointer (SSP) */ + movq -0x8(%rdi), %r9 +#endif + /* first arg of make_fcontext() == top of context-stack */ movq %rdi, %rax @@ -43,28 +58,63 @@ make_fcontext: /* reserve space for context-data on context-stack */ /* on context-function entry: (RSP -0x8) % 16 == 0 */ - leaq -0x40(%rax), %rax + leaq -0x48(%rax), %rax /* third arg of make_fcontext() == address of context-function */ /* stored in RBX */ - movq %rdx, 0x28(%rax) + movq %rdx, 0x30(%rax) /* save MMX control- and status-word */ stmxcsr (%rax) /* save x87 control-word */ fnstcw 0x4(%rax) +#if defined(BOOST_CONTEXT_TLS_STACK_PROTECTOR) + /* save stack guard */ + movq %fs:0x28, %rcx /* read stack guard from TLS record */ + movq %rcx, 0x8(%rsp) /* save stack guard */ +#endif + /* compute abs address of label trampoline */ leaq trampoline(%rip), %rcx /* save address of trampoline as return-address for context-function */ /* will be entered after calling jump_fcontext() first time */ - movq %rcx, 0x38(%rax) + movq %rcx, 0x40(%rax) /* compute abs address of label finish */ leaq finish(%rip), %rcx /* save address of finish as return-address for context-function */ /* will be entered after context-function returns */ - movq %rcx, 0x30(%rax) + movq %rcx, 0x38(%rax) + +#if BOOST_CONTEXT_SHADOW_STACK + /* Populate the shadow stack and normal stack */ + /* get original SSP */ + rdsspq %r8 + /* restore new shadow stack */ + rstorssp -0x8(%r9) + /* save the restore token on the original shadow stack */ + saveprevssp + /* push the address of "jmp trampoline" to the new shadow stack */ + /* as well as the stack */ + call 1f + jmp trampoline +1: + /* save address of "jmp trampoline" as return-address */ + /* for context-function */ + pop 0x38(%rax) + /* Get the new SSP. */ + rdsspq %r9 + /* restore original shadow stack */ + rstorssp -0x8(%r8) + /* save the restore token on the new shadow stack. */ + saveprevssp + + /* reserve space for the new SSP */ + leaq -0x8(%rax), %rax + /* save the new SSP to this fcontext */ + movq %r9, (%rax) +#endif ret /* return pointer to context-data */ @@ -72,7 +122,15 @@ trampoline: _CET_ENDBR /* store return address on stack */ /* fix stack alignment */ +#if BOOST_CONTEXT_SHADOW_STACK + /* save address of "jmp *%rbp" as return-address */ + /* on stack and shadow stack */ + call 2f + jmp *%rbp +2: +#else push %rbp +#endif /* jump to context-function */ jmp *%rbx diff --git a/src/util/boost-context/ontop_i386_ms_pe_gas.asm b/src/util/boost-context/ontop_i386_ms_pe_gas.asm deleted file mode 100644 index abe9002a4b..0000000000 --- a/src/util/boost-context/ontop_i386_ms_pe_gas.asm +++ /dev/null @@ -1,131 +0,0 @@ -/* - Copyright Oliver Kowalke 2009. - Copyright Thomas Sailer 2013. - Distributed under the Boost Software License, Version 1.0. - (See accompanying file LICENSE_1_0.txt or copy at - http://www.boost.org/LICENSE_1_0.txt) -*/ - -/************************************************************************************* -* --------------------------------------------------------------------------------- * -* | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | * -* --------------------------------------------------------------------------------- * -* | 0h | 04h | 08h | 0ch | 010h | 014h | 018h | 01ch | * -* --------------------------------------------------------------------------------- * -* | fc_mxcsr|fc_x87_cw| fc_strg |fc_deallo| limit | base | fc_seh | EDI | * -* --------------------------------------------------------------------------------- * -* --------------------------------------------------------------------------------- * -* | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | * -* --------------------------------------------------------------------------------- * -* | 020h | 024h | 028h | 02ch | 030h | 034h | 038h | 03ch | * -* --------------------------------------------------------------------------------- * -* | ESI | EBX | EBP | EIP | to | data | EH NXT |SEH HNDLR| * -* --------------------------------------------------------------------------------- * -**************************************************************************************/ - -.file "ontop_i386_ms_pe_gas.asm" -.text -.p2align 4,,15 - -/* mark as using no unregistered SEH handlers */ -.globl @feat.00 -.def @feat.00; .scl 3; .type 0; .endef -.set @feat.00, 1 - -.globl _ontop_fcontext -.def _ontop_fcontext; .scl 2; .type 32; .endef -_ontop_fcontext: - /* prepare stack */ - leal -0x2c(%esp), %esp - -#if !defined(BOOST_USE_TSX) - /* save MMX control- and status-word */ - stmxcsr (%esp) - /* save x87 control-word */ - fnstcw 0x4(%esp) -#endif - - /* load NT_TIB */ - movl %fs:(0x18), %edx - /* load fiber local storage */ - movl 0x10(%edx), %eax - movl %eax, 0x8(%esp) - /* load current dealloction stack */ - movl 0xe0c(%edx), %eax - movl %eax, 0xc(%esp) - /* load current stack limit */ - movl 0x8(%edx), %eax - movl %eax, 0x10(%esp) - /* load current stack base */ - movl 0x4(%edx), %eax - movl %eax, 0x14(%esp) - /* load current SEH exception list */ - movl (%edx), %eax - movl %eax, 0x18(%esp) - - movl %edi, 0x1c(%esp) /* save EDI */ - movl %esi, 0x20(%esp) /* save ESI */ - movl %ebx, 0x24(%esp) /* save EBX */ - movl %ebp, 0x28(%esp) /* save EBP */ - - /* store ESP (pointing to context-data) in ECX */ - movl %esp, %ecx - - /* first arg of ontop_fcontext() == fcontext to jump to */ - movl 0x30(%esp), %eax - - /* pass parent fcontext_t */ - movl %ecx, 0x30(%eax) - - /* second arg of ontop_fcontext() == data to be transferred */ - movl 0x34(%esp), %ecx - - /* pass data */ - movl %ecx, 0x34(%eax) - - /* third arg of ontop_fcontext() == ontop-function */ - movl 0x38(%esp), %ecx - - /* restore ESP (pointing to context-data) from EDX */ - movl %eax, %esp - -#if !defined(BOOST_USE_TSX) - /* restore MMX control- and status-word */ - ldmxcsr (%esp) - /* restore x87 control-word */ - fldcw 0x4(%esp) -#endif - - /* restore NT_TIB into EDX */ - movl %fs:(0x18), %edx - /* restore fiber local storage */ - movl 0x8(%esp), %eax - movl %eax, 0x10(%edx) - /* restore current deallocation stack */ - movl 0xc(%esp), %eax - movl %eax, 0xe0c(%edx) - /* restore current stack limit */ - movl 0x10(%esp), %eax - movl %eax, 0x08(%edx) - /* restore current stack base */ - movl 0x14(%esp), %eax - movl %eax, 0x04(%edx) - /* restore current SEH exception list */ - movl 0x18(%esp), %eax - movl %eax, (%edx) - - movl 0x1c(%esp), %edi /* restore EDI */ - movl 0x20(%esp), %esi /* restore ESI */ - movl 0x24(%esp), %ebx /* restore EBX */ - movl 0x28(%esp), %ebp /* restore EBP */ - - /* prepare stack */ - leal 0x2c(%esp), %esp - - /* keep return-address on stack */ - - /* jump to context */ - jmp *%ecx - -.section .drectve -.ascii " -export:\"ontop_fcontext\"" diff --git a/src/util/boost-context/ontop_i386_sysv_elf_gas.S b/src/util/boost-context/ontop_i386_sysv_elf_gas.S index 40fe6c2ab7..0cb6168fab 100644 --- a/src/util/boost-context/ontop_i386_sysv_elf_gas.S +++ b/src/util/boost-context/ontop_i386_sysv_elf_gas.S @@ -12,14 +12,14 @@ * ---------------------------------------------------------------------------------- * * | 0x0 | 0x4 | 0x8 | 0xc | 0x10 | 0x14 | 0x18 | 0x1c | * * ---------------------------------------------------------------------------------- * - * | fc_mxcsr|fc_x87_cw| EDI | ESI | EBX | EBP | EIP | hidden | * + * | fc_mxcsr|fc_x87_cw| guard | EDI | ESI | EBX | EBP | EIP | * * ---------------------------------------------------------------------------------- * * ---------------------------------------------------------------------------------- * * | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | * * ---------------------------------------------------------------------------------- * - * | 0x20 | 0x24 | | * + * | 0x20 | 0x24 | 0x28 | | * * ---------------------------------------------------------------------------------- * - * | to | data | | * + * | hidden | to | data | | * * ---------------------------------------------------------------------------------- * * * ****************************************************************************************/ @@ -30,41 +30,46 @@ .align 2 .type ontop_fcontext,@function ontop_fcontext: - leal -0x18(%esp), %esp /* prepare stack */ + leal -0x1c(%esp), %esp /* prepare stack */ #if !defined(BOOST_USE_TSX) stmxcsr (%esp) /* save MMX control- and status-word */ fnstcw 0x4(%esp) /* save x87 control-word */ #endif - movl %edi, 0x8(%esp) /* save EDI */ - movl %esi, 0xc(%esp) /* save ESI */ - movl %ebx, 0x10(%esp) /* save EBX */ - movl %ebp, 0x14(%esp) /* save EBP */ +#if defined(BOOST_CONTEXT_TLS_STACK_PROTECTOR) + movl %gs:0x14, %ecx /* read stack guard from TLS record */ + movl %ecx, 0x8(%esp) /* save stack guard */ +#endif + + movl %edi, 0xc(%esp) /* save EDI */ + movl %esi, 0x10(%esp) /* save ESI */ + movl %ebx, 0x14(%esp) /* save EBX */ + movl %ebp, 0x18(%esp) /* save EBP */ /* store ESP (pointing to context-data) in ECX */ movl %esp, %ecx /* first arg of ontop_fcontext() == fcontext to jump to */ - movl 0x20(%esp), %eax + movl 0x24(%esp), %eax /* pass parent fcontext_t */ - movl %ecx, 0x20(%eax) + movl %ecx, 0x24(%eax) /* second arg of ontop_fcontext() == data to be transferred */ - movl 0x24(%esp), %ecx + movl 0x28(%esp), %ecx /* pass data */ - movl %ecx, 0x24(%eax) + movl %ecx, 0x28(%eax) /* third arg of ontop_fcontext() == ontop-function */ - movl 0x28(%esp), %ecx + movl 0x2c(%esp), %ecx /* restore ESP (pointing to context-data) from EAX */ movl %eax, %esp /* address of returned transport_t */ - movl 0x1c(%esp), %eax + movl 0x20(%esp), %eax /* return parent fcontext_t */ movl %ecx, (%eax) /* return data */ @@ -75,12 +80,17 @@ ontop_fcontext: fldcw 0x4(%esp) /* restore x87 control-word */ #endif - movl 0x8(%esp), %edi /* restore EDI */ - movl 0xc(%esp), %esi /* restore ESI */ - movl 0x10(%esp), %ebx /* restore EBX */ - movl 0x14(%esp), %ebp /* restore EBP */ +#if defined(BOOST_CONTEXT_TLS_STACK_PROTECTOR) + movl 0x8(%esp), %edx /* load stack guard */ + movl %edx, %gs:0x14 /* restore stack guard to TLS record */ +#endif + + movl 0xc(%esp), %edi /* restore EDI */ + movl 0x10(%esp), %esi /* restore ESI */ + movl 0x14(%esp), %ebx /* restore EBX */ + movl 0x18(%esp), %ebp /* restore EBP */ - leal 0x18(%esp), %esp /* prepare stack */ + leal 0x1c(%esp), %esp /* prepare stack */ /* jump to context */ jmp *%ecx diff --git a/src/util/boost-context/ontop_ppc32_sysv_macho_gas.S b/src/util/boost-context/ontop_ppc32_sysv_macho_gas.S index 1eb5f9340c..2e701ebd3d 100644 --- a/src/util/boost-context/ontop_ppc32_sysv_macho_gas.S +++ b/src/util/boost-context/ontop_ppc32_sysv_macho_gas.S @@ -77,125 +77,125 @@ .globl _ontop_fcontext .align 2 _ontop_fcontext: - # reserve space on stack + ; reserve space on stack subi r1, r1, 244 - stfd f14, 0(r1) # save F14 - stfd f15, 8(r1) # save F15 - stfd f16, 16(r1) # save F16 - stfd f17, 24(r1) # save F17 - stfd f18, 32(r1) # save F18 - stfd f19, 40(r1) # save F19 - stfd f20, 48(r1) # save F20 - stfd f21, 56(r1) # save F21 - stfd f22, 64(r1) # save F22 - stfd f23, 72(r1) # save F23 - stfd f24, 80(r1) # save F24 - stfd f25, 88(r1) # save F25 - stfd f26, 96(r1) # save F26 - stfd f27, 104(r1) # save F27 - stfd f28, 112(r1) # save F28 - stfd f29, 120(r1) # save F29 - stfd f30, 128(r1) # save F30 - stfd f31, 136(r1) # save F31 - mffs f0 # load FPSCR - stfd f0, 144(r1) # save FPSCR + stfd f14, 0(r1) ; save F14 + stfd f15, 8(r1) ; save F15 + stfd f16, 16(r1) ; save F16 + stfd f17, 24(r1) ; save F17 + stfd f18, 32(r1) ; save F18 + stfd f19, 40(r1) ; save F19 + stfd f20, 48(r1) ; save F20 + stfd f21, 56(r1) ; save F21 + stfd f22, 64(r1) ; save F22 + stfd f23, 72(r1) ; save F23 + stfd f24, 80(r1) ; save F24 + stfd f25, 88(r1) ; save F25 + stfd f26, 96(r1) ; save F26 + stfd f27, 104(r1) ; save F27 + stfd f28, 112(r1) ; save F28 + stfd f29, 120(r1) ; save F29 + stfd f30, 128(r1) ; save F30 + stfd f31, 136(r1) ; save F31 + mffs f0 ; load FPSCR + stfd f0, 144(r1) ; save FPSCR - stw r13, 152(r1) # save R13 - stw r14, 156(r1) # save R14 - stw r15, 160(r1) # save R15 - stw r16, 164(r1) # save R16 - stw r17, 168(r1) # save R17 - stw r18, 172(r1) # save R18 - stw r19, 176(r1) # save R19 - stw r20, 180(r1) # save R20 - stw r21, 184(r1) # save R21 - stw r22, 188(r1) # save R22 - stw r23, 192(r1) # save R23 - stw r24, 196(r1) # save R24 - stw r25, 200(r1) # save R25 - stw r26, 204(r1) # save R26 - stw r27, 208(r1) # save R27 - stw r28, 212(r1) # save R28 - stw r29, 216(r1) # save R29 - stw r30, 220(r1) # save R30 - stw r31, 224(r1) # save R31 - stw r3, 228(r1) # save hidden + stw r13, 152(r1) ; save R13 + stw r14, 156(r1) ; save R14 + stw r15, 160(r1) ; save R15 + stw r16, 164(r1) ; save R16 + stw r17, 168(r1) ; save R17 + stw r18, 172(r1) ; save R18 + stw r19, 176(r1) ; save R19 + stw r20, 180(r1) ; save R20 + stw r21, 184(r1) ; save R21 + stw r22, 188(r1) ; save R22 + stw r23, 192(r1) ; save R23 + stw r24, 196(r1) ; save R24 + stw r25, 200(r1) ; save R25 + stw r26, 204(r1) ; save R26 + stw r27, 208(r1) ; save R27 + stw r28, 212(r1) ; save R28 + stw r29, 216(r1) ; save R29 + stw r30, 220(r1) ; save R30 + stw r31, 224(r1) ; save R31 + stw r3, 228(r1) ; save hidden - # save CR + ; save CR mfcr r0 stw r0, 232(r1) - # save LR + ; save LR mflr r0 stw r0, 236(r1) - # save LR as PC + ; save LR as PC stw r0, 240(r1) - # store RSP (pointing to context-data) in R7 + ; store RSP (pointing to context-data) in R7 mr r7, r1 - # restore RSP (pointing to context-data) from R4 + ; restore RSP (pointing to context-data) from R4 mr r1, r4 - lfd f14, 0(r1) # restore F14 - lfd f15, 8(r1) # restore F15 - lfd f16, 16(r1) # restore F16 - lfd f17, 24(r1) # restore F17 - lfd f18, 32(r1) # restore F18 - lfd f19, 40(r1) # restore F19 - lfd f20, 48(r1) # restore F20 - lfd f21, 56(r1) # restore F21 - lfd f22, 64(r1) # restore F22 - lfd f23, 72(r1) # restore F23 - lfd f24, 80(r1) # restore F24 - lfd f25, 88(r1) # restore F25 - lfd f26, 96(r1) # restore F26 - lfd f27, 104(r1) # restore F27 - lfd f28, 112(r1) # restore F28 - lfd f29, 120(r1) # restore F29 - lfd f30, 128(r1) # restore F30 - lfd f31, 136(r1) # restore F31 - lfd f0, 144(r1) # load FPSCR - mtfsf 0xff, f0 # restore FPSCR + lfd f14, 0(r1) ; restore F14 + lfd f15, 8(r1) ; restore F15 + lfd f16, 16(r1) ; restore F16 + lfd f17, 24(r1) ; restore F17 + lfd f18, 32(r1) ; restore F18 + lfd f19, 40(r1) ; restore F19 + lfd f20, 48(r1) ; restore F20 + lfd f21, 56(r1) ; restore F21 + lfd f22, 64(r1) ; restore F22 + lfd f23, 72(r1) ; restore F23 + lfd f24, 80(r1) ; restore F24 + lfd f25, 88(r1) ; restore F25 + lfd f26, 96(r1) ; restore F26 + lfd f27, 104(r1) ; restore F27 + lfd f28, 112(r1) ; restore F28 + lfd f29, 120(r1) ; restore F29 + lfd f30, 128(r1) ; restore F30 + lfd f31, 136(r1) ; restore F31 + lfd f0, 144(r1) ; load FPSCR + mtfsf 0xff, f0 ; restore FPSCR - lwz r13, 152(r1) # restore R13 - lwz r14, 156(r1) # restore R14 - lwz r15, 160(r1) # restore R15 - lwz r16, 164(r1) # restore R16 - lwz r17, 168(r1) # restore R17 - lwz r18, 172(r1) # restore R18 - lwz r19, 176(r1) # restore R19 - lwz r20, 180(r1) # restore R20 - lwz r21, 184(r1) # restore R21 - lwz r22, 188(r1) # restore R22 - lwz r23, 192(r1) # restore R23 - lwz r24, 196(r1) # restore R24 - lwz r25, 200(r1) # restore R25 - lwz r26, 204(r1) # restore R26 - lwz r27, 208(r1) # restore R27 - lwz r28, 212(r1) # restore R28 - lwz r29, 216(r1) # restore R29 - lwz r30, 220(r1) # restore R30 - lwz r31, 224(r1) # restore R31 - lwz r4, 228(r1) # restore hidden + lwz r13, 152(r1) ; restore R13 + lwz r14, 156(r1) ; restore R14 + lwz r15, 160(r1) ; restore R15 + lwz r16, 164(r1) ; restore R16 + lwz r17, 168(r1) ; restore R17 + lwz r18, 172(r1) ; restore R18 + lwz r19, 176(r1) ; restore R19 + lwz r20, 180(r1) ; restore R20 + lwz r21, 184(r1) ; restore R21 + lwz r22, 188(r1) ; restore R22 + lwz r23, 192(r1) ; restore R23 + lwz r24, 196(r1) ; restore R24 + lwz r25, 200(r1) ; restore R25 + lwz r26, 204(r1) ; restore R26 + lwz r27, 208(r1) ; restore R27 + lwz r28, 212(r1) ; restore R28 + lwz r29, 216(r1) ; restore R29 + lwz r30, 220(r1) ; restore R30 + lwz r31, 224(r1) ; restore R31 + lwz r4, 228(r1) ; restore hidden - # restore CR + ; restore CR lwz r0, 232(r1) mtcr r0 - # restore LR + ; restore LR lwz r0, 236(r1) mtlr r0 - # ignore PC + ; ignore PC - # adjust stack + ; adjust stack addi r1, r1, 244 - # return transfer_t + ; return transfer_t stw r7, 0(r4) stw r5, 4(r4) - # restore CTR + ; restore CTR mtctr r6 - # jump to ontop-function + ; jump to ontop-function bctr diff --git a/src/util/boost-context/ontop_ppc64_sysv_macho_gas.S b/src/util/boost-context/ontop_ppc64_sysv_macho_gas.S index 5de8acd10c..a9fe8cf5b8 100644 --- a/src/util/boost-context/ontop_ppc64_sysv_macho_gas.S +++ b/src/util/boost-context/ontop_ppc64_sysv_macho_gas.S @@ -12,7 +12,7 @@ * ------------------------------------------------- * * | 0 | 4 | 8 | 12 | 16 | 20 | 24 | 28 | * * ------------------------------------------------- * - * | TOC | R14 | R15 | R16 | * + * | R13 | R14 | R15 | R16 | * * ------------------------------------------------- * * ------------------------------------------------- * * | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | * @@ -61,7 +61,7 @@ * ------------------------------------------------- * * | 224 | 228 | 232 | 236 | 240 | 244 | 248 | 252 | * * ------------------------------------------------- * - * | TOC saved | FCTX | DATA | | * + * | FCTX | DATA | | | * * ------------------------------------------------- * * * *******************************************************/ diff --git a/src/util/boost-context/ontop_x86_64_ms_pe_gas.asm b/src/util/boost-context/ontop_x86_64_ms_pe_gas.asm deleted file mode 100644 index 02e040c9dc..0000000000 --- a/src/util/boost-context/ontop_x86_64_ms_pe_gas.asm +++ /dev/null @@ -1,211 +0,0 @@ -/* - Copyright Oliver Kowalke 2009. - Copyright Thomas Sailer 2013. - Distributed under the Boost Software License, Version 1.0. - (See accompanying file LICENSE_1_0.txt or copy at - http://www.boost.org/LICENSE_1_0.txt) -*/ - -/************************************************************************************* -* ---------------------------------------------------------------------------------- * -* | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | * -* ---------------------------------------------------------------------------------- * -* | 0x0 | 0x4 | 0x8 | 0xc | 0x10 | 0x14 | 0x18 | 0x1c | * -* ---------------------------------------------------------------------------------- * -* | SEE registers (XMM6-XMM15) | * -* ---------------------------------------------------------------------------------- * -* ---------------------------------------------------------------------------------- * -* | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | * -* ---------------------------------------------------------------------------------- * -* | 0x20 | 0x24 | 0x28 | 0x2c | 0x30 | 0x34 | 0x38 | 0x3c | * -* ---------------------------------------------------------------------------------- * -* | SEE registers (XMM6-XMM15) | * -* ---------------------------------------------------------------------------------- * -* ---------------------------------------------------------------------------------- * -* | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | * -* ---------------------------------------------------------------------------------- * -* | 0xe40 | 0x44 | 0x48 | 0x4c | 0x50 | 0x54 | 0x58 | 0x5c | * -* ---------------------------------------------------------------------------------- * -* | SEE registers (XMM6-XMM15) | * -* ---------------------------------------------------------------------------------- * -* ---------------------------------------------------------------------------------- * -* | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | * -* ---------------------------------------------------------------------------------- * -* | 0x60 | 0x64 | 0x68 | 0x6c | 0x70 | 0x74 | 0x78 | 0x7c | * -* ---------------------------------------------------------------------------------- * -* | SEE registers (XMM6-XMM15) | * -* ---------------------------------------------------------------------------------- * -* ---------------------------------------------------------------------------------- * -* | 32 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | * -* ---------------------------------------------------------------------------------- * -* | 0x80 | 0x84 | 0x88 | 0x8c | 0x90 | 0x94 | 0x98 | 0x9c | * -* ---------------------------------------------------------------------------------- * -* | SEE registers (XMM6-XMM15) | * -* ---------------------------------------------------------------------------------- * -* ---------------------------------------------------------------------------------- * -* | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | * -* ---------------------------------------------------------------------------------- * -* | 0xa0 | 0xa4 | 0xa8 | 0xac | 0xb0 | 0xb4 | 0xb8 | 0xbc | * -* ---------------------------------------------------------------------------------- * -* | fc_mxcsr|fc_x87_cw| | fbr_strg | fc_dealloc | * -* ---------------------------------------------------------------------------------- * -* ---------------------------------------------------------------------------------- * -* | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | * -* ---------------------------------------------------------------------------------- * -* | 0xc0 | 0xc4 | 0xc8 | 0xcc | 0xd0 | 0xd4 | 0xd8 | 0xdc | * -* ---------------------------------------------------------------------------------- * -* | limit | base | R12 | R13 | * -* ---------------------------------------------------------------------------------- * -* ---------------------------------------------------------------------------------- * -* | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | * -* ---------------------------------------------------------------------------------- * -* | 0xe0 | 0xe4 | 0xe8 | 0xec | 0xf0 | 0xf4 | 0xf8 | 0xfc | * -* ---------------------------------------------------------------------------------- * -* | R14 | R15 | RDI | RSI | * -* ---------------------------------------------------------------------------------- * -* ---------------------------------------------------------------------------------- * -* | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | * -* ---------------------------------------------------------------------------------- * -* | 0x100 | 0x104 | 0x108 | 0x10c | 0x110 | 0x114 | 0x118 | 0x11c | * -* ---------------------------------------------------------------------------------- * -* | RBX | RBP | hidden | RIP | * -* ---------------------------------------------------------------------------------- * -* ---------------------------------------------------------------------------------- * -* | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | * -* ---------------------------------------------------------------------------------- * -* | 0x120 | 0x124 | 0x128 | 0x12c | 0x130 | 0x134 | 0x138 | 0x13c | * -* ---------------------------------------------------------------------------------- * -* | parameter area | * -* ---------------------------------------------------------------------------------- * -* ---------------------------------------------------------------------------------- * -* | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | * -* ---------------------------------------------------------------------------------- * -* | 0x140 | 0x144 | 0x148 | 0x14c | 0x150 | 0x154 | 0x158 | 0x15c | * -* ---------------------------------------------------------------------------------- * -* | FCTX | DATA | | * -* ---------------------------------------------------------------------------------- * -**************************************************************************************/ - -.file "ontop_x86_64_ms_pe_gas.asm" -.text -.p2align 4,,15 -.globl ontop_fcontext -.def ontop_fcontext; .scl 2; .type 32; .endef -.seh_proc ontop_fcontext -ontop_fcontext: -.seh_endprologue - - leaq -0x118(%rsp), %rsp /* prepare stack */ - -#if !defined(BOOST_USE_TSX) - /* save XMM storage */ - movaps %xmm6, 0x0(%rsp) - movaps %xmm7, 0x10(%rsp) - movaps %xmm8, 0x20(%rsp) - movaps %xmm9, 0x30(%rsp) - movaps %xmm10, 0x40(%rsp) - movaps %xmm11, 0x50(%rsp) - movaps %xmm12, 0x60(%rsp) - movaps %xmm13, 0x70(%rsp) - movaps %xmm14, 0x80(%rsp) - movaps %xmm15, 0x90(%rsp) - stmxcsr 0xa0(%rsp) /* save MMX control- and status-word */ - fnstcw 0xa4(%rsp) /* save x87 control-word */ -#endif - - /* load NT_TIB */ - movq %gs:(0x30), %r10 - /* save fiber local storage */ - movq 0x20(%r10), %rax - movq %rax, 0xb0(%rsp) - /* save current deallocation stack */ - movq 0x1478(%r10), %rax - movq %rax, 0xb8(%rsp) - /* save current stack limit */ - movq 0x10(%r10), %rax - movq %rax, 0xc0(%rsp) - /* save current stack base */ - movq 0x08(%r10), %rax - movq %rax, 0xc8(%rsp) - - movq %r12, 0xd0(%rsp) /* save R12 */ - movq %r13, 0xd8(%rsp) /* save R13 */ - movq %r14, 0xe0(%rsp) /* save R14 */ - movq %r15, 0xe8(%rsp) /* save R15 */ - movq %rdi, 0xf0(%rsp) /* save RDI */ - movq %rsi, 0xf8(%rsp) /* save RSI */ - movq %rbx, 0x100(%rsp) /* save RBX */ - movq %rbp, 0x108(%rsp) /* save RBP */ - - movq %rcx, 0x110(%rsp) /* save hidden address of transport_t */ - - /* preserve RSP (pointing to context-data) in RCX */ - movq %rsp, %rcx - - /* restore RSP (pointing to context-data) from RDX */ - movq %rdx, %rsp - -#if !defined(BOOST_USE_TSX) - /* restore XMM storage */ - movaps 0x0(%rsp), %xmm6 - movaps 0x10(%rsp), %xmm7 - movaps 0x20(%rsp), %xmm8 - movaps 0x30(%rsp), %xmm9 - movaps 0x40(%rsp), %xmm10 - movaps 0x50(%rsp), %xmm11 - movaps 0x60(%rsp), %xmm12 - movaps 0x70(%rsp), %xmm13 - movaps 0x80(%rsp), %xmm14 - movaps 0x90(%rsp), %xmm15 - ldmxcsr 0xa0(%rsp) /* restore MMX control- and status-word */ - fldcw 0xa4(%rsp) /* restore x87 control-word */ -#endif - - /* load NT_TIB */ - movq %gs:(0x30), %r10 - /* restore fiber local storage */ - movq 0xb0(%rsp), %rax - movq %rax, 0x20(%r10) - /* restore current deallocation stack */ - movq 0xb8(%rsp), %rax - movq %rax, 0x1478(%r10) - /* restore current stack limit */ - movq 0xc0(%rsp), %rax - movq %rax, 0x10(%r10) - /* restore current stack base */ - movq 0xc8(%rsp), %rax - movq %rax, 0x08(%r10) - - movq 0xd0(%rsp), %r12 /* restore R12 */ - movq 0xd8(%rsp), %r13 /* restore R13 */ - movq 0xe0(%rsp), %r14 /* restore R14 */ - movq 0xe8(%rsp), %r15 /* restore R15 */ - movq 0xf0(%rsp), %rdi /* restore RDI */ - movq 0xf8(%rsp), %rsi /* restore RSI */ - movq 0x100(%rsp), %rbx /* restore RBX */ - movq 0x108(%rsp), %rbp /* restore RBP */ - - movq 0x110(%rsp), %rax /* restore hidden address of transport_t */ - - leaq 0x118(%rsp), %rsp /* prepare stack */ - - /* keep return-address on stack */ - - /* transport_t returned in RAX */ - /* return parent fcontext_t */ - movq %rcx, 0x0(%rax) - /* return data */ - movq %r8, 0x8(%rax) - - /* transport_t as 1.arg of context-function */ - /* RCX contains address of returned (hidden) transfer_t */ - movq %rax, %rcx - /* RDX contains address of passed transfer_t */ - movq %rax, %rdx - - /* indirect jump to context */ - jmp *%r9 -.seh_endproc - -.section .drectve -.ascii " -export:\"ontop_fcontext\"" diff --git a/src/util/boost-context/ontop_x86_64_sysv_elf_gas.S b/src/util/boost-context/ontop_x86_64_sysv_elf_gas.S index 2b764d355f..c3892b8ba0 100644 --- a/src/util/boost-context/ontop_x86_64_sysv_elf_gas.S +++ b/src/util/boost-context/ontop_x86_64_sysv_elf_gas.S @@ -12,19 +12,28 @@ * ---------------------------------------------------------------------------------- * * | 0x0 | 0x4 | 0x8 | 0xc | 0x10 | 0x14 | 0x18 | 0x1c | * * ---------------------------------------------------------------------------------- * - * | fc_mxcsr|fc_x87_cw| R12 | R13 | R14 | * + * | fc_mxcsr|fc_x87_cw| guard | R12 | R13 | * * ---------------------------------------------------------------------------------- * * ---------------------------------------------------------------------------------- * * | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | * * ---------------------------------------------------------------------------------- * * | 0x20 | 0x24 | 0x28 | 0x2c | 0x30 | 0x34 | 0x38 | 0x3c | * * ---------------------------------------------------------------------------------- * - * | R15 | RBX | RBP | RIP | * + * | R14 | R15 | RBX | RBP | * + * ---------------------------------------------------------------------------------- * + * ---------------------------------------------------------------------------------- * + * | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | * + * ---------------------------------------------------------------------------------- * + * | 0x40 | 0x44 | | * + * ---------------------------------------------------------------------------------- * + * | RIP | | * * ---------------------------------------------------------------------------------- * * * ****************************************************************************************/ # if defined __CET__ # include +# define SHSTK_ENABLED (__CET__ & 0x2) +# define BOOST_CONTEXT_SHADOW_STACK (SHSTK_ENABLED && SHADOW_STACK_SYSCALL) # else # define _CET_ENDBR # endif @@ -38,19 +47,32 @@ ontop_fcontext: /* preserve ontop-function in R8 */ movq %rdx, %r8 - leaq -0x38(%rsp), %rsp /* prepare stack */ + leaq -0x40(%rsp), %rsp /* prepare stack */ #if !defined(BOOST_USE_TSX) stmxcsr (%rsp) /* save MMX control- and status-word */ fnstcw 0x4(%rsp) /* save x87 control-word */ #endif - movq %r12, 0x8(%rsp) /* save R12 */ - movq %r13, 0x10(%rsp) /* save R13 */ - movq %r14, 0x18(%rsp) /* save R14 */ - movq %r15, 0x20(%rsp) /* save R15 */ - movq %rbx, 0x28(%rsp) /* save RBX */ - movq %rbp, 0x30(%rsp) /* save RBP */ +#if defined(BOOST_CONTEXT_TLS_STACK_PROTECTOR) + movq %fs:0x28, %rcx /* read stack guard from TLS record */ + movq %rcx, 0x8(%rsp) /* save stack guard */ +#endif + + movq %r12, 0x10(%rsp) /* save R12 */ + movq %r13, 0x18(%rsp) /* save R13 */ + movq %r14, 0x20(%rsp) /* save R14 */ + movq %r15, 0x28(%rsp) /* save R15 */ + movq %rbx, 0x30(%rsp) /* save RBX */ + movq %rbp, 0x38(%rsp) /* save RBP */ + +#if BOOST_CONTEXT_SHADOW_STACK + /* grow the stack to reserve space for shadow stack pointer(SSP) */ + leaq -0x8(%rsp), %rsp + /* read the current SSP and store it */ + rdsspq %rcx + movq %rcx, (%rsp) +#endif /* store RSP (pointing to context-data) in RAX */ movq %rsp, %rax @@ -58,19 +80,36 @@ ontop_fcontext: /* restore RSP (pointing to context-data) from RDI */ movq %rdi, %rsp +#if BOOST_CONTEXT_SHADOW_STACK + /* first 8 bytes are SSP */ + movq (%rsp), %rcx + leaq 0x8(%rsp), %rsp + + /* Restore target(new) shadow stack */ + rstorssp -8(%rcx) + /* restore token for previous shadow stack is pushed */ + /* on previous shadow stack after saveprevssp */ + saveprevssp +#endif + #if !defined(BOOST_USE_TSX) ldmxcsr (%rsp) /* restore MMX control- and status-word */ fldcw 0x4(%rsp) /* restore x87 control-word */ #endif - movq 0x8(%rsp), %r12 /* restore R12 */ - movq 0x10(%rsp), %r13 /* restore R13 */ - movq 0x18(%rsp), %r14 /* restore R14 */ - movq 0x20(%rsp), %r15 /* restore R15 */ - movq 0x28(%rsp), %rbx /* restore RBX */ - movq 0x30(%rsp), %rbp /* restore RBP */ +#if defined(BOOST_CONTEXT_TLS_STACK_PROTECTOR) + movq 0x8(%rsp), %rdx /* load stack guard */ + movq %rdx, %fs:0x28 /* restore stack guard to TLS record */ +#endif + + movq 0x10(%rsp), %r12 /* restore R12 */ + movq 0x18(%rsp), %r13 /* restore R13 */ + movq 0x20(%rsp), %r14 /* restore R14 */ + movq 0x28(%rsp), %r15 /* restore R15 */ + movq 0x30(%rsp), %rbx /* restore RBX */ + movq 0x38(%rsp), %rbp /* restore RBP */ - leaq 0x38(%rsp), %rsp /* prepare stack */ + leaq 0x40(%rsp), %rsp /* prepare stack */ /* return transfer_t from jump */ #if !defined(_ILP32) From 5e2116209f49292b63d6df053c1c2b1b35e39b21 Mon Sep 17 00:00:00 2001 From: Evan Ramos Date: Sun, 16 Apr 2023 17:34:45 -0500 Subject: [PATCH 020/155] Bashify conditionals in charmc, ampicc, charmrun, buildold This should improve build performance by eliminating many process launches from each invocation of these scripts. --- build | 2 +- buildcmake | 2 +- buildold | 130 +++++------ src/arch/gni/charmrun | 42 ++-- src/arch/mpi-win-x86_64/charmrun | 8 +- src/arch/mpi/charmrun | 46 ++-- src/arch/multicore/charmrun | 12 +- src/arch/ofi/charmrun | 46 ++-- src/arch/pami-linux-ppc64le/charmrun | 40 ++-- src/arch/pamilrts-linux-ppc64le/charmrun | 40 ++-- src/arch/ucx/charmrun | 48 ++-- src/arch/win/gatherflat.local | 14 +- src/arch/win/gathertree.local | 26 +-- src/arch/win/system_ln | 34 +-- src/libs/ck-libs/ampi/ampiCC | 38 +-- src/libs/ck-libs/ampi/ampirun | 2 +- src/scripts/charmc | 286 +++++++++++------------ src/scripts/gatherflat | 14 +- src/scripts/gathertree | 24 +- src/scripts/testrun | 8 +- 20 files changed, 430 insertions(+), 432 deletions(-) diff --git a/build b/build index 2d76ec19ea..97b2ea54dd 100755 --- a/build +++ b/build @@ -3,5 +3,5 @@ # Determine the location of this script my_srcdir="$(cd -P "$(dirname "${BASH_SOURCE[0]}")" && pwd)" -"$my_srcdir"/buildcmake "$@" +"$my_srcdir/buildcmake" "$@" exit $? diff --git a/buildcmake b/buildcmake index a7bd9a621e..e0ba85f762 100755 --- a/buildcmake +++ b/buildcmake @@ -75,7 +75,7 @@ function parse_triplet() { # Extract extra options from the full_triplet, e.g., # full_triplet='netlrts-darwin-x86_64-smp-omp' # becomes actual_triplet='netlrts-darwin-x86_64' and extra_triplet_opts='smp omp' - all_triplets=$(cd "$my_srcdir"/src/arch && find . -maxdepth 1 -name '*-*' -type d | sed 's,./,,') + all_triplets=$(cd "$my_srcdir/src/arch" && find . -maxdepth 1 -name '*-*' -type d | sed 's,./,,') extra_triplet_opts="$full_triplet" for t in $all_triplets; do extra_triplet_opts=${extra_triplet_opts#"$t"} diff --git a/buildold b/buildold index f33e59fe12..8647bae9d1 100755 --- a/buildold +++ b/buildold @@ -1,7 +1,7 @@ #!/bin/bash # Silly shorthand, used for source reorganization -if [ "$(dirname "$0")" = "." ] +if [[ "$(dirname "$0")" = '.' ]] then srcbaseabs="./src" srcbase="../../src" @@ -18,7 +18,7 @@ syntax() { echo 'Usage: build [charmc-options ...]' echo '' echo ': converse charm++ LIBS AMPI charm4py msa' - if test $more = 1 + if [[ "$more" = '1' ]] then echo '' echo ' charm++ compile Charm++ core only' @@ -39,7 +39,7 @@ syntax() { echo 'icc iccstatic xlc xlc64 gcc clang icx pgcc cc mpicxx' echo 'help smp omp tcp ooc syncft papi pthreads' echo '--incdir --libdir --basedir --build-shared --destination --suffix -j' - if test $more = 1 + if [[ "$more" = '1' ]] then echo '' echo 'For platform specific options, use help option:' @@ -100,7 +100,7 @@ syntax() { # Test that the above regular expressions are sufficient to capture all help strings. num_help_strings="$(grep -c AS_HELP_STRING "$configure_ac")" num_help_items="$(echo "$help_items" | wc -l)" - if [ $num_help_strings != $num_help_items ]; then + if [[ "$num_help_strings" != "$num_help_items" ]]; then echo ': Not all parameters were able to be displayed. Please open an issue on our GitHub: https://github.com/UIUC-PPL/charm' fi @@ -118,7 +118,7 @@ syntax() { fi echo '' echo ': normal compiler options e.g. -g -optimize -save -verbose' - if test $more = 1 + if [[ "$more" = '1' ]] then echo '' echo 'Examples:' @@ -153,14 +153,14 @@ syntax() { } Echo() { - [ "x$QUIET" = "x--quiet" ] || echo $* + [[ "$QUIET" = '--quiet' ]] || echo "$@" } printOption() { for prefix in cc conv-mach do str="Supported compilers:" - [ "$prefix" = "conv-mach" ] && str="Supported options:" + [[ "$prefix" = 'conv-mach' ]] && str="Supported options:" opts="" for dir in "${OPT_DIRS[@]}" do @@ -174,7 +174,7 @@ printOption() { do echo "$o" >> "$tmp" done - opts=`sort $tmp | uniq` + opts=$(sort $tmp | uniq) rm -f $tmp echo $str $opts done @@ -235,7 +235,7 @@ ONLY_CONFIGURE= FORCE= AMPI_ONLY= -[ "$1" = '--help' -o "$1" = '-h' ] && more=1 && syntax | ( less || more ) && exit 1 +[[ "$1" = '--help' || "$1" = '-h' ]] && more=1 && syntax | ( less || more ) && exit 1 [[ $# -lt 2 ]] && "$(dirname "$0")/smart-build.pl" && exit 1 PROGRAM="$1" shift @@ -248,7 +248,7 @@ oldifs="$IFS" IFS="-" for w in $1; do IFS="$oldifs" - if [ -z "$testversion" ]; then + if [[ -z "$testversion" ]]; then testversion="$w" else testversion="$testversion-$w" @@ -286,10 +286,10 @@ esac for w in "${VERSOPTS[@]}"; do # This has to be a build-time option (like "smp") TestIfCompiler "$w" - if [ $? -eq 1 ] + if [[ $? -eq 1 ]] then # It specifies a compiler: - if [ ! -z "$COMPILER" ] + if [[ -n "$COMPILER" ]] then echo "Error> Tried to specify two compilers: $COMPILER and $w" printOption @@ -303,7 +303,7 @@ for w in "${VERSOPTS[@]}"; do fi done -while [ ! $# -eq 0 ] +while [[ $# -ne 0 ]] do case "$1" in "--basedir") @@ -454,10 +454,10 @@ do *) # This has to be a build-time option (like "smp") TestIfCompiler "$1" - if [ $? -eq 1 ] + if [[ $? -eq 1 ]] then # It specifies a compiler: - if [ ! -z "$COMPILER" ] + if [[ -n "$COMPILER" ]] then echo "Error> Tried to specify two compilers: $COMPILER and $1" printOption @@ -467,14 +467,14 @@ do # It specifies some other option: TestIfOption "$1" BOPTS+=("$1") - [[ "$1" = "cuda" ]] && BUILD_CUDA=1 + [[ "$1" = 'cuda' ]] && BUILD_CUDA=1 fi shift ;; esac done -if [ $BUILD_CUDA -eq 1 ]; then +if [[ "$BUILD_CUDA" = '1' ]]; then echo "Checking if NVCC is in your path..." if command -v nvcc >/dev/null 2>&1 ; then NVCC_PATH="$(command -v nvcc)" @@ -493,31 +493,31 @@ if [ $BUILD_CUDA -eq 1 ]; then break fi done - if [ $HAVE_CUDA = "no" ]; then + if [[ "$HAVE_CUDA" = 'no' ]]; then echo "Error> CUDA not found, searched $\CUDATOOLKIT_HOME \$CUDA_DIR \$CUDA_HOME ${CUDA_PRESET_DIRS[*]}" exit 1 fi fi fi -[ "x$VERSION" = "x" ] && syntax && exit 1 +[[ -z "$VERSION" ]] && syntax && exit 1 -if [ "x_$ARCH" = "x_net" ]; then +if [[ "$ARCH" = 'net' ]]; then echo "Error: net-* has been removed, please use netlrts or verbs."; exit 1; fi #Check if building verbs on Omni-Path -if [ "x_$ARCH" = "x_verbs" ] && type /usr/sbin/opafabricinfo >/dev/null 2>&1; then +if [[ "$ARCH" = 'verbs' ]] && type /usr/sbin/opafabricinfo >/dev/null 2>&1; then echo "WARNING: Detected Omni-Path diagnostic tools."; echo "Verbs on Omni-Path architectures is not well supported: please use an OFI build instead."; fi -if [ -z "$MAKE" ] +if [[ -z "$MAKE" ]] then # prefer gmake MAKE="$(command -v gmake 2>/dev/null)" - [ -z "$MAKE" -o ! -x "$MAKE" ] && MAKE='make' + [[ -z "$MAKE" || ! -x "$MAKE" ]] && MAKE='make' fi if [[ ! -f "$src/$BASEVERSION/conv-mach.h" ]] @@ -526,7 +526,7 @@ then exit 1 fi -if [ ! -f "$srcbaseabs/scripts/configure" ] +if [[ ! -f "$srcbaseabs/scripts/configure" ]] then if ! command -v autoreconf >/dev/null 2>&1 || ! command -v aclocal >/dev/null 2>&1 then @@ -540,7 +540,7 @@ if [[ ${#BOPTS[@]} -ne 0 || -n "$COMPILER" ]] then echo "Selected Compiler: $COMPILER" - if test -n "$COMPILER" -a `echo "$BASEVERSION" | grep -c "cray\|gni"` -gt 0 + if [[ -n "$COMPILER" && $(echo "$BASEVERSION" | grep -c "cray\|gni") -gt 0 ]] then echo "Inserted explicit compiler options on Cray systems. Use compiler wrappers by loading PrgEnv-*" echo "e.g.) module load PrgEnv-* (e.g. cray for cce, gnu for gcc, intel for icc, and pgi for pgcc)" @@ -551,7 +551,7 @@ then if [[ $(echo "${BOPTS[@]}" | grep -c "omp") -gt 0 && $(echo "$BASEVERSION" | grep -c "darwin") -gt 0 ]] then - if test -z "$COMPILER" -o "$COMPILER" != "gcc" + if [[ -z "$COMPILER" || "$COMPILER" != 'gcc' ]] then echo "The integrated OpenMP runtime library is supported on Mac only with the normal gcc" echo "You need to install this normal (non-clang) gcc via MacPorts or Homebrew" @@ -570,7 +570,7 @@ fi #echo "|$DESTINATION|$DESTINATION_SUFFIX|" -if [ -z "$DESTINATION" ] +if [[ -z "$DESTINATION" ]] then DESTINATION="$VERSION" fi @@ -582,13 +582,13 @@ then src="$srcbaseabs/arch" fi -if [ -n "$DESTINATION_SUFFIX" ] +if [[ -n "$DESTINATION_SUFFIX" ]] then DESTINATION="$DESTINATION-$DESTINATION_SUFFIX" fi # make sure $DESTINATION is more than '/' characters, because we `rm -rf` it -if [ -z "${DESTINATION#"${DESTINATION%%[!/]*}"}" ] +if [[ -z "${DESTINATION#"${DESTINATION%%[!/]*}"}" ]] then echo 'Error: $DESTINATION is the filesystem root.' exit 1 @@ -603,50 +603,50 @@ then HAS_PXSHM=0 HAS_SMP=0 for i in "${BOPTS[@]}"; do - if [ "$i" = "smp" ]; then + if [[ "$i" = 'smp' ]]; then HAS_SMP=1 - elif [ "$i" = "pxshm" ]; then + elif [[ "$i" = 'pxshm' ]]; then HAS_PXSHM=1 - elif [ "$i" = "omp" ]; then + elif [[ "$i" = 'omp' ]]; then BUILD_OMP=1 MYTMP+=("$i") else MYTMP+=("$i") fi done - if [ $HAS_PXSHM -eq 1 ]; then + if [[ "$HAS_PXSHM" = '1' ]]; then MYTMP=(pxshm "${MYTMP[@]}") fi - if [ $HAS_SMP -eq 1 ]; then + if [[ "$HAS_SMP" = '1' ]]; then MYTMP=(smp "${MYTMP[@]}") - if [ $BUILD_OMP -eq 1 ]; then + if [[ "$BUILD_OMP" = '1' ]]; then CONFIG_OPTS=(--enable-task-queue "${CONFIG_OPTS[@]}") fi - elif [ $BUILD_OMP -eq 1 ]; then + elif [[ "$BUILD_OMP" = '1' ]]; then BUILD_OMP=2 #this means omp keyword inserted without smp keyword (presumably when building multicore-*) CONFIG_OPTS=(--enable-task-queue "${CONFIG_OPTS[@]}") fi fi # build for Charm4py -if [ "$PROGRAM" = "charm4py" ]; then +if [[ "$PROGRAM" = 'charm4py' ]]; then - if [[ ${#BOPTS[@]} -ne 0 && "$HAS_SMP" -eq 1 ]]; then + if [[ ${#BOPTS[@]} -ne 0 && "$HAS_SMP" = '1' ]]; then echo "Error: SMP mode is currently not supported with charm4py. Choose a non-smp version." exit 1 fi - if [ `echo "$BASEVERSION" | grep -c "multicore"` -gt 0 ]; then + if [[ $(echo "$BASEVERSION" | grep -c "multicore") -gt 0 ]]; then echo "Error: multicore is currently not supported with charm4py. Choose a non-smp version." exit 1 fi - if test $(echo "${CONFIG_OPTS[@]}" | grep -c "\--enable-charm4py") -eq 0 + if [[ $(echo "${CONFIG_OPTS[@]}" | grep -c "\--enable-charm4py") -eq 0 ]] then CONFIG_OPTS+=(--enable-charm4py) fi - if test `echo "$BASEVERSION" | grep -c "win"` -gt 0 + if [[ $(echo "$BASEVERSION" | grep -c "win") -gt 0 ]] then BUILD_SHARED="" else @@ -654,7 +654,7 @@ if [ "$PROGRAM" = "charm4py" ]; then fi fi -if test -n "$WITH_PRODUCTION" +if [[ -n "$WITH_PRODUCTION" ]] then # Prepend optimize so that an explicit -no-optimize still works OPTS=(-optimize -production "${OPTS[@]}") @@ -663,7 +663,7 @@ fi # build with Tau WITH_TAU=0 -if [ "$PROGRAM" = "Tau" ] +if [[ "$PROGRAM" = 'Tau' ]] then Echo "TAU>>>> makefile config option: $TAU_MAKEFILE" if [[ -n "$TAU_MAKEFILE" && -f "$TAU_MAKEFILE" ]] @@ -678,13 +678,13 @@ then fi fi -if [ "$PROGRAM" = "ChaNGa" ] +if [[ "$PROGRAM" = 'ChaNGa' ]] then #Setting lbuserdata when the build is ChaNGa CONFIG_OPTS=(--enable-lbuserdata "${CONFIG_OPTS[@]}") fi -if [ $BUILD_OMP = 2 ] +if [[ "$BUILD_OMP" = '2' ]] then case "$DESTINATION" in "multicore"*) @@ -708,10 +708,10 @@ fi # ---------- begin file structure creation ---------- # =================================================== -if [ -f "$DESTINATION/tmp/basics" ] +if [[ -f "$DESTINATION/tmp/basics" ]] then Echo "The configure step has already taken place for the specified build." - if [ -z "$FORCE" ] + if [[ -z "$FORCE" ]] then Echo "To attempt a partial rebuild, run 'make' in \"$DESTINATION/tmp\"." Echo "To remove the existing data and reconfigure, run this script again with --force." @@ -719,10 +719,10 @@ then else Echo "Removing existing data and starting over. (--force)" fi -elif [ -e "$DESTINATION" -a ! -e "$DESTINATION/.spack" ] +elif [[ -e "$DESTINATION" && ! -e "$DESTINATION/.spack" ]] then Echo "\"$DESTINATION\" already exists but is in an inconsistent state." - if [ -z "$FORCE" ] + if [[ -z "$FORCE" ]] then Echo "To remove the existing data and reconfigure, run this script again with --force." exit 1 @@ -741,7 +741,7 @@ mkdir -p "$DESTINATION/tmp" # Create the bin, lib, include, etc. links: WINNAME=`echo $VERSION | awk -F- '{print $2}'` -if [ "x_$WINNAME" = "x_win" ] +if [[ "$WINNAME" = 'win' ]] then #Win64 version needs special compilers and *copied* (not linked) # source files. @@ -778,7 +778,7 @@ EOF for newdir in "${newdirlist[@]}" do Echo "Soft-linking over $newdir" - if [ -r "$newdir" ] + if [[ -r "$newdir" ]] then rm -fr "$newdir" || exit 1 fi @@ -791,7 +791,7 @@ fi Echo "Copying src/scripts/Makefile to $DESTINATION/tmp" "$DESTINATION/tmp/system_ln" "$srcbase/scripts/Make.depends" "$DESTINATION/tmp/Make.depends" "$DESTINATION/tmp/system_ln" "$srcbase/scripts/Make.cidepends" "$DESTINATION/tmp/Make.cidepends" -if test -f "$srcbaseabs/ck-ldb/Make.lb" +if [[ -f "$srcbaseabs/ck-ldb/Make.lb" ]] then "$DESTINATION/tmp/system_ln" "$srcbase/ck-ldb/Make.lb" "$DESTINATION/tmp/Make.lb" else @@ -821,7 +821,7 @@ chmod +x "$ConvUsr" ConvHeader="$DESTINATION/tmp/conv-mach-opt.h" ConvSh="$DESTINATION/tmp/conv-mach-opt.sh" ConvMak="$DESTINATION/tmp/conv-mach-opt.mak" -if [ ! -f "$ConvSh" -o ! -f "$ConvHeader" -o ! -f "$ConvMak" ] +if [[ ! -f "$ConvSh" || ! -f "$ConvHeader" || ! -f "$ConvMak" ]] then Echo "Generating $ConvHeader, conv-mach-opt.sh, conv-mach-opt.mak" echo '/* Build-time options header, automatically generated by charm/build */' > "$ConvHeader" @@ -829,7 +829,7 @@ then echo '# Build-time options header, automatically generated by charm/build' > "$ConvMak" echo '[ -z "$CHARMINC" ] && CHARMINC="."' >> "$ConvSh" fi -if test -n "$COMPILER" +if [[ -n "$COMPILER" ]] then i="$(echo "$COMPILER" | sed 's/-[0-9\.][0-9\.]*$//')" echo "CMK_COMPILER_SUFFIX=\"${COMPILER#$i}\"" >> "$ConvSh" @@ -844,14 +844,14 @@ then echo '#include "'conv-mach-$i.h'"' >> "$ConvHeader" echo '. "$CHARMINC/'"conv-mach-$i.sh"'"' >> "$ConvSh" done - if [ $BUILD_CUDA -eq 1 ]; then + if [[ "$BUILD_CUDA" = '1' ]]; then echo 'CUDA_DIR="'"$CUDA_DIR"'"' >> "$ConvSh" echo "CUDA_DIR:=$CUDA_DIR" >> "$ConvMak" echo "BUILD_CUDA:=$BUILD_CUDA" >> "$ConvMak" fi fi -if test "$BUILD_SHARED" = "-build-shared" +if [[ "$BUILD_SHARED" = '-build-shared' ]] then echo "CMK_NO_BUILD_SHARED=false" >> "$ConvSh" echo "CMK_NO_BUILD_SHARED:=false" >> "$ConvMak" @@ -862,7 +862,7 @@ else echo "CMK_NO_BUILD_SHARED:=true" >> "$ConvMak" fi -if test -n "$WITH_ROMIO" +if [[ -n "$WITH_ROMIO" ]] then echo "CMK_AMPI_WITH_ROMIO=\"1\"" >> "$ConvSh" echo "CMK_AMPI_WITH_ROMIO:=1" >> "$ConvMak" @@ -890,14 +890,14 @@ else echo '#define CMK_AMPI_ONLY 0' >> "$ConvHeader" fi -if test -n "$WITH_PRODUCTION" +if [[ -n "$WITH_PRODUCTION" ]] then echo '#define CMK_OPTIMIZE 1' >> "$ConvHeader" fi -if test $WITH_TAU -eq 1 +if [[ $WITH_TAU -eq 1 ]] then - [ -z "$TAU_MAKEFILE" ] && TAU_MAKEFILE="Make.tau" + [[ -z "$TAU_MAKEFILE" ]] && TAU_MAKEFILE='Make.tau' SED_CHARMC="s@TAU_MAKEFILE=\(.*\)@TAU_MAKEFILE=$TAU_MAKEFILE@" sed -e "$SED_CHARMC" "$srcbaseabs/scripts/Makefile" > .Makefile.$$ && cp .Makefile.$$ "$srcbaseabs/scripts/Makefile" && rm -f .Makefile.$$ @@ -945,24 +945,24 @@ cd "$DESTINATION/tmp" runCmd() { - Echo "Performing '$*' in '$DESTINATION/tmp'" + Echo "Performing '$@' in '$DESTINATION/tmp'" "$@" } runCmd "$MAKE" "${MAKEOPTS[@]}" basics OPTS="${OPTS[*]}" QUIET="$QUIET" MAKEEXIT=$? -[ $MAKEEXIT -ne 0 ] && printError +[[ $MAKEEXIT -ne 0 ]] && printError -if test -n "$ONLY_CONFIGURE" +if [[ -n "$ONLY_CONFIGURE" ]] then exit 0 fi runCmd "$MAKE" "${MAKEOPTS[@]}" "$PROGRAM" OPTS="${OPTS[*]}" QUIET="$QUIET" MAKEEXIT=$? -if [ $MAKEEXIT -eq 0 ] +if [[ $MAKEEXIT -eq 0 ]] then - if [ $BUILD_OMP = 1 ]; + if [[ "$BUILD_OMP" = '1' ]]; then "$MAKE" MFLAGS="${MAKEOPTS[*]}" openmp_llvm OPTS="${OPTS[*]}" QUIET="$QUIET" fi diff --git a/src/arch/gni/charmrun b/src/arch/gni/charmrun index 3feaa87459..b10ed2b724 100755 --- a/src/arch/gni/charmrun +++ b/src/arch/gni/charmrun @@ -23,7 +23,7 @@ runCmd() "$@" } -while [ $# -gt 0 ] +while [[ $# -ne 0 ]] do case "$1" in +n|++n|++np) @@ -106,11 +106,11 @@ done [[ $QUIET -eq 1 ]] && args+=(++quiet) -if [ "$DEBUG" = '1' -o "$DEBUG_NO_PAUSE" = '1' ] +if [[ "$DEBUG" = '1' || "$DEBUG_NO_PAUSE" = '1' ]] then DEBUG_RUN=(-ex r) DEBUG_POSTFIX='--args' - if [ "$DEBUGGER" = 'lldb' ] + if [[ "$DEBUGGER" = 'lldb' ]] then DEBUG_RUN=(-o r) DEBUG_POSTFIX='--' @@ -140,16 +140,16 @@ fi [[ $QUIET -eq 0 ]] && echo && echo "Running as $nodes OS processes: ${args[*]}" -if [ -n "$PBS_NODEFILE" ] +if [[ -n "$PBS_NODEFILE" ]] then # we are in a job shell aprun="$(command -v aprun 2>/dev/null)" - if test -n "$aprun" + if [[ -n "$aprun" ]] then runCmd "$aprun" -n "$nodes" -d $(( ppn + 1 )) "${args[@]}" else mpirun_cmd="$(command -v mpirun 2>/dev/null)" - if test -n "$mpirun_cmd" + if [[ -n "$mpirun_cmd" ]] then if echo "$mpirun_cmd" | grep 'mvapich2' >/dev/null 2>&1 then @@ -169,11 +169,11 @@ then exit 1 fi fi -elif [ -n "$LSB_HOSTS" ] +elif [[ -n "$LSB_HOSTS" ]] then # Tungsten runCmd cmpirun -lsf -poll -no_smp -gm_long 200000 "${args[@]}" -elif [ -n "$PBS_QUEUE" -o -n "$LSF_QUEUE" ] +elif [[ -n "$PBS_QUEUE" || -n "$LSF_QUEUE" ]] then # Interactive mode: create, and submit a batch job script="charmrun_script.$$.sh" @@ -227,15 +227,15 @@ then ncpus="#PBS -l ncpus=$nodes" ;; esac - if test $USE_LSF -eq 0 + if [[ "$USE_LSF" = '0' ]] then mpirun="$(command -v aprun 2>/dev/null)" npcmd="-n " - if test -z "$mpirun" + if [[ -z "$mpirun" ]] then mpirun="$(command -v mpirun 2>/dev/null)" npcmd="-np " - if test -z "$mpirun" + if [[ -z "$mpirun" ]] then mpirun="$(command -v srun 2>/dev/null)" npcmd="-n " @@ -304,17 +304,17 @@ End() { echo "Submitting batch job for> $mpirun -np $nodes ${args[*]}" echo " using the command> $queue_qsub $script" chmod 755 $script - while [ -z "$jobid" ] + while [[ -z "$jobid" ]] do - [ $USE_LSF = 0 ] && jobid=`$queue_qsub $script|tail -1` - [ $USE_LSF = 1 ] && jobid=`$queue_qsub < $script|tail -1|sed -e 's/[^0-9]*//g'` + [[ "$USE_LSF" = '0' ]] && jobid=$($queue_qsub $script|tail -1) + [[ "$USE_LSF" = '1' ]] && jobid=$($queue_qsub < $script|tail -1|sed -e 's/[^0-9]*//g') done echo "Job enqueued under job ID $jobid" # kill job if interrupted trap 'End 1' 2 3 retry=0 # Wait for the job to complete, by checking its status - while [ true ] + while [[ true ]] do $queue_stat $jobid > tmp.$$ exitstatus=$? @@ -334,11 +334,11 @@ End() { tail -1 tmp.$$ rm tmp.$$ # Job ID may not exist now - if test $exitstatus -ne 0 + if [[ $exitstatus -ne 0 ]] then # retry a few times when error occurs retry=$(( retry + 1 )) - if test $retry -gt 6 + if [[ $retry -gt 6 ]] then echo "Charmrun> too many errors, abort!" exit 1 @@ -351,17 +351,17 @@ End() { sleep 20 fi done -elif [ -n "$(command -v srun 2>/dev/null)" ] +elif [[ -n "$(command -v srun 2>/dev/null)" ]] then # failover to srun before mpirun (for Edison autobuild support) runCmd srun -n "$nodes" -c $(( ppn + 1 )) "${args[@]}" else mpirun_cmd="$(command -v mpirun 2>/dev/null)" - if test -n "$mpirun_cmd" + if [[ -n "$mpirun_cmd" ]] then [[ -n "$MPI_MACHINEFILE" ]] && args=(-machinefile "$MPI_MACHINEFILE" "${args[@]}") setarch_cmd="$(command -v setarch 2>/dev/null)" - if [ -n "$setarch_cmd" -a -x "$setarch_cmd" ] + if [[ -n "$setarch_cmd" && -x "$setarch_cmd" ]] then # Disables randomization of the virtual address space (turns on # ADDR_NO_RANDOMIZE). @@ -372,7 +372,7 @@ else fi else mpiexec_cmd="$(command -v mpiexec 2>/dev/null)" - if test -n "$mpiexec_cmd" + if [[ -n "$mpiexec_cmd" ]] then runCmd "$mpiexec_cmd" -n "$nodes" "${args[@]}" else diff --git a/src/arch/mpi-win-x86_64/charmrun b/src/arch/mpi-win-x86_64/charmrun index 26af826242..36b569dcb6 100755 --- a/src/arch/mpi-win-x86_64/charmrun +++ b/src/arch/mpi-win-x86_64/charmrun @@ -25,7 +25,7 @@ runCmd() "$@" } -while [ $# -gt 0 ] +while [[ $# -ne 0 ]] do case "$1" in +n|++n|++np) @@ -112,11 +112,11 @@ done args+=("${charm_args[@]}") -if [ "$DEBUG" = '1' ] || [ "$DEBUG_NO_PAUSE" = '1' ] +if [[ "$DEBUG" = '1' || "$DEBUG_NO_PAUSE" = '1' ]] then DEBUG_RUN=(-ex r) DEBUG_POSTFIX='--args' - if [ "$DEBUGGER" = 'lldb' ] + if [[ "$DEBUGGER" = 'lldb' ]] then DEBUG_RUN=(-o r) DEBUG_POSTFIX='--' @@ -147,7 +147,7 @@ fi mpiexec_cmd="$(command -v mpiexec 2>/dev/null)" -if test -n "$mpiexec_cmd" +if [[ -n "$mpiexec_cmd" ]] then runCmd "$mpiexec_cmd" -n "$nodes" "${args[@]}" else diff --git a/src/arch/mpi/charmrun b/src/arch/mpi/charmrun index 5ae1db03e9..901df49fc4 100755 --- a/src/arch/mpi/charmrun +++ b/src/arch/mpi/charmrun @@ -26,7 +26,7 @@ runCmd() "$@" } -while [ $# -gt 0 ] +while [[ $# -ne 0 ]] do case "$1" in +n|++n|++np) @@ -114,16 +114,16 @@ done args+=("${charm_args[@]}") -if [ "$DEBUG" = '1' -o "$DEBUG_NO_PAUSE" = '1' ] +if [[ "$DEBUG" = '1' || "$DEBUG_NO_PAUSE" = '1' ]] then - if [ -z "$DEBUGGER" ] + if [[ -z "$DEBUGGER" ]] then [[ "$(uname -s 2>/dev/null)" = 'Darwin' ]] && DEBUGGER='lldb' || DEBUGGER='gdb' fi DEBUG_RUN=(-ex r) DEBUG_POSTFIX='--args' - if [ "$DEBUGGER" = 'lldb' ] + if [[ "$DEBUGGER" = 'lldb' ]] then DEBUG_RUN=(-o r) DEBUG_POSTFIX='--' @@ -152,16 +152,16 @@ fi [[ $QUIET -eq 0 ]] && echo && echo "Running as $nodes OS processes: ${args[*]}" -if [ -n "$PBS_NODEFILE" ] +if [[ -n "$PBS_NODEFILE" ]] then # we are in a job shell aprun="$(command -v aprun 2>/dev/null)" - if test -n "$aprun" + if [[ -n "$aprun" ]] then runCmd "$aprun" -n "$nodes" "${args[@]}" else mpirun_cmd="$(command -v mpirun 2>/dev/null)" - if test -n "$mpirun_cmd" + if [[ -n "$mpirun_cmd" ]] then if echo "$mpirun_cmd" | grep 'mvapich2' >/dev/null 2>&1 then @@ -181,11 +181,11 @@ then exit 1 fi fi -elif [ -n "$LSB_HOSTS" ] +elif [[ -n "$LSB_HOSTS" ]] then # Tungsten runCmd cmpirun -lsf -poll -no_smp -gm_long 200000 "${args[@]}" -elif [ -n "$PBS_QUEUE" -o -n "$LSF_QUEUE" ] +elif [[ -n "$PBS_QUEUE" || -n "$LSF_QUEUE" ]] then # Interactive mode: create, and submit a batch job script="charmrun_script.$$.sh" @@ -240,15 +240,15 @@ then ncpus="#PBS -l ncpus=$nodes" ;; esac - if test $USE_LSF -eq 0 + if [[ "$USE_LSF" = '0' ]] then mpirun="$(command -v aprun 2>/dev/null)" npcmd="-n " - if test -z "$mpirun" + if [[ -z "$mpirun" ]] then mpirun="$(command -v mpirun 2>/dev/null)" npcmd="-np " - if test -z "$mpirun" + if [[ -z "$mpirun" ]] then mpirun="$(command -v srun 2>/dev/null)" npcmd="-n " @@ -317,17 +317,17 @@ End() { echo "Submitting batch job for> $mpirun -np $nodes ${args[*]}" echo " using the command> $queue_qsub $script" chmod 755 $script - while [ -z "$jobid" ] + while [[ -z "$jobid" ]] do - [ $USE_LSF = 0 ] && jobid=`$queue_qsub $script|tail -1` - [ $USE_LSF = 1 ] && jobid=`$queue_qsub < $script|tail -1|sed -e 's/[^0-9]*//g'` + [[ "$USE_LSF" = '0' ]] && jobid=$($queue_qsub $script|tail -1) + [[ "$USE_LSF" = '1' ]] && jobid=$($queue_qsub < $script|tail -1|sed -e 's/[^0-9]*//g') done echo "Job enqueued under job ID $jobid" # kill job if interrupted trap 'End 1' 2 3 retry=0 # Wait for the job to complete, by checking its status - while [ true ] + while [[ true ]] do $queue_stat $jobid > tmp.$$ exitstatus=$? @@ -347,11 +347,11 @@ End() { tail -1 tmp.$$ rm tmp.$$ # Job ID may not exist now - if test $exitstatus -ne 0 + if [[ $exitstatus -ne 0 ]] then # retry a few times when error occurs retry=$(( retry + 1 )) - if test $retry -gt 6 + if [[ $retry -gt 6 ]] then echo "Charmrun> too many errors, abort!" exit 1 @@ -364,14 +364,14 @@ End() { sleep 20 fi done -elif [ -n "$(command -v mpirun 2>/dev/null)" ] +elif [[ -n "$(command -v mpirun 2>/dev/null)" ]] then mpirun_cmd="$(command -v mpirun 2>/dev/null)" - if test -n "$mpirun_cmd" + if [[ -n "$mpirun_cmd" ]] then [[ -n "$MPI_MACHINEFILE" ]] && args=(-machinefile "$MPI_MACHINEFILE" "${args[@]}") setarch_cmd="$(command -v setarch 2>/dev/null)" - if [ -n "$setarch_cmd" -a -x "$setarch_cmd" ] + if [[ -n "$setarch_cmd" && -x "$setarch_cmd" ]] then # Disables randomization of the virtual address space (turns on # ADDR_NO_RANDOMIZE). @@ -382,7 +382,7 @@ then fi else mpiexec_cmd="$(command -v mpiexec 2>/dev/null)" - if test -n "$mpiexec_cmd" + if [[ -n "$mpiexec_cmd" ]] then runCmd "$mpiexec_cmd" -n "$nodes" "${args[@]}" else @@ -390,7 +390,7 @@ then exit 1 fi fi -elif [ -n "$(command -v srun 2>/dev/null)" ] +elif [[ -n "$(command -v srun 2>/dev/null)" ]] then #mpirun is checked before srun to support the Bridges supercomputer at PSC #as srun has a known issue and fails to successfully launch the parallel job diff --git a/src/arch/multicore/charmrun b/src/arch/multicore/charmrun index c6161944a3..8bc62c635e 100755 --- a/src/arch/multicore/charmrun +++ b/src/arch/multicore/charmrun @@ -17,7 +17,7 @@ runCmd() "$@" } -while [ $# -gt 0 ] +while [[ $# -ne 0 ]] do case "$1" in +p|++p|+ppn|++ppn) @@ -85,7 +85,7 @@ do shift ;; *) - if [ -z "$cmd" ]; then + if [[ -z "$cmd" ]]; then cmd="$1" else args+=("$1") @@ -97,16 +97,16 @@ done [[ $QUIET -eq 1 ]] && args+=(++quiet) -if [ "$DEBUG" = '1' ] || [ "$DEBUG_NO_PAUSE" = '1' ] +if [[ "$DEBUG" = '1' || "$DEBUG_NO_PAUSE" = '1' ]] then - if [ -z "$DEBUGGER" ] + if [[ -z "$DEBUGGER" ]] then - [ "$(uname -s 2>/dev/null)" = 'Darwin' ] && DEBUGGER='lldb' || DEBUGGER='gdb' + [[ "$(uname -s 2>/dev/null)" = 'Darwin' ]] && DEBUGGER='lldb' || DEBUGGER='gdb' fi DEBUG_RUN=(-ex r) DEBUG_POSTFIX='--args' - if [ "$DEBUGGER" = 'lldb' ] + if [[ "$DEBUGGER" = 'lldb' ]] then DEBUG_RUN=(-o r) DEBUG_POSTFIX='--' diff --git a/src/arch/ofi/charmrun b/src/arch/ofi/charmrun index f5c55daa64..0f0a117043 100755 --- a/src/arch/ofi/charmrun +++ b/src/arch/ofi/charmrun @@ -26,7 +26,7 @@ runCmd() "$@" } -while [ $# -gt 0 ] +while [[ $# -ne 0 ]] do case "$1" in +n|++n|++np) @@ -114,16 +114,16 @@ done args+=("${charm_args[@]}") -if [ "$DEBUG" = '1' -o "$DEBUG_NO_PAUSE" = '1' ] +if [[ "$DEBUG" = '1' || "$DEBUG_NO_PAUSE" = '1' ]] then - if [ -z "$DEBUGGER" ] + if [[ -z "$DEBUGGER" ]] then [[ "$(uname -s 2>/dev/null)" = 'Darwin' ]] && DEBUGGER='lldb' || DEBUGGER='gdb' fi DEBUG_RUN=(-ex r) DEBUG_POSTFIX='--args' - if [ "$DEBUGGER" = 'lldb' ] + if [[ "$DEBUGGER" = 'lldb' ]] then DEBUG_RUN=(-o r) DEBUG_POSTFIX='--' @@ -152,16 +152,16 @@ fi [[ $QUIET -eq 0 ]] && echo && echo "Running as $nodes OS processes: ${args[*]}" -if [ -n "$PBS_NODEFILE" ] +if [[ -n "$PBS_NODEFILE" ]] then # we are in a job shell aprun="$(command -v aprun 2>/dev/null)" - if test -n "$aprun" + if [[ -n "$aprun" ]] then runCmd "$aprun" -n "$nodes" "${args[@]}" else mpirun_cmd="$(command -v mpirun 2>/dev/null)" - if test -n "$mpirun_cmd" + if [[ -n "$mpirun_cmd" ]] then if echo "$mpirun_cmd" | grep 'mvapich2' >/dev/null 2>&1 then @@ -181,11 +181,11 @@ then exit 1 fi fi -elif [ -n "$LSB_HOSTS" ] +elif [[ -n "$LSB_HOSTS" ]] then # Tungsten runCmd cmpirun -lsf -poll -no_smp -gm_long 200000 "${args[@]}" -elif [ -n "$PBS_QUEUE" -o -n "$LSF_QUEUE" ] +elif [[ -n "$PBS_QUEUE" || -n "$LSF_QUEUE" ]] then # Interactive mode: create, and submit a batch job script="charmrun_script.$$.sh" @@ -240,15 +240,15 @@ then ncpus="#PBS -l ncpus=$nodes" ;; esac - if test $USE_LSF -eq 0 + if [[ "$USE_LSF" = '0' ]] then mpirun="$(command -v aprun 2>/dev/null)" npcmd="-n " - if test -z "$mpirun" + if [[ -z "$mpirun" ]] then mpirun="$(command -v mpirun 2>/dev/null)" npcmd="-np " - if test -z "$mpirun" + if [[ -z "$mpirun" ]] then mpirun="$(command -v srun 2>/dev/null)" npcmd="-n " @@ -317,17 +317,17 @@ End() { echo "Submitting batch job for> $mpirun -np $nodes ${args[*]}" echo " using the command> $queue_qsub $script" chmod 755 $script - while [ -z "$jobid" ] + while [[ -z "$jobid" ]] do - [ $USE_LSF = 0 ] && jobid=`$queue_qsub $script|tail -1` - [ $USE_LSF = 1 ] && jobid=`$queue_qsub < $script|tail -1|sed -e 's/[^0-9]*//g'` + [[ "$USE_LSF" = '0' ]] && jobid=$($queue_qsub $script|tail -1) + [[ "$USE_LSF" = '1' ]] && jobid=$($queue_qsub < $script|tail -1|sed -e 's/[^0-9]*//g') done echo "Job enqueued under job ID $jobid" # kill job if interrupted trap 'End 1' 2 3 retry=0 # Wait for the job to complete, by checking its status - while [ true ] + while [[ true ]] do $queue_stat $jobid > tmp.$$ exitstatus=$? @@ -347,11 +347,11 @@ End() { tail -1 tmp.$$ rm tmp.$$ # Job ID may not exist now - if test $exitstatus -ne 0 + if [[ $exitstatus -ne 0 ]] then # retry a few times when error occurs retry=$(( retry + 1 )) - if test $retry -gt 6 + if [[ $retry -gt 6 ]] then echo "Charmrun> too many errors, abort!" exit 1 @@ -364,14 +364,14 @@ End() { sleep 20 fi done -elif [ -n "$(command -v mpirun 2>/dev/null)" ] +elif [[ -n "$(command -v mpirun 2>/dev/null)" ]] then mpirun_cmd="$(command -v mpirun 2>/dev/null)" - if test -n "$mpirun_cmd" + if [[ -n "$mpirun_cmd" ]] then [[ -n "$MPI_MACHINEFILE" ]] && args=(-machinefile "$MPI_MACHINEFILE" "${args[@]}") setarch_cmd="$(command -v setarch 2>/dev/null)" - if [ -n "$setarch_cmd" -a -x "$setarch_cmd" ] + if [[ -n "$setarch_cmd" && -x "$setarch_cmd" ]] then # Disables randomization of the virtual address space (turns on # ADDR_NO_RANDOMIZE). @@ -382,7 +382,7 @@ then fi else mpiexec_cmd="$(command -v mpiexec 2>/dev/null)" - if test -n "$mpiexec_cmd" + if [[ -n "$mpiexec_cmd" ]] then runCmd "$mpiexec_cmd" -n "$nodes" "${args[@]}" else @@ -390,7 +390,7 @@ then exit 1 fi fi -elif [ -n "$(command -v srun 2>/dev/null)" ] +elif [[ -n "$(command -v srun 2>/dev/null)" ]] then #mpirun is checked before srun to support the Bridges supercomputer at PSC #as srun has a known issue and fails to successfully launch the parallel job. diff --git a/src/arch/pami-linux-ppc64le/charmrun b/src/arch/pami-linux-ppc64le/charmrun index 938e596240..278aa2aae9 100755 --- a/src/arch/pami-linux-ppc64le/charmrun +++ b/src/arch/pami-linux-ppc64le/charmrun @@ -23,7 +23,7 @@ runCmd() "$@" } -while [ $# -gt 0 ] +while [[ $# -ne 0 ]] do case "$1" in +n|++n|++np) @@ -106,11 +106,11 @@ done [[ $QUIET -eq 1 ]] && args+=(++quiet) -if [ "$DEBUG" = '1' -o "$DEBUG_NO_PAUSE" = '1' ] +if [[ "$DEBUG" = '1' || "$DEBUG_NO_PAUSE" = '1' ]] then DEBUG_RUN=(-ex r) DEBUG_POSTFIX='--args' - if [ "$DEBUGGER" = 'lldb' ] + if [[ "$DEBUGGER" = 'lldb' ]] then DEBUG_RUN=(-o r) DEBUG_POSTFIX='--' @@ -140,16 +140,16 @@ fi [[ $QUIET -eq 0 ]] && echo && echo "Running as $nodes OS processes: ${args[*]}" -if [ -n "$PBS_NODEFILE" ] +if [[ -n "$PBS_NODEFILE" ]] then # we are in a job shell aprun="$(command -v aprun 2>/dev/null)" - if test -n "$aprun" + if [[ -n "$aprun" ]] then runCmd "$aprun" -n "$nodes" "${args[@]}" else mpirun_cmd="$(command -v mpirun 2>/dev/null)" - if test -n "$mpirun_cmd" + if [[ -n "$mpirun_cmd" ]] then if echo "$mpirun_cmd" | grep 'mvapich2' >/dev/null 2>&1 then @@ -169,11 +169,11 @@ then exit 1 fi fi -elif [ -n "$LSB_HOSTS" ] +elif [[ -n "$LSB_HOSTS" ]] then # Summit/Summitdev jsrun="$(command -v jsrun 2>/dev/null)" - if test -n "$jsrun" + if [[ -n "$jsrun" ]] then #cores per resource set = ppn + 1 core for system processes cores=$(( ppn + 1 )) @@ -187,7 +187,7 @@ then ;; esac fi -elif [ -n "$PBS_QUEUE" -o -n "$LSF_QUEUE" ] +elif [[ -n "$PBS_QUEUE" || -n "$LSF_QUEUE" ]] then # Interactive mode: create, and submit a batch job script="charmrun_script.$$.sh" @@ -242,11 +242,11 @@ then ncpus="#PBS -l ncpus=$nodes" ;; esac - if test $USE_LSF -eq 0 + if [[ "$USE_LSF" = '0' ]] then mpirun="$(command -v aprun 2>/dev/null)" npcmd="-n " - if test -z "$mpirun" + if [[ -z "$mpirun" ]] then mpirun="$(command -v mpirun 2>/dev/null)" npcmd="-np " @@ -314,17 +314,17 @@ End() { echo "Submitting batch job for> $mpirun -np $nodes ${args[*]}" echo " using the command> $queue_qsub $script" chmod 755 $script - while [ -z "$jobid" ] + while [[ -z "$jobid" ]] do - [ $USE_LSF = 0 ] && jobid=`$queue_qsub $script|tail -1` - [ $USE_LSF = 1 ] && jobid=`$queue_qsub < $script|tail -1|sed -e 's/[^0-9]*//g'` + [[ "$USE_LSF" = '0' ]] && jobid=$($queue_qsub $script|tail -1) + [[ "$USE_LSF" = '1' ]] && jobid=$($queue_qsub < $script|tail -1|sed -e 's/[^0-9]*//g') done echo "Job enqueued under job ID $jobid" # kill job if interrupted trap 'End 1' 2 3 retry=0 # Wait for the job to complete, by checking its status - while [ true ] + while [[ true ]] do $queue_stat $jobid > tmp.$$ exitstatus=$? @@ -344,11 +344,11 @@ End() { tail -1 tmp.$$ rm tmp.$$ # Job ID may not exist now - if test $exitstatus -ne 0 + if [[ $exitstatus -ne 0 ]] then # retry a few times when error occurs retry=$(( retry + 1 )) - if test $retry -gt 6 + if [[ $retry -gt 6 ]] then echo "Charmrun> too many errors, abort!" exit 1 @@ -363,11 +363,11 @@ End() { done else mpirun_cmd="$(command -v mpirun 2>/dev/null)" - if test -n "$mpirun_cmd" + if [[ -n "$mpirun_cmd" ]] then [[ -n "$MPI_MACHINEFILE" ]] && args=(-machinefile "$MPI_MACHINEFILE" "${args[@]}") setarch_cmd="$(command -v setarch 2>/dev/null)" - if [ -n "$setarch_cmd" -a -x "$setarch_cmd" ] + if [[ -n "$setarch_cmd" && -x "$setarch_cmd" ]] then # Disables randomization of the virtual address space (turns on # ADDR_NO_RANDOMIZE). @@ -378,7 +378,7 @@ else fi else mpiexec_cmd="$(command -v mpiexec 2>/dev/null)" - if test -n "$mpiexec_cmd" + if [[ -n "$mpiexec_cmd" ]] then runCmd "$mpiexec_cmd" -n "$nodes" "${args[@]}" else diff --git a/src/arch/pamilrts-linux-ppc64le/charmrun b/src/arch/pamilrts-linux-ppc64le/charmrun index 938e596240..278aa2aae9 100755 --- a/src/arch/pamilrts-linux-ppc64le/charmrun +++ b/src/arch/pamilrts-linux-ppc64le/charmrun @@ -23,7 +23,7 @@ runCmd() "$@" } -while [ $# -gt 0 ] +while [[ $# -ne 0 ]] do case "$1" in +n|++n|++np) @@ -106,11 +106,11 @@ done [[ $QUIET -eq 1 ]] && args+=(++quiet) -if [ "$DEBUG" = '1' -o "$DEBUG_NO_PAUSE" = '1' ] +if [[ "$DEBUG" = '1' || "$DEBUG_NO_PAUSE" = '1' ]] then DEBUG_RUN=(-ex r) DEBUG_POSTFIX='--args' - if [ "$DEBUGGER" = 'lldb' ] + if [[ "$DEBUGGER" = 'lldb' ]] then DEBUG_RUN=(-o r) DEBUG_POSTFIX='--' @@ -140,16 +140,16 @@ fi [[ $QUIET -eq 0 ]] && echo && echo "Running as $nodes OS processes: ${args[*]}" -if [ -n "$PBS_NODEFILE" ] +if [[ -n "$PBS_NODEFILE" ]] then # we are in a job shell aprun="$(command -v aprun 2>/dev/null)" - if test -n "$aprun" + if [[ -n "$aprun" ]] then runCmd "$aprun" -n "$nodes" "${args[@]}" else mpirun_cmd="$(command -v mpirun 2>/dev/null)" - if test -n "$mpirun_cmd" + if [[ -n "$mpirun_cmd" ]] then if echo "$mpirun_cmd" | grep 'mvapich2' >/dev/null 2>&1 then @@ -169,11 +169,11 @@ then exit 1 fi fi -elif [ -n "$LSB_HOSTS" ] +elif [[ -n "$LSB_HOSTS" ]] then # Summit/Summitdev jsrun="$(command -v jsrun 2>/dev/null)" - if test -n "$jsrun" + if [[ -n "$jsrun" ]] then #cores per resource set = ppn + 1 core for system processes cores=$(( ppn + 1 )) @@ -187,7 +187,7 @@ then ;; esac fi -elif [ -n "$PBS_QUEUE" -o -n "$LSF_QUEUE" ] +elif [[ -n "$PBS_QUEUE" || -n "$LSF_QUEUE" ]] then # Interactive mode: create, and submit a batch job script="charmrun_script.$$.sh" @@ -242,11 +242,11 @@ then ncpus="#PBS -l ncpus=$nodes" ;; esac - if test $USE_LSF -eq 0 + if [[ "$USE_LSF" = '0' ]] then mpirun="$(command -v aprun 2>/dev/null)" npcmd="-n " - if test -z "$mpirun" + if [[ -z "$mpirun" ]] then mpirun="$(command -v mpirun 2>/dev/null)" npcmd="-np " @@ -314,17 +314,17 @@ End() { echo "Submitting batch job for> $mpirun -np $nodes ${args[*]}" echo " using the command> $queue_qsub $script" chmod 755 $script - while [ -z "$jobid" ] + while [[ -z "$jobid" ]] do - [ $USE_LSF = 0 ] && jobid=`$queue_qsub $script|tail -1` - [ $USE_LSF = 1 ] && jobid=`$queue_qsub < $script|tail -1|sed -e 's/[^0-9]*//g'` + [[ "$USE_LSF" = '0' ]] && jobid=$($queue_qsub $script|tail -1) + [[ "$USE_LSF" = '1' ]] && jobid=$($queue_qsub < $script|tail -1|sed -e 's/[^0-9]*//g') done echo "Job enqueued under job ID $jobid" # kill job if interrupted trap 'End 1' 2 3 retry=0 # Wait for the job to complete, by checking its status - while [ true ] + while [[ true ]] do $queue_stat $jobid > tmp.$$ exitstatus=$? @@ -344,11 +344,11 @@ End() { tail -1 tmp.$$ rm tmp.$$ # Job ID may not exist now - if test $exitstatus -ne 0 + if [[ $exitstatus -ne 0 ]] then # retry a few times when error occurs retry=$(( retry + 1 )) - if test $retry -gt 6 + if [[ $retry -gt 6 ]] then echo "Charmrun> too many errors, abort!" exit 1 @@ -363,11 +363,11 @@ End() { done else mpirun_cmd="$(command -v mpirun 2>/dev/null)" - if test -n "$mpirun_cmd" + if [[ -n "$mpirun_cmd" ]] then [[ -n "$MPI_MACHINEFILE" ]] && args=(-machinefile "$MPI_MACHINEFILE" "${args[@]}") setarch_cmd="$(command -v setarch 2>/dev/null)" - if [ -n "$setarch_cmd" -a -x "$setarch_cmd" ] + if [[ -n "$setarch_cmd" && -x "$setarch_cmd" ]] then # Disables randomization of the virtual address space (turns on # ADDR_NO_RANDOMIZE). @@ -378,7 +378,7 @@ else fi else mpiexec_cmd="$(command -v mpiexec 2>/dev/null)" - if test -n "$mpiexec_cmd" + if [[ -n "$mpiexec_cmd" ]] then runCmd "$mpiexec_cmd" -n "$nodes" "${args[@]}" else diff --git a/src/arch/ucx/charmrun b/src/arch/ucx/charmrun index 7e7fc90b5e..6b9607a269 100755 --- a/src/arch/ucx/charmrun +++ b/src/arch/ucx/charmrun @@ -27,7 +27,7 @@ runCmd() "$@" } -while [ $# -gt 0 ] +while [[ $# -ne 0 ]] do case "$1" in +n|++n|++np) @@ -114,16 +114,16 @@ done args+=("${charm_args[@]}") -if [ "$DEBUG" = '1' -o "$DEBUG_NO_PAUSE" = '1' ] +if [[ "$DEBUG" = '1' || "$DEBUG_NO_PAUSE" = '1' ]] then - if [ -z "$DEBUGGER" ] + if [[ -z "$DEBUGGER" ]] then [[ "$(uname -s 2>/dev/null)" = 'Darwin' ]] && DEBUGGER='lldb' || DEBUGGER='gdb' fi DEBUG_RUN=(-ex r) DEBUG_POSTFIX='--args' - if [ "$DEBUGGER" = 'lldb' ] + if [[ "$DEBUGGER" = 'lldb' ]] then DEBUG_RUN=(-o r) DEBUG_POSTFIX='--' @@ -152,19 +152,19 @@ fi [[ $QUIET -eq 0 ]] && echo && echo "Running as $nodes OS processes: ${args[*]}" -if [ $LOCAL -eq 1 ] +if [[ $LOCAL -eq 1 ]] then runCmd "${args[@]}" +p "$nodes" -elif [ -n "$PBS_NODEFILE" ] +elif [[ -n "$PBS_NODEFILE" ]] then # we are in a job shell aprun="$(command -v aprun 2>/dev/null)" - if test -n "$aprun" + if [[ -n "$aprun" ]] then runCmd "$aprun" -n "$nodes" "${args[@]}" else mpirun_cmd="$(command -v mpirun 2>/dev/null)" - if test -n "$mpirun_cmd" + if [[ -n "$mpirun_cmd" ]] then if echo "$mpirun_cmd" | grep 'mvapich2' >/dev/null 2>&1 then @@ -184,11 +184,11 @@ then exit 1 fi fi -elif [ -n "$LSB_HOSTS" ] +elif [[ -n "$LSB_HOSTS" ]] then # Tungsten runCmd cmpirun -lsf -poll -no_smp -gm_long 200000 "${args[@]}" -elif [ -n "$PBS_QUEUE" -o -n "$LSF_QUEUE" ] +elif [[ -n "$PBS_QUEUE" || -n "$LSF_QUEUE" ]] then # Interactive mode: create, and submit a batch job script="charmrun_script.$$.sh" @@ -243,15 +243,15 @@ then ncpus="#PBS -l ncpus=$nodes" ;; esac - if test $USE_LSF -eq 0 + if [[ "$USE_LSF" = '0' ]] then mpirun="$(command -v aprun 2>/dev/null)" npcmd="-n " - if test -z "$mpirun" + if [[ -z "$mpirun" ]] then mpirun="$(command -v mpirun 2>/dev/null)" npcmd="-np " - if test -z "$mpirun" + if [[ -z "$mpirun" ]] then mpirun="$(command -v srun 2>/dev/null)" npcmd="-n " @@ -320,17 +320,17 @@ End() { echo "Submitting batch job for> $mpirun -np $nodes ${args[*]}" echo " using the command> $queue_qsub $script" chmod 755 $script - while [ -z "$jobid" ] + while [[ -z "$jobid" ]] do - [ $USE_LSF = 0 ] && jobid=`$queue_qsub $script|tail -1` - [ $USE_LSF = 1 ] && jobid=`$queue_qsub < $script|tail -1|sed -e 's/[^0-9]*//g'` + [[ "$USE_LSF" = '0' ]] && jobid=$($queue_qsub $script|tail -1) + [[ "$USE_LSF" = '1' ]] && jobid=$($queue_qsub < $script|tail -1|sed -e 's/[^0-9]*//g') done echo "Job enqueued under job ID $jobid" # kill job if interrupted trap 'End 1' 2 3 retry=0 # Wait for the job to complete, by checking its status - while [ true ] + while [[ true ]] do $queue_stat $jobid > tmp.$$ exitstatus=$? @@ -350,11 +350,11 @@ End() { tail -1 tmp.$$ rm tmp.$$ # Job ID may not exist now - if test $exitstatus -ne 0 + if [[ $exitstatus -ne 0 ]] then # retry a few times when error occurs retry=$(( retry + 1 )) - if test $retry -gt 6 + if [[ $retry -gt 6 ]] then echo "Charmrun> too many errors, abort!" exit 1 @@ -367,14 +367,14 @@ End() { sleep 20 fi done -elif [ -n "$(command -v mpirun 2>/dev/null)" ] +elif [[ -n "$(command -v mpirun 2>/dev/null)" ]] then mpirun_cmd="$(command -v mpirun 2>/dev/null)" - if test -n "$mpirun_cmd" + if [[ -n "$mpirun_cmd" ]] then [[ -n "$MPI_MACHINEFILE" ]] && args=(-machinefile "$MPI_MACHINEFILE" "${args[@]}") setarch_cmd="$(command -v setarch 2>/dev/null)" - if [ -n "$setarch_cmd" -a -x "$setarch_cmd" ] + if [[ -n "$setarch_cmd" && -x "$setarch_cmd" ]] then # Disables randomization of the virtual address space (turns on # ADDR_NO_RANDOMIZE). @@ -385,7 +385,7 @@ then fi else mpiexec_cmd="$(command -v mpiexec 2>/dev/null)" - if test -n "$mpiexec_cmd" + if [[ -n "$mpiexec_cmd" ]] then runCmd "$mpiexec_cmd" -n "$nodes" "${args[@]}" else @@ -393,7 +393,7 @@ then exit 1 fi fi -elif [ -n "$(command -v srun 2>/dev/null)" ] +elif [[ -n "$(command -v srun 2>/dev/null)" ]] then #mpirun is checked before srun to support the Bridges supercomputer at PSC #as srun has a known issue and fails to successfully launch the parallel job. diff --git a/src/arch/win/gatherflat.local b/src/arch/win/gatherflat.local index 75afa904ed..d51c284d4f 100755 --- a/src/arch/win/gatherflat.local +++ b/src/arch/win/gatherflat.local @@ -1,16 +1,16 @@ #!/bin/bash -[ ! -d $1 ] && exit 0; +[[ ! -d "$1" ]] && exit 0; SYSLN='ln -s -f' -[ $OS = 'Windows_NT' ] && SYSLN='ln -f' +[[ "$OS" = 'Windows_NT' ]] && SYSLN='ln -f' -SRC=$1 -DST=$2 +SRC="$1" +DST="$2" -[ ! -d $DST ] && mkdir $DST +[[ ! -d "$DST" ]] && mkdir "$DST" -for file in `find $SRC -name CVS -prune -o -type f -print` +for file in $(find "$SRC" -name CVS -prune -o -type f -print) do - $SYSLN $file $DST + $SYSLN "$file" "$DST" done diff --git a/src/arch/win/gathertree.local b/src/arch/win/gathertree.local index 45d794de88..06ca2d6551 100755 --- a/src/arch/win/gathertree.local +++ b/src/arch/win/gathertree.local @@ -1,25 +1,25 @@ #!/bin/bash -[ ! -d $1 ] && exit 0 -[ ! -d $2 ] && mkdir $2 +[[ ! -d "$1" ]] && exit 0 +[[ ! -d "$2" ]] && mkdir "$2" SYSLN='ln -s -f' -[ $OS = Windows_NT ] && SYSLN='ln -f' +[[ "$OS" = Windows_NT ]] && SYSLN='ln -f' -pushd $1 > /dev/null -SRC=`pwd` +pushd "$1" > /dev/null +SRC="$(pwd)" popd > /dev/null -pushd $2 > /dev/null -DST=`pwd` +pushd "$2" > /dev/null +DST="$(pwd)" popd > /dev/null -cd $SRC -for file in `find . -name CVS -prune -o -print` +cd "$SRC" +for file in $(find . -name CVS -prune -o -print) do - if [ -d $file ]; then - mkdir -p $DST/$file - elif [ -f $file ]; then - $SYSLN $SRC/$file $DST/$file + if [[ -d "$file" ]]; then + mkdir -p "$DST/$file" + elif [[ -f "$file" ]]; then + $SYSLN "$SRC/$file" "$DST/$file" fi done diff --git a/src/arch/win/system_ln b/src/arch/win/system_ln index 026de33f73..29c66afbd2 100755 --- a/src/arch/win/system_ln +++ b/src/arch/win/system_ln @@ -1,21 +1,21 @@ #!/bin/bash -if test "$OS" = 'Windows_NT' +if [[ "$OS" = 'Windows_NT' ]] then - junction=`ls ../bin/createlink 2>/dev/null` + junction=$(ls ../bin/createlink 2>/dev/null) fi -test x$junction = x && junction='cp -f' +[[ -z "$junction" ]] && junction='cp -f' -srcs=` echo $* | awk '{ for (i=1; i End() { - if [ -z "$SAVE" ] + if [[ -z "$SAVE" ]] then for FILE in "${FILES[@]}" do @@ -199,7 +199,7 @@ End() { $RM "$MYTMP.i" "$MYTMP.$CMK_CPP_SUFFIX" done $RM core "${DELETE[@]}" - if [ -z "$SKIP_MODULEINIT" -a -n "$modInitObj" ] + if [[ -z "$SKIP_MODULEINIT" && -n "$modInitObj" ]] then DoNoErrCheck $RM "$modInitSrc" "$modInitObj" > /dev/null 2>&1 fi @@ -277,11 +277,11 @@ joinChar() } Debugf() { - [ -n "$VERBOSE" ] && echo "charmc>" $@ + [[ -n "$VERBOSE" ]] && echo "charmc>" "$@" } Debug() { - if [ -n "$DEBUG_SCRIPT" ] + if [[ -n "$DEBUG_SCRIPT" ]] then echo echo "------- Charmc Debugging info: $* -------" @@ -301,9 +301,9 @@ Debug() { notInList() { search=$1 shift - while [ $# -gt 0 ] + while [[ $# -gt 0 ]] do - if [ "$search" = "$1" ] + if [[ "$search" = "$1" ]] then # It's already in there-- fail return 1 @@ -329,7 +329,7 @@ TEMP_BASE="/tmp/charmc_tmp.$$" # Try to find CHARMBIN by looking in directory where charmc is findCharmBin() { -if [ -z "$CHARMBIN" ] +if [[ -z "$CHARMBIN" ]] then SCRIPT="$1" CHARMBIN="$(dirname "$SCRIPT")" @@ -342,7 +342,7 @@ filterLegacyLB() local module="$1" local warningOn="$2" case "$module" in GreedyLB|GreedyRefineLB|RefineLB|RandCentLB|DummyLB|RotateLB) - if [ "$warningOn" = "1" ]; then + if [[ "$warningOn" = '1' ]]; then Warning "Warning: $module is now part of TreeLB. To use it, you must also pass +balancer $module at runtime." fi module="TreeLB" @@ -372,7 +372,7 @@ CHARMDIR="$(getAbsPath "$CHARMBIN/..")" CHARMLIB="$CHARMDIR/lib" CHARMINC="$CHARMDIR/include" CHARMLIBSO= -if test -d "$CHARMDIR/lib_so" +if [[ -d "$CHARMDIR/lib_so" ]] then CHARMLIBSO="$CHARMDIR/lib_so" fi @@ -385,10 +385,10 @@ fi # ############################################################################## -[ $# -eq 0 ] && printUsage "Error: No arguments given." +[[ $# -eq 0 ]] && printUsage "Error: No arguments given." processArgs() { -while [ ! $# -eq 0 ] +while [[ $# -ne 0 ]] do arg="$1" shift @@ -681,7 +681,7 @@ do COUNTTOKENS="yes" ;; "-default-to-aout") - if [ "$EXPLICIT_OBJECT $EXPLICIT_COMPILATION" = "no no" ] + if [[ "$EXPLICIT_OBJECT $EXPLICIT_COMPILATION" = 'no no' ]] then OBJECT="a.out" fi @@ -691,7 +691,7 @@ do exit 0 ;; "-c") - if [ "$EXPLICIT_OBJECT" = "no" ] + if [[ "$EXPLICIT_OBJECT" = 'no' ]] then OBJECT="" fi @@ -951,7 +951,7 @@ do OPTS+=("$arg") ;; *.*) - [ -n "$VERBOSE" ] && echo "Adding file $arg..." + [[ -n "$VERBOSE" ]] && echo "Adding file $arg..." FILES+=("$arg") INPUT_GIVEN="1" ;; @@ -972,7 +972,7 @@ processArgs "$@" # Do not skip linking if user explicitly specified an output file # This allows generating dependencies while compiling -if [ "$GENDEPENDS" = "yes" -a "$EXPLICIT_OBJECT" = "yes" ]; then +if [[ "$GENDEPENDS" = 'yes' && "$EXPLICIT_OBJECT" = 'yes' ]]; then SKIPLINK="" fi @@ -995,9 +995,9 @@ do fi # Handle new object files - if [ -n "$BASEO" -a -n "$OBJECT" ] + if [[ -n "$BASEO" && -n "$OBJECT" ]] then - if [ "$OBJECT" != "$BASEO" ] + if [[ "$OBJECT" != "$BASEO" ]] then DELETE+=("$BASEO") fi @@ -1037,15 +1037,15 @@ OPTS_CXX=($OPTS_CXX "${ARG_OPTS_CXX[@]}") OPTS_F90=($OPTS_F90 "${ARG_OPTS_F90[@]}") OPTS_LD=($OPTS_LD "${ARG_OPTS_LD[@]}") -if [ "$USE_BUILD_OPTIONS" = "1" ] +if [[ "$USE_BUILD_OPTIONS" = '1' ]] then - [ -n "$VERBOSE" ] && echo "Charmc applying build time options: $BUILDOPTS" + [[ -n "$VERBOSE" ]] && echo "Charmc applying build time options: $BUILDOPTS" OPTS+=($BUILDOPTS) fi # If we are debugging, add "-g -O0" to the C/C++ flags -if [ -n "$CHARMDEBUG" -a -z "$SEQUENTIAL" -a -z "$NATIVE" ]; then - if [ -n "$CMK_BUILD_PYTHON" ]; then +if [[ -n "$CHARMDEBUG" && -z "$SEQUENTIAL" && -z "$NATIVE" ]]; then + if [[ -n "$CMK_BUILD_PYTHON" ]]; then AddModules PythonCCS charmdebug_python POST_LIBRARIES+=("-lpython$CMK_BUILD_PYTHON") fi @@ -1059,55 +1059,55 @@ fi # character all the way to the linker command can be difficult, so we provide # this option as a convenience and a failsafe. # Additionally, some platforms do not need any special parameters. -if [ -n "$RPATH_ORIGIN" -a "$CMK_MACOSX" != "1" -a "$CMK_COMPILER" != "msvc" ]; then +if [[ -n "$RPATH_ORIGIN" && "$CMK_MACOSX" != '1' && "$CMK_COMPILER" != "msvc" ]]; then OPTS_LD+=("-Wl,-rpath,\$ORIGIN") fi PROCESSED_MODULES=() -if [[ "$WERROR" = "1" && -n "$CMK_WARNINGS_ARE_ERRORS" ]] +if [[ "$WERROR" = '1' && -n "$CMK_WARNINGS_ARE_ERRORS" ]] then OPTS+=("$CMK_WARNINGS_ARE_ERRORS") fi # If the user has asked for the latest language standards (C11 or CPP11) -if [ "$USE_NEW_STD" = "1" ] +if [[ "$USE_NEW_STD" = '1' ]] then # and if configure confirmed that the underlying compiler knows abt C11, enable it - if [ "$CMK_COMPILER_KNOWS_C11" = "1" ] + if [[ "$CMK_COMPILER_KNOWS_C11" = '1' ]] then OPTS_CC+=("$CMK_ENABLE_C11") fi fi -if [ "$ROSE_OMP_TLS_GLOBALS" = "yes" ] +if [[ "$ROSE_OMP_TLS_GLOBALS" = 'yes' ]] then USE_OPENMP="yes" TLSGLOBALS="1" - if [ ! -x "$CMK_ROSE_OMP_TOOL" ] + if [[ ! -x "$CMK_ROSE_OMP_TOOL" ]] then Abort "The environment variable CMK_ROSE_OMP_TOOL must contain the path to a built binary of the ROSE OpenMP variable privatization tool" fi fi -if [ "$USE_OPENMP" = "yes" -o "$CMK_OMP" = "1" -a -z "$SEQUENTIAL" -a -z "$NATIVE" ] +if [[ ( "$USE_OPENMP" = 'yes' || "$CMK_OMP" = '1' ) && -z "$SEQUENTIAL" && -z "$NATIVE" ]] then - if [ "$CMK_HAS_OPENMP" != "1" ] + if [[ "$CMK_HAS_OPENMP" != '1' ]] then echo "Error: OpenMP is unavailable!" exit 1 fi - [ -n "$VERBOSE" ] && echo OpenMP support enabled + [[ -n "$VERBOSE" ]] && echo OpenMP support enabled OPTS_CC+=("$CMK_C_OPENMP") OPTS_CXX+=("$CMK_C_OPENMP") OPTS_F90+=("$CMK_F_OPENMP") OPTS_LD+=("$CMK_LD_OPENMP") else - [ -n "$VERBOSE" ] && echo OpenMP support not enabled + [[ -n "$VERBOSE" ]] && echo OpenMP support not enabled fi -if [ "$TLSGLOBALS" = "1" ] +if [[ "$TLSGLOBALS" = '1' ]] then TLSGLOBALS_OPTS=() [[ "$CMK_COMPILER_KNOWS_FTLS_MODEL" = '1' ]] && TLSGLOBALS_OPTS+=('-ftls-model=initial-exec') @@ -1133,7 +1133,7 @@ findModuleDep() { # HACK: add modules to both ends of library list, to avoid # undefined symbol CkRegisterMainModule when it's in a module file. POST_LIBRARIES+=("-lmodule$M") - if [ "$M" = "PythonCCS" ] + if [[ "$M" = "PythonCCS" ]] then LINK_PYTHON=1 fi @@ -1145,7 +1145,7 @@ findModuleDep() { d="$dir/libmodule$M.dep" [[ -r "$d" ]] && dep="$d" done - if [ -r "$dep" ] + if [[ -r "$dep" ]] then # Add the module dependencies in this file # Debugf "Adding module" $M "dependencies from" $dep @@ -1180,7 +1180,7 @@ Debugf "----------- Module dependency search complete ------------" ############################################################################## -if [ "$BUILD_SHARE" = '1' -o "$USER_INITIATED_SHARED" = '1' ] +if [[ "$BUILD_SHARE" = '1' || "$USER_INITIATED_SHARED" = '1' ]] then USE_PIC="1" fi @@ -1221,7 +1221,7 @@ then OPTS_LD+=("$USE_UNDEFINED_DYNAMIC") fi -if [ "$BUILD_SHARE" = "1" -a "$USER_INITIATED_SHARED" = '0' ] +if [[ "$BUILD_SHARE" = '1' && "$USER_INITIATED_SHARED" = '0' ]] then # ignore BUILD_SHARE if the target is not .a or .so case "$OBJECT" in @@ -1232,7 +1232,7 @@ then *.so|*.so.*|*.sl|*.dylib|*.dylib.*) OPTS_LD+=($CMK_LD_SHARED "${OPTS_LDRO[@]}") [[ -n "$CHARMLIBSO" ]] && OPTS_LD+=("-L$CHARMLIBSO") - if [ "$CMK_MACOSX" = "1" -a -z "$STANDALONE" ]; then + if [[ "$CMK_MACOSX" = '1' && -z "$STANDALONE" ]]; then fname="$(basename "$OBJECT")" OPTS_LD+=("-Wl,-install_name,$CHARMLIBSO/$fname") fi @@ -1243,49 +1243,49 @@ then esac fi -if [ -n "$OVERRIDE_CC" ] +if [[ -n "$OVERRIDE_CC" ]] then CMK_CC="$OVERRIDE_CC" fi Debug "set 2" -if [ -n "$OVERRIDE_CXX" ] +if [[ -n "$OVERRIDE_CXX" ]] then CMK_CXX="$OVERRIDE_CXX" fi -if [ -n "$OVERRIDE_F90" ] +if [[ -n "$OVERRIDE_F90" ]] then CMK_CF90="$OVERRIDE_F90" fi -if [ -n "$OVERRIDE_LD" ] +if [[ -n "$OVERRIDE_LD" ]] then CMK_LD="$OVERRIDE_LD" fi -if [ -n "$OVERRIDE_LDXX" ] +if [[ -n "$OVERRIDE_LDXX" ]] then CMK_LDXX="$OVERRIDE_LDXX" fi -if [ -n "$USE_RELIABLE_CC" ] +if [[ -n "$USE_RELIABLE_CC" ]] then CMK_CC="$CMK_CC_RELIABLE" fi -if [ -n "$USE_FASTEST_CC" ] +if [[ -n "$USE_FASTEST_CC" ]] then CMK_CC="$CMK_CC_FASTEST" fi -if [ -n "$USE_F77" ] +if [[ -n "$USE_F77" ]] then CMK_CF90="$CMK_CF77" CMK_CF90_FIXED="$CMK_CF77" CMK_F90LIBS="$CMK_F77LIBS" fi -if [ -n "$CMK_F90_MODINC" ] +if [[ -n "$CMK_F90_MODINC" ]] then CMK_CF90_MODINC="$CMK_F90_MODINC" else @@ -1300,12 +1300,12 @@ then done fi -if [ -n "$CMK_F90_USE_MODDIR" ] +if [[ -n "$CMK_F90_USE_MODDIR" ]] then CMK_CF90+=" $CMK_CF90_MODINC $CHARMINC $CMK_SYSINC" fi -if [ -n "$SEQUENTIAL" ] +if [[ -n "$SEQUENTIAL" ]] then CMK_CC="$CMK_SEQ_CC" CMK_LD="$CMK_SEQ_LD" @@ -1321,7 +1321,7 @@ then CMK_LDXX_FLAGS="$CMK_SEQ_LDXX_FLAGS" fi -if [ -n "$NATIVE" ] +if [[ -n "$NATIVE" ]] then CMK_CC="$CMK_NATIVE_CC" CMK_LD="$CMK_NATIVE_LD" @@ -1334,19 +1334,19 @@ then CMK_LDXX_FLAGS="$CMK_NATIVE_LDXX_FLAGS" fi -if [ -n "$PREPROCESS" ] +if [[ -n "$PREPROCESS" ]] then CMK_CF90="$CMK_FPP" fi -if [ -n "$PURIFY" ] +if [[ -n "$PURIFY" ]] then CMK_LD="purify $CMK_LD" CMK_LDXX="purify $CMK_LDXX" fi Debug "set 4" -if [ "$OPTIMIZE_MODE" = "true" ] +if [[ "$OPTIMIZE_MODE" = 'true' ]] then OPTS_CC=($CMK_C_OPTIMIZE "${OPTS_CC[@]}") OPTS_CXX=($CMK_CXX_OPTIMIZE "${OPTS_CXX[@]}") @@ -1355,7 +1355,7 @@ then fi # Pick up per-architecture production mode settings -if [ "$PRODUCTION_MODE" = "true" ] +if [[ "$PRODUCTION_MODE" = 'true' ]] then OPTS_CC=($CMK_PRODUCTION $CMK_C_PRODUCTION "${OPTS_CC[@]}") OPTS_CXX=($CMK_PRODUCTION $CMK_CXX_PRODUCTION "${OPTS_CXX[@]}") @@ -1363,22 +1363,22 @@ then OPTS_LD=($CMK_PRODUCTION $CMK_C_PRODUCTION "${OPTS_LD[@]}") fi -if [ -n "$XI_INTERNAL" ] +if [[ -n "$XI_INTERNAL" ]] then CMK_XIOPTS+=" -intrinsic" fi -if [ "$GENDEPENDS" = "yes" ] +if [[ "$GENDEPENDS" = 'yes' ]] then CMK_XIOPTS+=" -M" fi -if [ "$COUNTTOKENS" = "yes" ] +if [[ "$COUNTTOKENS" = 'yes' ]] then CMK_XIOPTS+=" -count-tokens" fi -if test "$CMK_WITH_TAU" = "true" +if [[ "$CMK_WITH_TAU" = 'true' ]] then echo "include $TAU_MAKEFILE" > _make.tau.tmp echo "print-%:; @echo \$(\$*)" >> _make.tau.tmp @@ -1404,23 +1404,23 @@ OPTS_LD=("${OPTS[@]}" "${OPTS_LD[@]}") ############################################################################## Debug "Checking language..." -[ -z "$LANGUAGE" -a -n "$SEQUENTIAL" ] && LANGUAGE='c++' -[ -z "$PARADIGM" -a -n "$LANGUAGE" ] && PARADIGM="$LANGUAGE" -[ -z "$PARADIGM" ] && PARADIGM="charm++" +[[ -z "$LANGUAGE" && -n "$SEQUENTIAL" ]] && LANGUAGE='c++' +[[ -z "$PARADIGM" && -n "$LANGUAGE" ]] && PARADIGM="$LANGUAGE" +[[ -z "$PARADIGM" ]] && PARADIGM="charm++" case "$LANGUAGE" in "c"|"C"|"c++"|"C++") - [ -z "$SEQUENTIAL" -a -z "$NATIVE" ] && Abort "Language $LANGUAGE is for sequential programs" + [[ -z "$SEQUENTIAL" && -z "$NATIVE" ]] && Abort "Language $LANGUAGE is for sequential programs" ;; esac -if [ $USE_F77_LIBRARIES = "1" ] +if [[ "$USE_F77_LIBRARIES" = '1' ]] then CMK_SYSLIBS+=" $CMK_F77LIBS" FORTRAN_SEQ_LIBRARIES+=($CMK_F77LIBS) fi -if [ $USE_F90_LIBRARIES = "1" ] +if [[ "$USE_F90_LIBRARIES" = '1' ]] then if [[ ! -r "$CHARMLIB/libconv-utilf.a" ]] @@ -1449,17 +1449,17 @@ case "$PARADIGM" in ;; esac -if [ "$AMPIMAIN" != "" ] +if [[ -n "$AMPIMAIN" ]] then OBJECTFILES=("$CHARMLIB/lib$AMPIMAIN.o" "${OBJECTFILES[@]}") fi -if [ -n "$AMPI" ] +if [[ -n "$AMPI" ]] then CMK_SYSINC="-I$CHARMINC/ampi $CMK_SYSINC" fi -if [ "$TLSGLOBALS" = "1" ] +if [[ "$TLSGLOBALS" = '1' ]] then if [[ "$CMK_SUPPORTS_TLSGLOBALS" = '0' ]] then @@ -1475,15 +1475,15 @@ then echo "Warning: -tlsglobals may not work with compilers that do not recognize -mno-tls-direct-seg-refs." fi - if [ "$CMK_HAS_ELF_H" != '1' -a "$CMK_MACOSX" != '1' ] + if [[ "$CMK_HAS_ELF_H" != '1' && "$CMK_MACOSX" != '1' ]] then echo "Warning: -tlsglobals requires elf.h" fi fi -if [ "$SWAPGLOBALS" = "1" ] +if [[ "$SWAPGLOBALS" = '1' ]] then - if [ "$CMK_HAS_ELF_H" != "1" ] + if [[ "$CMK_HAS_ELF_H" != '1' ]] then echo "Error: -swapglobals requires elf.h" exit 1 @@ -1503,7 +1503,7 @@ then echo 'https://charm.cs.illinois.edu/gerrit/gitweb?p=libbfd-patches.git;a=tree;f=swapglobals' fi - if [ "$CMK_SMP" = "1" ] + if [[ "$CMK_SMP" = '1' ]] then echo "Error: -swapglobals is not supported on SMP builds of Charm++/AMPI" exit 1 @@ -1519,7 +1519,7 @@ then MIDDLE_LIBS=(-lglobal-swap "${MIDDLE_LIBS[@]}") fi -if [ "$SWAPGLOBALS" = "2" ] +if [[ "$SWAPGLOBALS" = '2' ]] then echo "-copyglobals option is no longer supported by Charm++/AMPI" exit 1 @@ -1527,7 +1527,7 @@ fi # dummy main module -if [ "$MPI_INTEROPERATE" != "" -a "$NO_MAIN_MODULE" = "" ] +if [[ -n "$MPI_INTEROPERATE" && -z "$NO_MAIN_MODULE" ]] then POST_LIBRARIES=(-lmpi-mainmodule "${POST_LIBRARIES[@]}") fi @@ -1585,7 +1585,7 @@ case "$MEMORY" in ;; esac -if [[ "$CMK_SUPPORTS_MEMORY_ISOMALLOC" != '1' ]] && [[ "$MEMORY" = "${MEMORY%isomalloc}isomalloc" ]] +if [[ "$CMK_SUPPORTS_MEMORY_ISOMALLOC" != '1' && "$MEMORY" = "${MEMORY%isomalloc}isomalloc" ]] then Abort "Error: -memory isomalloc is not supported on this platform." fi @@ -1601,11 +1601,11 @@ esac # Check for valid choice of THREAD -if [ "$CHARM_SHARED" = "1" -a -n "$CMK_LD_SHARED_THREAD" -a "$THREAD" = "default" ] +if [[ "$CHARM_SHARED" = '1' && -n "$CMK_LD_SHARED_THREAD" && "$THREAD" = "default" ]] then THREAD="$CMK_LD_SHARED_THREAD" fi -if [ "$TLSGLOBALS" = "1" ] +if [[ "$TLSGLOBALS" = '1' ]] then THREAD="${THREAD%-tls}-tls" fi @@ -1632,7 +1632,7 @@ MAKE_LD="0" CORE_LIBS=(-lconverse "${TRACE_OBJ[@]}" -lm) # get TAU stub makefile variables -if test "$CMK_WITH_TAU" = "true" +if [[ "$CMK_WITH_TAU" = 'true' ]] then echo "include $TAU_MAKEFILE" > _make.tau.tmp echo "print-%:; @echo \$(\$*)" >> _make.tau.tmp @@ -1646,7 +1646,7 @@ then fi # done getting TAU variables -if [ "$BUILD_SHARE" = '0' -a "$USER_INITIATED_SHARED" = '0' ] +if [[ "$BUILD_SHARE" = '0' && "$USER_INITIATED_SHARED" = '0' ]] then MIDDLE_LIBS=("${MEM_OBJ[@]}" "${THREAD_OBJ[@]}" "${MIDDLE_LIBS[@]}") fi @@ -1657,12 +1657,12 @@ case "$PARADIGM" in "f90charm") MAKE_LDXX="1" MIDDLE_LIBS=(-lck "${MIDDLE_LIBS[@]}" "${CORE_LIBS[@]}") - if [ -z "$NO_MAIN" ] + if [[ -z "$NO_MAIN" ]] then MIDDLE_LIBS=(-lckmainf "${MIDDLE_LIBS[@]}") F90_MAIN="1" fi - if [ "$TAU_TRACE_MPI" = "1" ] + if [[ "$TAU_TRACE_MPI" = '1' ]] then TAU_LIBS="$TAU_MPI_FLIBS $TAU_LIBS" fi @@ -1670,18 +1670,18 @@ case "$PARADIGM" in "charm"|"charm++"|"f90charm") MAKE_LDXX="1" MIDDLE_LIBS=(-lck "${MIDDLE_LIBS[@]}" "${CORE_LIBS[@]}") - if [ -z "$NO_MAIN" ] + if [[ -z "$NO_MAIN" ]] then - if [ -n "$AMPIF" ] + if [[ -n "$AMPIF" ]] then MIDDLE_LIBS=(-lckmainf "${MIDDLE_LIBS[@]}") F90_MAIN="1" - elif [ -z "$AMPIMAIN" ] + elif [[ -z "$AMPIMAIN" ]] then MIDDLE_LIBS=(-lckmain "${MIDDLE_LIBS[@]}") fi fi - if [ "$TAU_TRACE_MPI" = "1" ] + if [[ "$TAU_TRACE_MPI" = '1' ]] then TAU_LIBS="$TAU_MPI_LIBS $TAU_LIBS" fi @@ -1697,14 +1697,14 @@ case "$PARADIGM" in ;; esac -if [ "$BUILD_SHARE" = '0' -a "$USER_INITIATED_SHARED" = '0' ] +if [[ "$BUILD_SHARE" = '0' && "$USER_INITIATED_SHARED" = '0' ]] then MIDDLE_LIBS+=("${MEM_OBJ[@]}" "${THREAD_OBJ[@]}") fi -if [ "$CHARM_SHARED" = "1" ] +if [[ "$CHARM_SHARED" = '1' ]] then - [ -z "$CHARMLIBSO" ] && Abort "Charm++ lib_so directory not found!" + [[ -z "$CHARMLIBSO" ]] && Abort "Charm++ lib_so directory not found!" # build user executable/shared lib linking with charm .so OPTS_LD+=("$CMK_LD_LIBRARY_PATH") LANG_LIBS=("-L$CHARMLIBSO") @@ -1712,7 +1712,7 @@ else LANG_LIBS=("-L$CHARMLIB") fi -if [ -z "$STANDALONE" ] +if [[ -z "$STANDALONE" ]] then ALL_LIBS=("${LANG_LIBS[@]}" "${PRE_LIBRARIES[@]}" "${MIDDLE_LIBS[@]}" "${BAL_OBJ[@]}" $CMK_LIBS "${POST_LIBRARIES[@]}") case "$PARADIGM" in @@ -1724,24 +1724,24 @@ else ALL_LIBS=("${USER_PRE_LIBRARIES[@]}" "${USER_POST_LIBRARIES[@]}") fi -if [ -n "$LINK_WHOLE_ARCHIVE" ] +if [[ -n "$LINK_WHOLE_ARCHIVE" ]] then ALL_LIBS=("$CXX_NO_AS_NEEDED" "$LDXX_WHOLE_ARCHIVE_PRE" "${ALL_LIBS[@]}" "$LDXX_WHOLE_ARCHIVE_POST") fi ALL_LIBS+=($CMK_SYSLIBS) -if [ "$BUILD_SHARE" = '0' -a "$USER_INITIATED_SHARED" = '0' ] +if [[ "$BUILD_SHARE" = '0' && "$USER_INITIATED_SHARED" = '0' ]] then ALL_LIBS+=("$CHARMLIB/conv-static.o") fi -if [ -n "$LINK_CXX_STL" ] +if [[ -n "$LINK_CXX_STL" ]] then ALL_LIBS+=(-lstdc++) fi -if [ "$TRACE_WITH_TAU" = 1 ] +if [[ "$TRACE_WITH_TAU" = '1' ]] then echo "Linking with the TAU libraries: $TAU_LIBS" ALL_LIBS+=("$TAU_LIBS") @@ -1757,16 +1757,16 @@ fi ALL_LIBS=("${OBJECTFILES[@]}" "${ALL_LIBS[@]}") -if [ -n "$F90_MAIN" ] +if [[ -n "$F90_MAIN" ]] then # for_main needs to be placed at beginning CMK_LD_FLAGS="$CMK_F90MAINLIBS $CMK_LD_FLAGS" CMK_LDXX_FLAGS="$CMK_F90MAINLIBS $CMK_LDXX_FLAGS" fi -if [ -n "$F90_MAIN" -o "$USE_F90_LIBRARIES" = '1' ] +if [[ -n "$F90_MAIN" || "$USE_F90_LIBRARIES" = '1' ]] then - if [ "$CMK_CAN_LINK_FORTRAN" != '1' ] + if [[ "$CMK_CAN_LINK_FORTRAN" != '1' ]] then echo "Error: Configure testing was unable to link a Fortran program." exit 1 @@ -1785,7 +1785,7 @@ CHARM_CXX="$CMK_CXX" CHARM_LD="$CMK_LD" CHARM_LDXX="$CMK_LDXX" -CHARM_CPP_C_FLAGS=($CMK_CPP_C_FLAGS "-I$CHARMINC" $CMK_INCDIR $CMK_SYSINC "${OPTS_CPP[@]}") +CHARM_CPP_C_FLAGS=($CMK_CPP_C_FLAGS "-I$CHARMINC" $CMK_INCDIR $CMK_SYSINC "${OPTS_CC[@]}" "${OPTS_CPP[@]}") CHARM_CC_FLAGS=($CMK_CC_FLAGS "-I$CHARMINC" $CMK_INCDIR $CMK_SYSINC "${OPTS_CPP_INTERNAL[@]}" "${OPTS_CPP[@]}" "${OPTS_CC[@]}") CHARM_CXX_FLAGS=($CMK_CXX_FLAGS "-I$CHARMINC" $CMK_INCDIR $CMK_SYSINC "${OPTS_CPP_INTERNAL[@]}" "${OPTS_CPP[@]}" "${OPTS_CXX[@]}") CHARM_LD_FLAGS=($CMK_LD_FLAGS $CMK_LINK_BINARY $CMK_LIBDIR "${OPTS_LD[@]}" "${ALL_LIBS[@]}") @@ -1798,7 +1798,7 @@ CHARM_LDXX_FLAGS=($CMK_LDXX_FLAGS $CMK_LINK_BINARY $CMK_LIBDIR "${OPTS_LD[@]}" " # ######################################################################## -if [ -n "$PRINT_BUILDING_BLOCKS" ] +if [[ -n "$PRINT_BUILDING_BLOCKS" ]] then for i in CHARM_CC CHARM_CXX CHARM_LD CHARM_LDXX CHARMBIN CHARMINC CHARMLIB CHARMLIBSO do @@ -1914,16 +1914,16 @@ do case "$FILE_EXT" in .c|.s|.S|.asm|.C|.cc|.cxx|.cpp|.c++|.cu|.f|.F|.f90|.F90|.fpp|.FPP|.f77|.F77) - [ $VERBOSE ] && echo "Compiling $FILE" + [[ -n "$VERBOSE" ]] && echo "Compiling $FILE" DoNoErrCheck $RM "$BASEO" "$(stripExtension "$BASEO").f.o" esac - if [ ! -z "$SKIPLINK" ] + if [[ -n "$SKIPLINK" ]] then DESTO=() fi - if [ "$ROSE_OMP_TLS_GLOBALS" = "yes" ] + if [[ "$ROSE_OMP_TLS_GLOBALS" = 'yes' ]] then case "$FILE" in *.c) @@ -1950,7 +1950,7 @@ do *.ci) XIOPTS=($CMK_XIOPTS) [[ "$PARADIGM" = "f90charm" ]] && XIOPTS+=(-f90) - if [ "$PREPROCESS_CI" = "yes" ] + if [[ "$PREPROCESS_CI" = 'yes' ]] then runCmd $CMK_CPP_CHARM "${OPTS_CPP[@]}" "$FILE" | runCmd "$CHARMBIN/charmxi" "${XIOPTS[@]}" -orig-file "$FILE" else @@ -1959,36 +1959,36 @@ do ;; *.c|*.s|*.S|*.asm) runCmd $CHARM_CC "${CHARM_CC_FLAGS[@]}" -c "$FILE" "${DESTO[@]}" - if [ "$Do_res" -ne 0 ] + if [[ "$Do_res" -ne 0 ]] then touch "$BASEO" fi ;; *.C|*.cc|*.cxx|*.cpp|*.c++|*.cu) - if [ -n "$NATIVE" ] + if [[ -n "$NATIVE" ]] then runCmd $CMK_NATIVE_CXX $CMK_NATIVE_CXX_FLAGS "-I$CHARMINC" $CMK_SYSINC "${OPTS_CPP_INTERNAL[@]}" "${OPTS_CPP[@]}" -c "$FILE" "${DESTO[@]}" else runCmd $CHARM_CXX "${CHARM_CXX_FLAGS[@]}" -c "$FILE" "${DESTO[@]}" fi - if [ "$Do_res" -ne 0 ] + if [[ "$Do_res" -ne 0 ]] then touch "$BASEO" fi ;; *.f|*.F|*.f77|*.F77) - test -z "$CMK_CF90_FIXED" && Abort "No F90 compiler (CMK_CF90_FIXED) defined" + [[ -z "$CMK_CF90_FIXED" ]] && Abort "No F90 compiler (CMK_CF90_FIXED) defined" runCmd $CMK_CF90_FIXED "-I$CHARMINC" $CMK_SYSINC "${OPTS_CPP[@]}" "${OPTS_F90[@]}" -c "$FILE" "${DESTO[@]}" - if [ "$Do_res" -ne 0 ] + if [[ "$Do_res" -ne 0 ]] then touch "$BASEO" fi ;; *.f90|*.F90|*.fpp|*.FPP) - test -z "$CMK_CF90" && Abort "No F90 compiler (CMK_CF90) defined" + [[ -z "$CMK_CF90" ]] && Abort "No F90 compiler (CMK_CF90) defined" [[ -z "$PREPROCESS" ]] && OPTS_F90+=(-c) runCmd $CMK_CF90 "-I$CHARMINC" $CMK_SYSINC "${OPTS_CPP[@]}" "${OPTS_F90[@]}" "$FILE" "${DESTO[@]}" - if [ "$Do_res" -ne 0 ] + if [[ "$Do_res" -ne 0 ]] then touch "$BASEO" fi @@ -2024,41 +2024,41 @@ MakeSO() { Debugf "Running ldro..." DoNoErrCheck $RM "$OBJECT" # convert to absolute path if required - if test -n "$CMK_LD_SHARED_ABSOLUTE_PATH" + if [[ -n "$CMK_LD_SHARED_ABSOLUTE_PATH" ]] then dir="$(dirname "$OBJECT")" fname="$(basename "$OBJECT")" dir="$(cd "$dir"; pwd)" OBJECT="$dir/$fname" fi - if test "$MAKE_LD" = '1' + if [[ "$MAKE_LD" = '1' ]] then soTool="$CMK_LD $CMK_LD_FLAGS" else soTool="$CMK_LDXX $CMK_LDXX_FLAGS" fi - if [ -n "$STANDALONE" ] + if [[ -n "$STANDALONE" ]] then soLibs=("${USER_PRE_LIBRARIES[@]}" "${USER_POST_LIBRARIES[@]}") else soLibs=("${PRE_LIBRARIES[@]}" "${POST_LIBRARIES[@]}") - [[ "$CMK_MACOSX" = "1" ]] && OPTS_LD+=("-Wl,-install_name,$CHARMLIBSO/$fname") + [[ "$CMK_MACOSX" = '1' ]] && OPTS_LD+=("-Wl,-install_name,$CHARMLIBSO/$fname") fi - if [ -n "$LINK_WHOLE_ARCHIVE" ] + if [[ -n "$LINK_WHOLE_ARCHIVE" ]] then soLibs=("$CXX_NO_AS_NEEDED" "$LDXX_WHOLE_ARCHIVE_PRE" "${soLibs[@]}" "$LDXX_WHOLE_ARCHIVE_POST") fi soLibs+=($CMK_SYSLIBS) - if [ -n "$LINK_CXX_STL" ] + if [[ -n "$LINK_CXX_STL" ]] then soLibs+=(-lstdc++) fi soCmd=($soTool $CMK_LIBDIR -o "$OBJECT" "${OPTS_LD[@]}" "${OPTS_LDRO[@]}" "${OBJECTFILES[@]}" "${soLibs[@]}" $CMK_LD_SHARED_LIBS) DoNoErrCheck "${soCmd[@]}" Do_res=$? - if [ $Do_res -ne 0 ] + if [[ $Do_res -ne 0 ]] then - if [ -n "$NOABORT" ] + if [[ -n "$NOABORT" ]] then touch "$OBJECT" else @@ -2074,7 +2074,7 @@ MakeSO() { Copyobj } -if [ -z "$OBJECT" -o ! -z "$SKIPLINK" ] +if [[ -z "$OBJECT" || -n "$SKIPLINK" ]] then [[ ${#PASSTHROUGH_COMPILER_OPTIONS[@]} -ne 0 ]] && $CHARM_CXX "${PASSTHROUGH_COMPILER_OPTIONS[@]}" # We have no target object, or are playing preprocessor tricks-- just end @@ -2084,18 +2084,18 @@ fi Debug "About to link..." -if [ "$INPUT_GIVEN" != "1" ] +if [[ "$INPUT_GIVEN" != '1' ]] then Abort "Trying to link, but no object files or library archives were specified" fi # if interoperate dont create the library now, wait to collect all info -if [ "$MPI_INTEROPERATE" = "" ] +if [[ -z "$MPI_INTEROPERATE" ]] then case "$OBJECT" in *.so|*.so.*|*.sl|*.dylib|*.dylib.*) # Make shared library - if [ "$BUILD_SHARE" = '1' -a "$USER_INITIATED_SHARED" = '0' ] + if [[ "$BUILD_SHARE" = '1' && "$USER_INITIATED_SHARED" = '0' ]] then MakeSO fi @@ -2103,12 +2103,12 @@ case "$OBJECT" in *.a) # Make regular (.a, non-shared) library # in case building charm so, build .so under lib_so as well # Gengbin - if [ "$BUILD_SHARE" = "1" -a "$USER_INITIATED_SHARED" = '0' ] + if [[ "$BUILD_SHARE" = '1' && "$USER_INITIATED_SHARED" = '0' ]] then COPY_EXIT="" OBJECT_SAVE="$OBJECT" COPYTO_SAVE="$COPYTO" - if [ -z "$COPYTO" ] + if [[ -z "$COPYTO" ]] then DESTDIR="$(echo "$OBJECT" | sed -e 's,lib/[^/]*\.a$,lib_so,')" OBJECT="$(echo "$OBJECT" | sed -e 's,lib/\([^/]*\)\.a$,lib_so/\1.a,')" @@ -2155,7 +2155,7 @@ fi # check if we're linking a sequential object case "$LANGUAGE" in "c"|"C"|"f90"|"f77") - if [ -n "$NATIVE" ] + if [[ -n "$NATIVE" ]] then runCmd $CMK_NATIVE_LD $CMK_NATIVE_LD_FLAGS "${OPTS_LD[@]}" -o "$OBJECT" "${OBJECTFILES[@]}" \ "-L$CHARMLIB" "${USER_PRE_LIBRARIES[@]}" $CMK_NATIVE_LIBS "${USER_POST_LIBRARIES[@]}" @@ -2166,7 +2166,7 @@ case "$LANGUAGE" in Copyobj ;; "c++"|"C++") - if [ -n "$NATIVE" ] + if [[ -n "$NATIVE" ]] then runCmd $CMK_NATIVE_LDXX $CMK_NATIVE_LDXX_FLAGS "${OPTS_LD[@]}" -o "$OBJECT" "${OBJECTFILES[@]}" \ "-L$CHARMLIB" "${USER_PRE_LIBRARIES[@]}" $CMK_NATIVE_LIBS "${USER_POST_LIBRARIES[@]}" @@ -2185,19 +2185,17 @@ esac # ############################################################################## -# [ -r $CHARMLIB/libtrace-projections.a ] || Abort "trace libraries not installed. Is Charm++ built properly?" - if [[ ${#TRACEMODE[@]} -ne 0 ]] then for trace in "${TRACEMODE[@]}"; do - [ ! -r "$CHARMLIB/libtrace-$trace.a" ] && Abort "charmc : No such tracemode $trace" + [[ ! -r "$CHARMLIB/libtrace-$trace.a" ]] && Abort "charmc : No such tracemode $trace" done fi BAL_EXT="$(getExtension "$BALANCE")" -if [ -z "$BAL_EXT" ]; then +if [[ -z "$BAL_EXT" ]]; then # Balance has no extension-- is a library reference - if [ -f "${CHARMLIB}/libldb-$BALANCE.a" ]; then + if [[ -f "${CHARMLIB}/libldb-$BALANCE.a" ]]; then BAL_OBJ_FILE="${CHARMLIB}/libldb-$BALANCE.a" else BAL_OBJ_FILE="${CHARMLIBSO}/libldb-$BALANCE.so" @@ -2207,9 +2205,9 @@ else BAL_OBJ_FILE="$BALANCE" fi -if [ ! -r "$BAL_OBJ_FILE" ] +if [[ ! -r "$BAL_OBJ_FILE" ]] then - if [ "$BALANCE" = "$BAL_OBJ_FILE" ] + if [[ "$BALANCE" = "$BAL_OBJ_FILE" ]] then Abort "Could not find load balancer object $BAL_OBJ_FILE" else @@ -2218,7 +2216,7 @@ then fi fi -if [ -f "${CHARMLIB}/libmemory-${MEMORY}.a" ]; then +if [[ -f "${CHARMLIB}/libmemory-${MEMORY}.a" ]]; then MEM_OBJ_FILE="${CHARMLIB}/libmemory-${MEMORY}.a" else MEM_OBJ_FILE="${CHARMLIBSO}/libmemory-${MEMORY}.so" @@ -2230,7 +2228,7 @@ then Abort "charmc : No such memory mode $MEMORY" fi -if [ -f "${CHARMLIB}/libthreads-${THREAD}.a" ]; then +if [[ -f "${CHARMLIB}/libthreads-${THREAD}.a" ]]; then THREAD_OBJ_FILE="${CHARMLIB}/libthreads-${THREAD}.a" else THREAD_OBJ_FILE="${CHARMLIBSO}/libthreads-${THREAD}.so" @@ -2245,7 +2243,7 @@ fi ################# Build the module initialization function ################## -if [ -z "$SKIP_MODULEINIT" ] +if [[ -z "$SKIP_MODULEINIT" ]] then DoNoErrCheck $RM "$modInitSrc" "$modInitObj" > /dev/null 2>&1 @@ -2290,7 +2288,7 @@ then fi echo "void _registerExternalModules(char **argv) { (void)argv;" >> "$modInitSrc" for module in "${MODULES[@]}"; do - [ -n "$VERBOSE" ] && echo "Adding registration for module $module" + [[ -n "$VERBOSE" ]] && echo "Adding registration for module $module" echo " _register$module();" >> "$modInitSrc" done for trace in "${TRACEMODE[@]}"; do @@ -2336,7 +2334,7 @@ then # creating projections echo "void _createTraces(char **argv) { (void)argv;" >> "$modInitSrc" for trace in "${TRACEMODE[@]}"; do - [ -n "$VERBOSE" ] && echo "Adding registration for trace $trace" + [[ -n "$VERBOSE" ]] && echo "Adding registration for trace $trace" echo "extern void _createTrace$trace(char **argv);" >> "$modInitSrc" echo "_createTrace$trace(argv);" >> "$modInitSrc" done @@ -2354,13 +2352,13 @@ fi Debug "About to perform final link..." #currently only support creation of .a -if [ "$MPI_INTEROPERATE" != "" ] +if [[ -n "$MPI_INTEROPERATE" ]] then case "$OBJECT" in *.a) # in case building charm so, build .so under lib_so as well # Gengbin DoNoErrCheck $RM "$OBJECT" - if [ -z "$SKIP_MODULEINIT" ] + if [[ -z "$SKIP_MODULEINIT" ]] then runCmd $CMK_AR "$OBJECT" "${OBJECTFILES[@]}" "$modInitObj" fi @@ -2377,8 +2375,8 @@ case "$OBJECT" in esac fi -[ "$MAKE_LDXX" = "1" ] && runCmd $CHARM_LDXX "${CHARM_LDXX_FLAGS[@]}" -o "$OBJECT" -[ "$MAKE_LD" = "1" ] && runCmd $CHARM_LD "${CHARM_LD_FLAGS[@]}" -o "$OBJECT" +[[ "$MAKE_LDXX" = '1' ]] && runCmd $CHARM_LDXX "${CHARM_LDXX_FLAGS[@]}" -o "$OBJECT" +[[ "$MAKE_LD" = '1' ]] && runCmd $CHARM_LD "${CHARM_LD_FLAGS[@]}" -o "$OBJECT" ######################################################################## # @@ -2386,7 +2384,7 @@ fi # ######################################################################## -if test "$COPY_CHARMRUN" = "true" +if [[ "$COPY_CHARMRUN" = 'true' ]] then targ="charmrun$CMK_POST_EXE" [[ ! -x "$CHARMBIN/$targ" && -n "$CMK_POST_EXE" ]] && targ=charmrun diff --git a/src/scripts/gatherflat b/src/scripts/gatherflat index 51a2f36e80..544728afaf 100755 --- a/src/scripts/gatherflat +++ b/src/scripts/gatherflat @@ -1,16 +1,16 @@ #!/bin/bash -[ -x ./gatherflat.local ] && exec ./gatherflat.local $@ +[[ -x ./gatherflat.local ]] && exec ./gatherflat.local "$@" -if [ -d $1 ] ; then +if [[ -d "$1" ]] ; then -SRC=$1 -DST=$2 +SRC="$1" +DST="$2" rm -f temp.f temp.l -if [ ! -d $DST ] ; then mkdir $DST ; fi -(cd $SRC ; find . -name CVS -prune -o -type f -print)|sed -e s@.@@>temp.f -awk '{print "./system_ln '$SRC'"$1" '$DST'";}' < temp.f > temp.l +if [[ ! -d "$DST" ]] ; then mkdir "$DST" ; fi +(cd "$SRC" ; find . -name CVS -prune -o -type f -print)|sed -e s@.@@>temp.f +awk '{print "./system_ln '"$SRC"'"$1" '"$DST"'";}' < temp.f > temp.l sh temp.l rm -f temp.d temp.l diff --git a/src/scripts/gathertree b/src/scripts/gathertree index d232d2e016..28e245822f 100755 --- a/src/scripts/gathertree +++ b/src/scripts/gathertree @@ -1,27 +1,27 @@ #!/bin/bash -[ -x ./gathertree.local ] && exec ./gathertree.local $@ +[[ -x ./gathertree.local ]] && exec ./gathertree.local "$@" -if [ "x$SYSTEMLN" = "x" ]; then SYSTEMLN="./system_ln"; fi +[[ -z "$SYSTEMLN" ]] && SYSTEMLN='./system_ln' -SRC=$1 -DST=$2 +SRC="$1" +DST="$2" -[ ! -d $SRC ] && exit 0; +[[ ! -d "$SRC" ]] && exit 0; # remove all temporary files rm -f temp.d temp.f temp.m temp.l tmp*.awk # find all directories including and below SRC -(cd $SRC ; find . -name CVS -prune -o -type d -print )|sed -e s@.@@> temp.d +(cd "$SRC" ; find . -name CVS -prune -o -type d -print )|sed -e s@.@@> temp.d # find all files below SRC -(cd $SRC ; find . -name CVS -prune -o -type f -print )|sed -e s@.@@> temp.f +(cd "$SRC" ; find . -name CVS -prune -o -type f -print )|sed -e s@.@@> temp.f # generate shell script to make directories if they do not exist -awk '{print "if [ ! -d '$DST'"$1" ] ; then mkdir '$DST'"$1" ; fi";}' temp.m +awk '{print "if [ ! -d '"$DST"'"$1" ] ; then mkdir '"$DST"'"$1" ; fi";}' temp.m # generate shell script to symlink files case "$SRC" in /*) - echo '{ print "'$SYSTEMLN' '$SRC'"$1" '$DST'"$1 }' > tmp2.awk + echo '{ print "'"$SYSTEMLN"' '"$SRC"'"$1" '"$DST"'"$1 }' > tmp2.awk ;; *) # Count the number of directories up we have to go; print out list @@ -30,8 +30,8 @@ case "$SRC" in else if ($i!=".")nUp++; pah=""; for (i=0;i tmp1.awk - echo '{print "pah=`echo '$DST'"$1" | awk -F/ -f tmp1.awk`" ;' > tmp2.awk - echo ' print "'$SYSTEMLN' $pah'$SRC'"$1" '$DST'"$1 }' >> tmp2.awk + echo '{print "pah=`echo '"$DST"'"$1" | awk -F/ -f tmp1.awk`" ;' > tmp2.awk + echo ' print "'"$SYSTEMLN"' $pah'"$SRC"'"$1" '"$DST"'"$1 }' >> tmp2.awk ;; esac @@ -40,6 +40,6 @@ awk -f tmp2.awk temp.l sh temp.m # execute shell script to link files sh temp.l -[ -f $SRC/gather.tree ] && sh $SRC/gather.tree +[[ -f "$SRC/gather.tree" ]] && sh "$SRC/gather.tree" # remove temporary files rm -f temp.d temp.f temp.m temp.l tmp*.awk diff --git a/src/scripts/testrun b/src/scripts/testrun index fb8cb76641..735c4914eb 100755 --- a/src/scripts/testrun +++ b/src/scripts/testrun @@ -7,14 +7,14 @@ ppn=0 IFS=' ' read -r -a array <<< "$*" for i in "${array[@]}" do - if [ $ppn_found -eq 1 ] ; then + if [[ $ppn_found -eq 1 ]] ; then ppn=$i #echo "FOUND ppn:" $i break fi if [[ $i == *"ppn"* ]]; then ppn=$(echo "$i" | cut -d'n' -f 2) - if [ -z "$ppn" ] + if [[ -z "$ppn" ]] then ppn_found=1 else @@ -30,14 +30,14 @@ p_found=0 IFS=' ' read -r -a array <<< "$*" for i in "${array[@]}" do - if [ $p_found -eq 1 ] ; then + if [[ $p_found -eq 1 ]] ; then p=$i #echo "FOUND p:" $p break fi if [[ $i == "+p"* ]]; then p=$(echo "$i" | cut -d'p' -f 2) - if [ -z "$p" ] + if [[ -z "$p" ]] then p_found=1 else From f4f072204321a88d15acdd8c7baa692b2bdc34b8 Mon Sep 17 00:00:00 2001 From: Evan Ramos Date: Mon, 17 Apr 2023 17:30:47 -0500 Subject: [PATCH 021/155] CMake: Condition memory-hooks-charmdebug on CMK_HAS_MALLOC_HOOK Fixes #3602 --- src/conv-core/CMakeLists.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/conv-core/CMakeLists.txt b/src/conv-core/CMakeLists.txt index c64820ef99..097efd97c2 100644 --- a/src/conv-core/CMakeLists.txt +++ b/src/conv-core/CMakeLists.txt @@ -65,8 +65,10 @@ if(${CMK_CHARMDEBUG}) add_library(memory-charmdebug-mmap-slot memory.C) target_compile_definitions(memory-charmdebug-mmap-slot PRIVATE -DCMK_MEMORY_BUILD_CHARMDEBUG -DCPD_USE_MMAP -DCMK_SEPARATE_SLOT) - add_library(memory-hooks-charmdebug memory.C) - target_compile_definitions(memory-hooks-charmdebug PRIVATE -DCMK_MEMORY_BUILD_GNU_HOOKS -DCMK_MEMORY_BUILD_CHARMDEBUG) + if(CMK_HAS_MALLOC_HOOK) + add_library(memory-hooks-charmdebug memory.C) + target_compile_definitions(memory-hooks-charmdebug PRIVATE -DCMK_MEMORY_BUILD_GNU_HOOKS -DCMK_MEMORY_BUILD_CHARMDEBUG) + endif() endif() endif() From 6fb3dd007b57ae3e1cefcd8f82c388d0e089104e Mon Sep 17 00:00:00 2001 From: Sam White Date: Mon, 17 Apr 2023 21:01:43 -0500 Subject: [PATCH 022/155] Update year in readme, doc, and charmc to 2023 --- README.md | 2 +- doc/conf.py | 2 +- src/scripts/charmc | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 34bca9e4ea..9a3ddb86a2 100644 --- a/README.md +++ b/README.md @@ -358,4 +358,4 @@ Eric Bohm, Ronak Buch, Eric Mikida, Sam White, Nitin Bhat, Kavitha Chandrasekar, Jaemin Choi, Matthias Diener, Evan Ramos, Justin Szaday, Zane Fink, and Pathikrit Ghosh. -Copyright (C) 1989-2020 Regents of the University of Illinois +Copyright (C) 1989-2023 Regents of the University of Illinois diff --git a/doc/conf.py b/doc/conf.py index 4af40006e6..13e863ab88 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -20,7 +20,7 @@ # -- Project information ----------------------------------------------------- project = 'Charm++' -copyright = '2021, PPL' +copyright = '2023, PPL' author = 'PPL' # The short X.Y version diff --git a/src/scripts/charmc b/src/scripts/charmc index 5a0b75b6e1..22b14b1f61 100755 --- a/src/scripts/charmc +++ b/src/scripts/charmc @@ -180,7 +180,7 @@ printUsage() { echo "and Charm++ programs. The flags generally match those of cc or f77." echo " Other options that are not listed here will be passed directly to the" echo "underlying compiler and/or linker." - echo "Parallel Programming Lab, UIUC, 2020." + echo "Parallel Programming Lab, UIUC, 2023." echo "$@" exit 1 } From a30921a7bdc52321c50db38ba5513e754b4f42f6 Mon Sep 17 00:00:00 2001 From: Evan Ramos Date: Thu, 13 Apr 2023 22:17:32 -0500 Subject: [PATCH 023/155] Implement CmiTLS for Apple Silicon --- cmake/detect-features-cxx.cmake | 6 +++++- cmake/detect-features.cmake | 2 +- doc/ampi/03-using.rst | 3 ++- src/scripts/configure.ac | 2 +- src/util/cmitls.C | 26 ++++++++++++++++++++++++++ 5 files changed, 35 insertions(+), 4 deletions(-) diff --git a/cmake/detect-features-cxx.cmake b/cmake/detect-features-cxx.cmake index f982d9abca..bda53febfd 100644 --- a/cmake/detect-features-cxx.cmake +++ b/cmake/detect-features-cxx.cmake @@ -18,7 +18,11 @@ check_include_file_cxx(regex CMK_HAS_REGEX) # C++ compiler flags # Keep in sync with UNKNOWN_FLAGS section in src/arch/win/unix2nt_cc -check_cxx_compiler_flag("-mno-tls-direct-seg-refs" CMK_COMPILER_KNOWS_TLSDIRECTSEGREFS) +if(CHARM_CPU STREQUAL "i386" OR CHARM_CPU STREQUAL "x86_64") + check_cxx_compiler_flag("-mno-tls-direct-seg-refs" CMK_COMPILER_KNOWS_TLSDIRECTSEGREFS) +elseif() + set(CMK_COMPILER_KNOWS_TLSDIRECTSEGREFS 0) +endif() check_cxx_compiler_flag("-fvisibility=hidden" CMK_COMPILER_KNOWS_FVISIBILITY) diff --git a/cmake/detect-features.cmake b/cmake/detect-features.cmake index 85c63bb4e1..fe590e7363 100644 --- a/cmake/detect-features.cmake +++ b/cmake/detect-features.cmake @@ -108,7 +108,7 @@ else() endif() endif() -if (CMK_MACOSX AND CHARM_CPU STREQUAL "x86_64") +if (CMK_MACOSX) set(CMK_SUPPORTS_TLSGLOBALS 1) elseif(CMK_HAS_ELF_H AND (CHARM_CPU STREQUAL "i386" OR CHARM_CPU STREQUAL "x86_64")) if(NOT CMK_COMPILER_KNOWS_TLSDIRECTSEGREFS AND NOT CMK_COMPILER STREQUAL "clang") diff --git a/doc/ampi/03-using.rst b/doc/ampi/03-using.rst index 5dac6dd65d..b6f5ef4b6c 100644 --- a/doc/ampi/03-using.rst +++ b/doc/ampi/03-using.rst @@ -370,7 +370,8 @@ variables to user-level threads by changing the TLS segment register when context switching between user-level threads. The runtime overhead is that of changing a single pointer per user-level thread context switch. Currently, Charm++ supports it for x86/x86_64 platforms when -using GNU compilers. +using GNU or LLVM compilers, as well as macOS on all supported +architectures. .. code-block:: c++ diff --git a/src/scripts/configure.ac b/src/scripts/configure.ac index d81a5651fe..fd9b1d9130 100644 --- a/src/scripts/configure.ac +++ b/src/scripts/configure.ac @@ -2552,7 +2552,7 @@ add_flag "CMK_HAS_ELF_H='$pass'" "elf.h" CMK_SUPPORTS_SWAPGLOBALS='0' CMK_SUPPORTS_TLSGLOBALS='0' -if [[ "$CMK_MACOSX" = '1' -a "$CMK_VDIR" = "${CMK_VDIR%x86_64}x86_64" ]] +if [[ "$CMK_MACOSX" = '1' ]] then CMK_SUPPORTS_TLSGLOBALS='1' elif test $pass -eq 1 diff --git a/src/util/cmitls.C b/src/util/cmitls.C index 3979e15e9b..b46c050ff9 100644 --- a/src/util/cmitls.C +++ b/src/util/cmitls.C @@ -49,6 +49,13 @@ extern int quietModeRequested; # define CMK_TLS_X86_MOV "movl" # define CMK_TLS_X86_REG "gs" # define CMK_TLS_X86_WIDTH "4" +#elif defined __aarch64__ +# define CMK_TLS_ARM64 +# ifdef __APPLE__ +# define CMK_TLS_ARM64_REG "tpidrro_el0" +# else +# define CMK_TLS_ARM64_REG "tpidr_el0" +# endif #else # define CMK_TLS_SWITCHING_UNAVAILABLE #endif @@ -67,6 +74,12 @@ void* getTLSForKey(size_t key) asm volatile (CMK_TLS_X86_MOV " %%" CMK_TLS_X86_REG ":0x0(,%1," CMK_TLS_X86_WIDTH "), %0\n" : "=&r"(ptr) : "r"(key)); +#elif defined CMK_TLS_ARM64 + void ** block; + asm volatile ("mrs %0, " CMK_TLS_ARM64_REG "\n" + "and %0, %0, #-8\n" + : "=&r"(block)); + ptr = block[key]; #endif return ptr; } @@ -77,6 +90,12 @@ void setTLSForKey(size_t key, void* newptr) asm volatile (CMK_TLS_X86_MOV " %0, %%" CMK_TLS_X86_REG ":0x0(,%1," CMK_TLS_X86_WIDTH ")\n" : : "r"(newptr), "r"(key)); +#elif defined CMK_TLS_ARM64 + void ** block; + asm volatile ("mrs %0, " CMK_TLS_ARM64_REG "\n" + "and %0, %0, #-8\n" + : "=&r"(block)); + block[key] = newptr; #endif } @@ -93,6 +112,9 @@ void* getTLS() #if defined CMK_TLS_X86 asm volatile (CMK_TLS_X86_MOV " %%" CMK_TLS_X86_REG ":0x0, %0\n" : "=&r"(ptr)); +#elif defined CMK_TLS_ARM64 + asm volatile ("mrs %0, " CMK_TLS_ARM64_REG "\n" + : "=&r"(ptr)); #endif return ptr; } @@ -103,6 +125,10 @@ void setTLS(void* newptr) asm volatile (CMK_TLS_X86_MOV " %0, %%" CMK_TLS_X86_REG ":0x0\n" : : "r"(newptr)); +#elif defined CMK_TLS_ARM64 + asm volatile ("msr " CMK_TLS_ARM64_REG ", %0\n" + : + : "r"(newptr)); #endif } From 890fc914dbc54f861842288b082db351f6d8af67 Mon Sep 17 00:00:00 2001 From: Sam White Date: Thu, 9 Mar 2023 12:06:07 -0600 Subject: [PATCH 024/155] Cleanup: use snprintf instead of deprecated snprintf --- src/arch/gni/machine.C | 2 +- src/arch/mpi/machine.C | 9 +- src/arch/netlrts/machine-dgram.C | 28 +- src/arch/netlrts/machine.C | 24 +- src/arch/pami/machine.C | 2 +- src/arch/util/machine-common-core.C | 9 +- src/arch/util/machine-xpmem.C | 6 +- src/arch/verbs/machine-dgram.C | 22 +- src/arch/verbs/machine.C | 18 +- src/ck-core/charm++.h | 6 +- src/ck-core/charmf.C | 6 +- src/ck-core/ck.C | 6 +- src/ck-core/ckIgetControl.C | 4 +- src/ck-core/ckarray.C | 16 +- src/ck-core/ckcheckpoint.C | 2 +- src/ck-core/debug-charm.C | 6 +- src/ck-core/envelope-path.h | 9 +- src/ck-core/envelope.h | 5 +- src/ck-core/modifyScheduler.C | 4 +- src/ck-cp/controlPoints.h | 9 +- src/ck-cp/pathHistory.h | 5 +- src/ck-ldb/CentralLB.C | 12 +- src/ck-ldb/LBComm.C | 19 +- src/ck-ldb/LBSimulation.C | 6 +- src/ck-ldb/TempAwareRefineLB.C | 10 +- src/ck-ldb/ZoltanLB.C | 2 +- src/ck-ldb/readmodel.C | 4 +- src/ck-perf/trace-Tau.C | 4 +- src/ck-perf/trace-common.C | 2 +- src/ck-perf/trace-counter.C | 20 +- src/ck-perf/trace-memory.C | 2 +- src/ck-perf/trace-projections.C | 35 +- src/ck-perf/trace-projector.C | 5 +- src/ck-perf/trace-summary.C | 21 +- src/ck-perf/trace-utilization.C | 5 +- src/ck-pics/picsautoperf.C | 2 +- src/conv-ccs/ccs-builtins.C | 9 +- src/conv-ccs/ccs-client.C | 2 +- src/conv-ccs/ccs-server.C | 10 +- src/conv-core/conv-taskQ.C | 2 +- src/conv-core/cpuaffinity.C | 4 +- src/conv-core/isomalloc.C | 2 +- src/conv-core/memory-charmdebug.C | 6 +- src/conv-core/memory-record.C | 2 +- src/conv-core/memory.C | 2 +- src/conv-core/shmem/cmishm.C | 4 +- src/conv-core/threads.C | 2 +- src/conv-ldb/cldb.neighbor.C | 2 +- src/conv-ldb/generate.C | 6 +- src/conv-perf/traceCore.C | 27 +- src/libs/ck-libs/ampi/ampi.C | 6 +- src/libs/ck-libs/ckloop/CkLoop.C | 2 +- src/libs/ck-libs/collide/collidecharm.C | 12 +- src/libs/ck-libs/liveViz3d/lv3d0_server.C | 10 +- src/libs/ck-libs/mblock/patch.C | 4 +- src/libs/ck-libs/pmaf/chunk.C | 4 +- src/libs/ck-libs/pose/eqheap.C | 5 +- src/libs/ck-libs/pose/eventID.h | 5 - src/libs/ck-libs/pose/evq.C | 2 +- src/libs/ck-libs/pose/pose.C | 6 +- src/libs/ck-libs/pose/stats.C | 2 +- src/libs/ck-libs/pose/stats.h | 2 +- src/libs/ck-libs/tcharm/tcharm.C | 4 +- src/util/charmrun-src/charmrun.C | 116 +- src/util/charmrun-src/daemon.C | 2 +- src/util/ckdll.C | 8 +- src/util/pup.h | 10 +- src/util/pup_paged.C | 5 +- src/util/pup_util.C | 74 +- src/util/sockRoutines.C | 6 +- src/util/sockRoutines.h | 8 +- src/util/treeStrategy_3dTorus_minBytesHops.h | 6 +- src/xlat-i/sdag/CSdagConstruct.C | 4 +- src/xlat-i/sdag/constructs/Case.C | 4 +- src/xlat-i/sdag/constructs/CaseList.C | 4 +- src/xlat-i/sdag/constructs/Else.C | 2 +- src/xlat-i/sdag/constructs/For.C | 4 +- src/xlat-i/sdag/constructs/Forall.C | 2 +- src/xlat-i/sdag/constructs/OList.C | 4 +- src/xlat-i/sdag/constructs/Overlap.C | 4 +- src/xlat-i/sdag/constructs/Serial.C | 6 +- src/xlat-i/sdag/constructs/When.C | 6 +- src/xlat-i/xi-Parameter.C | 2 +- src/xlat-i/xi-grammar.tab.C | 4704 +++++++++--------- src/xlat-i/xi-grammar.tab.h | 185 +- src/xlat-i/xi-grammar.y | 37 +- src/xlat-i/xi-main.C | 2 +- src/xlat-i/xi-util.C | 2 +- 88 files changed, 2924 insertions(+), 2774 deletions(-) diff --git a/src/arch/gni/machine.C b/src/arch/gni/machine.C index 2b8134b94f..9bef7c93cd 100644 --- a/src/arch/gni/machine.C +++ b/src/arch/gni/machine.C @@ -822,7 +822,7 @@ static void init_comm_stats(void) if (print_stats){ char ln[200]; int code = mkdir(counters_dirname, 00777); - sprintf(ln,"%s/statistics.%d.%d", counters_dirname, mysize, myrank); + snprintf(ln,sizeof(ln),"%s/statistics.%d.%d", counters_dirname, mysize, myrank); counterLog=fopen(ln,"w"); if (counterLog == NULL) CmiAbort("Counter files open failed"); } diff --git a/src/arch/mpi/machine.C b/src/arch/mpi/machine.C index e525f18701..d8bcc3096f 100644 --- a/src/arch/mpi/machine.C +++ b/src/arch/mpi/machine.C @@ -29,7 +29,7 @@ #include static char* strsignal(int sig) { static char outbuf[32]; - sprintf(outbuf, "%d", sig); + snprintf(outbuf, sizeof(outbuf), "%d", sig); return outbuf; } #include @@ -1041,7 +1041,7 @@ static void PumpMsgsBlocking(void) { #if CMK_SMP_TRACE_COMMTHREAD && CMI_MPI_TRACE_MOREDETAILED char tmp[32]; - sprintf(tmp, "To proc %d", CmiNodeFirst(CmiMyNode())+CMI_DEST_RANK(msg)); + snprintf(tmp, sizeof(tmp), "To proc %d", CmiNodeFirst(CmiMyNode())+CMI_DEST_RANK(msg)); traceUserSuppliedBracketedNote(tmp, 30, CpvAccess(projTraceStart), CmiWallTimer()); #endif @@ -1537,8 +1537,9 @@ void LrtsInit(int *argc, char ***argv, int *numNodes, int *myNodeID) { } static char s_restartaftercrash[] = "+restartaftercrash"; restart_argv[i] = s_restartaftercrash; - phase_str = (char*)malloc(10); - sprintf(phase_str,"%d", CpvAccess(_curRestartPhase)); + const int phase_str_len = 10; + phase_str = (char*)malloc(phase_str_len); + snprintf(phase_str, phase_str_len, "%d", CpvAccess(_curRestartPhase)); restart_argv[i+1]=phase_str; restart_argv[i+2]=NULL; *argv = restart_argv; diff --git a/src/arch/netlrts/machine-dgram.C b/src/arch/netlrts/machine-dgram.C index a04c1d1e16..fdfc57c7dd 100644 --- a/src/arch/netlrts/machine-dgram.C +++ b/src/arch/netlrts/machine-dgram.C @@ -419,28 +419,28 @@ void printNetStatistics(void) unsigned int recv_ack=0, ack_pkts=0; myNode = nodes+CmiMyNode(); - sprintf(tmpstr, "***********************************\n"); + snprintf(tmpstr, sizeof(tmpstr), "***********************************\n"); strcpy(statstr, tmpstr); - sprintf(tmpstr, "Net Statistics For Node %u\n", CmiMyNode()); + snprintf(tmpstr, sizeof(tmpstr), "Net Statistics For Node %u\n", CmiMyNode()); strcat(statstr, tmpstr); - sprintf(tmpstr, "Interrupts: %u \tProcessed: %u\n", - myNode->stat_total_intr, myNode->stat_proc_intr); + snprintf(tmpstr, sizeof(tmpstr), "Interrupts: %u \tProcessed: %u\n", + myNode->stat_total_intr, myNode->stat_proc_intr); strcat(statstr, tmpstr); - sprintf(tmpstr, "Total Msgs Sent: %u \tTotal Bytes Sent: %u\n", - myNode->sent_msgs, myNode->sent_bytes); + snprintf(tmpstr, sizeof(tmpstr), "Total Msgs Sent: %u \tTotal Bytes Sent: %u\n", + myNode->sent_msgs, myNode->sent_bytes); strcat(statstr, tmpstr); - sprintf(tmpstr, "Total Msgs Recv: %u \tTotal Bytes Recv: %u\n", - myNode->recd_msgs, myNode->recd_bytes); + snprintf(tmpstr, sizeof(tmpstr), "Total Msgs Recv: %u \tTotal Bytes Recv: %u\n", + myNode->recd_msgs, myNode->recd_bytes); strcat(statstr, tmpstr); - sprintf(tmpstr, "***********************************\n"); + snprintf(tmpstr, sizeof(tmpstr), "***********************************\n"); strcat(statstr, tmpstr); - sprintf(tmpstr, "[Num]\tSENDTO\tRESEND\tRECV\tACKSTO\tACKSFRM\tPKTACK\n"); + snprintf(tmpstr, sizeof(tmpstr), "[Num]\tSENDTO\tRESEND\tRECV\tACKSTO\tACKSFRM\tPKTACK\n"); strcat(statstr,tmpstr); - sprintf(tmpstr, "=====\t======\t======\t====\t======\t=======\t======\n"); + snprintf(tmpstr, sizeof(tmpstr), "=====\t======\t======\t====\t======\t=======\t======\n"); strcat(statstr,tmpstr); for(i=0;istat_send_pkt, node->stat_resend_pkt, node->stat_recv_pkt, node->stat_send_ack, node->stat_recv_ack, node->stat_ack_pkts); @@ -452,12 +452,12 @@ void printNetStatistics(void) recv_ack += node->stat_recv_ack; ack_pkts += node->stat_ack_pkts; } - sprintf(tmpstr, "[TOTAL]\t%u\t%u\t%u\t%u\t%u\t%u\n", + snprintf(tmpstr, sizeof(tmpstr), "[TOTAL]\t%u\t%u\t%u\t%u\t%u\t%u\n", send_pkt, resend_pkt, recv_pkt, send_ack, recv_ack, ack_pkts); strcat(statstr, tmpstr); - sprintf(tmpstr, "***********************************\n"); + snprintf(tmpstr, sizeof(tmpstr), "***********************************\n"); strcat(statstr, tmpstr); CmiPrintf("%s", statstr); } diff --git a/src/arch/netlrts/machine.C b/src/arch/netlrts/machine.C index 9ca54addb5..7f7ae543ff 100644 --- a/src/arch/netlrts/machine.C +++ b/src/arch/netlrts/machine.C @@ -340,7 +340,7 @@ static void KillEveryone(const char *msg) static void KillEveryoneCode(int n) { char _s[100]; - sprintf(_s, "[%d] XXX Fatal error #%d\n", CmiMyPe(), n); + snprintf(_s, sizeof(_s), "[%d] XXX Fatal error #%d\n", CmiMyPe(), n); charmrun_abort(_s); machine_exit(1); } @@ -760,7 +760,7 @@ static void log_init(void) static void log_done(void) { char logname[100]; FILE *f; int i, size; - sprintf(logname, "log.%d", Lrts_myNode); + snprintf(logname, sizeof(logname), "log.%d", Lrts_myNode); f = fopen(logname, "w"); if (f==0) KillEveryone("fopen problem"); if (log_wrap) size = 50000; else size=log_pos; @@ -780,7 +780,7 @@ void printLog(void) return; logged = 1; CmiPrintf("Logging: %d\n", Lrts_myNode); - sprintf(logname, "log.%d", Lrts_myNode); + snprintf(logname, sizeof(logname), "log.%d", Lrts_myNode); f = fopen(logname, "w"); if (f==0) KillEveryone("fopen problem"); for (i = 5000; i; i--) @@ -1041,11 +1041,11 @@ CmiPrintStackTrace(0); char msgBuf[80]; skt_set_abort(ignore_further_errors); if (CmiNumPartitions() == 1) { - sprintf(msgBuf,"Fatal error on PE %d> ",CmiMyPe()); + snprintf(msgBuf,sizeof(msgBuf),"Fatal error on PE %d> ",CmiMyPe()); } else { - sprintf(msgBuf,"Fatal error on Partition %d PE %d> ", CmiMyPartition(), CmiMyPe()); + snprintf(msgBuf,sizeof(msgBuf),"Fatal error on Partition %d PE %d> ", CmiMyPartition(), CmiMyPe()); } ctrl_sendone_nolock("abort",msgBuf,strlen(msgBuf),s,strlen(s)+1); skt_close(Cmi_charmrun_fd); @@ -1157,7 +1157,7 @@ static void InternalPrintf(const char *f, va_list l) ChMessage replymsg; char *buffer = (char *)CmiTmpAlloc(PRINTBUFSIZE); CmiStdoutFlush(); - vsprintf(buffer, f, l); + vsnprintf(buffer, PRINTBUFSIZE, f, l); if(Cmi_syncprint) { LOCK_IF_AVAILABLE(); ctrl_sendone_nolock("printsyn", buffer,strlen(buffer)+1,NULL,0); @@ -1176,7 +1176,7 @@ static void InternalError(const char *f, va_list l) ChMessage replymsg; char *buffer = (char *)CmiTmpAlloc(PRINTBUFSIZE); CmiStdoutFlush(); - vsprintf(buffer, f, l); + vsnprintf(buffer, PRINTBUFSIZE, f, l); if(Cmi_syncprint) { ctrl_sendone_locking("printerrsyn", buffer,strlen(buffer)+1,NULL,0); LOCK_IF_AVAILABLE(); @@ -1801,7 +1801,7 @@ int CmiBarrierZero(void) if (CmiMyRank() == 0) { char str[64]; - sprintf(str, "%d", CmiMyNodeGlobal()); + snprintf(str, sizeof(str), "%d", CmiMyNodeGlobal()); ctrl_sendone_locking("barrier0",str,strlen(str)+1,NULL,0); if (CmiMyNodeGlobal() == 0) { while (barrierReceived != 2) { @@ -1932,7 +1932,7 @@ void LrtsExit(int exitcode) } else { char tmp[16]; - sprintf(tmp, "%d", exitcode); + snprintf(tmp, sizeof(tmp), "%d", exitcode); Cmi_check_delay = 1.0; /* speed up checking of charmrun */ for(i = 0; i < CmiMyNodeSize(); i++) { ctrl_sendone_locking("ending",tmp,strlen(tmp)+1,NULL,0); /* this causes charmrun to go away, every PE needs to report */ @@ -2018,17 +2018,17 @@ void ConverseCleanup(void) ret[argc+1]="+newnumpes"; char temp[50]; - sprintf(temp,"%d", numProcessAfterRestart); + snprintf(temp, sizeof(temp), "%d", numProcessAfterRestart); ret[argc+2]=temp; ret[argc+3]="+mynewpe"; char temp2[50]; - sprintf(temp2,"%d", mynewpe); + snprintf(temp2, sizeof(temp2), "%d", mynewpe); ret[argc+4]=temp2; ret[argc+5]="+myoldpe"; char temp3[50]; - sprintf(temp3,"%d", CmiMyPe()); + snprintf(temp3, sizeof(temp3), "%d", CmiMyPe()); ret[argc+6]=temp3; if (restart_idx == -1) { diff --git a/src/arch/pami/machine.C b/src/arch/pami/machine.C index b6474c139e..4e616e6e41 100644 --- a/src/arch/pami/machine.C +++ b/src/arch/pami/machine.C @@ -720,7 +720,7 @@ void ConverseInit(int argc, char **argv, CmiStartFn fn, int usched, int initret) _Cmi_numnodes = configuration.value.intval; #if MACHINE_DEBUG_LOG char ln[200]; - sprintf(ln,"debugLog.%d", _Cmi_mynode); + snprintf(ln, sizeof(ln), "debugLog.%d", _Cmi_mynode); debugLog=fopen(ln,"w"); if (debugLog == NULL) { diff --git a/src/arch/util/machine-common-core.C b/src/arch/util/machine-common-core.C index 8da5549037..0ffadf0313 100644 --- a/src/arch/util/machine-common-core.C +++ b/src/arch/util/machine-common-core.C @@ -1365,7 +1365,7 @@ if ( MSG_STATISTIC) #if MACHINE_DEBUG_LOG char ln[200]; - sprintf(ln,"debugLog.%d", _Cmi_mynode); + snprintf(ln,sizeof(ln),"debugLog.%d", _Cmi_mynode); debugLog=fopen(ln,"w"); if (debugLog == NULL) { @@ -1416,10 +1416,11 @@ if ( MSG_STATISTIC) Cmi_usrsched = usched; if ( CmiGetArgStringDesc(argv,"+stdout",&stdoutbase,"base filename to redirect partition stdout to") ) { - stdoutpath = (char *)malloc(strlen(stdoutbase) + 30); - sprintf(stdoutpath, stdoutbase, CmiMyPartition(), CmiMyPartition(), CmiMyPartition()); + int len = strlen(stdoutbase) + 30; + stdoutpath = (char *)malloc(len); + snprintf(stdoutpath, len, stdoutbase, CmiMyPartition(), CmiMyPartition(), CmiMyPartition()); if ( ! strcmp(stdoutpath, stdoutbase) ) { - sprintf(stdoutpath, "%s.%d", stdoutbase, CmiMyPartition()); + snprintf(stdoutpath, len, "%s.%d", stdoutbase, CmiMyPartition()); } if ( CmiMyPartition() == 0 && CmiMyNode() == 0 && !quietMode) { printf("Redirecting stdout to files %s through %d\n",stdoutpath,CmiNumPartitions()-1); diff --git a/src/arch/util/machine-xpmem.C b/src/arch/util/machine-xpmem.C index 90784b4fc6..e145161511 100644 --- a/src/arch/util/machine-xpmem.C +++ b/src/arch/util/machine-xpmem.C @@ -634,7 +634,7 @@ void createRecvXpmemAndSems(sharedBufData **bufs,char **bufNames){ int fd; char fname[128]; - sprintf(fname, ".xpmem.%d", xpmemContext->nodestart+xpmemContext->noderank); + snprintf(fname, sizeof(fname), ".xpmem.%d", xpmemContext->nodestart+xpmemContext->noderank); fd = open(fname, O_CREAT|O_WRONLY, S_IRUSR|S_IWUSR); if (fd == -1) { CmiAbort("createShmObjectsAndSems failed"); @@ -660,7 +660,7 @@ void createSendXpmemAndSems(sharedBufData **bufs,char **bufNames) __s64 segid; char fname[128]; int fd; - sprintf(fname, ".xpmem.%d", xpmemContext->nodestart+i); + snprintf(fname, sizeof(fname), ".xpmem.%d", xpmemContext->nodestart+i); fd = open(fname, O_RDONLY); if (fd == -1) { CmiAbort("createShmObjectsAndSems failed"); @@ -690,7 +690,7 @@ void createSendXpmemAndSems(sharedBufData **bufs,char **bufNames) void removeXpmemFiles(void) { char fname[64]; - sprintf(fname, ".xpmem.%d", xpmemContext->nodestart+xpmemContext->noderank); + snprintf(fname, sizeof(fname), ".xpmem.%d", xpmemContext->nodestart+xpmemContext->noderank); unlink(fname); } diff --git a/src/arch/verbs/machine-dgram.C b/src/arch/verbs/machine-dgram.C index 5a07fc83e1..c7b914ef90 100644 --- a/src/arch/verbs/machine-dgram.C +++ b/src/arch/verbs/machine-dgram.C @@ -469,28 +469,28 @@ void printNetStatistics(void) unsigned int recv_ack=0, ack_pkts=0; myNode = nodes+CmiMyNode(); - sprintf(tmpstr, "***********************************\n"); + snprintf(tmpstr, sizeof(tmpstr), "***********************************\n"); strcpy(statstr, tmpstr); - sprintf(tmpstr, "Net Statistics For Node %u\n", CmiMyNode()); + snprintf(tmpstr, sizeof(tmpstr), "Net Statistics For Node %u\n", CmiMyNode()); strcat(statstr, tmpstr); - sprintf(tmpstr, "Interrupts: %u \tProcessed: %u\n", + snprintf(tmpstr, sizeof(tmpstr), "Interrupts: %u \tProcessed: %u\n", myNode->stat_total_intr, myNode->stat_proc_intr); strcat(statstr, tmpstr); - sprintf(tmpstr, "Total Msgs Sent: %u \tTotal Bytes Sent: %u\n", + snprintf(tmpstr, sizeof(tmpstr), "Total Msgs Sent: %u \tTotal Bytes Sent: %u\n", myNode->sent_msgs, myNode->sent_bytes); strcat(statstr, tmpstr); - sprintf(tmpstr, "Total Msgs Recv: %u \tTotal Bytes Recv: %u\n", + snprintf(tmpstr, sizeof(tmpstr), "Total Msgs Recv: %u \tTotal Bytes Recv: %u\n", myNode->recd_msgs, myNode->recd_bytes); strcat(statstr, tmpstr); - sprintf(tmpstr, "***********************************\n"); + snprintf(tmpstr, sizeof(tmpstr), "***********************************\n"); strcat(statstr, tmpstr); - sprintf(tmpstr, "[Num]\tSENDTO\tRESEND\tRECV\tACKSTO\tACKSFRM\tPKTACK\n"); + snprintf(tmpstr, sizeof(tmpstr), "[Num]\tSENDTO\tRESEND\tRECV\tACKSTO\tACKSFRM\tPKTACK\n"); strcat(statstr,tmpstr); - sprintf(tmpstr, "=====\t======\t======\t====\t======\t=======\t======\n"); + snprintf(tmpstr, sizeof(tmpstr), "=====\t======\t======\t====\t======\t=======\t======\n"); strcat(statstr,tmpstr); for(i=0;istat_send_pkt, node->stat_resend_pkt, node->stat_recv_pkt, node->stat_send_ack, node->stat_recv_ack, node->stat_ack_pkts); @@ -502,12 +502,12 @@ void printNetStatistics(void) recv_ack += node->stat_recv_ack; ack_pkts += node->stat_ack_pkts; } - sprintf(tmpstr, "[TOTAL]\t%u\t%u\t%u\t%u\t%u\t%u\n", + snprintf(tmpstr, sizeof(tmpstr), "[TOTAL]\t%u\t%u\t%u\t%u\t%u\t%u\n", send_pkt, resend_pkt, recv_pkt, send_ack, recv_ack, ack_pkts); strcat(statstr, tmpstr); - sprintf(tmpstr, "***********************************\n"); + snprintf(tmpstr, sizeof(tmpstr), "***********************************\n"); strcat(statstr, tmpstr); CmiPrintf("%s", statstr); } diff --git a/src/arch/verbs/machine.C b/src/arch/verbs/machine.C index 6ee164de63..0344b7a606 100644 --- a/src/arch/verbs/machine.C +++ b/src/arch/verbs/machine.C @@ -332,7 +332,7 @@ static void KillEveryone(const char *msg) static void KillEveryoneCode(int n) { char _s[100]; - sprintf(_s, "[%d] Fatal error #%d\n", CmiMyPe(), n); + snprintf(_s, sizeof(_s), "[%d] Fatal error #%d\n", CmiMyPe(), n); charmrun_abort(_s); machine_exit(1); } @@ -727,7 +727,7 @@ static void log_init(void) static void log_done(void) { char logname[100]; FILE *f; int i, size; - sprintf(logname, "log.%d", Lrts_myNode); + snprintf(logname, sizeof(logname), "log.%d", Lrts_myNode); f = fopen(logname, "w"); if (f==0) KillEveryone("fopen problem"); if (log_wrap) size = 50000; else size=log_pos; @@ -747,7 +747,7 @@ void printLog(void) return; logged = 1; CmiPrintf("Logging: %d\n", Lrts_myNode); - sprintf(logname, "log.%d", Lrts_myNode); + snprintf(logname, sizeof(logname), "log.%d", Lrts_myNode); f = fopen(logname, "w"); if (f==0) KillEveryone("fopen problem"); for (i = 5000; i; i--) @@ -997,11 +997,11 @@ CmiPrintStackTrace(0); char msgBuf[80]; skt_set_abort(ignore_further_errors); if (CmiNumPartitions() == 1) { - sprintf(msgBuf,"Fatal error on PE %d> ",CmiMyPe()); + snprintf(msgBuf,sizeof(msgBuf),"Fatal error on PE %d> ",CmiMyPe()); } else { - sprintf(msgBuf,"Fatal error on Partition %d PE %d> ", CmiMyPartition(), CmiMyPe()); + snprintf(msgBuf,sizeof(msgBuf),"Fatal error on Partition %d PE %d> ", CmiMyPartition(), CmiMyPe()); } ctrl_sendone_nolock("abort",msgBuf,strlen(msgBuf),s,strlen(s)+1); } @@ -1100,7 +1100,7 @@ static void InternalPrintf(const char *f, va_list l) ChMessage replymsg; char *buffer = (char *)CmiTmpAlloc(PRINTBUFSIZE); CmiStdoutFlush(); - vsprintf(buffer, f, l); + vsnprintf(buffer, PRINTBUFSIZE, f, l); if(Cmi_syncprint) { LOCK_IF_AVAILABLE(); ctrl_sendone_nolock("printsyn", buffer,strlen(buffer)+1,NULL,0); @@ -1119,7 +1119,7 @@ static void InternalError(const char *f, va_list l) ChMessage replymsg; char *buffer = (char *)CmiTmpAlloc(PRINTBUFSIZE); CmiStdoutFlush(); - vsprintf(buffer, f, l); + vsnprintf(buffer, PRINTBUFSIZE, f, l); if(Cmi_syncprint) { ctrl_sendone_locking("printerrsyn", buffer,strlen(buffer)+1,NULL,0); LOCK_IF_AVAILABLE(); @@ -1798,7 +1798,7 @@ int CmiBarrierZero(void) if (CmiMyRank() == 0) { char str[64]; - sprintf(str, "%d", CmiMyNodeGlobal()); + snprintf(str, sizeof(str), "%d", CmiMyNodeGlobal()); ctrl_sendone_locking("barrier0",str,strlen(str)+1,NULL,0); if (CmiMyNodeGlobal() == 0) { while (barrierReceived != 2) { @@ -1929,7 +1929,7 @@ void LrtsExit(int exitcode) exit(exitcode); /*Standalone version-- just leave*/ } else { char tmp[16]; - sprintf(tmp, "%d", exitcode); + snprintf(tmp, sizeof(tmp), "%d", exitcode); Cmi_check_delay = 1.0; /* speed up checking of charmrun */ for(i = 0; i < CmiMyNodeSize(); i++) { ctrl_sendone_locking("ending",tmp,strlen(tmp)+1,NULL,0); /* this causes charmrun to go away, every PE needs to report */ diff --git a/src/ck-core/charm++.h b/src/ck-core/charm++.h index d3b47a2c28..6c5c0bdf93 100644 --- a/src/ck-core/charm++.h +++ b/src/ck-core/charm++.h @@ -1314,13 +1314,15 @@ static const char *idx2str(const CkArrayIndex &ind) { if (ind.dimension <= 3) { for (int i=0;i0) strcat(retBuf,";"); - sprintf(&retBuf[strlen(retBuf)],"%d",ind.data()[i]); + const int retBufLen = strlen(retBuf); + snprintf(&retBuf[retBufLen],sizeof(retBuf)-retBufLen,"%d",ind.data()[i]); } } else { const short int *idx = (const short int*)ind.data(); for (int i=0;i0) strcat(retBuf,";"); - sprintf(&retBuf[strlen(retBuf)],"%hd",idx[i]); + const int retBufLen = strlen(retBuf); + snprintf(&retBuf[retBufLen],sizeof(retBuf)-retBufLen,"%hd",idx[i]); } } return retBuf; diff --git a/src/ck-core/charmf.C b/src/ck-core/charmf.C index 7af8e53f1f..93ea427996 100644 --- a/src/ck-core/charmf.C +++ b/src/ck-core/charmf.C @@ -59,21 +59,21 @@ extern "C" void FTN_NAME(CKPRINTF, ckprintf)(const char *format, ...) case 'd': i = va_arg(args, int *); temp_fmt[temp_len] = 'i'; temp_fmt[++temp_len]='\0'; - str_len += sprintf(str+str_len,temp_fmt,*i); + str_len += snprintf(str+str_len,std::max(0, (int)sizeof(str) - str_len),temp_fmt,*i); ifmt++; flag=1; break; case 'e': case 'f': f = va_arg(args, float *); temp_fmt[temp_len] = format[ifmt]; temp_fmt[++temp_len]='\0'; - str_len += sprintf(str+str_len,temp_fmt,*f); + str_len += snprintf(str+str_len,std::max(0, (int)sizeof(str) - str_len),temp_fmt,*f); ifmt++; flag=1; break; case 'E': case 'F': d = va_arg(args, double *); temp_fmt[temp_len] = format[ifmt]+32; temp_fmt[++temp_len]='\0'; - str_len += sprintf(str+str_len,temp_fmt,*d); + str_len += snprintf(str+str_len,std::max(0, (int)sizeof(str) - str_len),temp_fmt,*d); ifmt++; flag=1; break; default: diff --git a/src/ck-core/ck.C b/src/ck-core/ck.C index d9a253970d..346c985211 100644 --- a/src/ck-core/ck.C +++ b/src/ck-core/ck.C @@ -151,7 +151,7 @@ int Chare::ckGetChareType() const { } char *Chare::ckDebugChareName(void) { char buf[100]; - sprintf(buf,"Chare on pe %d at %p",CkMyPe(),(void*)this); + snprintf(buf,sizeof(buf),"Chare on pe %d at %p",CkMyPe(),(void*)this); return strdup(buf); } int Chare::ckDebugChareID(char *str, int limit) { @@ -2720,14 +2720,14 @@ private: crc1 = checksum_initial(((unsigned char*)env)+CmiMsgHeaderSizeBytes, sizeof(*env)-CmiMsgHeaderSizeBytes); crc2 = checksum_initial(((unsigned char*)env)+sizeof(*env), env->getTotalsize()-sizeof(*env)); } - curpos+=sprintf(&buffer[curpos],"%d %d %d %d %x %x %d\n",env->getSrcPe(),env->getTotalsize(),env->getEvent(), env->getMsgtype()==NodeBocInitMsg || env->getMsgtype()==ForNodeBocMsg, crc1, crc2, env->getEpIdx()); + curpos+=snprintf(&buffer[curpos],buffer.size() - curpos,"%d %d %d %d %x %x %d\n",env->getSrcPe(),env->getTotalsize(),env->getEvent(), env->getMsgtype()==NodeBocInitMsg || env->getMsgtype()==ForNodeBocMsg, crc1, crc2, env->getEpIdx()); if (curpos > _recplay_logsize-128) flushLog(); if (!wasPacked) CkUnpackMessage(envptr); } return true; } virtual bool process(CthThreadToken *token,CkCoreState *ck) { - curpos+=sprintf(&buffer[curpos], "%d %d %d\n",CkMyPe(), -2, token->serialNo); + curpos+=snprintf(&buffer[curpos], buffer.size() - curpos, "%d %d %d\n",CkMyPe(), -2, token->serialNo); if (curpos > _recplay_logsize-128) flushLog(); return true; } diff --git a/src/ck-core/ckIgetControl.C b/src/ck-core/ckIgetControl.C index e34dd39bb8..3d124fd573 100644 --- a/src/ck-core/ckIgetControl.C +++ b/src/ck-core/ckIgetControl.C @@ -199,8 +199,8 @@ static int getRSS() char filename[128], commands[256], retstring[128]; int fd; pid = getpid(); - sprintf(filename,"__topmem__%d", CkMyPe()); - sprintf(commands, "export TERM=vt100; top -b -n 1 -p %d |grep %d | awk -F' ' '{print $6}' > %s", pid, + snprintf(filename, sizeof(filename), "__topmem__%d", CkMyPe()); + snprintf(commands, sizeof(commands), "export TERM=vt100; top -b -n 1 -p %d |grep %d | awk -F' ' '{print $6}' > %s", pid, pid, filename); system(commands); i=0; diff --git a/src/ck-core/ckarray.C b/src/ck-core/ckarray.C index 38c8540732..cfe58b2c88 100644 --- a/src/ck-core/ckarray.C +++ b/src/ck-core/ckarray.C @@ -437,29 +437,29 @@ char* ArrayElement::ckDebugChareName(void) switch (thisIndexMax.dimension) { case 0: - sprintf(buf, "%s", className); + snprintf(buf, sizeof(buf), "%s", className); break; case 1: - sprintf(buf, "%s[%d]", className, d[0]); + snprintf(buf, sizeof(buf), "%s[%d]", className, d[0]); break; case 2: - sprintf(buf, "%s(%d,%d)", className, d[0], d[1]); + snprintf(buf, sizeof(buf), "%s(%d,%d)", className, d[0], d[1]); break; case 3: - sprintf(buf, "%s(%d,%d,%d)", className, d[0], d[1], d[2]); + snprintf(buf, sizeof(buf), "%s(%d,%d,%d)", className, d[0], d[1], d[2]); break; case 4: - sprintf(buf, "%s(%hd,%hd,%hd,%hd)", className, s[0], s[1], s[2], s[3]); + snprintf(buf, sizeof(buf), "%s(%hd,%hd,%hd,%hd)", className, s[0], s[1], s[2], s[3]); break; case 5: - sprintf(buf, "%s(%hd,%hd,%hd,%hd,%hd)", className, s[0], s[1], s[2], s[3], s[4]); + snprintf(buf, sizeof(buf), "%s(%hd,%hd,%hd,%hd,%hd)", className, s[0], s[1], s[2], s[3], s[4]); break; case 6: - sprintf(buf, "%s(%hd,%hd,%hd,%hd,%hd,%hd)", className, s[0], s[1], s[2], s[3], s[4], + snprintf(buf, sizeof(buf), "%s(%hd,%hd,%hd,%hd,%hd,%hd)", className, s[0], s[1], s[2], s[3], s[4], s[5]); break; default: - sprintf(buf, "%s(%d,%d,%d,%d..)", className, d[0], d[1], d[2], d[3]); + snprintf(buf, sizeof(buf), "%s(%d,%d,%d,%d..)", className, d[0], d[1], d[2], d[3]); break; }; return strdup(buf); diff --git a/src/ck-core/ckcheckpoint.C b/src/ck-core/ckcheckpoint.C index bb0d761193..3a656480ab 100644 --- a/src/ck-core/ckcheckpoint.C +++ b/src/ck-core/ckcheckpoint.C @@ -175,7 +175,7 @@ static void bdcastROGroupData(void){ void printIndex(const CkArrayIndex &idx,char *dest) { const int *idxData=idx.data(); for (int i=0;i /tmp/start_gdb.$$ << END_OF_SCRIPT\n"); diff --git a/src/ck-core/envelope-path.h b/src/ck-core/envelope-path.h index 371d638654..f023b0b5e6 100644 --- a/src/ck-core/envelope-path.h +++ b/src/ck-core/envelope-path.h @@ -146,18 +146,19 @@ class PathHistory { } /// Write a description of the path into the beginning of the provided buffer. The buffer ought to be large enough. - void printHTMLToString(char* buf) const { + void printHTMLToString(char* buf, int len) const { buf[0] = '\0'; + int tmplen = strlen(buf); - sprintf(buf+strlen(buf), "Path Time=%lf
", (double)totalTime); + tmplen += snprintf(buf+tmplen, len - tmplen, "Path Time=%lf
", (double)totalTime); for(int i=0;i0){ - sprintf(buf+strlen(buf),"EP %d count=%d
", i, (int)epIdxCount[i]); + tmplen += snprintf(buf+tmplen, len - tmplen, "EP %d count=%d
", i, (int)epIdxCount[i]); } } for(int i=0;i0){ - sprintf(buf+strlen(buf), "Array %d count=%d
", i, (int)arrayIdxCount[i]); + tmplen += snprintf(buf+tmplen, len - tmplen, "Array %d count=%d
", i, (int)arrayIdxCount[i]); } } } diff --git a/src/ck-core/envelope.h b/src/ck-core/envelope.h index fa21e185d3..9a049e8d06 100644 --- a/src/ck-core/envelope.h +++ b/src/ck-core/envelope.h @@ -61,9 +61,8 @@ class PathHistoryEnvelope { void reset(); void print() const; /// Write a description of the path into the beginning of the provided buffer. The buffer ought to be large enough. - void printHTMLToString(char* buf) const{ - buf[0] = '\0'; - sprintf(buf+strlen(buf), "Path Time=%lf
Sender idx=%d", (double)totalTime, (int)sender_history_table_idx); + void printHTMLToString(char* buf, int len) const{ + snprintf(buf, len, "Path Time=%lf
Sender idx=%d", (double)totalTime, (int)sender_history_table_idx); } /// The number of available EP counts int getNumUsed() const; diff --git a/src/ck-core/modifyScheduler.C b/src/ck-core/modifyScheduler.C index ee982c939f..10d7fb458d 100644 --- a/src/ck-core/modifyScheduler.C +++ b/src/ck-core/modifyScheduler.C @@ -40,7 +40,7 @@ void CqsIncreasePriorityForEntryMethod(Queue q, const int entrymethod){ #if CMK_TRACE_ENABLED char traceStr[64]; - sprintf(traceStr, "Replacing %p in message queue with NULL", removedMsgPtr); + snprintf(traceStr, sizeof(traceStr), "Replacing %p in message queue with NULL", removedMsgPtr); traceUserSuppliedNote(traceStr); #endif } @@ -67,7 +67,7 @@ void CqsIncreasePriorityForMemCriticalEntries(Queue q){ #if CMK_TRACE_ENABLED char traceStr[64]; - sprintf(traceStr, "Replacing %p in message queue with NULL", removedMsgPtr); + snprintf(traceStr, sizeof(traceStr), "Replacing %p in message queue with NULL", removedMsgPtr); traceUserSuppliedNote(traceStr); #endif } diff --git a/src/ck-cp/controlPoints.h b/src/ck-cp/controlPoints.h index 0a5c8dfc05..fdf5e28c62 100644 --- a/src/ck-cp/controlPoints.h +++ b/src/ck-cp/controlPoints.h @@ -664,13 +664,16 @@ class simplexScheme { char s[2048]; s[0] = '\0'; for(std::set::iterator iter = simplexIndices.begin(); iter != simplexIndices.end(); ++iter){ - sprintf(s+strlen(s), "%d: ", *iter); + int slen = strlen(s); + snprintf(s+slen, sizeof(s)-slen, "%d: ", *iter); for(std::map::iterator citer = allData.phases[*iter]->controlPoints.begin(); citer != allData.phases[*iter]->controlPoints.end(); ++citer){ - sprintf(s+strlen(s), " %d", citer->second); + slen = strlen(s); + snprintf(s+slen, sizeof(s)-slen, " %d", citer->second); } - sprintf(s+strlen(s), "\n"); + slen = strlen(s); + snprintf(s+slen, sizeof(s)-slen, "\n"); } CkPrintf("Current simplex is:\n%s\n", s); } diff --git a/src/ck-cp/pathHistory.h b/src/ck-cp/pathHistory.h index 568262440e..4d73f2a24c 100644 --- a/src/ck-cp/pathHistory.h +++ b/src/ck-cp/pathHistory.h @@ -167,9 +167,8 @@ class MergeablePathHistory { } /// Write a description of the path into the beginning of the provided buffer. The buffer ought to be large enough. - void printHTMLToString(char* buf) const{ - buf[0] = '\0'; - sprintf(buf+strlen(buf), "MergeablePathHistory time=%lf send pe=%d idx=%d timeEntryStarted=%lf", (double)preceding_path_time, (int)sender_pe, (int)sender_history_table_idx, (double)timeEntryMethodStarted); + void printHTMLToString(char* buf, int len) const{ + snprintf(buf, len, "MergeablePathHistory time=%lf send pe=%d idx=%d timeEntryStarted=%lf", (double)preceding_path_time, (int)sender_pe, (int)sender_history_table_idx, (double)timeEntryMethodStarted); } void setDebug100(){ diff --git a/src/ck-ldb/CentralLB.C b/src/ck-ldb/CentralLB.C index 13fac19aa3..0fac4e8140 100644 --- a/src/ck-ldb/CentralLB.C +++ b/src/ck-ldb/CentralLB.C @@ -188,7 +188,7 @@ static int cpufreq_sysfs_write ( ) { char path[100]; -sprintf(path,"/sys/devices/system/cpu/cpu%d/cpufreq/scaling_setspeed",proc); +snprintf(path,sizeof(path),"/sys/devices/system/cpu/cpu%d/cpufreq/scaling_setspeed",proc); FILE *fd = fopen (path, "w"); if (!fd) { @@ -216,7 +216,7 @@ static int cpufreq_sysfs_read (int proc) FILE *fd; char path[100]; int i=proc; - sprintf(path,"/sys/devices/system/cpu/cpu%d/cpufreq/scaling_setspeed",i); + snprintf(path,sizeof(path),"/sys/devices/system/cpu/cpu%d/cpufreq/scaling_setspeed",i); fd = fopen (path, "r"); @@ -237,7 +237,7 @@ float CentralLB::getTemp(int cpu) char val[10]; FILE *f; char path[100]; - sprintf(path,"/sys/devices/platform/coretemp.%d/temp1_input",cpu); + snprintf(path,sizeof(path),"/sys/devices/platform/coretemp.%d/temp1_input",cpu); f=fopen(path,"r"); if (!f) { printf("777 FILE OPEN ERROR file=%s\n",path); @@ -1339,7 +1339,7 @@ void CentralLB::changeFreq(int nFreq) // if(procFreq[i]!=procFreqNew[i]) { char newfreq[10]; - sprintf(newfreq,"%d",nFreq); + snprintf(newfreq,sizeof(newfreq),"%d",nFreq); cpufreq_sysfs_write(newfreq,CkMyPe()%physicalCoresPerNode);//i%physicalCoresPerNode); // CkPrintf("PROC#%d freq changing from %d to %d temp=%f\n",i,procFreq[i],procFreqNew[i],procTemp[i]); } @@ -1429,7 +1429,7 @@ void CentralLB::simulationWrite() { // here we are supposed to dump the database int dumpFileSize = strlen(LBSimulation::dumpFile) + 4; char *dumpFileName = (char *)malloc(dumpFileSize); - while (sprintf(dumpFileName, "%s.%d", LBSimulation::dumpFile, LBSimulation::dumpStep) >= dumpFileSize) { + while (snprintf(dumpFileName, dumpFileSize, "%s.%d", LBSimulation::dumpFile, LBSimulation::dumpStep) >= dumpFileSize) { free(dumpFileName); dumpFileSize+=3; dumpFileName = (char *)malloc(dumpFileSize); @@ -1456,7 +1456,7 @@ void CentralLB::simulationRead() { // here we are supposed to read the data from the dump database int simFileSize = strlen(LBSimulation::dumpFile) + 4; char *simFileName = (char *)malloc(simFileSize); - while (sprintf(simFileName, "%s.%d", LBSimulation::dumpFile, LBSimulation::simStep) >= simFileSize) { + while (snprintf(simFileName, simFileSize, "%s.%d", LBSimulation::dumpFile, LBSimulation::simStep) >= simFileSize) { free(simFileName); simFileSize+=3; simFileName = (char *)malloc(simFileSize); diff --git a/src/ck-ldb/LBComm.C b/src/ck-ldb/LBComm.C index b06a119d47..8780202940 100644 --- a/src/ck-ldb/LBComm.C +++ b/src/ck-ldb/LBComm.C @@ -101,15 +101,16 @@ bool LBCommData::equal(const LBCommData &d2) const int LBCommData::compute_key() { - int kstring[80]; - char* kptr = (char*)((void*)(&(kstring[0]))); + char kstring[320]; + char* kptr = &kstring[0]; + int* kintarr = (int*)((void*)(&kstring[0])); int pcount; if (from_proc()) { - pcount = sprintf(kptr,"%d",src_proc); + pcount = snprintf(kptr,sizeof(kstring),"%d",src_proc); kptr += pcount; } else { - pcount = sprintf(kptr,"%d%" PRIu64 "",srcObj.omID().id.idx, + pcount = snprintf(kptr,sizeof(kstring),"%d%" PRIu64 "",srcObj.omID().id.idx, srcObj.id); kptr += pcount; } @@ -117,11 +118,11 @@ int LBCommData::compute_key() //CmiAssert(destObj.get_type() == LD_OBJ_MSG); switch (destObj.get_type()) { case LD_PROC_MSG: - pcount += sprintf(kptr,"%d", destObj.proc()); + pcount += snprintf(kptr, sizeof(kstring) - pcount, "%d", destObj.proc()); break; case LD_OBJ_MSG: { LDObjKey &destKey = destObj.get_destObj(); - pcount += sprintf(kptr,"%d%" PRIu64 "XXXXXXXX",destKey.omID().id.idx, + pcount += snprintf(kptr, sizeof(kstring) - pcount, "%d%" PRIu64 "XXXXXXXX",destKey.omID().id.idx, destKey.objID()); pcount -= 8; /* The 'X's insure that the next few bytes are fixed */ break; @@ -130,7 +131,7 @@ int LBCommData::compute_key() int len; const LDObjKey *destKeys = destObj.get_destObjs(len); CmiAssert(len>0); - pcount += sprintf(kptr,"%d%" PRIu64 "XXXXXXXX",destKeys[0].omID().id.idx, + pcount += snprintf(kptr, sizeof(kstring) - pcount, "%d%" PRIu64 "XXXXXXXX",destKeys[0].omID().id.idx, destKeys[0].objID()); pcount -= 8; /* The 'X's insure that the next few bytes are fixed */ break; @@ -138,8 +139,8 @@ int LBCommData::compute_key() } int k=-1; - for(int i=0; i < (pcount+3)/4; i++) - k ^= kstring[i]; + for(int i=0; i < (pcount+sizeof(int)-1)/sizeof(int); i++) + k ^= kintarr[i]; // CmiPrintf("New key %d, %s\n",k,kstring); diff --git a/src/ck-ldb/LBSimulation.C b/src/ck-ldb/LBSimulation.C index b6a12aee31..4b1cfc0f27 100644 --- a/src/ck-ldb/LBSimulation.C +++ b/src/ck-ldb/LBSimulation.C @@ -273,9 +273,9 @@ void LBSimulation::PrintSimulationResults() void LBSimulation::PrintDecisions(LBMigrateMsg *m, char *simFileName, int peCount) { - char *resultFile = (char *)malloc((strlen(simFileName) + - strlen("results") + 2)*sizeof(char)); - sprintf(resultFile,"%s.results", simFileName); + int len = (strlen(simFileName) + strlen("results") + 2)*sizeof(char); + char *resultFile = (char *)malloc(len); + snprintf(resultFile, len, "%s.results", simFileName); FILE *f = fopen(resultFile, "w"); fprintf(f, "%d %d\n", peCount, m->n_moves); // header for (int i=0; in_moves; i++) { diff --git a/src/ck-ldb/TempAwareRefineLB.C b/src/ck-ldb/TempAwareRefineLB.C index dd5c31cfeb..14d2a829ba 100644 --- a/src/ck-ldb/TempAwareRefineLB.C +++ b/src/ck-ldb/TempAwareRefineLB.C @@ -33,7 +33,7 @@ static int cpufreq_sysfs_write ( ) { char path[100]; -sprintf(path,"/sys/devices/system/cpu/cpu%d/cpufreq/scaling_setspeed",proc); +snprintf(path,sizeof(path),"/sys/devices/system/cpu/cpu%d/cpufreq/scaling_setspeed",proc); FILE *fd = fopen (path, "w"); if (!fd) { @@ -60,7 +60,7 @@ float TempAwareRefineLB::getTemp(int cpu) char val[10]; FILE *f; char path[100]; - sprintf(path,"/sys/devices/platform/coretemp.%d/temp1_input",cpu); + snprintf(path,sizeof(path),"/sys/devices/platform/coretemp.%d/temp1_input",cpu); f=fopen(path,"r"); if (!f) { printf("777 FILE OPEN ERROR file=%s\n",path); @@ -78,7 +78,7 @@ static int cpufreq_sysfs_read (int proc) FILE *fd; char path[100]; int i=proc; - sprintf(path,"/sys/devices/system/cpu/cpu%d/cpufreq/scaling_setspeed",i); + snprintf(path,sizeof(path),"/sys/devices/system/cpu/cpu%d/cpufreq/scaling_setspeed",i); fd = fopen (path, "r"); @@ -181,7 +181,7 @@ freqs[12] = 1333000; for(int i=0;iname); //if (check.compare(name_s) != 0) //{ - char name [500]; - sprintf(name, "%s::%s::%d", _chareTable[_entryTable[id]->chareIdx]->name, + char name[500]; + snprintf(name, sizeof(name), "%s::%s::%d", _chareTable[_entryTable[id]->chareIdx]->name, _entryTable[id]->name, id); //should this fuction be excluded from instrumentation? if (!instrumentEntity(name)) diff --git a/src/ck-perf/trace-common.C b/src/ck-perf/trace-common.C index 6c3ef3ce79..735c35ae5d 100644 --- a/src/ck-perf/trace-common.C +++ b/src/ck-perf/trace-common.C @@ -136,7 +136,7 @@ static void traceCommonInit(char **argv) char subdir[20]; if(CmiNumPartitions() > 1) { - sprintf(subdir, "prj.part%d%s", CmiMyPartition(), PATHSEPSTR); + snprintf(subdir, sizeof(subdir), "prj.part%d%s", CmiMyPartition(), PATHSEPSTR); } else { subdir[0]='\0'; } diff --git a/src/ck-perf/trace-counter.C b/src/ck-perf/trace-counter.C index 417dc335a8..c2c28aaf30 100644 --- a/src/ck-perf/trace-counter.C +++ b/src/ck-perf/trace-counter.C @@ -423,16 +423,16 @@ FILE* CountLogPool::openFile(int phase) { const static int strSize = 10; char pestr[strSize+1]; char phasestr[strSize+1]; - snprintf(pestr, strSize, "%d", CmiMyPe()); + snprintf(pestr, sizeof(pestr), "%d", CmiMyPe()); pestr[strSize] = '\0'; int len = strlen(CpvAccess(_logName)) + strlen("phase.count.") + 2*strSize + 1; char* fname = new char[len+1]; _MEMCHECK(fname); if (phase >= 0) { - snprintf(phasestr, strSize, "%d", phase); + snprintf(phasestr, sizeof(phasestr), "%d", phase); phasestr[strSize] = '\0'; - sprintf(fname, "%s.phase%s.%s.count", CpvAccess(_logName), phasestr, pestr); + snprintf(fname, len+1, "%s.phase%s.%s.count", CpvAccess(_logName), phasestr, pestr); } - else { sprintf(fname, "%s.%s.count", CpvAccess(_logName), pestr); } + else { snprintf(fname, len+1, "%s.%s.count", CpvAccess(_logName), pestr); } FILE* fp = NULL; DEBUGF(("%d/%d DEBUG: TRACE: %s:%d\n", CmiMyPe(), CmiNumPes(), fname, errno)); do { @@ -471,16 +471,16 @@ void CountLogPool::writeSts(int phase) char phasestr[strSize+1]; int _numEntries=_entryTable.size(); // add strSize for phase number - char *fname = - new char[strlen(CpvAccess(_logName))+strlen(".count.sts")+strSize]; + int len = strlen(CpvAccess(_logName))+strlen(".count.sts")+strSize; + char *fname = new char[len]; _MEMCHECK(fname); if (phase < 0 && lastPhase_ >= 0) { phase = lastPhase_; } if (phase >= 0) { - snprintf(phasestr, strSize, "%d", phase); + snprintf(phasestr, sizeof(phasestr), "%d", phase); phasestr[strSize] = '\0'; - sprintf(fname, "%s.phase%s.count.sts", CpvAccess(_logName), phasestr); + snprintf(fname, len, "%s.phase%s.count.sts", CpvAccess(_logName), phasestr); } - else { sprintf(fname, "%s.count.sts", CpvAccess(_logName)); } + else { snprintf(fname, len, "%s.count.sts", CpvAccess(_logName)); } FILE *sts = fopen(fname, "w+"); // DEBUGF(("%d/%d DEBUG: File: %s \n", CmiMyPe(), CmiNumPes(), fname)); if(sts==0) @@ -1205,7 +1205,7 @@ void TraceCounter::printHelp() // create a format so that all the str line up char format[64]; - snprintf(format, 64, " %%2d %%-%ds %%s\n", argStrSize_); + snprintf(format, sizeof(format), " %%2d %%-%ds %%s\n", argStrSize_); CounterArg* help = firstArg_; while (help != NULL) { diff --git a/src/ck-perf/trace-memory.C b/src/ck-perf/trace-memory.C index e5761f06c0..6c6f78f84d 100644 --- a/src/ck-perf/trace-memory.C +++ b/src/ck-perf/trace-memory.C @@ -76,7 +76,7 @@ inline void TraceMemory::flush() { firstTime = false; // flushing the logs char fname[1024]; - sprintf(fname, "memoryLog_%d", CkMyPe()); + snprintf(fname, sizeof(fname), "memoryLog_%d", CkMyPe()); FILE *fp; do { fp = fopen(fname, mode); diff --git a/src/ck-perf/trace-projections.C b/src/ck-perf/trace-projections.C index b429ad8a0d..81994db572 100644 --- a/src/ck-perf/trace-projections.C +++ b/src/ck-perf/trace-projections.C @@ -207,21 +207,23 @@ void LogPool::createFile(const char *fix) } char* filenameLastPart = strrchr(pgmname, PATHSEP) + 1; // Last occurrence of path separator - char *pathPlusFilePrefix = new char[1024]; + static constexpr int pathPlusFilePrefixLen = 1024; + char *pathPlusFilePrefix = new char[pathPlusFilePrefixLen]; if(nSubdirs > 0){ int sd = CkMyPe() % nSubdirs; - char *subdir = new char[1024]; - sprintf(subdir, "%s.projdir.%d", pgmname, sd); + static constexpr int subdirLen = 1024; + char *subdir = new char[subdirLen]; + snprintf(subdir, subdirLen, "%s.projdir.%d", pgmname, sd); CmiMkdir(subdir); - sprintf(pathPlusFilePrefix, "%s%c%s%s", subdir, PATHSEP, filenameLastPart, fix); + snprintf(pathPlusFilePrefix, pathPlusFilePrefixLen, "%s%c%s%s", subdir, PATHSEP, filenameLastPart, fix); delete[] subdir; } else { - sprintf(pathPlusFilePrefix, "%s%s", pgmname, fix); + snprintf(pathPlusFilePrefix, pathPlusFilePrefixLen, "%s%s", pgmname, fix); } char pestr[10]; - sprintf(pestr, "%d", CkMyPe()); + snprintf(pestr, sizeof(pestr), "%d", CkMyPe()); #if CMK_USE_ZLIB int len; if(compressed) @@ -235,13 +237,13 @@ void LogPool::createFile(const char *fix) fname = new char[len]; #if CMK_USE_ZLIB if(compressed) { - sprintf(fname, "%s.%s.log.gz", pathPlusFilePrefix,pestr); + snprintf(fname, len, "%s.%s.log.gz", pathPlusFilePrefix,pestr); } else { - sprintf(fname, "%s.%s.log", pathPlusFilePrefix, pestr); + snprintf(fname, len, "%s.%s.log", pathPlusFilePrefix, pestr); } #else - sprintf(fname, "%s.%s.log", pathPlusFilePrefix, pestr); + snprintf(fname, len, "%s.%s.log", pathPlusFilePrefix, pestr); #endif fileCreated = true; delete[] pathPlusFilePrefix; @@ -257,8 +259,9 @@ void LogPool::createSts(const char *fix) } // create the sts file - char *fname = new char[strlen(CkpvAccess(traceRoot))+strlen(fix)+strlen(".sts")+2]; - sprintf(fname, "%s%s.sts", CkpvAccess(traceRoot), fix); + int len = strlen(CkpvAccess(traceRoot))+strlen(fix)+strlen(".sts")+2; + char *fname = new char[len]; + snprintf(fname, len, "%s%s.sts", CkpvAccess(traceRoot), fix); do { stsfp = fopen(fname, "w"); @@ -273,9 +276,10 @@ void LogPool::createSts(const char *fix) void LogPool::createRC() { // create the projections rc file. + int len = strlen(CkpvAccess(traceRoot))+strlen(".projrc")+1; fname = - new char[strlen(CkpvAccess(traceRoot))+strlen(".projrc")+1]; - sprintf(fname, "%s.projrc", CkpvAccess(traceRoot)); + new char[len]; + snprintf(fname, len, "%s.projrc", CkpvAccess(traceRoot)); do { rcfp = fopen(fname, "w"); } while (!rcfp && (errno == EINTR || errno == EMFILE)); @@ -460,8 +464,9 @@ void LogPool::writeStatis(void) { // create the statis file - char *fname = new char[strlen(CkpvAccess(traceRoot))+strlen(".statis")+10]; - sprintf(fname, "%s.%d.statis", CkpvAccess(traceRoot), CkMyPe()); + int len = strlen(CkpvAccess(traceRoot))+strlen(".statis")+10; + char *fname = new char[len]; + snprintf(fname, len, "%s.%d.statis", CkpvAccess(traceRoot), CkMyPe()); do { statisfp = fopen(fname, "w"); diff --git a/src/ck-perf/trace-projector.C b/src/ck-perf/trace-projector.C index f28ed63d80..4fe378003f 100644 --- a/src/ck-perf/trace-projector.C +++ b/src/ck-perf/trace-projector.C @@ -76,8 +76,9 @@ void TraceProjector::traceClearEps(void) extern "C" void writeSts(){ FILE *stsfp; - char *fname = new char[strlen(CkpvAccess(traceRoot))+strlen(".sts")+1]; - sprintf(fname, "%s.sts", CkpvAccess(traceRoot)); + int len = strlen(CkpvAccess(traceRoot))+strlen(".sts")+1; + char *fname = new char[len]; + snprintf(fname, len, "%s.sts", CkpvAccess(traceRoot)); do{ stsfp = fopen(fname, "w"); } while (!stsfp && (errno == EINTR || errno == EMFILE)); diff --git a/src/ck-perf/trace-summary.C b/src/ck-perf/trace-summary.C index 983e2488e2..2ca7e6325e 100644 --- a/src/ck-perf/trace-summary.C +++ b/src/ck-perf/trace-summary.C @@ -307,11 +307,11 @@ void SumLogPool::write(void) // CmiPrintf("TRACE: %s:%d\n", fname, errno); if (!sumonly) { char pestr[10]; - sprintf(pestr, "%d", CkMyPe()); + snprintf(pestr, sizeof(pestr), "%d", CkMyPe()); int len = strlen(pgm) + strlen(".sumd.") + strlen(pestr) + 1; char *fname = new char[len+1]; - sprintf(fname, "%s.%s.sum", pgm, pestr); + snprintf(fname, len+1, "%s.%s.sum", pgm, pestr); do { fp = fopen(fname, "w+"); } while (!fp && errno == EINTR); @@ -321,7 +321,7 @@ void SumLogPool::write(void) } if (sumDetail) { - sprintf(fname, "%s.%s.sumd", pgm, pestr); + snprintf(fname, len+1, "%s.%s.sumd", pgm, pestr); do { sdfp = fopen(fname, "w+"); } while (!sdfp && errno == EINTR); @@ -482,9 +482,10 @@ void SumLogPool::write(void) void SumLogPool::writeSts(void) { // open sts file + int len = strlen(CkpvAccess(traceRoot))+strlen(".sum.sts")+1; char *fname = - new char[strlen(CkpvAccess(traceRoot))+strlen(".sum.sts")+1]; - sprintf(fname, "%s.sum.sts", CkpvAccess(traceRoot)); + new char[len]; + snprintf(fname, len, "%s.sum.sts", CkpvAccess(traceRoot)); stsfp = fopen(fname, "w+"); //CmiPrintf("File: %s \n", fname); if (stsfp == 0) { @@ -1002,8 +1003,9 @@ void TraceSummaryBOC::sumData(double *sumData, int totalsize) { UInt epNums = CkpvAccess(_trace)->pool()->getEpInfoSize(); UInt numBins = totalsize/epNums; int numEntries = epNums - NUM_DUMMY_EPS - 1; - char *fname = new char[strlen(CkpvAccess(traceRoot))+strlen(".sumall")+1]; - sprintf(fname, "%s.sumall", CkpvAccess(traceRoot)); + int len = strlen(CkpvAccess(traceRoot))+strlen(".sumall")+1; + char *fname = new char[len]; + snprintf(fname, len, "%s.sumall", CkpvAccess(traceRoot)); FILE *sumfp = fopen(fname, "w+"); delete [] fname; fprintf(sumfp, "ver:%3.1f cpu:%d numIntervals:%d numEPs:%d intervalSize:%e\n", @@ -1241,8 +1243,9 @@ void TraceSummaryBOC::write(void) { unsigned int j; - char *fname = new char[strlen(CkpvAccess(traceRoot))+strlen(".sum")+1]; - sprintf(fname, "%s.sum", CkpvAccess(traceRoot)); + int len = strlen(CkpvAccess(traceRoot))+strlen(".sum")+1; + char *fname = new char[len]; + snprintf(fname, len, "%s.sum", CkpvAccess(traceRoot)); FILE *sumfp = fopen(fname, "w+"); //CmiPrintf("File: %s \n", fname); if(sumfp == 0) diff --git a/src/ck-perf/trace-utilization.C b/src/ck-perf/trace-utilization.C index 6d8850b725..b9da380bdc 100644 --- a/src/ck-perf/trace-utilization.C +++ b/src/ck-perf/trace-utilization.C @@ -196,8 +196,9 @@ void TraceUtilizationBOC::sumDetailDataCollected(CkReductionMsg *msg) { void TraceUtilization::writeSts(void) { // open sts file - char *fname = new char[strlen(CkpvAccess(traceRoot))+strlen(".util.sts")+1]; - sprintf(fname, "%s.util.sts", CkpvAccess(traceRoot)); + int len = strlen(CkpvAccess(traceRoot))+strlen(".util.sts")+1; + char *fname = new char[len]; + snprintf(fname, len, "%s.util.sts", CkpvAccess(traceRoot)); FILE* stsfp = fopen(fname, "w+"); if (stsfp == 0) { CmiAbort("Cannot open summary sts file for writing.\n"); diff --git a/src/ck-pics/picsautoperf.C b/src/ck-pics/picsautoperf.C index 96d651246f..5e0fbd6860 100644 --- a/src/ck-pics/picsautoperf.C +++ b/src/ck-pics/picsautoperf.C @@ -670,7 +670,7 @@ TraceAutoPerfBOC::TraceAutoPerfBOC() { //--------- Projections output if(CkpvAccess(myParent)==-1){ char filename[50]; - sprintf(filename, "output.%d.pics", CkMyPe()); + snprintf(filename, sizeof(filename), "output.%d.pics", CkMyPe()); if(CkMyPe()==0) CkpvAccess(fpSummary) = fopen(filename, "w+"); else if(PICS_collection_mode == FULL) diff --git a/src/conv-ccs/ccs-builtins.C b/src/conv-ccs/ccs-builtins.C index e5bf5bddca..a2059a565b 100644 --- a/src/conv-ccs/ccs-builtins.C +++ b/src/conv-ccs/ccs-builtins.C @@ -212,7 +212,7 @@ static void CpdList_ccs_list_items_txt(char *msg) } char *buf=new char[bufLen]; { - PUP::toText p(buf); pupCpd(p,acc,req); + PUP::toText p(buf, bufLen); pupCpd(p,acc,req); if (p.size()!=bufLen) CmiError("ERROR! Sizing/packing length mismatch for %s list pup function!\n", acc->getPath()); @@ -438,14 +438,15 @@ static void CWeb_Deliver(void) if (hasApplet) { WEBDEBUG(("CWeb_Deliver to applet\n")); /*Send the performance data off to the applet*/ - char *reply=(char *)malloc(6+14*CmiNumPes()*CWebNoOfFns); - sprintf(reply,"perf"); + int reply_len = 6+14+CmiNumPes()*CWebNoOfFns; + char *reply=(char *)malloc(reply_len); + snprintf(reply,reply_len,"perf"); for(i=0; iperfData[j]); + snprintf(buf,sizeof(buf)," %d",collectedValues[i]->perfData[j]); strcat(reply,buf); } } diff --git a/src/conv-ccs/ccs-client.C b/src/conv-ccs/ccs-client.C index f0f63b33b5..e0395ed44f 100644 --- a/src/conv-ccs/ccs-client.C +++ b/src/conv-ccs/ccs-client.C @@ -68,7 +68,7 @@ static void printSvr(CcsServer *svr) { char ipBuf[200]; int i; - DEBUGF(("hostIP: %s\n", skt_print_ip(ipBuf,svr->hostIP))); + DEBUGF(("hostIP: %s\n", skt_print_ip(ipBuf,sizeof(ipBuf),svr->hostIP))); DEBUGF(("hostPort: %d\n", svr->hostPort)); DEBUGF(("authentication: %d\n", svr->isAuth)); DEBUGF(("replyFd: %d\n", svr->replyFd)); diff --git a/src/conv-ccs/ccs-server.C b/src/conv-ccs/ccs-server.C index 089c9bc0d2..760b989d83 100644 --- a/src/conv-ccs/ccs-server.C +++ b/src/conv-ccs/ccs-server.C @@ -301,7 +301,7 @@ static CcsSecMan *CcsSecMan_default(const char *authFile) authFile); exit(1); } - while (NULL!=fgets(line,200,secFile)) { + while (NULL!=fgets(line,sizeof(line),secFile)) { int level; char key[200]; /*Secret key, in ASCII hex*/ int nItems=sscanf(line,"%d%s",&level,key); @@ -353,7 +353,7 @@ void CcsServer_new(skt_ip_t *ret_ip,int *use_port,const char *authFile) ip=skt_my_ip(); ccs_server_fd=skt_server(&port); printf("ccs: %s\nccs: Server IP = %s, Server port = %u $\n", - CMK_CCS_VERSION, skt_print_ip(ip_str,ip), port); + CMK_CCS_VERSION, skt_print_ip(ip_str,sizeof(ip_str),ip), port); fflush(stdout); if (ret_ip!=NULL) *ret_ip=ip; if (use_port!=NULL) *use_port=port; @@ -421,14 +421,14 @@ int CcsServer_recvRequest(CcsImplHeader *hdr,void **reqData) CCSDBG(("CCS Receiving connection...\n")); fd=skt_accept(ccs_server_fd,&ip,&port); - CCSDBG(("CCS Connected to IP=%s, port=%d...\n",skt_print_ip(ip_str,ip),port)); + CCSDBG(("CCS Connected to IP=%s, port=%d...\n",skt_print_ip(ip_str,sizeof(ip_str),ip),port)); hdr->attr.ip=ip; hdr->attr.port=ChMessageInt_new(port); if (0==CcsServer_recvRequestData(fd,hdr,reqData)) { fprintf(stdout,"During CCS Client IP:port (%s:%d) processing.\n", - skt_print_ip(ip_str,ip), + skt_print_ip(ip_str,sizeof(ip_str),ip), port); skt_close(fd); ret=0; @@ -547,7 +547,7 @@ void print_fw_handler(char *msg) { void print_node0(const char *format, va_list args) { char buffer[MAX_PRINT_BUF_SIZE]; int len; - if ((len=vsnprintf(buffer, MAX_PRINT_BUF_SIZE, format, args)) >= MAX_PRINT_BUF_SIZE) CmiAbort("CmiPrintf: printing buffer too long\n"); + if ((len=vsnprintf(buffer, sizeof(buffer), format, args)) >= MAX_PRINT_BUF_SIZE) CmiAbort("CmiPrintf: printing buffer too long\n"); if (CmiMyPe() == 0) { /* We are the print server, just concatenate the printed string */ write_stdio_duplicate(buffer); diff --git a/src/conv-core/conv-taskQ.C b/src/conv-core/conv-taskQ.C index 47d2815906..315eb8bcd2 100644 --- a/src/conv-core/conv-taskQ.C +++ b/src/conv-core/conv-taskQ.C @@ -9,7 +9,7 @@ extern "C" void StealTask() { ++random_rank; #if CMK_TRACE_ENABLED char s[10]; - sprintf( s, "%d", random_rank ); + snprintf( s, sizeof(s), "%d", random_rank ); traceUserSuppliedBracketedNote(s, TASKQ_QUEUE_STEAL_EVENTID, _start, CmiWallTimer()); #endif void* msg = TaskQueueSteal((TaskQueue)CpvAccessOther(CsdTaskQueue, random_rank)); diff --git a/src/conv-core/cpuaffinity.C b/src/conv-core/cpuaffinity.C index 8bf914c97a..27267a7262 100644 --- a/src/conv-core/cpuaffinity.C +++ b/src/conv-core/cpuaffinity.C @@ -1309,9 +1309,9 @@ void CmiInitCPUAffinityUtil(void){ CpvInitialize(void *, myProcStatFP); CmiLock(_smp_mutex); #if CMK_SMP - sprintf(fname, "/proc/%d/task/%ld/stat", getpid(), syscall(SYS_gettid)); + snprintf(fname, sizeof(fname), "/proc/%d/task/%ld/stat", getpid(), syscall(SYS_gettid)); #else - sprintf(fname, "/proc/%d/stat", getpid()); + snprintf(fname, sizeof(fname), "/proc/%d/stat", getpid()); #endif CpvAccess(myProcStatFP) = (void *)fopen(fname, "r"); CmiUnlock(_smp_mutex); diff --git a/src/conv-core/isomalloc.C b/src/conv-core/isomalloc.C index a9556c7b81..674bca40d8 100644 --- a/src/conv-core/isomalloc.C +++ b/src/conv-core/isomalloc.C @@ -647,7 +647,7 @@ static int try_largest_mmap_region(memRegion_t * destRegion) pid_t pid = getpid(); { char s[128]; - sprintf(s, "cat /proc/%d/maps", pid); + snprintf(s, sizeof(s), "cat /proc/%d/maps", pid); system(s); } #endif diff --git a/src/conv-core/memory-charmdebug.C b/src/conv-core/memory-charmdebug.C index e5e10429cb..45daae6e3d 100644 --- a/src/conv-core/memory-charmdebug.C +++ b/src/conv-core/memory-charmdebug.C @@ -671,7 +671,7 @@ AllocationPoint * CreateAllocationTree(int *nodesCount) { } SLOT_ITERATE_END - sprintf(filename, "allocationTree_%d", CmiMyPe()); + snprintf(filename, sizeof(filename), "allocationTree_%d", CmiMyPe()); fd = fopen(filename, "w"); fprintf(fd, "digraph %s {\n", filename); it = CkHashtableGetIterator(table); @@ -692,7 +692,7 @@ AllocationPoint * CreateAllocationTree(int *nodesCount) { fprintf(fd, "}\n"); fclose(fd); - sprintf(filename, "allocationTree_%d.tree", CmiMyPe()); + snprintf(filename, sizeof(filename), "allocationTree_%d.tree", CmiMyPe()); fd = fopen(filename, "w"); printAllocationTree(root, fd, 0); fclose(fd); @@ -1381,7 +1381,7 @@ static void meta_init(char **argv) { if (CmiMyRank()==0) { char buf[100]; status("Converse -memory mode: charmdebug\n"); - sprintf(buf, "slot size %d\n", (int)sizeof(Slot)); + snprintf(buf, sizeof(buf), "slot size %d\n", (int)sizeof(Slot)); status(buf); CmiMemoryIs_flag|=CMI_MEMORY_IS_CHARMDEBUG; cpdInitializeMemory = 0; diff --git a/src/conv-core/memory-record.C b/src/conv-core/memory-record.C index c5df2cf1f0..901e2bf23f 100644 --- a/src/conv-core/memory-record.C +++ b/src/conv-core/memory-record.C @@ -74,7 +74,7 @@ static void meta_init(char **argv) const int mype = CmiMyPe(); char outputname[64]; - sprintf(outputname, "heap-replay-%d.cpp", mype); + snprintf(outputname, sizeof(outputname), "heap-replay-%d.cpp", mype); FILE * output = fopen(outputname, "w"); if (output == nullptr) CmiAbort("Could not open heap-replay-%d.cpp!", mype); diff --git a/src/conv-core/memory.C b/src/conv-core/memory.C index 48f87d3da8..cfec42c97e 100644 --- a/src/conv-core/memory.C +++ b/src/conv-core/memory.C @@ -651,7 +651,7 @@ INLINE static CMK_TYPEDEF_UINT8 MemusagePS(void){ CMK_TYPEDEF_UINT8 vsz=0; FILE *p; int ret; - sprintf(pscmd, "/bin/ps -o vsz= -p %d", getpid()); + snprintf(pscmd, sizeof(pscmd), "/bin/ps -o vsz= -p %d", getpid()); p = popen(pscmd, "r"); if(p){ ret = fscanf(p, "%" PRIu64, &vsz); diff --git a/src/conv-core/shmem/cmishm.C b/src/conv-core/shmem/cmishm.C index 7d76dfcf12..89c0c30567 100644 --- a/src/conv-core/shmem/cmishm.C +++ b/src/conv-core/shmem/cmishm.C @@ -37,7 +37,7 @@ static std::pair openShared_(int node) { // generate a name for this pe auto slen = snprintf(NULL, 0, CMI_SHARED_FMT, (std::size_t)CsvAccess(node_pid), node); auto name = new char[slen]; - sprintf(name, CMI_SHARED_FMT, (std::size_t)CsvAccess(node_pid), node); + snprintf(name, slen, CMI_SHARED_FMT, (std::size_t)CsvAccess(node_pid), node); DEBUGP(("%d> opening share %s\n", CmiMyPe(), name)); // try opening the share exclusively auto fd = shm_open(name, O_CREAT | O_EXCL | O_RDWR, 0666); @@ -90,7 +90,7 @@ struct CmiIpcManager : public ipc_metadata_ { auto slen = snprintf(NULL, 0, CMI_SHARED_FMT, (std::size_t)CsvAccess(node_pid), proc); auto name = new char[slen]; - sprintf(name, CMI_SHARED_FMT, (std::size_t)CsvAccess(node_pid), proc); + snprintf(name, slen, CMI_SHARED_FMT, (std::size_t)CsvAccess(node_pid), proc); shm_unlink(name); delete[] name; } diff --git a/src/conv-core/threads.C b/src/conv-core/threads.C index 8c5f079c71..a0d13b4e0c 100644 --- a/src/conv-core/threads.C +++ b/src/conv-core/threads.C @@ -264,7 +264,7 @@ int CthAliasCreate(int stackSize) char tmpName[128]; char lastByte=0; int fd; - sprintf(tmpName,"/tmp/charmThreadStackXXXXXX"); + snprintf(tmpName,sizeof(tmpName),"/tmp/charmThreadStackXXXXXX"); fd=mkstemp(tmpName); if (fd==-1) CmiAbort("threads.C> Cannot create /tmp file to contain thread stack"); unlink(tmpName); /* delete file when it gets closed */ diff --git a/src/conv-ldb/cldb.neighbor.C b/src/conv-ldb/cldb.neighbor.C index 9ad669f8fe..7fadcbf8bc 100644 --- a/src/conv-ldb/cldb.neighbor.C +++ b/src/conv-ldb/cldb.neighbor.C @@ -550,7 +550,7 @@ void CldReadNeighborData(void) if (CmiNumPes() <= 1) return; - sprintf(filename, "graph%d/graph%d", CmiNumPes(), CmiMyPe()); + snprintf(filename, sizeof(filename), "graph%d/graph%d", CmiNumPes(), CmiMyPe()); if ((fp = fopen(filename, "r")) == 0) { CmiError("Error opening graph init file on PE: %d\n", CmiMyPe()); diff --git a/src/conv-ldb/generate.C b/src/conv-ldb/generate.C index 9c82728c10..0a94791b41 100644 --- a/src/conv-ldb/generate.C +++ b/src/conv-ldb/generate.C @@ -64,8 +64,8 @@ void gengraph(int numVertices, int numConnections, int pseed, int *pes, int *npe /* make a directory */ if (tofile && CmiMyPe() == 0) { - sprintf(dirname, "graph%d", globalNumVertices); - sprintf(dircmd, "mkdir %s", dirname); + snprintf(dirname, sizeof(dirname), "graph%d", globalNumVertices); + snprintf(dircmd, sizeof(dircmd), "mkdir %s", dirname); if (system(dircmd) == -1) { CmiAbort("CLD> call to system() failed!"); } @@ -447,7 +447,7 @@ static void printOut(VerticesListType *vertices) for (i=0; inumVertices; i++) { /* Open graphN/graphi */ - sprintf(filename, "graph%d/graph%d", vertices->numVertices, i); + snprintf(filename, sizeof(filename), "graph%d/graph%d", vertices->numVertices, i); fp = fopen(filename, "w"); fprintf(fp, "%d ", vertexRecs[i].degree); for (j=0; jthisIndex,ptr->getMyPe()); + snprintf(name,MPI_MAX_PROCESSOR_NAME,"AMPI_RANK[%d]_WTH[%d]",ptr->thisIndex,ptr->getMyPe()); *resultlen = strlen(name); return MPI_SUCCESS; } diff --git a/src/libs/ck-libs/ckloop/CkLoop.C b/src/libs/ck-libs/ckloop/CkLoop.C index 5f424c8cee..6a2094f3ab 100644 --- a/src/libs/ck-libs/ckloop/CkLoop.C +++ b/src/libs/ck-libs/ckloop/CkLoop.C @@ -41,7 +41,7 @@ static volatile int exitFlag = 0; static int HelperOnCore() { #if CMK_OS_IS_LINUX char fname[64]; - sprintf(fname, "/proc/%d/task/%ld/stat", getpid(), syscall(SYS_gettid)); + snprintf(fname, sizeof(fname), "/proc/%d/task/%ld/stat", getpid(), syscall(SYS_gettid)); FILE *ifp = fopen(fname, "r"); if (ifp == NULL) return -1; fseek(ifp, 0, SEEK_SET); diff --git a/src/libs/ck-libs/collide/collidecharm.C b/src/libs/ck-libs/collide/collidecharm.C index 467e50fa88..68b4440579 100644 --- a/src/libs/ck-libs/collide/collidecharm.C +++ b/src/libs/ck-libs/collide/collidecharm.C @@ -12,7 +12,7 @@ # define CM_STATUS(x) ckout<<"["< "< "<dumpString()); //} else { diff --git a/src/libs/ck-libs/pose/eventID.h b/src/libs/ck-libs/pose/eventID.h index 6123f939dd..7c1d7dca72 100644 --- a/src/libs/ck-libs/pose/eventID.h +++ b/src/libs/ck-libs/pose/eventID.h @@ -6,10 +6,6 @@ #include "charm++.h" #include "limits.h" -#if defined(_WIN32) && defined(_MSC_VER) && _MSC_VER < 1500 -#define snprintf _snprintf -#endif - /// Unique identifier for a POSE event class eventID { @@ -72,7 +68,6 @@ class eventID CmiAssert((pe >= 0) && (pe < CkNumPes())); CkPrintf("%d.%d", id, pe); } - inline char *sdump(char *s) { sprintf(s, "%d.%d", id, pe); return s;} inline char *sndump(char *s,size_t n) { snprintf(s,n,"%d.%d", id, pe); return s;} /// Pack/unpack/sizing operator inline void pup(class PUP::er &p) { p(id); p(pe); } diff --git a/src/libs/ck-libs/pose/evq.C b/src/libs/ck-libs/pose/evq.C index a0e78311a1..baecf01fd9 100644 --- a/src/libs/ck-libs/pose/evq.C +++ b/src/libs/ck-libs/pose/evq.C @@ -483,7 +483,7 @@ char *eventQueue::dumpString() { #if USE_LONG_TIMESTAMPS snprintf(tempStr, PVT_DEBUG_BUFFER_LINE_LENGTH, "%lld[%u.%d.%d]", e->timestamp, e->evID.id, e->evID.getPE(), e->done); #else - sprintf(tempStr, PVT_DEBUG_BUFFER_LINE_LENGTH, "%d[%u.%d.%d]", e->timestamp, e->evID.id, e->evID.getPE(), e->done); + snprintf(tempStr, PVT_DEBUG_BUFFER_LINE_LENGTH, "%d[%u.%d.%d]", e->timestamp, e->evID.id, e->evID.getPE(), e->done); #endif strncat(str, tempStr, 32); diff --git a/src/libs/ck-libs/pose/pose.C b/src/libs/ck-libs/pose/pose.C index 1b9b51cecb..8cd389eff8 100644 --- a/src/libs/ck-libs/pose/pose.C +++ b/src/libs/ck-libs/pose/pose.C @@ -60,12 +60,12 @@ void POSE_init(int IDflag, int ET) // can specify both CkPrintf("POSE DOP analysis enabled...deleting dop log files...\n"); char fName[32]; for (int i = 0; i < CkNumPes(); i++) { - sprintf(fName, "dop%d.log", i); + snprintf(fName, sizeof(fName), "dop%d.log", i); unlink(fName); } - sprintf(fName, "dop_mod.out"); + snprintf(fName, sizeof(fName), "dop_mod.out"); unlink(fName); - sprintf(fName, "dop_sim.out"); + snprintf(fName, sizeof(fName), "dop_sim.out"); unlink(fName); } POSE_inactDetect = IDflag; diff --git a/src/libs/ck-libs/pose/stats.C b/src/libs/ck-libs/pose/stats.C index 86ca21dcdf..c0c70f5f7e 100644 --- a/src/libs/ck-libs/pose/stats.C +++ b/src/libs/ck-libs/pose/stats.C @@ -189,7 +189,7 @@ void globalStat::DOPcalc(POSE_TimeType gvt, double grt) for (i=0; i vp %d, p %d]",(void *)tc,tc->getElement(),CkMyPe()); + if (tc==NULL) snprintf(where,sizeof(where),"[serial context on %d]",CkMyPe()); + else snprintf(where,sizeof(where),"[%p> vp %d, p %d]",(void *)tc,tc->getElement(),CkMyPe()); CmiPrintf("%s Called routine %s\n",where,routineName); CmiPrintStackTrace(1); CmiPrintf("\n"); diff --git a/src/util/charmrun-src/charmrun.C b/src/util/charmrun-src/charmrun.C index 908fc62f20..313ac05e98 100644 --- a/src/util/charmrun-src/charmrun.C +++ b/src/util/charmrun-src/charmrun.C @@ -147,7 +147,7 @@ static const char *mylogin(void) char cmd[16]; char uname[64]; FILE *p; - sprintf(cmd, "id -u -n"); + snprintf(cmd, sizeof(cmd), "id -u -n"); p = popen(cmd, "r"); if (p) { if (fscanf(p, "%63s", uname) != 1) { @@ -200,7 +200,7 @@ static char *pathfix(const char *path, pathfixlist fixes) char *offs = strstr(buffer, l->s1); if (offs) { offs[0] = 0; - sprintf(buf2, "%s%s%s", buffer, l->s2, offs + len); + snprintf(buf2, sizeof(buf2), "%s%s%s", buffer, l->s2, offs + len); strcpy(buffer, buf2); mod = 1; } @@ -336,7 +336,7 @@ static char *getenv_display() if (p == 0) return NULL; if ((e[0] == ':') || (strncmp(e, "unix:", 5) == 0)) { - sprintf(result, "%s:%s", skt_print_ip(ipBuf, skt_my_ip()), p + 1); + snprintf(result, sizeof(result), "%s:%s", skt_print_ip(ipBuf, 200, skt_my_ip()), p + 1); } else strcpy(result, e); return result; @@ -526,15 +526,15 @@ static const char *pparam_getdef(ppdef def) static char result[100]; switch (def->type) { case 'i': - sprintf(result, "%d", *def->where.i); + snprintf(result, sizeof(result), "%d", *def->where.i); return result; case 'r': - sprintf(result, "%f", *def->where.r); + snprintf(result, sizeof(result), "%f", *def->where.r); return result; case 's': return *def->where.s ? *def->where.s : ""; case 'f': - sprintf(result, *def->where.f ? "true" : "false"); + snprintf(result, sizeof(result), *def->where.f ? "true" : "false"); return result; } return NULL; @@ -589,7 +589,7 @@ static int pparam_parseopt() } /* handle + by itself - an error */ if (opt[1] == 0) { - sprintf(pparam_error, "Illegal option +\n"); + snprintf(pparam_error, sizeof(pparam_error), "Illegal option +\n"); return -1; } /* look up option definition */ @@ -606,7 +606,7 @@ static int pparam_parseopt() } if (deffind.def == nullptr) { if (opt[1] == '+') { - sprintf(pparam_error, "Option %s not recognized.", opt); + snprintf(pparam_error, sizeof(pparam_error), "Option %s not recognized.", opt); return -1; } else { /*Unrecognized single '+' option-- skip it.*/ @@ -617,7 +617,7 @@ static int pparam_parseopt() auto def = deffind.def; /* handle flag-options */ if ((def->type == 'f') && (opt[1] != '+') && (opt[2] != '\0')) { - sprintf(pparam_error, "Option %s should not include a value", opt); + snprintf(pparam_error, sizeof(pparam_error), "Option %s should not include a value", opt); return -1; } if (def->type == 'f') { @@ -633,13 +633,13 @@ static int pparam_parseopt() } else opt += 2; if ((opt == nullptr) || (opt[0] == '\0')) { - sprintf(pparam_error, "%s must be followed by a value.", optname); + snprintf(pparam_error, sizeof(pparam_error), "%s must be followed by a value.", optname); return -1; } int ok = pparam_setdef(def, opt); pparam_delarg(pparam_pos); if (ok < 0) { - sprintf(pparam_error, "Illegal value for %s", optname); + snprintf(pparam_error, sizeof(pparam_error), "Illegal value for %s", optname); return -1; } return 0; @@ -1102,7 +1102,7 @@ static void arg_init(int argc, const char **argv) /*Absolute path to node-program*/ arg_nodeprog_a = argv[1]; } else { - sprintf(buf, "%s%s%s", arg_currdir_a, DIRSEP, arg_nodeprog_r); + snprintf(buf, sizeof(buf), "%s%s%s", arg_currdir_a, DIRSEP, arg_nodeprog_r); arg_nodeprog_a = strdup(buf); } if (arg_scalable_start) { @@ -1282,7 +1282,7 @@ static char *nodetab_file_find() nodetab_tempName = strdup(buffer); #else /*UNIX*/ if (getenv("HOME")) { - sprintf(buffer, "%s/.nodelist", getenv("HOME")); + snprintf(buffer, sizeof(buffer), "%s/.nodelist", getenv("HOME")); } #endif if (!probefile(buffer)) { @@ -1622,7 +1622,7 @@ static void nodeinfo_populate(nodetab_process & p) p.dataport = dataport; if (arg_verbose) { char ips[200]; - skt_print_ip(ips, i.IP); + skt_print_ip(ips, sizeof(ips), i.IP); printf("Charmrun> client %d connected (IP=%s data_port=%d)\n", node, ips, dataport); } @@ -2373,13 +2373,13 @@ static int req_handle_realloc(ChMessage *msg, SOCKET fd) int index = 0; char sp_buffer[50]; // newP buffer - sprintf(sp_buffer, "%d", newP); + snprintf(sp_buffer, sizeof(sp_buffer), "%d", newP); char sp_buffer1[50]; // oldP buffer - sprintf(sp_buffer1, "%d", oldP); + snprintf(sp_buffer1, sizeof(sp_buffer1), "%d", oldP); char sp_buffer2[6]; // charmrun port - sprintf(sp_buffer2, "%d", server_port); + snprintf(sp_buffer2, sizeof(sp_buffer2), "%d", server_port); /* Check that shrink expand parameters don't already exist */ @@ -3981,7 +3981,7 @@ static void req_start_server(void) /*Use symbolic host name as charmrun address*/ gethostname(server_addr, sizeof(server_addr)); else - skt_print_ip(server_addr, ip); + skt_print_ip(server_addr, sizeof(server_addr), ip); #if CMK_SHRINK_EXPAND server_port = arg_charmrun_port; @@ -4156,7 +4156,7 @@ int main(int argc, const char **argv, char **envp) char ips[200]; for (const nodetab_host * h : host_table) { - skt_print_ip(ips, h->ip); + skt_print_ip(ips, sizeof(ips), h->ip); printf("Charmrun> added host \"%s\", IP:%s\n", h->name, ips); } } @@ -4351,11 +4351,11 @@ static char *create_netstart(int node) static char dest[1536]; int port = 0; if (arg_mpiexec) - sprintf(dest, "$CmiMyNode %s %d %d %d", server_addr, server_port, - getpid() & 0x7FFF, port); + snprintf(dest, sizeof(dest), "$CmiMyNode %s %d %d %d", server_addr, server_port, + getpid() & 0x7FFF, port); else - sprintf(dest, "%d %s %d %d %d", node, server_addr, server_port, - getpid() & 0x7FFF, port); + snprintf(dest, sizeof(dest), "%d %s %d %d %d", node, server_addr, server_port, + getpid() & 0x7FFF, port); return dest; } @@ -4396,14 +4396,14 @@ static void start_nodes_daemon(std::vector & process_table) printf("Charmrun> Starting node program %d on '%s' as %s.\n", p.nodeno, h->name, nodeprog_relative); free(nodeprog_relative); - sprintf(task.env, "NETSTART=%.240s", create_netstart(p.nodeno)); + snprintf(task.env, DAEMON_MAXENV, "NETSTART=%.240s", create_netstart(p.nodeno)); char nodeArgBuffer[5120]; /*Buffer to hold assembled program arguments*/ char *argBuf; if (h->nice != -100) { if (arg_verbose) printf("Charmrun> +nice %d\n", h->nice); - sprintf(nodeArgBuffer, "%s +nice %d", argBuffer, h->nice); + snprintf(nodeArgBuffer, sizeof(nodeArgBuffer), "%s +nice %d", argBuffer, h->nice); argBuf = nodeArgBuffer; } else argBuf = argBuffer; @@ -5097,8 +5097,9 @@ static void read_global_segments_size() sshargv.push_back(h->name); sshargv.push_back("-l"); sshargv.push_back(h->login); - char *tmp = (char *) malloc(sizeof(char) * 9 + strlen(arg_nodeprog_r)); - sprintf(tmp, "size -A %s", arg_nodeprog_r); + int tmplen = 9 + strlen(arg_nodeprog_r); + char *tmp = (char *) malloc(tmplen); + snprintf(tmp, tmplen, "size -A %s", arg_nodeprog_r); sshargv.push_back(tmp); sshargv.push_back((const char *) NULL); @@ -5136,8 +5137,9 @@ static void open_gdb_info() sshargv.push_back(h->name); sshargv.push_back("-l"); sshargv.push_back(h->login); - char *tmp = (char *) malloc(sizeof(char) * 8 + strlen(arg_nodeprog_r)); - sprintf(tmp, "gdb -q %s", arg_nodeprog_r); + int tmplen = 8 + strlen(arg_nodeprog_r); + char *tmp = (char *) malloc(tmplen); + snprintf(tmp, tmplen, "gdb -q %s", arg_nodeprog_r); sshargv.push_back(tmp); sshargv.push_back((const char *) NULL); @@ -5193,7 +5195,7 @@ static void start_next_level_charmruns() const char *nodeprog_name = strrchr(arg_nodeprog_a, '/'); static char buf[1024]; - sprintf(buf, "%.*s%s%s", (int)(nodeprog_name-arg_nodeprog_a), arg_nodeprog_a, DIRSEP, "charmrun"); + snprintf(buf, sizeof(buf), "%.*s%s%s", (int)(nodeprog_name-arg_nodeprog_a), arg_nodeprog_a, DIRSEP, "charmrun"); arg_nodeprog_a = strdup(buf); int nextIndex = 0; @@ -5205,11 +5207,11 @@ static void start_next_level_charmruns() FILE *f; char startScript[200]; - sprintf(startScript, "/tmp/charmrun.%d.%d", getpid(), p.procno); + snprintf(startScript, sizeof(startScript), "/tmp/charmrun.%d.%d", getpid(), p.procno); f = fopen(startScript, "w"); if (f == NULL) { /* now try current directory */ - sprintf(startScript, "charmrun.%d.%d", getpid(), p.procno); + snprintf(startScript, sizeof(startScript), "charmrun.%d.%d", getpid(), p.procno); f = fopen(startScript, "w"); if (f == NULL) { fprintf(stderr, "Charmrun> Can not write file %s!\n", startScript); @@ -5229,11 +5231,11 @@ static void start_next_level_charmruns() static void start_one_node_ssh(nodetab_process & p, const char ** argv) { char startScript[200]; - sprintf(startScript, "/tmp/charmrun.%d.%d", getpid(), p.nodeno); + snprintf(startScript, sizeof(startScript), "/tmp/charmrun.%d.%d", getpid(), p.nodeno); FILE *f = fopen(startScript, "w"); if (f == NULL) { /* now try current directory */ - sprintf(startScript, "charmrun.%d.%d", getpid(), p.nodeno); + snprintf(startScript, sizeof(startScript), "charmrun.%d.%d", getpid(), p.nodeno); f = fopen(startScript, "w"); if (f == NULL) { fprintf(stderr, "Charmrun> Can not write file %s!\n", startScript); @@ -5274,7 +5276,7 @@ static int ssh_fork_one(nodetab_process & p, const char *startScript) char npes[24]; if ( ! arg_mpiexec_no_n ) { sshargv.push_back("-n"); - sprintf(npes, "%d", processes); + snprintf(npes, sizeof(npes), "%d", processes); sshargv.push_back(npes); } sshargv.push_back((char *) startScript); @@ -5305,12 +5307,12 @@ static int ssh_fork_one(nodetab_process & p, const char *startScript) static void start_nodes_mpiexec() { char startScript[200]; - sprintf(startScript, "./charmrun.%d", getpid()); + snprintf(startScript, sizeof(startScript), "./charmrun.%d", getpid()); FILE *f = fopen(startScript, "w"); chmod(startScript, S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IROTH); if (f == NULL) { /* now try current directory */ - sprintf(startScript, "./charmrun.%d", getpid()); + snprintf(startScript, sizeof(startScript), "./charmrun.%d", getpid()); f = fopen(startScript, "w"); if (f == NULL) { fprintf(stderr, "Charmrun> Can not write file %s!\n", startScript); @@ -5450,6 +5452,8 @@ struct local_nodestart int persona; #endif + static constexpr int envLen = 256; + local_nodestart(const char ** extra_argv = nullptr) { char ** env = main_envp; @@ -5470,28 +5474,28 @@ struct local_nodestart envp = (char **) malloc((envc + 3 + extra + 1) * sizeof(void *)); for (int i = 0; i < envc; i++) envp[i] = env[i]; - envp[envc] = (char *) malloc(256); - envp[envc + 1] = (char *) malloc(256); + envp[envc] = (char *) malloc(envLen); + envp[envc + 1] = (char *) malloc(envLen); envp[envc + 2] = strdup("FROM_CHARMRUN=1"); n = 3; // cpu affinity hints using Unit = typename TopologyRequest::Unit; if (proc_active) { - envp[envc + n] = (char *) malloc(256); + envp[envc + n] = (char *) malloc(envLen); switch (proc_per.unit()) { case Unit::Host: - sprintf(envp[envc + n], "CmiProcessPerHost=%d", proc_per.host); + snprintf(envp[envc + n], envLen, "CmiProcessPerHost=%d", proc_per.host); break; case Unit::Socket: - sprintf(envp[envc + n], "CmiProcessPerSocket=%d", proc_per.socket); + snprintf(envp[envc + n], envLen, "CmiProcessPerSocket=%d", proc_per.socket); break; case Unit::Core: - sprintf(envp[envc + n], "CmiProcessPerCore=%d", proc_per.core); + snprintf(envp[envc + n], envLen, "CmiProcessPerCore=%d", proc_per.core); break; case Unit::PU: - sprintf(envp[envc + n], "CmiProcessPerPU=%d", proc_per.pu); + snprintf(envp[envc + n], envLen, "CmiProcessPerPU=%d", proc_per.pu); break; default: break; @@ -5501,20 +5505,20 @@ struct local_nodestart #if CMK_SMP if (onewth_active) { - envp[envc + n] = (char *) malloc(256); + envp[envc + n] = (char *) malloc(envLen); switch (onewth_per.unit()) { case Unit::Host: - sprintf(envp[envc + n], "CmiOneWthPerHost=%d", 1); + snprintf(envp[envc + n], envLen, "CmiOneWthPerHost=%d", 1); break; case Unit::Socket: - sprintf(envp[envc + n], "CmiOneWthPerSocket=%d", 1); + snprintf(envp[envc + n], envLen, "CmiOneWthPerSocket=%d", 1); break; case Unit::Core: - sprintf(envp[envc + n], "CmiOneWthPerCore=%d", 1); + snprintf(envp[envc + n], envLen, "CmiOneWthPerCore=%d", 1); break; case Unit::PU: - sprintf(envp[envc + n], "CmiOneWthPerPU=%d", 1); + snprintf(envp[envc + n], envLen, "CmiOneWthPerPU=%d", 1); break; default: break; @@ -5523,11 +5527,11 @@ struct local_nodestart } #endif #if CMK_USE_SHMEM - envp[envc + n] = (char *) malloc(256); - sprintf(envp[envc + n], CMI_IPC_POOL_SIZE_ENV_VAR "=%d", arg_ipc_pool_size); + envp[envc + n] = (char *) malloc(envLen); + snprintf(envp[envc + n], envLen, CMI_IPC_POOL_SIZE_ENV_VAR "=%d", arg_ipc_pool_size); ++n; - envp[envc + n] = (char *) malloc(256); - sprintf(envp[envc + n], CMI_IPC_CUTOFF_ENV_VAR "=%d", arg_ipc_cutoff); + envp[envc + n] = (char *) malloc(envLen); + snprintf(envp[envc + n], envLen, CMI_IPC_CUTOFF_ENV_VAR "=%d", arg_ipc_cutoff); ++n; #endif envp[envc + n] = 0; @@ -5626,8 +5630,8 @@ struct local_nodestart { if (arg_verbose) printf("Charmrun> start %d node program on localhost.\n", p.nodeno); - sprintf(envp[envc], "NETSTART=%s", create_netstart(p.nodeno)); - sprintf(envp[envc + 1], "CmiNumNodes=%d", 0); + snprintf(envp[envc], envLen, "NETSTART=%s", create_netstart(p.nodeno)); + snprintf(envp[envc + 1], envLen, "CmiNumNodes=%d", 0); #if CMK_HAS_POSIX_SPAWN // We need posix_spawn on macOS because it is the only way to disable ASLR at runtime. @@ -5748,7 +5752,7 @@ static void restart_node(nodetab_process & p) const char ** added_restart_argv = restart_argv + i; restart_argv[i] = "+restartaftercrash"; char phase_str[10]; - sprintf(phase_str, "%d", ++current_restart_phase); + snprintf(phase_str, sizeof(phase_str), "%d", ++current_restart_phase); restart_argv[i + 1] = phase_str; restart_argv[i + 2] = "+restartisomalloc"; restart_argv[i + 3] = NULL; diff --git a/src/util/charmrun-src/daemon.C b/src/util/charmrun-src/daemon.C index 830f74ac9b..c706ed0e2c 100644 --- a/src/util/charmrun-src/daemon.C +++ b/src/util/charmrun-src/daemon.C @@ -105,7 +105,7 @@ int main() curTime=time(NULL); fprintf(logfile,"Connection from IP %s, port %d at %s", - skt_print_ip(ip_str,remoteIP),remotePortNumber, + skt_print_ip(ip_str,sizeof(ip_str),remoteIP),remotePortNumber, ctime(&curTime)); fflush(logfile); diff --git a/src/util/ckdll.C b/src/util/ckdll.C index aa6bdb4107..3272a8ca89 100644 --- a/src/util/ckdll.C +++ b/src/util/ckdll.C @@ -114,19 +114,19 @@ CkCppInterpreter::CkCppInterpreter(const char *cppCode,const char *inclPath) /*Write the c++ code to a temporary file:*/ char sourceFile[256]; - sprintf(sourceFile,"%s/ckSharedLib_%d_%d_%p.%s", + snprintf(sourceFile,sizeof(sourceFile),"%s/ckSharedLib_%d_%d_%p.%s", CMK_SCRATCH_PATH,randA,randB,(void*)this,"cpp"); FILE *f=fopen(sourceFile,"w"); if (f==NULL) return; fputs(cppCode,f); fclose(f); /*Allocate a spot for the library file:*/ - sprintf(libraryFile,"%s/ckSharedLib_%d_%d_%p%s", + snprintf(libraryFile,sizeof(libraryFile),"%s/ckSharedLib_%d_%d_%p%s", CMK_SCRATCH_PATH,randA,randB,(void*)this,CkDll::extension); //Compile the .cpp file into a .dll: char compilerCmd[1024]; - sprintf(compilerCmd,"%s%s %s %s%s", + snprintf(compilerCmd,sizeof(compilerCmd),"%s%s %s %s%s", CMK_DLL_CC, libraryFile, sourceFile, inclPath!=NULL?CMK_DLL_INC:"",inclPath!=NULL?inclPath:""); @@ -144,7 +144,7 @@ CkCppInterpreter::CkCppInterpreter(const char *cppCode,const char *inclPath) // HIDEOUS HACK: playing silly games with filename: // CC source -o foo.so // CC foo.so -o foo.sop - sprintf(compilerCmd,"%s%sp %s", + snprintf(compilerCmd,sizeof(compilerCmd),"%s%sp %s", CMK_DLL_LINK, libraryFile, libraryFile); compilerRet=CkSystem(compilerCmd); unlink(libraryFile); diff --git a/src/util/pup.h b/src/util/pup.h index c15413077a..ca359760c4 100644 --- a/src/util/pup.h +++ b/src/util/pup.h @@ -555,6 +555,7 @@ class fromDisk : public disk { class toTextUtil : public er { private: char *cur; /*Current output buffer*/ + size_t maxCount; /*Max length of cur buffer*/ int level; /*Indentation distance*/ void beginEnv(const char *type,int n=0); void endEnv(const char *type); @@ -562,7 +563,7 @@ class toTextUtil : public er { void endLine(void); protected: virtual char *advance(char *cur)=0; /*Consume current buffer and return next*/ - toTextUtil(unsigned int inType,char *buf); + toTextUtil(unsigned int inType,char *buf,size_t len); toTextUtil(const toTextUtil &p); //You don't want to copy void operator=(const toTextUtil &p); // You don't want to copy public: @@ -578,8 +579,10 @@ class toTextUtil : public er { }; /* Return the number of characters, including terminating NULL */ class sizerText : public toTextUtil { + public: + static constexpr int lineLen = 1000; private: - char line[1000]; + char line[lineLen]; size_t charCount; /*Total characters seen so far (not including NULL) */ protected: virtual char *advance(char *cur); @@ -593,10 +596,11 @@ class toText : public toTextUtil { private: char *buf; size_t charCount; /*Total characters written so far (not including NULL) */ + size_t maxCount; /*Max length of buf*/ protected: virtual char *advance(char *cur); public: - toText(char *outStr); + toText(char *outStr, size_t len); toText(const toText &p); //You don't want to copy void operator=(const toText &p); // You don't want to copy size_t size(void) const {return charCount+1; /*add NULL*/ } diff --git a/src/util/pup_paged.C b/src/util/pup_paged.C index e59a369c7c..29c4eaae49 100644 --- a/src/util/pup_paged.C +++ b/src/util/pup_paged.C @@ -9,8 +9,9 @@ pup_pagetable *getNewPagetable(char *fName){ _pagetable->table = NULL; _pagetable->tailtable = NULL; _pagetable->maxblk=0; - _pagetable->fName = new char[strlen(fName)+20]; - sprintf(_pagetable->fName,"%s_%d.dat",fName,CmiMyPe()); + int len = strlen(fName)+20; + _pagetable->fName = new char[len]; + snprintf(_pagetable->fName,len,"%s_%d.dat",fName,CmiMyPe()); _pagetable->fp = fopen(_pagetable->fName,"wb"); fclose(_pagetable->fp); _pagetable->fp = fopen(_pagetable->fName,"r+b"); diff --git a/src/util/pup_util.C b/src/util/pup_util.C index c13239aa9f..561b7ecbad 100644 --- a/src/util/pup_util.C +++ b/src/util/pup_util.C @@ -648,34 +648,36 @@ void PUP::toTextUtil::endLine(void) { } void PUP::toTextUtil::beginEnv(const char *type,int n) { - char *o=beginLine(); - sprintf(o,"begin "); o+=strlen(o); - sprintf(o,type,n); o+=strlen(o); - sprintf(o," {\n"); + char * const begin=beginLine(); + char *o=begin; + snprintf(o,maxCount,"begin "); o+=strlen(o); + snprintf(o,maxCount - (o-begin),type,n); o+=strlen(o); + snprintf(o,maxCount - (o-begin)," {\n"); endLine(); level++; } void PUP::toTextUtil::endEnv(const char *type) { level--; - sprintf(beginLine(),"} end %s;\n",type); + snprintf(beginLine(),maxCount,"} end %s;\n",type); endLine(); } -PUP::toTextUtil::toTextUtil(unsigned int inType,char *buf) +PUP::toTextUtil::toTextUtil(unsigned int inType,char *buf,size_t len) :er(inType) { cur=buf; + maxCount=len; level=0; } void PUP::toTextUtil::comment(const char *message) { - sprintf(beginLine(),"//%s\n",message); endLine(); + snprintf(beginLine(),maxCount,"//%s\n",message); endLine(); } void PUP::toTextUtil::synchronize(unsigned int m) { - sprintf(beginLine(),"sync=0x%08x\n",m); endLine(); + snprintf(beginLine(),maxCount,"sync=0x%08x\n",m); endLine(); #if 0 /* text people don't care this much about synchronization */ char *o=beginLine(); sprintf(o,"sync=");o+=strlen(o); @@ -702,38 +704,40 @@ void PUP::toTextUtil::pup_buffer(void *&p,size_t n, size_t itemSize, dataType t, void PUP::toTextUtil::bytes(void *p,size_t n,size_t itemSize,dataType t) { if (t==Tchar) { /*Character data is written out directly (rather than numerically)*/ - char *o=beginLine(); - sprintf(o,"string=");o+=strlen(o); + char * const begin=beginLine(); + char *o=begin; + snprintf(o,maxCount,"string=");o+=strlen(o); *o++='\"'; /*Leading quote*/ /*Copy each character, possibly escaped*/ const char *c=(const char *)p; for (size_t i=0;icharstar(), label->charstar()); + snprintf(nameStr, sizeof(nameStr), "%s%s", CParsedFile::className->charstar(), label->charstar()); generateClosureSignature(decls, defs, entry, false, "void", label, false, encapState); defs << " "; generateCall(defs, encapStateChild, encapStateChild, constructs->front()->label); endMethod(defs); // trace - sprintf(nameStr, "%s%s", CParsedFile::className->charstar(), label->charstar()); + snprintf(nameStr, sizeof(nameStr), "%s%s", CParsedFile::className->charstar(), label->charstar()); strcat(nameStr, "_end"); generateClosureSignature(decls, defs, entry, false, "void", label, true, encapStateChild); diff --git a/src/xlat-i/sdag/constructs/CaseList.C b/src/xlat-i/sdag/constructs/CaseList.C index 9f473fe14b..5d04644fab 100644 --- a/src/xlat-i/sdag/constructs/CaseList.C +++ b/src/xlat-i/sdag/constructs/CaseList.C @@ -34,7 +34,7 @@ void CaseListConstruct::propagateState(std::list encap, stateVars->insert(stateVars->end(), plist.begin(), plist.end()); { char txt[128]; - sprintf(txt, "_cs%d", nodeNum); + snprintf(txt, sizeof(txt), "_cs%d", nodeNum); counter = new XStr(txt); sv = new CStateVar(0, "SDAG::CSpeculator *", 0, txt, 0, NULL, 1); sv->isSpeculator = true; @@ -72,7 +72,7 @@ void CaseListConstruct::generateCode(XStr& decls, XStr& defs, Entry* entry) { } endMethod(defs); - sprintf(nameStr, "%s%s", CParsedFile::className->charstar(), label->charstar()); + snprintf(nameStr, sizeof(nameStr), "%s%s", CParsedFile::className->charstar(), label->charstar()); strcat(nameStr, "_end"); generateClosureSignature(decls, defs, entry, false, "void", label, true, diff --git a/src/xlat-i/sdag/constructs/Else.C b/src/xlat-i/sdag/constructs/Else.C index e1541fac1f..9f8e486ead 100644 --- a/src/xlat-i/sdag/constructs/Else.C +++ b/src/xlat-i/sdag/constructs/Else.C @@ -16,7 +16,7 @@ void ElseConstruct::generateCode(XStr& decls, XStr& defs, Entry* entry) { endMethod(defs); // trace - sprintf(nameStr, "%s%s", CParsedFile::className->charstar(), label->charstar()); + snprintf(nameStr, sizeof(nameStr), "%s%s", CParsedFile::className->charstar(), label->charstar()); strcat(nameStr, "_end"); generateClosureSignature(decls, defs, entry, false, "void", label, true, encapStateChild); diff --git a/src/xlat-i/sdag/constructs/For.C b/src/xlat-i/sdag/constructs/For.C index 1f85829414..1591807175 100644 --- a/src/xlat-i/sdag/constructs/For.C +++ b/src/xlat-i/sdag/constructs/For.C @@ -10,7 +10,7 @@ ForConstruct::ForConstruct(IntExprConstruct* decl, IntExprConstruct* pred, } void ForConstruct::generateCode(XStr& decls, XStr& defs, Entry* entry) { - sprintf(nameStr, "%s%s", CParsedFile::className->charstar(), label->charstar()); + snprintf(nameStr, sizeof(nameStr), "%s%s", CParsedFile::className->charstar(), label->charstar()); generateClosureSignature(decls, defs, entry, false, "void", label, false, encapState); @@ -35,7 +35,7 @@ void ForConstruct::generateCode(XStr& decls, XStr& defs, Entry* entry) { endMethod(defs); // trace - sprintf(nameStr, "%s%s", CParsedFile::className->charstar(), label->charstar()); + snprintf(nameStr, sizeof(nameStr), "%s%s", CParsedFile::className->charstar(), label->charstar()); strcat(nameStr, "_end"); generateClosureSignature(decls, defs, entry, false, "void", label, true, diff --git a/src/xlat-i/sdag/constructs/Forall.C b/src/xlat-i/sdag/constructs/Forall.C index 4e36beed27..2382d19ca1 100644 --- a/src/xlat-i/sdag/constructs/Forall.C +++ b/src/xlat-i/sdag/constructs/Forall.C @@ -82,7 +82,7 @@ void ForallConstruct::propagateState(std::list encap, { char txt[128]; - sprintf(txt, "_cf%d", nodeNum); + snprintf(txt, sizeof(txt), "_cf%d", nodeNum); counter = new XStr(txt); sv = new CStateVar(0, "SDAG::CCounter *", 0, txt, 0, NULL, 1); sv->isCounter = true; diff --git a/src/xlat-i/sdag/constructs/OList.C b/src/xlat-i/sdag/constructs/OList.C index b6163efaf7..94f77dc74e 100644 --- a/src/xlat-i/sdag/constructs/OList.C +++ b/src/xlat-i/sdag/constructs/OList.C @@ -26,7 +26,7 @@ void OListConstruct::generateCode(XStr& decls, XStr& defs, Entry* entry) { } endMethod(defs); - sprintf(nameStr, "%s%s", CParsedFile::className->charstar(), label->charstar()); + snprintf(nameStr, sizeof(nameStr), "%s%s", CParsedFile::className->charstar(), label->charstar()); strcat(nameStr, "_end"); generateClosureSignature(decls, defs, entry, false, "void", label, true, @@ -79,7 +79,7 @@ void OListConstruct::propagateState(std::list encap, stateVars->insert(stateVars->end(), plist.begin(), plist.end()); { char txt[128]; - sprintf(txt, "_co%d", nodeNum); + snprintf(txt, sizeof(txt), "_co%d", nodeNum); counter = new XStr(txt); sv = new CStateVar(0, "SDAG::CCounter *", 0, txt, 0, NULL, 1); sv->isCounter = true; diff --git a/src/xlat-i/sdag/constructs/Overlap.C b/src/xlat-i/sdag/constructs/Overlap.C index 4702e07e9d..ecad298e4c 100644 --- a/src/xlat-i/sdag/constructs/Overlap.C +++ b/src/xlat-i/sdag/constructs/Overlap.C @@ -8,14 +8,14 @@ OverlapConstruct::OverlapConstruct(SdagConstruct* olist) } void OverlapConstruct::generateCode(XStr& decls, XStr& defs, Entry* entry) { - sprintf(nameStr, "%s%s", CParsedFile::className->charstar(), label->charstar()); + snprintf(nameStr, sizeof(nameStr), "%s%s", CParsedFile::className->charstar(), label->charstar()); generateClosureSignature(decls, defs, entry, false, "void", label, false, encapState); defs << " "; generateCall(defs, encapStateChild, encapStateChild, constructs->front()->label); endMethod(defs); // trace - sprintf(nameStr, "%s%s", CParsedFile::className->charstar(), label->charstar()); + snprintf(nameStr, sizeof(nameStr), "%s%s", CParsedFile::className->charstar(), label->charstar()); strcat(nameStr, "_end"); generateClosureSignature(decls, defs, entry, false, "void", label, true, encapStateChild); diff --git a/src/xlat-i/sdag/constructs/Serial.C b/src/xlat-i/sdag/constructs/Serial.C index 0cd054ceca..e6ec4b5dfd 100644 --- a/src/xlat-i/sdag/constructs/Serial.C +++ b/src/xlat-i/sdag/constructs/Serial.C @@ -76,13 +76,13 @@ void SerialConstruct::generateCode(XStr& decls, XStr& defs, Entry* entry) { void SerialConstruct::generateTrace() { char traceText[1024]; if (traceName) { - sprintf(traceText, "%s_%s", CParsedFile::className->charstar(), - traceName->charstar()); + snprintf(traceText, sizeof(traceText), "%s_%s", CParsedFile::className->charstar(), + traceName->charstar()); // remove blanks for (unsigned int i = 0; i < strlen(traceText); i++) if (traceText[i] == ' ' || traceText[i] == '\t') traceText[i] = '_'; } else { - sprintf(traceText, "%s%s", CParsedFile::className->charstar(), label->charstar()); + snprintf(traceText, sizeof(traceText), "%s%s", CParsedFile::className->charstar(), label->charstar()); } traceName = new XStr(traceText); diff --git a/src/xlat-i/sdag/constructs/When.C b/src/xlat-i/sdag/constructs/When.C index 6e8f0a5e24..0174762097 100644 --- a/src/xlat-i/sdag/constructs/When.C +++ b/src/xlat-i/sdag/constructs/When.C @@ -44,7 +44,7 @@ void WhenConstruct::propagateState(list encap, list& pl if (pl->getGivenName() == NULL) { // if the parameter doesn't have a name, generate a dummy name char s[128]; - sprintf(s, "gen_name%d", cntr); + snprintf(s, sizeof(s), "gen_name%d", cntr); pl->setGivenName(s); cntr++; dummy_var = true; @@ -151,7 +151,7 @@ void WhenConstruct::generateCode(XStr& decls, XStr& defs, Entry* entry) { // the when method with the reference numbers determined based on the // current state if (numRefs > 0) { - sprintf(nameStr, "%s%s", CParsedFile::className->charstar(), label->charstar()); + snprintf(nameStr, sizeof(nameStr), "%s%s", CParsedFile::className->charstar(), label->charstar()); generateClosureSignature(decls, defs, entry, false, "SDAG::Continuation*", label, false, encapState); @@ -200,7 +200,7 @@ void WhenConstruct::generateCode(XStr& decls, XStr& defs, Entry* entry) { endMethod(defs); } - sprintf(nameStr, "%s%s", CParsedFile::className->charstar(), label->charstar()); + snprintf(nameStr, sizeof(nameStr), "%s%s", CParsedFile::className->charstar(), label->charstar()); generateClosureSignature(decls, defs, entry, false, "SDAG::Continuation*", label, false, encapState, numRefs); diff --git a/src/xlat-i/xi-Parameter.C b/src/xlat-i/xi-Parameter.C index dc89148780..74169d5c23 100644 --- a/src/xlat-i/xi-Parameter.C +++ b/src/xlat-i/xi-Parameter.C @@ -65,7 +65,7 @@ Parameter::Parameter(int Nline, Type* Ntype, const char* Nname, const char* Narr if (name == NULL && !isVoid()) { /*Fabricate a unique name for this marshalled param.*/ static int unnamedCount = 0; name = new char[50]; - sprintf((char*)name, "impl_noname_%x", unnamedCount++); + snprintf((char*)name, 50, "impl_noname_%x", unnamedCount++); } byReference = false; declaredReference = false; diff --git a/src/xlat-i/xi-grammar.tab.C b/src/xlat-i/xi-grammar.tab.C index 20997287c8..f57080716b 100644 --- a/src/xlat-i/xi-grammar.tab.C +++ b/src/xlat-i/xi-grammar.tab.C @@ -1,8 +1,9 @@ -/* A Bison parser, made by GNU Bison 3.0.4. */ +/* A Bison parser, made by GNU Bison 3.8.2. */ /* Bison implementation for Yacc-like parsers in C - Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. + Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 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 @@ -15,7 +16,7 @@ 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 . */ + along with this program. If not, see . */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work @@ -33,6 +34,10 @@ /* C LALR(1) parser skeleton written by Richard Stallman, by simplifying the original so-called "semantic" parser. */ +/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual, + especially those whose name start with YY_ or yy_. They are + private implementation details that can be changed or removed. */ + /* All symbols defined below should begin with yy or YY, to avoid infringing on user name space. This should be done even for local variables, as they might otherwise be expanded by user macros. @@ -40,11 +45,11 @@ define necessary library symbols; they are noted "INFRINGES ON USER NAME SPACE" below. */ -/* Identify Bison output. */ -#define YYBISON 1 +/* Identify Bison output, and Bison version. */ +#define YYBISON 30802 -/* Bison version. */ -#define YYBISON_VERSION "3.0.4" +/* Bison version string. */ +#define YYBISON_VERSION "3.8.2" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -61,8 +66,8 @@ -/* Copy the first part of user declarations. */ -#line 2 "xi-grammar.y" /* yacc.c:339 */ +/* First part of user prologue. */ +#line 2 "xi-grammar.y" #include #include @@ -112,26 +117,31 @@ void splitScopedName(const char* name, const char** scope, const char** basename void ReservedWord(int token, int fCol, int lCol); } -#line 116 "y.tab.c" /* yacc.c:339 */ +#line 121 "y.tab.c" +# ifndef YY_CAST +# ifdef __cplusplus +# define YY_CAST(Type, Val) static_cast (Val) +# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast (Val) +# else +# define YY_CAST(Type, Val) ((Type) (Val)) +# define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val)) +# endif +# endif # ifndef YY_NULLPTR -# if defined __cplusplus && 201103L <= __cplusplus -# define YY_NULLPTR nullptr +# if defined __cplusplus +# if 201103L <= __cplusplus +# define YY_NULLPTR nullptr +# else +# define YY_NULLPTR 0 +# endif # else -# define YY_NULLPTR 0 +# define YY_NULLPTR ((void*)0) # endif # endif -/* Enabling verbose error messages. */ -#ifdef YYERROR_VERBOSE -# undef YYERROR_VERBOSE -# define YYERROR_VERBOSE 1 -#else -# define YYERROR_VERBOSE 0 -#endif - -/* In a future release of Bison, this section will be replaced - by #include "y.tab.h". */ +/* Use api.header.include to #include this header + instead of duplicating it here. */ #ifndef YY_YY_Y_TAB_H_INCLUDED # define YY_YY_Y_TAB_H_INCLUDED /* Debug traces. */ @@ -142,90 +152,99 @@ void ReservedWord(int token, int fCol, int lCol); extern int yydebug; #endif -/* Token type. */ +/* Token kinds. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE enum yytokentype { - MODULE = 258, - MAINMODULE = 259, - EXTERN = 260, - READONLY = 261, - INITCALL = 262, - INITNODE = 263, - INITPROC = 264, - PUPABLE = 265, - CHARE = 266, - MAINCHARE = 267, - GROUP = 268, - NODEGROUP = 269, - ARRAY = 270, - MESSAGE = 271, - CONDITIONAL = 272, - CLASS = 273, - INCLUDE = 274, - STACKSIZE = 275, - THREADED = 276, - TEMPLATE = 277, - WHENIDLE = 278, - SYNC = 279, - IGET = 280, - EXCLUSIVE = 281, - IMMEDIATE = 282, - SKIPSCHED = 283, - INLINE = 284, - VIRTUAL = 285, - MIGRATABLE = 286, - AGGREGATE = 287, - CREATEHERE = 288, - CREATEHOME = 289, - NOKEEP = 290, - NOTRACE = 291, - APPWORK = 292, - VOID = 293, - CONST = 294, - NOCOPY = 295, - NOCOPYPOST = 296, - NOCOPYDEVICE = 297, - PACKED = 298, - VARSIZE = 299, - ENTRY = 300, - FOR = 301, - FORALL = 302, - WHILE = 303, - WHEN = 304, - OVERLAP = 305, - SERIAL = 306, - IF = 307, - ELSE = 308, - PYTHON = 309, - LOCAL = 310, - NAMESPACE = 311, - USING = 312, - IDENT = 313, - NUMBER = 314, - LITERAL = 315, - CPROGRAM = 316, - HASHIF = 317, - HASHIFDEF = 318, - INT = 319, - LONG = 320, - SHORT = 321, - CHAR = 322, - FLOAT = 323, - DOUBLE = 324, - UNSIGNED = 325, - ACCEL = 326, - READWRITE = 327, - WRITEONLY = 328, - ACCELBLOCK = 329, - MEMCRITICAL = 330, - REDUCTIONTARGET = 331, - CASE = 332, - TYPENAME = 333 + YYEMPTY = -2, + YYEOF = 0, /* "end of file" */ + YYerror = 256, /* error */ + YYUNDEF = 257, /* "invalid token" */ + MODULE = 258, /* MODULE */ + MAINMODULE = 259, /* MAINMODULE */ + EXTERN = 260, /* EXTERN */ + READONLY = 261, /* READONLY */ + INITCALL = 262, /* INITCALL */ + INITNODE = 263, /* INITNODE */ + INITPROC = 264, /* INITPROC */ + PUPABLE = 265, /* PUPABLE */ + CHARE = 266, /* CHARE */ + MAINCHARE = 267, /* MAINCHARE */ + GROUP = 268, /* GROUP */ + NODEGROUP = 269, /* NODEGROUP */ + ARRAY = 270, /* ARRAY */ + MESSAGE = 271, /* MESSAGE */ + CONDITIONAL = 272, /* CONDITIONAL */ + CLASS = 273, /* CLASS */ + INCLUDE = 274, /* INCLUDE */ + STACKSIZE = 275, /* STACKSIZE */ + THREADED = 276, /* THREADED */ + TEMPLATE = 277, /* TEMPLATE */ + WHENIDLE = 278, /* WHENIDLE */ + SYNC = 279, /* SYNC */ + IGET = 280, /* IGET */ + EXCLUSIVE = 281, /* EXCLUSIVE */ + IMMEDIATE = 282, /* IMMEDIATE */ + SKIPSCHED = 283, /* SKIPSCHED */ + INLINE = 284, /* INLINE */ + VIRTUAL = 285, /* VIRTUAL */ + MIGRATABLE = 286, /* MIGRATABLE */ + AGGREGATE = 287, /* AGGREGATE */ + CREATEHERE = 288, /* CREATEHERE */ + CREATEHOME = 289, /* CREATEHOME */ + NOKEEP = 290, /* NOKEEP */ + NOTRACE = 291, /* NOTRACE */ + APPWORK = 292, /* APPWORK */ + VOID = 293, /* VOID */ + CONST = 294, /* CONST */ + NOCOPY = 295, /* NOCOPY */ + NOCOPYPOST = 296, /* NOCOPYPOST */ + NOCOPYDEVICE = 297, /* NOCOPYDEVICE */ + PACKED = 298, /* PACKED */ + VARSIZE = 299, /* VARSIZE */ + ENTRY = 300, /* ENTRY */ + FOR = 301, /* FOR */ + FORALL = 302, /* FORALL */ + WHILE = 303, /* WHILE */ + WHEN = 304, /* WHEN */ + OVERLAP = 305, /* OVERLAP */ + SERIAL = 306, /* SERIAL */ + IF = 307, /* IF */ + ELSE = 308, /* ELSE */ + PYTHON = 309, /* PYTHON */ + LOCAL = 310, /* LOCAL */ + NAMESPACE = 311, /* NAMESPACE */ + USING = 312, /* USING */ + IDENT = 313, /* IDENT */ + NUMBER = 314, /* NUMBER */ + LITERAL = 315, /* LITERAL */ + CPROGRAM = 316, /* CPROGRAM */ + HASHIF = 317, /* HASHIF */ + HASHIFDEF = 318, /* HASHIFDEF */ + INT = 319, /* INT */ + LONG = 320, /* LONG */ + SHORT = 321, /* SHORT */ + CHAR = 322, /* CHAR */ + FLOAT = 323, /* FLOAT */ + DOUBLE = 324, /* DOUBLE */ + UNSIGNED = 325, /* UNSIGNED */ + ACCEL = 326, /* ACCEL */ + READWRITE = 327, /* READWRITE */ + WRITEONLY = 328, /* WRITEONLY */ + ACCELBLOCK = 329, /* ACCELBLOCK */ + MEMCRITICAL = 330, /* MEMCRITICAL */ + REDUCTIONTARGET = 331, /* REDUCTIONTARGET */ + CASE = 332, /* CASE */ + TYPENAME = 333 /* TYPENAME */ }; + typedef enum yytokentype yytoken_kind_t; #endif -/* Tokens. */ +/* Token kinds. */ +#define YYEMPTY -2 +#define YYEOF 0 +#define YYerror 256 +#define YYUNDEF 257 #define MODULE 258 #define MAINMODULE 259 #define EXTERN 260 @@ -305,10 +324,9 @@ extern int yydebug; /* Value type. */ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED - union YYSTYPE { -#line 54 "xi-grammar.y" /* yacc.c:355 */ +#line 54 "xi-grammar.y" Attribute *attr; Attribute::Argument *attrarg; @@ -354,9 +372,9 @@ union YYSTYPE XStr* xstrptr; AccelBlock* accelBlock; -#line 358 "y.tab.c" /* yacc.c:355 */ -}; +#line 376 "y.tab.c" +}; typedef union YYSTYPE YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define YYSTYPE_IS_DECLARED 1 @@ -379,40 +397,320 @@ struct YYLTYPE extern YYSTYPE yylval; extern YYLTYPE yylloc; + int yyparse (void); + #endif /* !YY_YY_Y_TAB_H_INCLUDED */ +/* Symbol kind. */ +enum yysymbol_kind_t +{ + YYSYMBOL_YYEMPTY = -2, + YYSYMBOL_YYEOF = 0, /* "end of file" */ + YYSYMBOL_YYerror = 1, /* error */ + YYSYMBOL_YYUNDEF = 2, /* "invalid token" */ + YYSYMBOL_MODULE = 3, /* MODULE */ + YYSYMBOL_MAINMODULE = 4, /* MAINMODULE */ + YYSYMBOL_EXTERN = 5, /* EXTERN */ + YYSYMBOL_READONLY = 6, /* READONLY */ + YYSYMBOL_INITCALL = 7, /* INITCALL */ + YYSYMBOL_INITNODE = 8, /* INITNODE */ + YYSYMBOL_INITPROC = 9, /* INITPROC */ + YYSYMBOL_PUPABLE = 10, /* PUPABLE */ + YYSYMBOL_CHARE = 11, /* CHARE */ + YYSYMBOL_MAINCHARE = 12, /* MAINCHARE */ + YYSYMBOL_GROUP = 13, /* GROUP */ + YYSYMBOL_NODEGROUP = 14, /* NODEGROUP */ + YYSYMBOL_ARRAY = 15, /* ARRAY */ + YYSYMBOL_MESSAGE = 16, /* MESSAGE */ + YYSYMBOL_CONDITIONAL = 17, /* CONDITIONAL */ + YYSYMBOL_CLASS = 18, /* CLASS */ + YYSYMBOL_INCLUDE = 19, /* INCLUDE */ + YYSYMBOL_STACKSIZE = 20, /* STACKSIZE */ + YYSYMBOL_THREADED = 21, /* THREADED */ + YYSYMBOL_TEMPLATE = 22, /* TEMPLATE */ + YYSYMBOL_WHENIDLE = 23, /* WHENIDLE */ + YYSYMBOL_SYNC = 24, /* SYNC */ + YYSYMBOL_IGET = 25, /* IGET */ + YYSYMBOL_EXCLUSIVE = 26, /* EXCLUSIVE */ + YYSYMBOL_IMMEDIATE = 27, /* IMMEDIATE */ + YYSYMBOL_SKIPSCHED = 28, /* SKIPSCHED */ + YYSYMBOL_INLINE = 29, /* INLINE */ + YYSYMBOL_VIRTUAL = 30, /* VIRTUAL */ + YYSYMBOL_MIGRATABLE = 31, /* MIGRATABLE */ + YYSYMBOL_AGGREGATE = 32, /* AGGREGATE */ + YYSYMBOL_CREATEHERE = 33, /* CREATEHERE */ + YYSYMBOL_CREATEHOME = 34, /* CREATEHOME */ + YYSYMBOL_NOKEEP = 35, /* NOKEEP */ + YYSYMBOL_NOTRACE = 36, /* NOTRACE */ + YYSYMBOL_APPWORK = 37, /* APPWORK */ + YYSYMBOL_VOID = 38, /* VOID */ + YYSYMBOL_CONST = 39, /* CONST */ + YYSYMBOL_NOCOPY = 40, /* NOCOPY */ + YYSYMBOL_NOCOPYPOST = 41, /* NOCOPYPOST */ + YYSYMBOL_NOCOPYDEVICE = 42, /* NOCOPYDEVICE */ + YYSYMBOL_PACKED = 43, /* PACKED */ + YYSYMBOL_VARSIZE = 44, /* VARSIZE */ + YYSYMBOL_ENTRY = 45, /* ENTRY */ + YYSYMBOL_FOR = 46, /* FOR */ + YYSYMBOL_FORALL = 47, /* FORALL */ + YYSYMBOL_WHILE = 48, /* WHILE */ + YYSYMBOL_WHEN = 49, /* WHEN */ + YYSYMBOL_OVERLAP = 50, /* OVERLAP */ + YYSYMBOL_SERIAL = 51, /* SERIAL */ + YYSYMBOL_IF = 52, /* IF */ + YYSYMBOL_ELSE = 53, /* ELSE */ + YYSYMBOL_PYTHON = 54, /* PYTHON */ + YYSYMBOL_LOCAL = 55, /* LOCAL */ + YYSYMBOL_NAMESPACE = 56, /* NAMESPACE */ + YYSYMBOL_USING = 57, /* USING */ + YYSYMBOL_IDENT = 58, /* IDENT */ + YYSYMBOL_NUMBER = 59, /* NUMBER */ + YYSYMBOL_LITERAL = 60, /* LITERAL */ + YYSYMBOL_CPROGRAM = 61, /* CPROGRAM */ + YYSYMBOL_HASHIF = 62, /* HASHIF */ + YYSYMBOL_HASHIFDEF = 63, /* HASHIFDEF */ + YYSYMBOL_INT = 64, /* INT */ + YYSYMBOL_LONG = 65, /* LONG */ + YYSYMBOL_SHORT = 66, /* SHORT */ + YYSYMBOL_CHAR = 67, /* CHAR */ + YYSYMBOL_FLOAT = 68, /* FLOAT */ + YYSYMBOL_DOUBLE = 69, /* DOUBLE */ + YYSYMBOL_UNSIGNED = 70, /* UNSIGNED */ + YYSYMBOL_ACCEL = 71, /* ACCEL */ + YYSYMBOL_READWRITE = 72, /* READWRITE */ + YYSYMBOL_WRITEONLY = 73, /* WRITEONLY */ + YYSYMBOL_ACCELBLOCK = 74, /* ACCELBLOCK */ + YYSYMBOL_MEMCRITICAL = 75, /* MEMCRITICAL */ + YYSYMBOL_REDUCTIONTARGET = 76, /* REDUCTIONTARGET */ + YYSYMBOL_CASE = 77, /* CASE */ + YYSYMBOL_TYPENAME = 78, /* TYPENAME */ + YYSYMBOL_79_ = 79, /* ';' */ + YYSYMBOL_80_ = 80, /* ':' */ + YYSYMBOL_81_ = 81, /* '{' */ + YYSYMBOL_82_ = 82, /* '}' */ + YYSYMBOL_83_ = 83, /* ',' */ + YYSYMBOL_84_ = 84, /* '<' */ + YYSYMBOL_85_ = 85, /* '>' */ + YYSYMBOL_86_ = 86, /* '*' */ + YYSYMBOL_87_ = 87, /* '(' */ + YYSYMBOL_88_ = 88, /* ')' */ + YYSYMBOL_89_ = 89, /* '&' */ + YYSYMBOL_90_ = 90, /* '.' */ + YYSYMBOL_91_ = 91, /* '[' */ + YYSYMBOL_92_ = 92, /* ']' */ + YYSYMBOL_93_ = 93, /* '=' */ + YYSYMBOL_94_ = 94, /* '-' */ + YYSYMBOL_YYACCEPT = 95, /* $accept */ + YYSYMBOL_File = 96, /* File */ + YYSYMBOL_ModuleEList = 97, /* ModuleEList */ + YYSYMBOL_OptExtern = 98, /* OptExtern */ + YYSYMBOL_OneOrMoreSemiColon = 99, /* OneOrMoreSemiColon */ + YYSYMBOL_OptSemiColon = 100, /* OptSemiColon */ + YYSYMBOL_Name = 101, /* Name */ + YYSYMBOL_QualName = 102, /* QualName */ + YYSYMBOL_Module = 103, /* Module */ + YYSYMBOL_ConstructEList = 104, /* ConstructEList */ + YYSYMBOL_ConstructList = 105, /* ConstructList */ + YYSYMBOL_ConstructSemi = 106, /* ConstructSemi */ + YYSYMBOL_Construct = 107, /* Construct */ + YYSYMBOL_TParam = 108, /* TParam */ + YYSYMBOL_TParamList = 109, /* TParamList */ + YYSYMBOL_TParamEList = 110, /* TParamEList */ + YYSYMBOL_OptTParams = 111, /* OptTParams */ + YYSYMBOL_BuiltinType = 112, /* BuiltinType */ + YYSYMBOL_NamedType = 113, /* NamedType */ + YYSYMBOL_QualNamedType = 114, /* QualNamedType */ + YYSYMBOL_SimpleType = 115, /* SimpleType */ + YYSYMBOL_OnePtrType = 116, /* OnePtrType */ + YYSYMBOL_PtrType = 117, /* PtrType */ + YYSYMBOL_FuncType = 118, /* FuncType */ + YYSYMBOL_BaseType = 119, /* BaseType */ + YYSYMBOL_BaseDataType = 120, /* BaseDataType */ + YYSYMBOL_RestrictedType = 121, /* RestrictedType */ + YYSYMBOL_Type = 122, /* Type */ + YYSYMBOL_ArrayDim = 123, /* ArrayDim */ + YYSYMBOL_Dim = 124, /* Dim */ + YYSYMBOL_DimList = 125, /* DimList */ + YYSYMBOL_Readonly = 126, /* Readonly */ + YYSYMBOL_ReadonlyMsg = 127, /* ReadonlyMsg */ + YYSYMBOL_OptVoid = 128, /* OptVoid */ + YYSYMBOL_MAttribs = 129, /* MAttribs */ + YYSYMBOL_MAttribList = 130, /* MAttribList */ + YYSYMBOL_MAttrib = 131, /* MAttrib */ + YYSYMBOL_CAttribs = 132, /* CAttribs */ + YYSYMBOL_CAttribList = 133, /* CAttribList */ + YYSYMBOL_PythonOptions = 134, /* PythonOptions */ + YYSYMBOL_ArrayAttrib = 135, /* ArrayAttrib */ + YYSYMBOL_ArrayAttribs = 136, /* ArrayAttribs */ + YYSYMBOL_ArrayAttribList = 137, /* ArrayAttribList */ + YYSYMBOL_CAttrib = 138, /* CAttrib */ + YYSYMBOL_OptConditional = 139, /* OptConditional */ + YYSYMBOL_MsgArray = 140, /* MsgArray */ + YYSYMBOL_Var = 141, /* Var */ + YYSYMBOL_VarList = 142, /* VarList */ + YYSYMBOL_Message = 143, /* Message */ + YYSYMBOL_OptBaseList = 144, /* OptBaseList */ + YYSYMBOL_BaseList = 145, /* BaseList */ + YYSYMBOL_Chare = 146, /* Chare */ + YYSYMBOL_Group = 147, /* Group */ + YYSYMBOL_NodeGroup = 148, /* NodeGroup */ + YYSYMBOL_ArrayIndexType = 149, /* ArrayIndexType */ + YYSYMBOL_Array = 150, /* Array */ + YYSYMBOL_TChare = 151, /* TChare */ + YYSYMBOL_TGroup = 152, /* TGroup */ + YYSYMBOL_TNodeGroup = 153, /* TNodeGroup */ + YYSYMBOL_TArray = 154, /* TArray */ + YYSYMBOL_TMessage = 155, /* TMessage */ + YYSYMBOL_OptTypeInit = 156, /* OptTypeInit */ + YYSYMBOL_OptNameInit = 157, /* OptNameInit */ + YYSYMBOL_TVar = 158, /* TVar */ + YYSYMBOL_TVarList = 159, /* TVarList */ + YYSYMBOL_TemplateSpec = 160, /* TemplateSpec */ + YYSYMBOL_Template = 161, /* Template */ + YYSYMBOL_MemberEList = 162, /* MemberEList */ + YYSYMBOL_MemberList = 163, /* MemberList */ + YYSYMBOL_NonEntryMember = 164, /* NonEntryMember */ + YYSYMBOL_InitNode = 165, /* InitNode */ + YYSYMBOL_InitProc = 166, /* InitProc */ + YYSYMBOL_PUPableClass = 167, /* PUPableClass */ + YYSYMBOL_IncludeFile = 168, /* IncludeFile */ + YYSYMBOL_Member = 169, /* Member */ + YYSYMBOL_MemberBody = 170, /* MemberBody */ + YYSYMBOL_UnexpectedToken = 171, /* UnexpectedToken */ + YYSYMBOL_Entry = 172, /* Entry */ + YYSYMBOL_AccelBlock = 173, /* AccelBlock */ + YYSYMBOL_EReturn = 174, /* EReturn */ + YYSYMBOL_EAttribs = 175, /* EAttribs */ + YYSYMBOL_AttributeArg = 176, /* AttributeArg */ + YYSYMBOL_AttributeArgList = 177, /* AttributeArgList */ + YYSYMBOL_EAttribList = 178, /* EAttribList */ + YYSYMBOL_EAttrib = 179, /* EAttrib */ + YYSYMBOL_DefaultParameter = 180, /* DefaultParameter */ + YYSYMBOL_CPROGRAM_List = 181, /* CPROGRAM_List */ + YYSYMBOL_CCode = 182, /* CCode */ + YYSYMBOL_ParamBracketStart = 183, /* ParamBracketStart */ + YYSYMBOL_ParamBraceStart = 184, /* ParamBraceStart */ + YYSYMBOL_ParamBraceEnd = 185, /* ParamBraceEnd */ + YYSYMBOL_Parameter = 186, /* Parameter */ + YYSYMBOL_AccelBufferType = 187, /* AccelBufferType */ + YYSYMBOL_AccelInstName = 188, /* AccelInstName */ + YYSYMBOL_AccelArrayParam = 189, /* AccelArrayParam */ + YYSYMBOL_AccelParameter = 190, /* AccelParameter */ + YYSYMBOL_ParamList = 191, /* ParamList */ + YYSYMBOL_AccelParamList = 192, /* AccelParamList */ + YYSYMBOL_EParameters = 193, /* EParameters */ + YYSYMBOL_AccelEParameters = 194, /* AccelEParameters */ + YYSYMBOL_OptStackSize = 195, /* OptStackSize */ + YYSYMBOL_OptSdagCode = 196, /* OptSdagCode */ + YYSYMBOL_Slist = 197, /* Slist */ + YYSYMBOL_Olist = 198, /* Olist */ + YYSYMBOL_CaseList = 199, /* CaseList */ + YYSYMBOL_OptTraceName = 200, /* OptTraceName */ + YYSYMBOL_WhenConstruct = 201, /* WhenConstruct */ + YYSYMBOL_NonWhenConstruct = 202, /* NonWhenConstruct */ + YYSYMBOL_SingleConstruct = 203, /* SingleConstruct */ + YYSYMBOL_HasElse = 204, /* HasElse */ + YYSYMBOL_IntExpr = 205, /* IntExpr */ + YYSYMBOL_EndIntExpr = 206, /* EndIntExpr */ + YYSYMBOL_StartIntExpr = 207, /* StartIntExpr */ + YYSYMBOL_SEntry = 208, /* SEntry */ + YYSYMBOL_SEntryList = 209, /* SEntryList */ + YYSYMBOL_SParamBracketStart = 210, /* SParamBracketStart */ + YYSYMBOL_SParamBracketEnd = 211, /* SParamBracketEnd */ + YYSYMBOL_HashIFComment = 212, /* HashIFComment */ + YYSYMBOL_HashIFDefComment = 213 /* HashIFDefComment */ +}; +typedef enum yysymbol_kind_t yysymbol_kind_t; + -/* Copy the second part of user declarations. */ -#line 389 "y.tab.c" /* yacc.c:358 */ #ifdef short # undef short #endif -#ifdef YYTYPE_UINT8 -typedef YYTYPE_UINT8 yytype_uint8; -#else -typedef unsigned char yytype_uint8; +/* On compilers that do not define __PTRDIFF_MAX__ etc., make sure + and (if available) are included + so that the code can choose integer types of a good width. */ + +#ifndef __PTRDIFF_MAX__ +# include /* INFRINGES ON USER NAME SPACE */ +# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ +# include /* INFRINGES ON USER NAME SPACE */ +# define YY_STDINT_H +# endif #endif -#ifdef YYTYPE_INT8 -typedef YYTYPE_INT8 yytype_int8; +/* Narrow types that promote to a signed type and that can represent a + signed or unsigned integer of at least N bits. In tables they can + save space and decrease cache pressure. Promoting to a signed type + helps avoid bugs in integer arithmetic. */ + +#ifdef __INT_LEAST8_MAX__ +typedef __INT_LEAST8_TYPE__ yytype_int8; +#elif defined YY_STDINT_H +typedef int_least8_t yytype_int8; #else typedef signed char yytype_int8; #endif -#ifdef YYTYPE_UINT16 -typedef YYTYPE_UINT16 yytype_uint16; +#ifdef __INT_LEAST16_MAX__ +typedef __INT_LEAST16_TYPE__ yytype_int16; +#elif defined YY_STDINT_H +typedef int_least16_t yytype_int16; #else -typedef unsigned short int yytype_uint16; +typedef short yytype_int16; #endif -#ifdef YYTYPE_INT16 -typedef YYTYPE_INT16 yytype_int16; +/* Work around bug in HP-UX 11.23, which defines these macros + incorrectly for preprocessor constants. This workaround can likely + be removed in 2023, as HPE has promised support for HP-UX 11.23 + (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of + . */ +#ifdef __hpux +# undef UINT_LEAST8_MAX +# undef UINT_LEAST16_MAX +# define UINT_LEAST8_MAX 255 +# define UINT_LEAST16_MAX 65535 +#endif + +#if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__ +typedef __UINT_LEAST8_TYPE__ yytype_uint8; +#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \ + && UINT_LEAST8_MAX <= INT_MAX) +typedef uint_least8_t yytype_uint8; +#elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX +typedef unsigned char yytype_uint8; #else -typedef short int yytype_int16; +typedef short yytype_uint8; +#endif + +#if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__ +typedef __UINT_LEAST16_TYPE__ yytype_uint16; +#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \ + && UINT_LEAST16_MAX <= INT_MAX) +typedef uint_least16_t yytype_uint16; +#elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX +typedef unsigned short yytype_uint16; +#else +typedef int yytype_uint16; +#endif + +#ifndef YYPTRDIFF_T +# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__ +# define YYPTRDIFF_T __PTRDIFF_TYPE__ +# define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__ +# elif defined PTRDIFF_MAX +# ifndef ptrdiff_t +# include /* INFRINGES ON USER NAME SPACE */ +# endif +# define YYPTRDIFF_T ptrdiff_t +# define YYPTRDIFF_MAXIMUM PTRDIFF_MAX +# else +# define YYPTRDIFF_T long +# define YYPTRDIFF_MAXIMUM LONG_MAX +# endif #endif #ifndef YYSIZE_T @@ -420,15 +718,28 @@ typedef short int yytype_int16; # define YYSIZE_T __SIZE_TYPE__ # elif defined size_t # define YYSIZE_T size_t -# elif ! defined YYSIZE_T +# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ # include /* INFRINGES ON USER NAME SPACE */ # define YYSIZE_T size_t # else -# define YYSIZE_T unsigned int +# define YYSIZE_T unsigned # endif #endif -#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) +#define YYSIZE_MAXIMUM \ + YY_CAST (YYPTRDIFF_T, \ + (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \ + ? YYPTRDIFF_MAXIMUM \ + : YY_CAST (YYSIZE_T, -1))) + +#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X)) + + +/* Stored state numbers (used for stacks). */ +typedef yytype_int16 yy_state_t; + +/* State numbers in computations. */ +typedef int yy_state_fast_t; #ifndef YY_ # if defined YYENABLE_NLS && YYENABLE_NLS @@ -442,47 +753,43 @@ typedef short int yytype_int16; # endif #endif -#ifndef YY_ATTRIBUTE -# if (defined __GNUC__ \ - && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \ - || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C -# define YY_ATTRIBUTE(Spec) __attribute__(Spec) -# else -# define YY_ATTRIBUTE(Spec) /* empty */ -# endif -#endif #ifndef YY_ATTRIBUTE_PURE -# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__)) +# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__) +# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__)) +# else +# define YY_ATTRIBUTE_PURE +# endif #endif #ifndef YY_ATTRIBUTE_UNUSED -# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__)) -#endif - -#if !defined _Noreturn \ - && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112) -# if defined _MSC_VER && 1200 <= _MSC_VER -# define _Noreturn __declspec (noreturn) +# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__) +# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) # else -# define _Noreturn YY_ATTRIBUTE ((__noreturn__)) +# define YY_ATTRIBUTE_UNUSED # endif #endif /* Suppress unused-variable warnings by "using" E. */ #if ! defined lint || defined __GNUC__ -# define YYUSE(E) ((void) (E)) +# define YY_USE(E) ((void) (E)) #else -# define YYUSE(E) /* empty */ +# define YY_USE(E) /* empty */ #endif -#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ /* Suppress an incorrect diagnostic about yylval being uninitialized. */ -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ - _Pragma ("GCC diagnostic push") \ - _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ +#if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__ +# if __GNUC__ * 100 + __GNUC_MINOR__ < 407 +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") +# else +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \ _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") -# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ +# endif +# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ _Pragma ("GCC diagnostic pop") #else # define YY_INITIAL_VALUE(Value) Value @@ -495,8 +802,22 @@ typedef short int yytype_int16; # define YY_INITIAL_VALUE(Value) /* Nothing. */ #endif +#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__ +# define YY_IGNORE_USELESS_CAST_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"") +# define YY_IGNORE_USELESS_CAST_END \ + _Pragma ("GCC diagnostic pop") +#endif +#ifndef YY_IGNORE_USELESS_CAST_BEGIN +# define YY_IGNORE_USELESS_CAST_BEGIN +# define YY_IGNORE_USELESS_CAST_END +#endif + + +#define YY_ASSERT(E) ((void) (0 && (E))) -#if ! defined yyoverflow || YYERROR_VERBOSE +#if !defined yyoverflow /* The parser invokes alloca or malloc; define the necessary symbols. */ @@ -561,8 +882,7 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */ # endif # endif # endif -#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ - +#endif /* !defined yyoverflow */ #if (! defined yyoverflow \ && (! defined __cplusplus \ @@ -572,18 +892,19 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */ /* A type that is properly aligned for any stack member. */ union yyalloc { - yytype_int16 yyss_alloc; + yy_state_t yyss_alloc; YYSTYPE yyvs_alloc; YYLTYPE yyls_alloc; }; /* The size of the maximum gap between one aligned stack and the next. */ -# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) +# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1) /* The size of an array large to enough to hold all stacks, each with N elements. */ # define YYSTACK_BYTES(N) \ - ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \ + ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE) \ + + YYSIZEOF (YYLTYPE)) \ + 2 * YYSTACK_GAP_MAXIMUM) # define YYCOPY_NEEDED 1 @@ -596,11 +917,11 @@ union yyalloc # define YYSTACK_RELOCATE(Stack_alloc, Stack) \ do \ { \ - YYSIZE_T yynewbytes; \ + YYPTRDIFF_T yynewbytes; \ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ Stack = &yyptr->Stack_alloc; \ - yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ - yyptr += yynewbytes / sizeof (*yyptr); \ + yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / YYSIZEOF (*yyptr); \ } \ while (0) @@ -612,12 +933,12 @@ union yyalloc # ifndef YYCOPY # if defined __GNUC__ && 1 < __GNUC__ # define YYCOPY(Dst, Src, Count) \ - __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) + __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src))) # else # define YYCOPY(Dst, Src, Count) \ do \ { \ - YYSIZE_T yyi; \ + YYPTRDIFF_T yyi; \ for (yyi = 0; yyi < (Count); yyi++) \ (Dst)[yyi] = (Src)[yyi]; \ } \ @@ -640,17 +961,20 @@ union yyalloc /* YYNSTATES -- Number of states. */ #define YYNSTATES 793 -/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned - by yylex, with out-of-bounds checking. */ -#define YYUNDEFTOK 2 +/* YYMAXUTOK -- Last valid token kind. */ #define YYMAXUTOK 333 -#define YYTRANSLATE(YYX) \ - ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) + +/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM + as returned by yylex, with out-of-bounds checking. */ +#define YYTRANSLATE(YYX) \ + (0 <= (YYX) && (YYX) <= YYMAXUTOK \ + ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \ + : YYSYMBOL_YYUNDEF) /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM - as returned by yylex, without out-of-bounds checking. */ -static const yytype_uint8 yytranslate[] = + as returned by yylex. */ +static const yytype_int8 yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -689,8 +1013,8 @@ static const yytype_uint8 yytranslate[] = }; #if YYDEBUG - /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ -static const yytype_uint16 yyrline[] = +/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ +static const yytype_int16 yyrline[] = { 0, 203, 203, 208, 211, 216, 217, 221, 223, 228, 229, 234, 236, 237, 238, 240, 241, 242, 244, 245, @@ -698,60 +1022,67 @@ static const yytype_uint16 yyrline[] = 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 287, 289, 290, 293, 294, - 295, 296, 300, 302, 308, 315, 319, 326, 328, 333, - 334, 338, 340, 342, 344, 346, 360, 362, 364, 366, - 372, 374, 376, 378, 380, 382, 384, 386, 388, 390, - 398, 400, 402, 406, 408, 413, 414, 419, 420, 424, - 426, 428, 430, 432, 434, 436, 438, 440, 442, 444, - 446, 448, 450, 452, 454, 456, 458, 460, 462, 466, - 467, 472, 480, 482, 486, 490, 492, 496, 500, 502, - 504, 506, 508, 510, 514, 516, 518, 520, 522, 526, - 528, 530, 532, 534, 536, 540, 542, 544, 546, 548, - 550, 554, 558, 563, 564, 568, 572, 577, 578, 583, - 584, 594, 596, 600, 602, 607, 608, 612, 614, 619, - 620, 624, 629, 630, 634, 636, 640, 642, 647, 648, - 652, 653, 656, 660, 662, 666, 668, 670, 675, 676, - 680, 682, 686, 688, 692, 696, 700, 706, 710, 712, - 716, 718, 722, 726, 730, 734, 736, 741, 742, 747, - 748, 750, 752, 761, 763, 765, 767, 769, 771, 775, - 777, 781, 785, 787, 789, 791, 793, 797, 799, 804, - 811, 815, 817, 819, 820, 822, 824, 826, 830, 832, - 834, 840, 846, 855, 857, 859, 865, 873, 875, 878, - 882, 886, 888, 893, 895, 903, 905, 907, 909, 911, - 913, 915, 917, 919, 921, 923, 926, 937, 955, 973, - 975, 979, 984, 985, 987, 994, 998, 999, 1003, 1004, - 1005, 1006, 1009, 1011, 1013, 1015, 1017, 1019, 1021, 1023, - 1025, 1027, 1029, 1031, 1033, 1035, 1037, 1039, 1041, 1043, - 1047, 1056, 1058, 1060, 1065, 1066, 1068, 1077, 1078, 1080, - 1086, 1092, 1098, 1106, 1113, 1121, 1128, 1130, 1132, 1134, - 1139, 1149, 1159, 1171, 1172, 1173, 1176, 1177, 1178, 1179, - 1186, 1192, 1201, 1208, 1214, 1220, 1228, 1230, 1234, 1236, - 1240, 1242, 1246, 1248, 1253, 1254, 1258, 1260, 1262, 1266, - 1268, 1272, 1274, 1278, 1280, 1282, 1290, 1293, 1296, 1298, - 1300, 1304, 1306, 1308, 1310, 1312, 1314, 1316, 1318, 1320, - 1322, 1324, 1326, 1330, 1332, 1334, 1336, 1338, 1340, 1342, - 1345, 1348, 1350, 1352, 1354, 1356, 1358, 1369, 1370, 1372, - 1376, 1380, 1384, 1388, 1394, 1402, 1404, 1408, 1411, 1415, - 1419 + 295, 296, 300, 302, 309, 317, 321, 328, 330, 335, + 336, 340, 342, 344, 346, 348, 362, 364, 366, 368, + 374, 376, 378, 380, 382, 384, 386, 388, 390, 392, + 400, 402, 404, 408, 410, 415, 416, 421, 422, 426, + 428, 430, 432, 434, 436, 438, 440, 442, 444, 446, + 448, 450, 452, 454, 456, 458, 460, 462, 464, 468, + 469, 474, 482, 484, 488, 492, 494, 498, 502, 504, + 506, 508, 510, 512, 516, 518, 520, 522, 524, 528, + 530, 532, 534, 536, 538, 542, 544, 546, 548, 550, + 552, 556, 560, 565, 566, 570, 574, 579, 580, 585, + 586, 596, 598, 602, 604, 609, 610, 614, 616, 621, + 622, 626, 631, 632, 636, 638, 642, 644, 649, 650, + 654, 655, 658, 662, 664, 668, 670, 672, 677, 678, + 682, 684, 688, 690, 694, 698, 702, 708, 712, 714, + 718, 720, 724, 728, 732, 736, 738, 743, 744, 749, + 750, 752, 754, 763, 765, 767, 769, 771, 773, 777, + 779, 783, 787, 789, 791, 793, 795, 799, 801, 806, + 813, 817, 819, 821, 822, 824, 826, 828, 832, 834, + 836, 842, 848, 857, 859, 861, 867, 875, 877, 880, + 884, 888, 890, 895, 897, 905, 907, 909, 911, 913, + 915, 917, 919, 921, 923, 925, 928, 939, 957, 975, + 977, 981, 986, 987, 989, 996, 1000, 1001, 1005, 1006, + 1007, 1008, 1011, 1013, 1015, 1017, 1019, 1021, 1023, 1025, + 1027, 1029, 1031, 1033, 1035, 1037, 1039, 1041, 1043, 1045, + 1049, 1058, 1060, 1062, 1067, 1068, 1070, 1080, 1081, 1083, + 1090, 1097, 1104, 1113, 1120, 1128, 1135, 1137, 1139, 1141, + 1146, 1156, 1166, 1178, 1179, 1180, 1183, 1184, 1185, 1186, + 1193, 1199, 1208, 1215, 1221, 1227, 1235, 1237, 1241, 1243, + 1247, 1249, 1253, 1255, 1260, 1261, 1265, 1267, 1269, 1273, + 1275, 1279, 1281, 1285, 1287, 1289, 1297, 1300, 1303, 1305, + 1307, 1311, 1313, 1315, 1317, 1319, 1321, 1323, 1325, 1327, + 1329, 1331, 1333, 1337, 1339, 1341, 1343, 1345, 1347, 1349, + 1352, 1355, 1357, 1359, 1361, 1363, 1365, 1376, 1377, 1379, + 1383, 1387, 1391, 1395, 1401, 1409, 1411, 1415, 1418, 1422, + 1426 }; #endif -#if YYDEBUG || YYERROR_VERBOSE || 0 +/** Accessing symbol of state STATE. */ +#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State]) + +#if YYDEBUG || 0 +/* The user-facing name of the symbol whose (internal) number is + YYSYMBOL. No bounds checking. */ +static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED; + /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = { - "$end", "error", "$undefined", "MODULE", "MAINMODULE", "EXTERN", - "READONLY", "INITCALL", "INITNODE", "INITPROC", "PUPABLE", "CHARE", - "MAINCHARE", "GROUP", "NODEGROUP", "ARRAY", "MESSAGE", "CONDITIONAL", - "CLASS", "INCLUDE", "STACKSIZE", "THREADED", "TEMPLATE", "WHENIDLE", - "SYNC", "IGET", "EXCLUSIVE", "IMMEDIATE", "SKIPSCHED", "INLINE", - "VIRTUAL", "MIGRATABLE", "AGGREGATE", "CREATEHERE", "CREATEHOME", - "NOKEEP", "NOTRACE", "APPWORK", "VOID", "CONST", "NOCOPY", "NOCOPYPOST", - "NOCOPYDEVICE", "PACKED", "VARSIZE", "ENTRY", "FOR", "FORALL", "WHILE", - "WHEN", "OVERLAP", "SERIAL", "IF", "ELSE", "PYTHON", "LOCAL", - "NAMESPACE", "USING", "IDENT", "NUMBER", "LITERAL", "CPROGRAM", "HASHIF", - "HASHIFDEF", "INT", "LONG", "SHORT", "CHAR", "FLOAT", "DOUBLE", + "\"end of file\"", "error", "\"invalid token\"", "MODULE", "MAINMODULE", + "EXTERN", "READONLY", "INITCALL", "INITNODE", "INITPROC", "PUPABLE", + "CHARE", "MAINCHARE", "GROUP", "NODEGROUP", "ARRAY", "MESSAGE", + "CONDITIONAL", "CLASS", "INCLUDE", "STACKSIZE", "THREADED", "TEMPLATE", + "WHENIDLE", "SYNC", "IGET", "EXCLUSIVE", "IMMEDIATE", "SKIPSCHED", + "INLINE", "VIRTUAL", "MIGRATABLE", "AGGREGATE", "CREATEHERE", + "CREATEHOME", "NOKEEP", "NOTRACE", "APPWORK", "VOID", "CONST", "NOCOPY", + "NOCOPYPOST", "NOCOPYDEVICE", "PACKED", "VARSIZE", "ENTRY", "FOR", + "FORALL", "WHILE", "WHEN", "OVERLAP", "SERIAL", "IF", "ELSE", "PYTHON", + "LOCAL", "NAMESPACE", "USING", "IDENT", "NUMBER", "LITERAL", "CPROGRAM", + "HASHIF", "HASHIFDEF", "INT", "LONG", "SHORT", "CHAR", "FLOAT", "DOUBLE", "UNSIGNED", "ACCEL", "READWRITE", "WRITEONLY", "ACCELBLOCK", "MEMCRITICAL", "REDUCTIONTARGET", "CASE", "TYPENAME", "';'", "':'", "'{'", "'}'", "','", "'<'", "'>'", "'*'", "'('", "')'", "'&'", "'.'", @@ -782,38 +1113,26 @@ static const char *const yytname[] = "SEntryList", "SParamBracketStart", "SParamBracketEnd", "HashIFComment", "HashIFDefComment", YY_NULLPTR }; -#endif -# ifdef YYPRINT -/* YYTOKNUM[NUM] -- (External) token number corresponding to the - (internal) symbol number NUM (which must be that of a token). */ -static const yytype_uint16 yytoknum[] = +static const char * +yysymbol_name (yysymbol_kind_t yysymbol) { - 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, - 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, - 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, - 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, - 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, - 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, - 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, - 325, 326, 327, 328, 329, 330, 331, 332, 333, 59, - 58, 123, 125, 44, 60, 62, 42, 40, 41, 38, - 46, 91, 93, 61, 45 -}; -# endif + return yytname[yysymbol]; +} +#endif -#define YYPACT_NINF -601 +#define YYPACT_NINF (-601) -#define yypact_value_is_default(Yystate) \ - (!!((Yystate) == (-601))) +#define yypact_value_is_default(Yyn) \ + ((Yyn) == YYPACT_NINF) -#define YYTABLE_NINF -352 +#define YYTABLE_NINF (-352) -#define yytable_value_is_error(Yytable_value) \ +#define yytable_value_is_error(Yyn) \ 0 - /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing - STATE-NUM. */ +/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + STATE-NUM. */ static const yytype_int16 yypact[] = { 197, 1300, 1300, 61, -601, 197, -601, -601, -601, -601, @@ -898,10 +1217,10 @@ static const yytype_int16 yypact[] = -601, 672, -601 }; - /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. - Performed when YYTABLE does not specify something else to do. Zero - means the default is an error. */ -static const yytype_uint16 yydefact[] = +/* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. + Performed when YYTABLE does not specify something else to do. Zero + means the default is an error. */ +static const yytype_int16 yydefact[] = { 3, 0, 0, 0, 2, 3, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, @@ -985,7 +1304,7 @@ static const yytype_uint16 yydefact[] = 366, 0, 367 }; - /* YYPGOTO[NTERM-NUM]. */ +/* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { -601, -601, 712, -601, -55, -283, -1, -62, 666, 702, @@ -1002,10 +1321,10 @@ static const yytype_int16 yypgoto[] = -561, -600, -503, -601, 271, 294, 247, -601, -601 }; - /* YYDEFGOTO[NTERM-NUM]. */ +/* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { - -1, 3, 4, 73, 409, 197, 264, 154, 5, 64, + 0, 3, 4, 73, 409, 197, 264, 154, 5, 64, 74, 75, 76, 323, 324, 325, 246, 155, 265, 156, 157, 158, 159, 160, 161, 223, 224, 326, 397, 332, 333, 107, 108, 164, 179, 280, 281, 171, 262, 297, @@ -1019,9 +1338,9 @@ static const yytype_int16 yydefgoto[] = 605, 638, 587, 591, 592, 334, 458, 78, 79 }; - /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If - positive, shift that token. If negative, reduce the rule whose - number is the opposite. If YYTABLE_NINF, syntax error. */ +/* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If + positive, shift that token. If negative, reduce the rule whose + number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_int16 yytable[] = { 57, 58, 63, 63, 162, 142, 368, 85, 375, 168, @@ -1336,8 +1655,8 @@ static const yytype_int16 yycheck[] = -1, -1, -1, 78 }; - /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing - symbol of state STATE-NUM. */ +/* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of + state STATE-NUM. */ static const yytype_uint8 yystos[] = { 0, 3, 4, 96, 97, 103, 3, 4, 5, 7, @@ -1422,7 +1741,7 @@ static const yytype_uint8 yystos[] = 203, 197, 82 }; - /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ +/* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */ static const yytype_uint8 yyr1[] = { 0, 95, 96, 97, 97, 98, 98, 99, 99, 100, @@ -1468,8 +1787,8 @@ static const yytype_uint8 yyr1[] = 213 }; - /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ -static const yytype_uint8 yyr2[] = +/* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */ +static const yytype_int8 yyr2[] = { 0, 2, 1, 0, 2, 0, 1, 1, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -1515,39 +1834,39 @@ static const yytype_uint8 yyr2[] = }; +enum { YYENOMEM = -2 }; + #define yyerrok (yyerrstatus = 0) #define yyclearin (yychar = YYEMPTY) -#define YYEMPTY (-2) -#define YYEOF 0 #define YYACCEPT goto yyacceptlab #define YYABORT goto yyabortlab #define YYERROR goto yyerrorlab +#define YYNOMEM goto yyexhaustedlab #define YYRECOVERING() (!!yyerrstatus) -#define YYBACKUP(Token, Value) \ -do \ - if (yychar == YYEMPTY) \ - { \ - yychar = (Token); \ - yylval = (Value); \ - YYPOPSTACK (yylen); \ - yystate = *yyssp; \ - goto yybackup; \ - } \ - else \ - { \ - yyerror (YY_("syntax error: cannot back up")); \ - YYERROR; \ - } \ -while (0) - -/* Error token number */ -#define YYTERROR 1 -#define YYERRCODE 256 - +#define YYBACKUP(Token, Value) \ + do \ + if (yychar == YYEMPTY) \ + { \ + yychar = (Token); \ + yylval = (Value); \ + YYPOPSTACK (yylen); \ + yystate = *yyssp; \ + goto yybackup; \ + } \ + else \ + { \ + yyerror (YY_("syntax error: cannot back up")); \ + YYERROR; \ + } \ + while (0) + +/* Backward compatibility with an undocumented macro. + Use YYerror or YYUNDEF. */ +#define YYERRCODE YYUNDEF /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. If N is 0, then set CURRENT to the empty location which ends @@ -1591,20 +1910,27 @@ do { \ } while (0) -/* YY_LOCATION_PRINT -- Print the location on the stream. +/* YYLOCATION_PRINT -- Print the location on the stream. This macro was not mandated originally: define only if we know we won't break user code: when these are the locations we know. */ -#ifndef YY_LOCATION_PRINT -# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL +# ifndef YYLOCATION_PRINT + +# if defined YY_LOCATION_PRINT + + /* Temporary convenience wrapper in case some people defined the + undocumented and private YY_LOCATION_PRINT macros. */ +# define YYLOCATION_PRINT(File, Loc) YY_LOCATION_PRINT(File, *(Loc)) + +# elif defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL /* Print *YYLOCP on YYO. Private, do not rely on its existence. */ YY_ATTRIBUTE_UNUSED -static unsigned +static int yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp) { - unsigned res = 0; + int res = 0; int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0; if (0 <= yylocp->first_line) { @@ -1624,63 +1950,71 @@ yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp) res += YYFPRINTF (yyo, "-%d", end_col); } return res; - } +} -# define YY_LOCATION_PRINT(File, Loc) \ - yy_location_print_ (File, &(Loc)) +# define YYLOCATION_PRINT yy_location_print_ -# else -# define YY_LOCATION_PRINT(File, Loc) ((void) 0) -# endif -#endif + /* Temporary convenience wrapper in case some people defined the + undocumented and private YY_LOCATION_PRINT macros. */ +# define YY_LOCATION_PRINT(File, Loc) YYLOCATION_PRINT(File, &(Loc)) + +# else + +# define YYLOCATION_PRINT(File, Loc) ((void) 0) + /* Temporary convenience wrapper in case some people defined the + undocumented and private YY_LOCATION_PRINT macros. */ +# define YY_LOCATION_PRINT YYLOCATION_PRINT + +# endif +# endif /* !defined YYLOCATION_PRINT */ -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ +# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \ do { \ if (yydebug) \ { \ YYFPRINTF (stderr, "%s ", Title); \ yy_symbol_print (stderr, \ - Type, Value, Location); \ + Kind, Value, Location); \ YYFPRINTF (stderr, "\n"); \ } \ } while (0) -/*----------------------------------------. -| Print this symbol's value on YYOUTPUT. | -`----------------------------------------*/ +/*-----------------------------------. +| Print this symbol's value on YYO. | +`-----------------------------------*/ static void -yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp) +yy_symbol_value_print (FILE *yyo, + yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp) { - FILE *yyo = yyoutput; - YYUSE (yyo); - YYUSE (yylocationp); + FILE *yyoutput = yyo; + YY_USE (yyoutput); + YY_USE (yylocationp); if (!yyvaluep) return; -# ifdef YYPRINT - if (yytype < YYNTOKENS) - YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); -# endif - YYUSE (yytype); + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN + YY_USE (yykind); + YY_IGNORE_MAYBE_UNINITIALIZED_END } -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ +/*---------------------------. +| Print this symbol on YYO. | +`---------------------------*/ static void -yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp) +yy_symbol_print (FILE *yyo, + yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp) { - YYFPRINTF (yyoutput, "%s %s (", - yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]); + YYFPRINTF (yyo, "%s %s (", + yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind)); - YY_LOCATION_PRINT (yyoutput, *yylocationp); - YYFPRINTF (yyoutput, ": "); - yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp); - YYFPRINTF (yyoutput, ")"); + YYLOCATION_PRINT (yyo, yylocationp); + YYFPRINTF (yyo, ": "); + yy_symbol_value_print (yyo, yykind, yyvaluep, yylocationp); + YYFPRINTF (yyo, ")"); } /*------------------------------------------------------------------. @@ -1689,7 +2023,7 @@ yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYL `------------------------------------------------------------------*/ static void -yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) +yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop) { YYFPRINTF (stderr, "Stack now"); for (; yybottom <= yytop; yybottom++) @@ -1712,21 +2046,22 @@ do { \ `------------------------------------------------*/ static void -yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule) +yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, + int yyrule) { - unsigned long int yylno = yyrline[yyrule]; + int yylno = yyrline[yyrule]; int yynrhs = yyr2[yyrule]; int yyi; - YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", + YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n", yyrule - 1, yylno); /* The symbols being reduced. */ for (yyi = 0; yyi < yynrhs; yyi++) { YYFPRINTF (stderr, " $%d = ", yyi + 1); yy_symbol_print (stderr, - yystos[yyssp[yyi + 1 - yynrhs]], - &(yyvsp[(yyi + 1) - (yynrhs)]) - , &(yylsp[(yyi + 1) - (yynrhs)]) ); + YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]), + &yyvsp[(yyi + 1) - (yynrhs)], + &(yylsp[(yyi + 1) - (yynrhs)])); YYFPRINTF (stderr, "\n"); } } @@ -1741,8 +2076,8 @@ do { \ multiple parsers can coexist. */ int yydebug; #else /* !YYDEBUG */ -# define YYDPRINTF(Args) -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) +# define YYDPRINTF(Args) ((void) 0) +# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) # define YY_STACK_PRINT(Bottom, Top) # define YY_REDUCE_PRINT(Rule) #endif /* !YYDEBUG */ @@ -1765,250 +2100,31 @@ int yydebug; #endif -#if YYERROR_VERBOSE - -# ifndef yystrlen -# if defined __GLIBC__ && defined _STRING_H -# define yystrlen strlen -# else -/* Return the length of YYSTR. */ -static YYSIZE_T -yystrlen (const char *yystr) -{ - YYSIZE_T yylen; - for (yylen = 0; yystr[yylen]; yylen++) - continue; - return yylen; -} -# endif -# endif - -# ifndef yystpcpy -# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE -# define yystpcpy stpcpy -# else -/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in - YYDEST. */ -static char * -yystpcpy (char *yydest, const char *yysrc) -{ - char *yyd = yydest; - const char *yys = yysrc; - - while ((*yyd++ = *yys++) != '\0') - continue; - - return yyd - 1; -} -# endif -# endif - -# ifndef yytnamerr -/* Copy to YYRES the contents of YYSTR after stripping away unnecessary - quotes and backslashes, so that it's suitable for yyerror. The - heuristic is that double-quoting is unnecessary unless the string - contains an apostrophe, a comma, or backslash (other than - backslash-backslash). YYSTR is taken from yytname. If YYRES is - null, do not copy; instead, return the length of what the result - would have been. */ -static YYSIZE_T -yytnamerr (char *yyres, const char *yystr) -{ - if (*yystr == '"') - { - YYSIZE_T yyn = 0; - char const *yyp = yystr; - - for (;;) - switch (*++yyp) - { - case '\'': - case ',': - goto do_not_strip_quotes; - - case '\\': - if (*++yyp != '\\') - goto do_not_strip_quotes; - /* Fall through. */ - default: - if (yyres) - yyres[yyn] = *yyp; - yyn++; - break; - - case '"': - if (yyres) - yyres[yyn] = '\0'; - return yyn; - } - do_not_strip_quotes: ; - } - - if (! yyres) - return yystrlen (yystr); - - return yystpcpy (yyres, yystr) - yyres; -} -# endif - -/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message - about the unexpected token YYTOKEN for the state stack whose top is - YYSSP. - - Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is - not large enough to hold the message. In that case, also set - *YYMSG_ALLOC to the required number of bytes. Return 2 if the - required number of bytes is too large to store. */ -static int -yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, - yytype_int16 *yyssp, int yytoken) -{ - YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]); - YYSIZE_T yysize = yysize0; - enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; - /* Internationalized format string. */ - const char *yyformat = YY_NULLPTR; - /* Arguments of yyformat. */ - char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; - /* Number of reported tokens (one for the "unexpected", one per - "expected"). */ - int yycount = 0; - - /* There are many possibilities here to consider: - - If this state is a consistent state with a default action, then - the only way this function was invoked is if the default action - is an error action. In that case, don't check for expected - tokens because there are none. - - The only way there can be no lookahead present (in yychar) is if - this state is a consistent state with a default action. Thus, - detecting the absence of a lookahead is sufficient to determine - that there is no unexpected or expected token to report. In that - case, just report a simple "syntax error". - - Don't assume there isn't a lookahead just because this state is a - consistent state with a default action. There might have been a - previous inconsistent state, consistent state with a non-default - action, or user semantic action that manipulated yychar. - - Of course, the expected token list depends on states to have - correct lookahead information, and it depends on the parser not - to perform extra reductions after fetching a lookahead from the - scanner and before detecting a syntax error. Thus, state merging - (from LALR or IELR) and default reductions corrupt the expected - token list. However, the list is correct for canonical LR with - one exception: it will still contain any token that will not be - accepted due to an error action in a later state. - */ - if (yytoken != YYEMPTY) - { - int yyn = yypact[*yyssp]; - yyarg[yycount++] = yytname[yytoken]; - if (!yypact_value_is_default (yyn)) - { - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. In other words, skip the first -YYN actions for - this state because they are default actions. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn + 1; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yyx; - - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR - && !yytable_value_is_error (yytable[yyx + yyn])) - { - if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) - { - yycount = 1; - yysize = yysize0; - break; - } - yyarg[yycount++] = yytname[yyx]; - { - YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]); - if (! (yysize <= yysize1 - && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) - return 2; - yysize = yysize1; - } - } - } - } - switch (yycount) - { -# define YYCASE_(N, S) \ - case N: \ - yyformat = S; \ - break - YYCASE_(0, YY_("syntax error")); - YYCASE_(1, YY_("syntax error, unexpected %s")); - YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); - YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); - YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); - YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); -# undef YYCASE_ - } - - { - YYSIZE_T yysize1 = yysize + yystrlen (yyformat); - if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) - return 2; - yysize = yysize1; - } - if (*yymsg_alloc < yysize) - { - *yymsg_alloc = 2 * yysize; - if (! (yysize <= *yymsg_alloc - && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) - *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; - return 1; - } - /* Avoid sprintf, as that infringes on the user's name space. - Don't have undefined behavior even if the translation - produced a string with the wrong number of "%s"s. */ - { - char *yyp = *yymsg; - int yyi = 0; - while ((*yyp = *yyformat) != '\0') - if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) - { - yyp += yytnamerr (yyp, yyarg[yyi++]); - yyformat += 2; - } - else - { - yyp++; - yyformat++; - } - } - return 0; -} -#endif /* YYERROR_VERBOSE */ /*-----------------------------------------------. | Release the memory associated to this symbol. | `-----------------------------------------------*/ static void -yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp) +yydestruct (const char *yymsg, + yysymbol_kind_t yykind, YYSTYPE *yyvaluep, YYLTYPE *yylocationp) { - YYUSE (yyvaluep); - YYUSE (yylocationp); + YY_USE (yyvaluep); + YY_USE (yylocationp); if (!yymsg) yymsg = "Deleting"; - YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); + YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp); YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - YYUSE (yytype); + YY_USE (yykind); YY_IGNORE_MAYBE_UNINITIALIZED_END } - - -/* The lookahead symbol. */ +/* Lookahead token kind. */ int yychar; /* The semantic value of the lookahead symbol. */ @@ -2023,6 +2139,8 @@ YYLTYPE yylloc int yynerrs; + + /*----------. | yyparse. | `----------*/ @@ -2030,53 +2148,45 @@ int yynerrs; int yyparse (void) { - int yystate; + yy_state_fast_t yystate = 0; /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus; - - /* The stacks and their tools: - 'yyss': related to states. - 'yyvs': related to semantic values. - 'yyls': related to locations. + int yyerrstatus = 0; - Refer to the stacks through separate pointers, to allow yyoverflow + /* Refer to the stacks through separate pointers, to allow yyoverflow to reallocate them elsewhere. */ - /* The state stack. */ - yytype_int16 yyssa[YYINITDEPTH]; - yytype_int16 *yyss; - yytype_int16 *yyssp; + /* Their size. */ + YYPTRDIFF_T yystacksize = YYINITDEPTH; - /* The semantic value stack. */ + /* The state stack: array, bottom, top. */ + yy_state_t yyssa[YYINITDEPTH]; + yy_state_t *yyss = yyssa; + yy_state_t *yyssp = yyss; + + /* The semantic value stack: array, bottom, top. */ YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs; - YYSTYPE *yyvsp; + YYSTYPE *yyvs = yyvsa; + YYSTYPE *yyvsp = yyvs; - /* The location stack. */ + /* The location stack: array, bottom, top. */ YYLTYPE yylsa[YYINITDEPTH]; - YYLTYPE *yyls; - YYLTYPE *yylsp; - - /* The locations where the error started and ended. */ - YYLTYPE yyerror_range[3]; - - YYSIZE_T yystacksize; + YYLTYPE *yyls = yylsa; + YYLTYPE *yylsp = yyls; int yyn; + /* The return value of yyparse. */ int yyresult; - /* Lookahead token as an internal (translated) token number. */ - int yytoken = 0; + /* Lookahead symbol kind. */ + yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY; /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; YYLTYPE yyloc; -#if YYERROR_VERBOSE - /* Buffer for error messages, and its allocated size. */ - char yymsgbuf[128]; - char *yymsg = yymsgbuf; - YYSIZE_T yymsg_alloc = sizeof yymsgbuf; -#endif + /* The locations where the error started and ended. */ + YYLTYPE yyerror_range[3]; + + #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N)) @@ -2084,43 +2194,49 @@ yyparse (void) Keep to zero when no symbol should be popped. */ int yylen = 0; - yyssp = yyss = yyssa; - yyvsp = yyvs = yyvsa; - yylsp = yyls = yylsa; - yystacksize = YYINITDEPTH; - YYDPRINTF ((stderr, "Starting parse\n")); - yystate = 0; - yyerrstatus = 0; - yynerrs = 0; yychar = YYEMPTY; /* Cause a token to be read. */ + yylsp[0] = yylloc; goto yysetstate; + /*------------------------------------------------------------. -| yynewstate -- Push a new state, which is found in yystate. | +| yynewstate -- push a new state, which is found in yystate. | `------------------------------------------------------------*/ - yynewstate: +yynewstate: /* In all cases, when you get here, the value and location stacks have just been pushed. So pushing a state here evens the stacks. */ yyssp++; - yysetstate: - *yyssp = yystate; + +/*--------------------------------------------------------------------. +| yysetstate -- set current state (the top of the stack) to yystate. | +`--------------------------------------------------------------------*/ +yysetstate: + YYDPRINTF ((stderr, "Entering state %d\n", yystate)); + YY_ASSERT (0 <= yystate && yystate < YYNSTATES); + YY_IGNORE_USELESS_CAST_BEGIN + *yyssp = YY_CAST (yy_state_t, yystate); + YY_IGNORE_USELESS_CAST_END + YY_STACK_PRINT (yyss, yyssp); if (yyss + yystacksize - 1 <= yyssp) +#if !defined yyoverflow && !defined YYSTACK_RELOCATE + YYNOMEM; +#else { /* Get the current used size of the three stacks, in elements. */ - YYSIZE_T yysize = yyssp - yyss + 1; + YYPTRDIFF_T yysize = yyssp - yyss + 1; -#ifdef yyoverflow +# if defined yyoverflow { /* Give user a chance to reallocate the stack. Use copies of these so that the &'s don't force the real ones into memory. */ + yy_state_t *yyss1 = yyss; YYSTYPE *yyvs1 = yyvs; - yytype_int16 *yyss1 = yyss; YYLTYPE *yyls1 = yyls; /* Each stack pointer address is followed by the size of the @@ -2128,32 +2244,29 @@ yyparse (void) conditional around just the two extra args, but that might be undefined if yyoverflow is a macro. */ yyoverflow (YY_("memory exhausted"), - &yyss1, yysize * sizeof (*yyssp), - &yyvs1, yysize * sizeof (*yyvsp), - &yyls1, yysize * sizeof (*yylsp), + &yyss1, yysize * YYSIZEOF (*yyssp), + &yyvs1, yysize * YYSIZEOF (*yyvsp), + &yyls1, yysize * YYSIZEOF (*yylsp), &yystacksize); - - yyls = yyls1; yyss = yyss1; yyvs = yyvs1; + yyls = yyls1; } -#else /* no yyoverflow */ -# ifndef YYSTACK_RELOCATE - goto yyexhaustedlab; -# else +# else /* defined YYSTACK_RELOCATE */ /* Extend the stack our own way. */ if (YYMAXDEPTH <= yystacksize) - goto yyexhaustedlab; + YYNOMEM; yystacksize *= 2; if (YYMAXDEPTH < yystacksize) yystacksize = YYMAXDEPTH; { - yytype_int16 *yyss1 = yyss; + yy_state_t *yyss1 = yyss; union yyalloc *yyptr = - (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); + YY_CAST (union yyalloc *, + YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize)))); if (! yyptr) - goto yyexhaustedlab; + YYNOMEM; YYSTACK_RELOCATE (yyss_alloc, yyss); YYSTACK_RELOCATE (yyvs_alloc, yyvs); YYSTACK_RELOCATE (yyls_alloc, yyls); @@ -2162,31 +2275,32 @@ yyparse (void) YYSTACK_FREE (yyss1); } # endif -#endif /* no yyoverflow */ yyssp = yyss + yysize - 1; yyvsp = yyvs + yysize - 1; yylsp = yyls + yysize - 1; - YYDPRINTF ((stderr, "Stack size increased to %lu\n", - (unsigned long int) yystacksize)); + YY_IGNORE_USELESS_CAST_BEGIN + YYDPRINTF ((stderr, "Stack size increased to %ld\n", + YY_CAST (long, yystacksize))); + YY_IGNORE_USELESS_CAST_END if (yyss + yystacksize - 1 <= yyssp) YYABORT; } +#endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */ - YYDPRINTF ((stderr, "Entering state %d\n", yystate)); if (yystate == YYFINAL) YYACCEPT; goto yybackup; + /*-----------. | yybackup. | `-----------*/ yybackup: - /* Do appropriate processing given the current state. Read a lookahead token if we need one and don't already have one. */ @@ -2197,18 +2311,30 @@ yybackup: /* Not known => get a lookahead token if don't already have one. */ - /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ + /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */ if (yychar == YYEMPTY) { - YYDPRINTF ((stderr, "Reading a token: ")); + YYDPRINTF ((stderr, "Reading a token\n")); yychar = yylex (); } if (yychar <= YYEOF) { - yychar = yytoken = YYEOF; + yychar = YYEOF; + yytoken = YYSYMBOL_YYEOF; YYDPRINTF ((stderr, "Now at end of input.\n")); } + else if (yychar == YYerror) + { + /* The scanner already issued an error message, process directly + to error recovery. But do not keep the error token as + lookahead, it is too special and may lead us to an endless + loop in error recovery. */ + yychar = YYUNDEF; + yytoken = YYSYMBOL_YYerror; + yyerror_range[1] = yylloc; + goto yyerrlab1; + } else { yytoken = YYTRANSLATE (yychar); @@ -2236,15 +2362,14 @@ yybackup: /* Shift the lookahead token. */ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); - - /* Discard the shifted token. */ - yychar = YYEMPTY; - yystate = yyn; YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; YY_IGNORE_MAYBE_UNINITIALIZED_END *++yylsp = yylloc; + + /* Discard the shifted token. */ + yychar = YYEMPTY; goto yynewstate; @@ -2259,7 +2384,7 @@ yydefault: /*-----------------------------. -| yyreduce -- Do a reduction. | +| yyreduce -- do a reduction. | `-----------------------------*/ yyreduce: /* yyn is the number of a rule to reduce with. */ @@ -2275,467 +2400,470 @@ yyreduce: GCC warning that YYVAL may be used uninitialized. */ yyval = yyvsp[1-yylen]; - /* Default location. */ + /* Default location. */ YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen); + yyerror_range[1] = yyloc; YY_REDUCE_PRINT (yyn); switch (yyn) { - case 2: -#line 204 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.modlist) = (yyvsp[0].modlist); modlist = (yyvsp[0].modlist); } -#line 2287 "y.tab.c" /* yacc.c:1646 */ + case 2: /* File: ModuleEList */ +#line 204 "xi-grammar.y" + { (yyval.modlist) = (yyvsp[0].modlist); modlist = (yyvsp[0].modlist); } +#line 2413 "y.tab.c" break; - case 3: -#line 208 "xi-grammar.y" /* yacc.c:1646 */ - { + case 3: /* ModuleEList: %empty */ +#line 208 "xi-grammar.y" + { (yyval.modlist) = 0; } -#line 2295 "y.tab.c" /* yacc.c:1646 */ +#line 2421 "y.tab.c" break; - case 4: -#line 212 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.modlist) = new AstChildren(lineno, (yyvsp[-1].module), (yyvsp[0].modlist)); } -#line 2301 "y.tab.c" /* yacc.c:1646 */ + case 4: /* ModuleEList: Module ModuleEList */ +#line 212 "xi-grammar.y" + { (yyval.modlist) = new AstChildren(lineno, (yyvsp[-1].module), (yyvsp[0].modlist)); } +#line 2427 "y.tab.c" break; - case 5: -#line 216 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.intval) = 0; } -#line 2307 "y.tab.c" /* yacc.c:1646 */ + case 5: /* OptExtern: %empty */ +#line 216 "xi-grammar.y" + { (yyval.intval) = 0; } +#line 2433 "y.tab.c" break; - case 6: -#line 218 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.intval) = 1; } -#line 2313 "y.tab.c" /* yacc.c:1646 */ + case 6: /* OptExtern: EXTERN */ +#line 218 "xi-grammar.y" + { (yyval.intval) = 1; } +#line 2439 "y.tab.c" break; - case 7: -#line 222 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.intval) = 1; } -#line 2319 "y.tab.c" /* yacc.c:1646 */ + case 7: /* OneOrMoreSemiColon: ';' */ +#line 222 "xi-grammar.y" + { (yyval.intval) = 1; } +#line 2445 "y.tab.c" break; - case 8: -#line 224 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.intval) = 2; } -#line 2325 "y.tab.c" /* yacc.c:1646 */ + case 8: /* OneOrMoreSemiColon: OneOrMoreSemiColon ';' */ +#line 224 "xi-grammar.y" + { (yyval.intval) = 2; } +#line 2451 "y.tab.c" break; - case 9: -#line 228 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.intval) = 0; } -#line 2331 "y.tab.c" /* yacc.c:1646 */ + case 9: /* OptSemiColon: %empty */ +#line 228 "xi-grammar.y" + { (yyval.intval) = 0; } +#line 2457 "y.tab.c" break; - case 10: -#line 230 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.intval) = 1; } -#line 2337 "y.tab.c" /* yacc.c:1646 */ + case 10: /* OptSemiColon: OneOrMoreSemiColon */ +#line 230 "xi-grammar.y" + { (yyval.intval) = 1; } +#line 2463 "y.tab.c" break; - case 11: -#line 235 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.strval) = (yyvsp[0].strval); } -#line 2343 "y.tab.c" /* yacc.c:1646 */ + case 11: /* Name: IDENT */ +#line 235 "xi-grammar.y" + { (yyval.strval) = (yyvsp[0].strval); } +#line 2469 "y.tab.c" break; - case 12: -#line 236 "xi-grammar.y" /* yacc.c:1646 */ - { ReservedWord(MODULE, (yyloc).first_column, (yyloc).last_column); YYABORT; } -#line 2349 "y.tab.c" /* yacc.c:1646 */ + case 12: /* Name: MODULE */ +#line 236 "xi-grammar.y" + { ReservedWord(MODULE, (yyloc).first_column, (yyloc).last_column); YYABORT; } +#line 2475 "y.tab.c" break; - case 13: -#line 237 "xi-grammar.y" /* yacc.c:1646 */ - { ReservedWord(MAINMODULE, (yyloc).first_column, (yyloc).last_column); YYABORT; } -#line 2355 "y.tab.c" /* yacc.c:1646 */ + case 13: /* Name: MAINMODULE */ +#line 237 "xi-grammar.y" + { ReservedWord(MAINMODULE, (yyloc).first_column, (yyloc).last_column); YYABORT; } +#line 2481 "y.tab.c" break; - case 14: -#line 238 "xi-grammar.y" /* yacc.c:1646 */ - { ReservedWord(EXTERN, (yyloc).first_column, (yyloc).last_column); YYABORT; } -#line 2361 "y.tab.c" /* yacc.c:1646 */ + case 14: /* Name: EXTERN */ +#line 238 "xi-grammar.y" + { ReservedWord(EXTERN, (yyloc).first_column, (yyloc).last_column); YYABORT; } +#line 2487 "y.tab.c" break; - case 15: -#line 240 "xi-grammar.y" /* yacc.c:1646 */ - { ReservedWord(INITCALL, (yyloc).first_column, (yyloc).last_column); YYABORT; } -#line 2367 "y.tab.c" /* yacc.c:1646 */ + case 15: /* Name: INITCALL */ +#line 240 "xi-grammar.y" + { ReservedWord(INITCALL, (yyloc).first_column, (yyloc).last_column); YYABORT; } +#line 2493 "y.tab.c" break; - case 16: -#line 241 "xi-grammar.y" /* yacc.c:1646 */ - { ReservedWord(INITNODE, (yyloc).first_column, (yyloc).last_column); YYABORT; } -#line 2373 "y.tab.c" /* yacc.c:1646 */ + case 16: /* Name: INITNODE */ +#line 241 "xi-grammar.y" + { ReservedWord(INITNODE, (yyloc).first_column, (yyloc).last_column); YYABORT; } +#line 2499 "y.tab.c" break; - case 17: -#line 242 "xi-grammar.y" /* yacc.c:1646 */ - { ReservedWord(INITPROC, (yyloc).first_column, (yyloc).last_column); YYABORT; } -#line 2379 "y.tab.c" /* yacc.c:1646 */ + case 17: /* Name: INITPROC */ +#line 242 "xi-grammar.y" + { ReservedWord(INITPROC, (yyloc).first_column, (yyloc).last_column); YYABORT; } +#line 2505 "y.tab.c" break; - case 18: -#line 244 "xi-grammar.y" /* yacc.c:1646 */ - { ReservedWord(CHARE, (yyloc).first_column, (yyloc).last_column); YYABORT; } -#line 2385 "y.tab.c" /* yacc.c:1646 */ + case 18: /* Name: CHARE */ +#line 244 "xi-grammar.y" + { ReservedWord(CHARE, (yyloc).first_column, (yyloc).last_column); YYABORT; } +#line 2511 "y.tab.c" break; - case 19: -#line 245 "xi-grammar.y" /* yacc.c:1646 */ - { ReservedWord(MAINCHARE, (yyloc).first_column, (yyloc).last_column); YYABORT; } -#line 2391 "y.tab.c" /* yacc.c:1646 */ + case 19: /* Name: MAINCHARE */ +#line 245 "xi-grammar.y" + { ReservedWord(MAINCHARE, (yyloc).first_column, (yyloc).last_column); YYABORT; } +#line 2517 "y.tab.c" break; - case 20: -#line 246 "xi-grammar.y" /* yacc.c:1646 */ - { ReservedWord(GROUP, (yyloc).first_column, (yyloc).last_column); YYABORT; } -#line 2397 "y.tab.c" /* yacc.c:1646 */ + case 20: /* Name: GROUP */ +#line 246 "xi-grammar.y" + { ReservedWord(GROUP, (yyloc).first_column, (yyloc).last_column); YYABORT; } +#line 2523 "y.tab.c" break; - case 21: -#line 247 "xi-grammar.y" /* yacc.c:1646 */ - { ReservedWord(NODEGROUP, (yyloc).first_column, (yyloc).last_column); YYABORT; } -#line 2403 "y.tab.c" /* yacc.c:1646 */ + case 21: /* Name: NODEGROUP */ +#line 247 "xi-grammar.y" + { ReservedWord(NODEGROUP, (yyloc).first_column, (yyloc).last_column); YYABORT; } +#line 2529 "y.tab.c" break; - case 22: -#line 248 "xi-grammar.y" /* yacc.c:1646 */ - { ReservedWord(ARRAY, (yyloc).first_column, (yyloc).last_column); YYABORT; } -#line 2409 "y.tab.c" /* yacc.c:1646 */ + case 22: /* Name: ARRAY */ +#line 248 "xi-grammar.y" + { ReservedWord(ARRAY, (yyloc).first_column, (yyloc).last_column); YYABORT; } +#line 2535 "y.tab.c" break; - case 23: -#line 252 "xi-grammar.y" /* yacc.c:1646 */ - { ReservedWord(INCLUDE, (yyloc).first_column, (yyloc).last_column); YYABORT; } -#line 2415 "y.tab.c" /* yacc.c:1646 */ + case 23: /* Name: INCLUDE */ +#line 252 "xi-grammar.y" + { ReservedWord(INCLUDE, (yyloc).first_column, (yyloc).last_column); YYABORT; } +#line 2541 "y.tab.c" break; - case 24: -#line 253 "xi-grammar.y" /* yacc.c:1646 */ - { ReservedWord(STACKSIZE, (yyloc).first_column, (yyloc).last_column); YYABORT; } -#line 2421 "y.tab.c" /* yacc.c:1646 */ + case 24: /* Name: STACKSIZE */ +#line 253 "xi-grammar.y" + { ReservedWord(STACKSIZE, (yyloc).first_column, (yyloc).last_column); YYABORT; } +#line 2547 "y.tab.c" break; - case 25: -#line 254 "xi-grammar.y" /* yacc.c:1646 */ - { ReservedWord(THREADED, (yyloc).first_column, (yyloc).last_column); YYABORT; } -#line 2427 "y.tab.c" /* yacc.c:1646 */ + case 25: /* Name: THREADED */ +#line 254 "xi-grammar.y" + { ReservedWord(THREADED, (yyloc).first_column, (yyloc).last_column); YYABORT; } +#line 2553 "y.tab.c" break; - case 26: -#line 255 "xi-grammar.y" /* yacc.c:1646 */ - { ReservedWord(TEMPLATE, (yyloc).first_column, (yyloc).last_column); YYABORT; } -#line 2433 "y.tab.c" /* yacc.c:1646 */ + case 26: /* Name: TEMPLATE */ +#line 255 "xi-grammar.y" + { ReservedWord(TEMPLATE, (yyloc).first_column, (yyloc).last_column); YYABORT; } +#line 2559 "y.tab.c" break; - case 27: -#line 256 "xi-grammar.y" /* yacc.c:1646 */ - { ReservedWord(WHENIDLE, (yyloc).first_column, (yyloc).last_column); YYABORT; } -#line 2439 "y.tab.c" /* yacc.c:1646 */ + case 27: /* Name: WHENIDLE */ +#line 256 "xi-grammar.y" + { ReservedWord(WHENIDLE, (yyloc).first_column, (yyloc).last_column); YYABORT; } +#line 2565 "y.tab.c" break; - case 28: -#line 257 "xi-grammar.y" /* yacc.c:1646 */ - { ReservedWord(SYNC, (yyloc).first_column, (yyloc).last_column); YYABORT; } -#line 2445 "y.tab.c" /* yacc.c:1646 */ + case 28: /* Name: SYNC */ +#line 257 "xi-grammar.y" + { ReservedWord(SYNC, (yyloc).first_column, (yyloc).last_column); YYABORT; } +#line 2571 "y.tab.c" break; - case 29: -#line 258 "xi-grammar.y" /* yacc.c:1646 */ - { ReservedWord(IGET, (yyloc).first_column, (yyloc).last_column); YYABORT; } -#line 2451 "y.tab.c" /* yacc.c:1646 */ + case 29: /* Name: IGET */ +#line 258 "xi-grammar.y" + { ReservedWord(IGET, (yyloc).first_column, (yyloc).last_column); YYABORT; } +#line 2577 "y.tab.c" break; - case 30: -#line 259 "xi-grammar.y" /* yacc.c:1646 */ - { ReservedWord(EXCLUSIVE, (yyloc).first_column, (yyloc).last_column); YYABORT; } -#line 2457 "y.tab.c" /* yacc.c:1646 */ + case 30: /* Name: EXCLUSIVE */ +#line 259 "xi-grammar.y" + { ReservedWord(EXCLUSIVE, (yyloc).first_column, (yyloc).last_column); YYABORT; } +#line 2583 "y.tab.c" break; - case 31: -#line 260 "xi-grammar.y" /* yacc.c:1646 */ - { ReservedWord(IMMEDIATE, (yyloc).first_column, (yyloc).last_column); YYABORT; } -#line 2463 "y.tab.c" /* yacc.c:1646 */ + case 31: /* Name: IMMEDIATE */ +#line 260 "xi-grammar.y" + { ReservedWord(IMMEDIATE, (yyloc).first_column, (yyloc).last_column); YYABORT; } +#line 2589 "y.tab.c" break; - case 32: -#line 261 "xi-grammar.y" /* yacc.c:1646 */ - { ReservedWord(SKIPSCHED, (yyloc).first_column, (yyloc).last_column); YYABORT; } -#line 2469 "y.tab.c" /* yacc.c:1646 */ + case 32: /* Name: SKIPSCHED */ +#line 261 "xi-grammar.y" + { ReservedWord(SKIPSCHED, (yyloc).first_column, (yyloc).last_column); YYABORT; } +#line 2595 "y.tab.c" break; - case 33: -#line 262 "xi-grammar.y" /* yacc.c:1646 */ - { ReservedWord(NOCOPY, (yyloc).first_column, (yyloc).last_column); YYABORT; } -#line 2475 "y.tab.c" /* yacc.c:1646 */ + case 33: /* Name: NOCOPY */ +#line 262 "xi-grammar.y" + { ReservedWord(NOCOPY, (yyloc).first_column, (yyloc).last_column); YYABORT; } +#line 2601 "y.tab.c" break; - case 34: -#line 263 "xi-grammar.y" /* yacc.c:1646 */ - { ReservedWord(NOCOPYPOST, (yyloc).first_column, (yyloc).last_column); YYABORT; } -#line 2481 "y.tab.c" /* yacc.c:1646 */ + case 34: /* Name: NOCOPYPOST */ +#line 263 "xi-grammar.y" + { ReservedWord(NOCOPYPOST, (yyloc).first_column, (yyloc).last_column); YYABORT; } +#line 2607 "y.tab.c" break; - case 35: -#line 264 "xi-grammar.y" /* yacc.c:1646 */ - { ReservedWord(NOCOPYDEVICE, (yyloc).first_column, (yyloc).last_column); YYABORT; } -#line 2487 "y.tab.c" /* yacc.c:1646 */ + case 35: /* Name: NOCOPYDEVICE */ +#line 264 "xi-grammar.y" + { ReservedWord(NOCOPYDEVICE, (yyloc).first_column, (yyloc).last_column); YYABORT; } +#line 2613 "y.tab.c" break; - case 36: -#line 265 "xi-grammar.y" /* yacc.c:1646 */ - { ReservedWord(INLINE, (yyloc).first_column, (yyloc).last_column); YYABORT; } -#line 2493 "y.tab.c" /* yacc.c:1646 */ + case 36: /* Name: INLINE */ +#line 265 "xi-grammar.y" + { ReservedWord(INLINE, (yyloc).first_column, (yyloc).last_column); YYABORT; } +#line 2619 "y.tab.c" break; - case 37: -#line 266 "xi-grammar.y" /* yacc.c:1646 */ - { ReservedWord(VIRTUAL, (yyloc).first_column, (yyloc).last_column); YYABORT; } -#line 2499 "y.tab.c" /* yacc.c:1646 */ + case 37: /* Name: VIRTUAL */ +#line 266 "xi-grammar.y" + { ReservedWord(VIRTUAL, (yyloc).first_column, (yyloc).last_column); YYABORT; } +#line 2625 "y.tab.c" break; - case 38: -#line 267 "xi-grammar.y" /* yacc.c:1646 */ - { ReservedWord(MIGRATABLE, (yyloc).first_column, (yyloc).last_column); YYABORT; } -#line 2505 "y.tab.c" /* yacc.c:1646 */ + case 38: /* Name: MIGRATABLE */ +#line 267 "xi-grammar.y" + { ReservedWord(MIGRATABLE, (yyloc).first_column, (yyloc).last_column); YYABORT; } +#line 2631 "y.tab.c" break; - case 39: -#line 268 "xi-grammar.y" /* yacc.c:1646 */ - { ReservedWord(CREATEHERE, (yyloc).first_column, (yyloc).last_column); YYABORT; } -#line 2511 "y.tab.c" /* yacc.c:1646 */ + case 39: /* Name: CREATEHERE */ +#line 268 "xi-grammar.y" + { ReservedWord(CREATEHERE, (yyloc).first_column, (yyloc).last_column); YYABORT; } +#line 2637 "y.tab.c" break; - case 40: -#line 269 "xi-grammar.y" /* yacc.c:1646 */ - { ReservedWord(CREATEHOME, (yyloc).first_column, (yyloc).last_column); YYABORT; } -#line 2517 "y.tab.c" /* yacc.c:1646 */ + case 40: /* Name: CREATEHOME */ +#line 269 "xi-grammar.y" + { ReservedWord(CREATEHOME, (yyloc).first_column, (yyloc).last_column); YYABORT; } +#line 2643 "y.tab.c" break; - case 41: -#line 270 "xi-grammar.y" /* yacc.c:1646 */ - { ReservedWord(NOKEEP, (yyloc).first_column, (yyloc).last_column); YYABORT; } -#line 2523 "y.tab.c" /* yacc.c:1646 */ + case 41: /* Name: NOKEEP */ +#line 270 "xi-grammar.y" + { ReservedWord(NOKEEP, (yyloc).first_column, (yyloc).last_column); YYABORT; } +#line 2649 "y.tab.c" break; - case 42: -#line 271 "xi-grammar.y" /* yacc.c:1646 */ - { ReservedWord(NOTRACE, (yyloc).first_column, (yyloc).last_column); YYABORT; } -#line 2529 "y.tab.c" /* yacc.c:1646 */ + case 42: /* Name: NOTRACE */ +#line 271 "xi-grammar.y" + { ReservedWord(NOTRACE, (yyloc).first_column, (yyloc).last_column); YYABORT; } +#line 2655 "y.tab.c" break; - case 43: -#line 272 "xi-grammar.y" /* yacc.c:1646 */ - { ReservedWord(APPWORK, (yyloc).first_column, (yyloc).last_column); YYABORT; } -#line 2535 "y.tab.c" /* yacc.c:1646 */ + case 43: /* Name: APPWORK */ +#line 272 "xi-grammar.y" + { ReservedWord(APPWORK, (yyloc).first_column, (yyloc).last_column); YYABORT; } +#line 2661 "y.tab.c" break; - case 44: -#line 275 "xi-grammar.y" /* yacc.c:1646 */ - { ReservedWord(PACKED, (yyloc).first_column, (yyloc).last_column); YYABORT; } -#line 2541 "y.tab.c" /* yacc.c:1646 */ + case 44: /* Name: PACKED */ +#line 275 "xi-grammar.y" + { ReservedWord(PACKED, (yyloc).first_column, (yyloc).last_column); YYABORT; } +#line 2667 "y.tab.c" break; - case 45: -#line 276 "xi-grammar.y" /* yacc.c:1646 */ - { ReservedWord(VARSIZE, (yyloc).first_column, (yyloc).last_column); YYABORT; } -#line 2547 "y.tab.c" /* yacc.c:1646 */ + case 45: /* Name: VARSIZE */ +#line 276 "xi-grammar.y" + { ReservedWord(VARSIZE, (yyloc).first_column, (yyloc).last_column); YYABORT; } +#line 2673 "y.tab.c" break; - case 46: -#line 277 "xi-grammar.y" /* yacc.c:1646 */ - { ReservedWord(ENTRY, (yyloc).first_column, (yyloc).last_column); YYABORT; } -#line 2553 "y.tab.c" /* yacc.c:1646 */ + case 46: /* Name: ENTRY */ +#line 277 "xi-grammar.y" + { ReservedWord(ENTRY, (yyloc).first_column, (yyloc).last_column); YYABORT; } +#line 2679 "y.tab.c" break; - case 47: -#line 278 "xi-grammar.y" /* yacc.c:1646 */ - { ReservedWord(FOR, (yyloc).first_column, (yyloc).last_column); YYABORT; } -#line 2559 "y.tab.c" /* yacc.c:1646 */ + case 47: /* Name: FOR */ +#line 278 "xi-grammar.y" + { ReservedWord(FOR, (yyloc).first_column, (yyloc).last_column); YYABORT; } +#line 2685 "y.tab.c" break; - case 48: -#line 279 "xi-grammar.y" /* yacc.c:1646 */ - { ReservedWord(FORALL, (yyloc).first_column, (yyloc).last_column); YYABORT; } -#line 2565 "y.tab.c" /* yacc.c:1646 */ + case 48: /* Name: FORALL */ +#line 279 "xi-grammar.y" + { ReservedWord(FORALL, (yyloc).first_column, (yyloc).last_column); YYABORT; } +#line 2691 "y.tab.c" break; - case 49: -#line 280 "xi-grammar.y" /* yacc.c:1646 */ - { ReservedWord(WHILE, (yyloc).first_column, (yyloc).last_column); YYABORT; } -#line 2571 "y.tab.c" /* yacc.c:1646 */ + case 49: /* Name: WHILE */ +#line 280 "xi-grammar.y" + { ReservedWord(WHILE, (yyloc).first_column, (yyloc).last_column); YYABORT; } +#line 2697 "y.tab.c" break; - case 50: -#line 281 "xi-grammar.y" /* yacc.c:1646 */ - { ReservedWord(WHEN, (yyloc).first_column, (yyloc).last_column); YYABORT; } -#line 2577 "y.tab.c" /* yacc.c:1646 */ + case 50: /* Name: WHEN */ +#line 281 "xi-grammar.y" + { ReservedWord(WHEN, (yyloc).first_column, (yyloc).last_column); YYABORT; } +#line 2703 "y.tab.c" break; - case 51: -#line 282 "xi-grammar.y" /* yacc.c:1646 */ - { ReservedWord(OVERLAP, (yyloc).first_column, (yyloc).last_column); YYABORT; } -#line 2583 "y.tab.c" /* yacc.c:1646 */ + case 51: /* Name: OVERLAP */ +#line 282 "xi-grammar.y" + { ReservedWord(OVERLAP, (yyloc).first_column, (yyloc).last_column); YYABORT; } +#line 2709 "y.tab.c" break; - case 52: -#line 283 "xi-grammar.y" /* yacc.c:1646 */ - { ReservedWord(SERIAL, (yyloc).first_column, (yyloc).last_column); YYABORT; } -#line 2589 "y.tab.c" /* yacc.c:1646 */ + case 52: /* Name: SERIAL */ +#line 283 "xi-grammar.y" + { ReservedWord(SERIAL, (yyloc).first_column, (yyloc).last_column); YYABORT; } +#line 2715 "y.tab.c" break; - case 53: -#line 284 "xi-grammar.y" /* yacc.c:1646 */ - { ReservedWord(IF, (yyloc).first_column, (yyloc).last_column); YYABORT; } -#line 2595 "y.tab.c" /* yacc.c:1646 */ + case 53: /* Name: IF */ +#line 284 "xi-grammar.y" + { ReservedWord(IF, (yyloc).first_column, (yyloc).last_column); YYABORT; } +#line 2721 "y.tab.c" break; - case 54: -#line 285 "xi-grammar.y" /* yacc.c:1646 */ - { ReservedWord(ELSE, (yyloc).first_column, (yyloc).last_column); YYABORT; } -#line 2601 "y.tab.c" /* yacc.c:1646 */ + case 54: /* Name: ELSE */ +#line 285 "xi-grammar.y" + { ReservedWord(ELSE, (yyloc).first_column, (yyloc).last_column); YYABORT; } +#line 2727 "y.tab.c" break; - case 55: -#line 287 "xi-grammar.y" /* yacc.c:1646 */ - { ReservedWord(LOCAL, (yyloc).first_column, (yyloc).last_column); YYABORT; } -#line 2607 "y.tab.c" /* yacc.c:1646 */ + case 55: /* Name: LOCAL */ +#line 287 "xi-grammar.y" + { ReservedWord(LOCAL, (yyloc).first_column, (yyloc).last_column); YYABORT; } +#line 2733 "y.tab.c" break; - case 56: -#line 289 "xi-grammar.y" /* yacc.c:1646 */ - { ReservedWord(USING, (yyloc).first_column, (yyloc).last_column); YYABORT; } -#line 2613 "y.tab.c" /* yacc.c:1646 */ + case 56: /* Name: USING */ +#line 289 "xi-grammar.y" + { ReservedWord(USING, (yyloc).first_column, (yyloc).last_column); YYABORT; } +#line 2739 "y.tab.c" break; - case 57: -#line 290 "xi-grammar.y" /* yacc.c:1646 */ - { ReservedWord(ACCEL, (yyloc).first_column, (yyloc).last_column); YYABORT; } -#line 2619 "y.tab.c" /* yacc.c:1646 */ + case 57: /* Name: ACCEL */ +#line 290 "xi-grammar.y" + { ReservedWord(ACCEL, (yyloc).first_column, (yyloc).last_column); YYABORT; } +#line 2745 "y.tab.c" break; - case 58: -#line 293 "xi-grammar.y" /* yacc.c:1646 */ - { ReservedWord(ACCELBLOCK, (yyloc).first_column, (yyloc).last_column); YYABORT; } -#line 2625 "y.tab.c" /* yacc.c:1646 */ + case 58: /* Name: ACCELBLOCK */ +#line 293 "xi-grammar.y" + { ReservedWord(ACCELBLOCK, (yyloc).first_column, (yyloc).last_column); YYABORT; } +#line 2751 "y.tab.c" break; - case 59: -#line 294 "xi-grammar.y" /* yacc.c:1646 */ - { ReservedWord(MEMCRITICAL, (yyloc).first_column, (yyloc).last_column); YYABORT; } -#line 2631 "y.tab.c" /* yacc.c:1646 */ + case 59: /* Name: MEMCRITICAL */ +#line 294 "xi-grammar.y" + { ReservedWord(MEMCRITICAL, (yyloc).first_column, (yyloc).last_column); YYABORT; } +#line 2757 "y.tab.c" break; - case 60: -#line 295 "xi-grammar.y" /* yacc.c:1646 */ - { ReservedWord(REDUCTIONTARGET, (yyloc).first_column, (yyloc).last_column); YYABORT; } -#line 2637 "y.tab.c" /* yacc.c:1646 */ + case 60: /* Name: REDUCTIONTARGET */ +#line 295 "xi-grammar.y" + { ReservedWord(REDUCTIONTARGET, (yyloc).first_column, (yyloc).last_column); YYABORT; } +#line 2763 "y.tab.c" break; - case 61: -#line 296 "xi-grammar.y" /* yacc.c:1646 */ - { ReservedWord(CASE, (yyloc).first_column, (yyloc).last_column); YYABORT; } -#line 2643 "y.tab.c" /* yacc.c:1646 */ + case 61: /* Name: CASE */ +#line 296 "xi-grammar.y" + { ReservedWord(CASE, (yyloc).first_column, (yyloc).last_column); YYABORT; } +#line 2769 "y.tab.c" break; - case 62: -#line 301 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.strval) = (yyvsp[0].strval); } -#line 2649 "y.tab.c" /* yacc.c:1646 */ + case 62: /* QualName: IDENT */ +#line 301 "xi-grammar.y" + { (yyval.strval) = (yyvsp[0].strval); } +#line 2775 "y.tab.c" break; - case 63: -#line 303 "xi-grammar.y" /* yacc.c:1646 */ - { - char *tmp = new char[strlen((yyvsp[-3].strval))+strlen((yyvsp[0].strval))+3]; - sprintf(tmp,"%s::%s", (yyvsp[-3].strval), (yyvsp[0].strval)); + case 63: /* QualName: QualName ':' ':' IDENT */ +#line 303 "xi-grammar.y" + { + int len = strlen((yyvsp[-3].strval))+strlen((yyvsp[0].strval))+3; + char *tmp = new char[len]; + snprintf(tmp,len,"%s::%s", (yyvsp[-3].strval), (yyvsp[0].strval)); (yyval.strval) = tmp; } -#line 2659 "y.tab.c" /* yacc.c:1646 */ +#line 2786 "y.tab.c" break; - case 64: -#line 309 "xi-grammar.y" /* yacc.c:1646 */ - { - char *tmp = new char[strlen((yyvsp[-3].strval))+5+3]; - sprintf(tmp,"%s::array", (yyvsp[-3].strval)); + case 64: /* QualName: QualName ':' ':' ARRAY */ +#line 310 "xi-grammar.y" + { + int len = strlen((yyvsp[-3].strval))+5+3; + char *tmp = new char[len]; + snprintf(tmp, len, "%s::array", (yyvsp[-3].strval)); (yyval.strval) = tmp; } -#line 2669 "y.tab.c" /* yacc.c:1646 */ +#line 2797 "y.tab.c" break; - case 65: -#line 316 "xi-grammar.y" /* yacc.c:1646 */ - { + case 65: /* Module: MODULE Name ConstructEList */ +#line 318 "xi-grammar.y" + { (yyval.module) = new Module(lineno, (yyvsp[-1].strval), (yyvsp[0].conslist)); } -#line 2677 "y.tab.c" /* yacc.c:1646 */ +#line 2805 "y.tab.c" break; - case 66: -#line 320 "xi-grammar.y" /* yacc.c:1646 */ - { + case 66: /* Module: MAINMODULE Name ConstructEList */ +#line 322 "xi-grammar.y" + { (yyval.module) = new Module(lineno, (yyvsp[-1].strval), (yyvsp[0].conslist)); (yyval.module)->setMain(); } -#line 2686 "y.tab.c" /* yacc.c:1646 */ +#line 2814 "y.tab.c" break; - case 67: -#line 327 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.conslist) = 0; } -#line 2692 "y.tab.c" /* yacc.c:1646 */ + case 67: /* ConstructEList: OneOrMoreSemiColon */ +#line 329 "xi-grammar.y" + { (yyval.conslist) = 0; } +#line 2820 "y.tab.c" break; - case 68: -#line 329 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.conslist) = (yyvsp[-2].conslist); } -#line 2698 "y.tab.c" /* yacc.c:1646 */ + case 68: /* ConstructEList: '{' ConstructList '}' OptSemiColon */ +#line 331 "xi-grammar.y" + { (yyval.conslist) = (yyvsp[-2].conslist); } +#line 2826 "y.tab.c" break; - case 69: -#line 333 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.conslist) = 0; } -#line 2704 "y.tab.c" /* yacc.c:1646 */ + case 69: /* ConstructList: %empty */ +#line 335 "xi-grammar.y" + { (yyval.conslist) = 0; } +#line 2832 "y.tab.c" break; - case 70: -#line 335 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.conslist) = new ConstructList(lineno, (yyvsp[-1].construct), (yyvsp[0].conslist)); } -#line 2710 "y.tab.c" /* yacc.c:1646 */ + case 70: /* ConstructList: Construct ConstructList */ +#line 337 "xi-grammar.y" + { (yyval.conslist) = new ConstructList(lineno, (yyvsp[-1].construct), (yyvsp[0].conslist)); } +#line 2838 "y.tab.c" break; - case 71: -#line 339 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.construct) = new UsingScope((yyvsp[0].strval), false); } -#line 2716 "y.tab.c" /* yacc.c:1646 */ + case 71: /* ConstructSemi: USING NAMESPACE QualName */ +#line 341 "xi-grammar.y" + { (yyval.construct) = new UsingScope((yyvsp[0].strval), false); } +#line 2844 "y.tab.c" break; - case 72: -#line 341 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.construct) = new UsingScope((yyvsp[0].strval), true); } -#line 2722 "y.tab.c" /* yacc.c:1646 */ + case 72: /* ConstructSemi: USING QualName */ +#line 343 "xi-grammar.y" + { (yyval.construct) = new UsingScope((yyvsp[0].strval), true); } +#line 2850 "y.tab.c" break; - case 73: -#line 343 "xi-grammar.y" /* yacc.c:1646 */ - { (yyvsp[0].member)->setExtern((yyvsp[-1].intval)); (yyval.construct) = (yyvsp[0].member); } -#line 2728 "y.tab.c" /* yacc.c:1646 */ + case 73: /* ConstructSemi: OptExtern NonEntryMember */ +#line 345 "xi-grammar.y" + { (yyvsp[0].member)->setExtern((yyvsp[-1].intval)); (yyval.construct) = (yyvsp[0].member); } +#line 2856 "y.tab.c" break; - case 74: -#line 345 "xi-grammar.y" /* yacc.c:1646 */ - { (yyvsp[0].message)->setExtern((yyvsp[-1].intval)); (yyval.construct) = (yyvsp[0].message); } -#line 2734 "y.tab.c" /* yacc.c:1646 */ + case 74: /* ConstructSemi: OptExtern Message */ +#line 347 "xi-grammar.y" + { (yyvsp[0].message)->setExtern((yyvsp[-1].intval)); (yyval.construct) = (yyvsp[0].message); } +#line 2862 "y.tab.c" break; - case 75: -#line 347 "xi-grammar.y" /* yacc.c:1646 */ - { + case 75: /* ConstructSemi: EXTERN ENTRY EAttribs EReturn QualNamedType Name OptTParams EParameters */ +#line 349 "xi-grammar.y" + { Entry *e = new Entry(lineno, (yyvsp[-5].attr), (yyvsp[-4].type), (yyvsp[-2].strval), (yyvsp[0].plist), 0, 0, 0, (yylsp[-7]).first_line, (yyloc).last_line); int isExtern = 1; e->setExtern(isExtern); @@ -2746,1210 +2874,1210 @@ yyreduce: firstRdma = true; firstDeviceRdma = true; } -#line 2750 "y.tab.c" /* yacc.c:1646 */ +#line 2878 "y.tab.c" break; - case 76: -#line 361 "xi-grammar.y" /* yacc.c:1646 */ - { if((yyvsp[-2].conslist)) (yyvsp[-2].conslist)->recurse((yyvsp[-4].intval), &Construct::setExtern); (yyval.construct) = (yyvsp[-2].conslist); } -#line 2756 "y.tab.c" /* yacc.c:1646 */ + case 76: /* Construct: OptExtern '{' ConstructList '}' OptSemiColon */ +#line 363 "xi-grammar.y" + { if((yyvsp[-2].conslist)) (yyvsp[-2].conslist)->recurse((yyvsp[-4].intval), &Construct::setExtern); (yyval.construct) = (yyvsp[-2].conslist); } +#line 2884 "y.tab.c" break; - case 77: -#line 363 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.construct) = new Scope((yyvsp[-3].strval), (yyvsp[-1].conslist)); } -#line 2762 "y.tab.c" /* yacc.c:1646 */ + case 77: /* Construct: NAMESPACE Name '{' ConstructList '}' */ +#line 365 "xi-grammar.y" + { (yyval.construct) = new Scope((yyvsp[-3].strval), (yyvsp[-1].conslist)); } +#line 2890 "y.tab.c" break; - case 78: -#line 365 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.construct) = (yyvsp[-1].construct); } -#line 2768 "y.tab.c" /* yacc.c:1646 */ + case 78: /* Construct: ConstructSemi OneOrMoreSemiColon */ +#line 367 "xi-grammar.y" + { (yyval.construct) = (yyvsp[-1].construct); } +#line 2896 "y.tab.c" break; - case 79: -#line 367 "xi-grammar.y" /* yacc.c:1646 */ - { + case 79: /* Construct: ConstructSemi UnexpectedToken */ +#line 369 "xi-grammar.y" + { ERROR("preceding construct must be semicolon terminated", (yyloc).first_column, (yyloc).last_column); YYABORT; } -#line 2778 "y.tab.c" /* yacc.c:1646 */ +#line 2906 "y.tab.c" break; - case 80: -#line 373 "xi-grammar.y" /* yacc.c:1646 */ - { (yyvsp[0].module)->setExtern((yyvsp[-1].intval)); (yyval.construct) = (yyvsp[0].module); } -#line 2784 "y.tab.c" /* yacc.c:1646 */ + case 80: /* Construct: OptExtern Module */ +#line 375 "xi-grammar.y" + { (yyvsp[0].module)->setExtern((yyvsp[-1].intval)); (yyval.construct) = (yyvsp[0].module); } +#line 2912 "y.tab.c" break; - case 81: -#line 375 "xi-grammar.y" /* yacc.c:1646 */ - { (yyvsp[0].chare)->setExtern((yyvsp[-1].intval)); (yyval.construct) = (yyvsp[0].chare); } -#line 2790 "y.tab.c" /* yacc.c:1646 */ + case 81: /* Construct: OptExtern Chare */ +#line 377 "xi-grammar.y" + { (yyvsp[0].chare)->setExtern((yyvsp[-1].intval)); (yyval.construct) = (yyvsp[0].chare); } +#line 2918 "y.tab.c" break; - case 82: -#line 377 "xi-grammar.y" /* yacc.c:1646 */ - { (yyvsp[0].chare)->setExtern((yyvsp[-1].intval)); (yyval.construct) = (yyvsp[0].chare); } -#line 2796 "y.tab.c" /* yacc.c:1646 */ + case 82: /* Construct: OptExtern Group */ +#line 379 "xi-grammar.y" + { (yyvsp[0].chare)->setExtern((yyvsp[-1].intval)); (yyval.construct) = (yyvsp[0].chare); } +#line 2924 "y.tab.c" break; - case 83: -#line 379 "xi-grammar.y" /* yacc.c:1646 */ - { (yyvsp[0].chare)->setExtern((yyvsp[-1].intval)); (yyval.construct) = (yyvsp[0].chare); } -#line 2802 "y.tab.c" /* yacc.c:1646 */ + case 83: /* Construct: OptExtern NodeGroup */ +#line 381 "xi-grammar.y" + { (yyvsp[0].chare)->setExtern((yyvsp[-1].intval)); (yyval.construct) = (yyvsp[0].chare); } +#line 2930 "y.tab.c" break; - case 84: -#line 381 "xi-grammar.y" /* yacc.c:1646 */ - { (yyvsp[0].chare)->setExtern((yyvsp[-1].intval)); (yyval.construct) = (yyvsp[0].chare); } -#line 2808 "y.tab.c" /* yacc.c:1646 */ + case 84: /* Construct: OptExtern Array */ +#line 383 "xi-grammar.y" + { (yyvsp[0].chare)->setExtern((yyvsp[-1].intval)); (yyval.construct) = (yyvsp[0].chare); } +#line 2936 "y.tab.c" break; - case 85: -#line 383 "xi-grammar.y" /* yacc.c:1646 */ - { (yyvsp[0].templat)->setExtern((yyvsp[-1].intval)); (yyval.construct) = (yyvsp[0].templat); } -#line 2814 "y.tab.c" /* yacc.c:1646 */ + case 85: /* Construct: OptExtern Template */ +#line 385 "xi-grammar.y" + { (yyvsp[0].templat)->setExtern((yyvsp[-1].intval)); (yyval.construct) = (yyvsp[0].templat); } +#line 2942 "y.tab.c" break; - case 86: -#line 385 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.construct) = NULL; } -#line 2820 "y.tab.c" /* yacc.c:1646 */ + case 86: /* Construct: HashIFComment */ +#line 387 "xi-grammar.y" + { (yyval.construct) = NULL; } +#line 2948 "y.tab.c" break; - case 87: -#line 387 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.construct) = NULL; } -#line 2826 "y.tab.c" /* yacc.c:1646 */ + case 87: /* Construct: HashIFDefComment */ +#line 389 "xi-grammar.y" + { (yyval.construct) = NULL; } +#line 2954 "y.tab.c" break; - case 88: -#line 389 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.construct) = (yyvsp[0].accelBlock); } -#line 2832 "y.tab.c" /* yacc.c:1646 */ + case 88: /* Construct: AccelBlock */ +#line 391 "xi-grammar.y" + { (yyval.construct) = (yyvsp[0].accelBlock); } +#line 2960 "y.tab.c" break; - case 89: -#line 391 "xi-grammar.y" /* yacc.c:1646 */ - { + case 89: /* Construct: error */ +#line 393 "xi-grammar.y" + { ERROR("invalid construct", (yyloc).first_column, (yyloc).last_column); YYABORT; } -#line 2842 "y.tab.c" /* yacc.c:1646 */ +#line 2970 "y.tab.c" break; - case 90: -#line 399 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.tparam) = new TParamType((yyvsp[0].type)); } -#line 2848 "y.tab.c" /* yacc.c:1646 */ + case 90: /* TParam: Type */ +#line 401 "xi-grammar.y" + { (yyval.tparam) = new TParamType((yyvsp[0].type)); } +#line 2976 "y.tab.c" break; - case 91: -#line 401 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.tparam) = new TParamVal((yyvsp[0].strval)); } -#line 2854 "y.tab.c" /* yacc.c:1646 */ + case 91: /* TParam: NUMBER */ +#line 403 "xi-grammar.y" + { (yyval.tparam) = new TParamVal((yyvsp[0].strval)); } +#line 2982 "y.tab.c" break; - case 92: -#line 403 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.tparam) = new TParamVal((yyvsp[0].strval)); } -#line 2860 "y.tab.c" /* yacc.c:1646 */ + case 92: /* TParam: LITERAL */ +#line 405 "xi-grammar.y" + { (yyval.tparam) = new TParamVal((yyvsp[0].strval)); } +#line 2988 "y.tab.c" break; - case 93: -#line 407 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.tparlist) = new TParamList((yyvsp[0].tparam)); } -#line 2866 "y.tab.c" /* yacc.c:1646 */ + case 93: /* TParamList: TParam */ +#line 409 "xi-grammar.y" + { (yyval.tparlist) = new TParamList((yyvsp[0].tparam)); } +#line 2994 "y.tab.c" break; - case 94: -#line 409 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.tparlist) = new TParamList((yyvsp[-2].tparam), (yyvsp[0].tparlist)); } -#line 2872 "y.tab.c" /* yacc.c:1646 */ + case 94: /* TParamList: TParam ',' TParamList */ +#line 411 "xi-grammar.y" + { (yyval.tparlist) = new TParamList((yyvsp[-2].tparam), (yyvsp[0].tparlist)); } +#line 3000 "y.tab.c" break; - case 95: -#line 413 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.tparlist) = new TParamList(0); } -#line 2878 "y.tab.c" /* yacc.c:1646 */ + case 95: /* TParamEList: %empty */ +#line 415 "xi-grammar.y" + { (yyval.tparlist) = new TParamList(0); } +#line 3006 "y.tab.c" break; - case 96: -#line 415 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.tparlist) = (yyvsp[0].tparlist); } -#line 2884 "y.tab.c" /* yacc.c:1646 */ + case 96: /* TParamEList: TParamList */ +#line 417 "xi-grammar.y" + { (yyval.tparlist) = (yyvsp[0].tparlist); } +#line 3012 "y.tab.c" break; - case 97: -#line 419 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.tparlist) = 0; } -#line 2890 "y.tab.c" /* yacc.c:1646 */ + case 97: /* OptTParams: %empty */ +#line 421 "xi-grammar.y" + { (yyval.tparlist) = 0; } +#line 3018 "y.tab.c" break; - case 98: -#line 421 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.tparlist) = (yyvsp[-1].tparlist); } -#line 2896 "y.tab.c" /* yacc.c:1646 */ + case 98: /* OptTParams: '<' TParamEList '>' */ +#line 423 "xi-grammar.y" + { (yyval.tparlist) = (yyvsp[-1].tparlist); } +#line 3024 "y.tab.c" break; - case 99: -#line 425 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.type) = new BuiltinType("int"); } -#line 2902 "y.tab.c" /* yacc.c:1646 */ + case 99: /* BuiltinType: INT */ +#line 427 "xi-grammar.y" + { (yyval.type) = new BuiltinType("int"); } +#line 3030 "y.tab.c" break; - case 100: -#line 427 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.type) = new BuiltinType("long"); } -#line 2908 "y.tab.c" /* yacc.c:1646 */ + case 100: /* BuiltinType: LONG */ +#line 429 "xi-grammar.y" + { (yyval.type) = new BuiltinType("long"); } +#line 3036 "y.tab.c" break; - case 101: -#line 429 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.type) = new BuiltinType("long int"); } -#line 2914 "y.tab.c" /* yacc.c:1646 */ + case 101: /* BuiltinType: LONG INT */ +#line 431 "xi-grammar.y" + { (yyval.type) = new BuiltinType("long int"); } +#line 3042 "y.tab.c" break; - case 102: -#line 431 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.type) = new BuiltinType("short"); } -#line 2920 "y.tab.c" /* yacc.c:1646 */ + case 102: /* BuiltinType: SHORT */ +#line 433 "xi-grammar.y" + { (yyval.type) = new BuiltinType("short"); } +#line 3048 "y.tab.c" break; - case 103: -#line 433 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.type) = new BuiltinType("short int"); } -#line 2926 "y.tab.c" /* yacc.c:1646 */ + case 103: /* BuiltinType: SHORT INT */ +#line 435 "xi-grammar.y" + { (yyval.type) = new BuiltinType("short int"); } +#line 3054 "y.tab.c" break; - case 104: -#line 435 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.type) = new BuiltinType("char"); } -#line 2932 "y.tab.c" /* yacc.c:1646 */ + case 104: /* BuiltinType: CHAR */ +#line 437 "xi-grammar.y" + { (yyval.type) = new BuiltinType("char"); } +#line 3060 "y.tab.c" break; - case 105: -#line 437 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.type) = new BuiltinType("unsigned int"); } -#line 2938 "y.tab.c" /* yacc.c:1646 */ + case 105: /* BuiltinType: UNSIGNED INT */ +#line 439 "xi-grammar.y" + { (yyval.type) = new BuiltinType("unsigned int"); } +#line 3066 "y.tab.c" break; - case 106: -#line 439 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.type) = new BuiltinType("unsigned long"); } -#line 2944 "y.tab.c" /* yacc.c:1646 */ + case 106: /* BuiltinType: UNSIGNED LONG */ +#line 441 "xi-grammar.y" + { (yyval.type) = new BuiltinType("unsigned long"); } +#line 3072 "y.tab.c" break; - case 107: -#line 441 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.type) = new BuiltinType("unsigned long int"); } -#line 2950 "y.tab.c" /* yacc.c:1646 */ + case 107: /* BuiltinType: UNSIGNED LONG INT */ +#line 443 "xi-grammar.y" + { (yyval.type) = new BuiltinType("unsigned long int"); } +#line 3078 "y.tab.c" break; - case 108: -#line 443 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.type) = new BuiltinType("unsigned long long"); } -#line 2956 "y.tab.c" /* yacc.c:1646 */ + case 108: /* BuiltinType: UNSIGNED LONG LONG */ +#line 445 "xi-grammar.y" + { (yyval.type) = new BuiltinType("unsigned long long"); } +#line 3084 "y.tab.c" break; - case 109: -#line 445 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.type) = new BuiltinType("unsigned long long int"); } -#line 2962 "y.tab.c" /* yacc.c:1646 */ + case 109: /* BuiltinType: UNSIGNED LONG LONG INT */ +#line 447 "xi-grammar.y" + { (yyval.type) = new BuiltinType("unsigned long long int"); } +#line 3090 "y.tab.c" break; - case 110: -#line 447 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.type) = new BuiltinType("unsigned short"); } -#line 2968 "y.tab.c" /* yacc.c:1646 */ + case 110: /* BuiltinType: UNSIGNED SHORT */ +#line 449 "xi-grammar.y" + { (yyval.type) = new BuiltinType("unsigned short"); } +#line 3096 "y.tab.c" break; - case 111: -#line 449 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.type) = new BuiltinType("unsigned short int"); } -#line 2974 "y.tab.c" /* yacc.c:1646 */ + case 111: /* BuiltinType: UNSIGNED SHORT INT */ +#line 451 "xi-grammar.y" + { (yyval.type) = new BuiltinType("unsigned short int"); } +#line 3102 "y.tab.c" break; - case 112: -#line 451 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.type) = new BuiltinType("unsigned char"); } -#line 2980 "y.tab.c" /* yacc.c:1646 */ + case 112: /* BuiltinType: UNSIGNED CHAR */ +#line 453 "xi-grammar.y" + { (yyval.type) = new BuiltinType("unsigned char"); } +#line 3108 "y.tab.c" break; - case 113: -#line 453 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.type) = new BuiltinType("long long"); } -#line 2986 "y.tab.c" /* yacc.c:1646 */ + case 113: /* BuiltinType: LONG LONG */ +#line 455 "xi-grammar.y" + { (yyval.type) = new BuiltinType("long long"); } +#line 3114 "y.tab.c" break; - case 114: -#line 455 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.type) = new BuiltinType("long long int"); } -#line 2992 "y.tab.c" /* yacc.c:1646 */ + case 114: /* BuiltinType: LONG LONG INT */ +#line 457 "xi-grammar.y" + { (yyval.type) = new BuiltinType("long long int"); } +#line 3120 "y.tab.c" break; - case 115: -#line 457 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.type) = new BuiltinType("float"); } -#line 2998 "y.tab.c" /* yacc.c:1646 */ + case 115: /* BuiltinType: FLOAT */ +#line 459 "xi-grammar.y" + { (yyval.type) = new BuiltinType("float"); } +#line 3126 "y.tab.c" break; - case 116: -#line 459 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.type) = new BuiltinType("double"); } -#line 3004 "y.tab.c" /* yacc.c:1646 */ + case 116: /* BuiltinType: DOUBLE */ +#line 461 "xi-grammar.y" + { (yyval.type) = new BuiltinType("double"); } +#line 3132 "y.tab.c" break; - case 117: -#line 461 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.type) = new BuiltinType("long double"); } -#line 3010 "y.tab.c" /* yacc.c:1646 */ + case 117: /* BuiltinType: LONG DOUBLE */ +#line 463 "xi-grammar.y" + { (yyval.type) = new BuiltinType("long double"); } +#line 3138 "y.tab.c" break; - case 118: -#line 463 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.type) = new BuiltinType("void"); } -#line 3016 "y.tab.c" /* yacc.c:1646 */ + case 118: /* BuiltinType: VOID */ +#line 465 "xi-grammar.y" + { (yyval.type) = new BuiltinType("void"); } +#line 3144 "y.tab.c" break; - case 119: -#line 466 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.ntype) = new NamedType((yyvsp[-1].strval),(yyvsp[0].tparlist)); } -#line 3022 "y.tab.c" /* yacc.c:1646 */ + case 119: /* NamedType: Name OptTParams */ +#line 468 "xi-grammar.y" + { (yyval.ntype) = new NamedType((yyvsp[-1].strval),(yyvsp[0].tparlist)); } +#line 3150 "y.tab.c" break; - case 120: -#line 467 "xi-grammar.y" /* yacc.c:1646 */ - { + case 120: /* QualNamedType: QualName OptTParams */ +#line 469 "xi-grammar.y" + { const char* basename, *scope; splitScopedName((yyvsp[-1].strval), &scope, &basename); (yyval.ntype) = new NamedType(basename, (yyvsp[0].tparlist), scope); } -#line 3032 "y.tab.c" /* yacc.c:1646 */ +#line 3160 "y.tab.c" break; - case 121: -#line 473 "xi-grammar.y" /* yacc.c:1646 */ - { + case 121: /* QualNamedType: TYPENAME QualName OptTParams */ +#line 475 "xi-grammar.y" + { const char* basename, *scope; splitScopedName((yyvsp[-1].strval), &scope, &basename); (yyval.ntype) = new NamedType(basename, (yyvsp[0].tparlist), scope, true); } -#line 3042 "y.tab.c" /* yacc.c:1646 */ +#line 3170 "y.tab.c" break; - case 122: -#line 481 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.type) = (yyvsp[0].type); } -#line 3048 "y.tab.c" /* yacc.c:1646 */ + case 122: /* SimpleType: BuiltinType */ +#line 483 "xi-grammar.y" + { (yyval.type) = (yyvsp[0].type); } +#line 3176 "y.tab.c" break; - case 123: -#line 483 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.type) = (yyvsp[0].ntype); } -#line 3054 "y.tab.c" /* yacc.c:1646 */ + case 123: /* SimpleType: QualNamedType */ +#line 485 "xi-grammar.y" + { (yyval.type) = (yyvsp[0].ntype); } +#line 3182 "y.tab.c" break; - case 124: -#line 487 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.ptype) = new PtrType((yyvsp[-1].type)); } -#line 3060 "y.tab.c" /* yacc.c:1646 */ + case 124: /* OnePtrType: SimpleType '*' */ +#line 489 "xi-grammar.y" + { (yyval.ptype) = new PtrType((yyvsp[-1].type)); } +#line 3188 "y.tab.c" break; - case 125: -#line 491 "xi-grammar.y" /* yacc.c:1646 */ - { (yyvsp[-1].ptype)->indirect(); (yyval.ptype) = (yyvsp[-1].ptype); } -#line 3066 "y.tab.c" /* yacc.c:1646 */ + case 125: /* PtrType: OnePtrType '*' */ +#line 493 "xi-grammar.y" + { (yyvsp[-1].ptype)->indirect(); (yyval.ptype) = (yyvsp[-1].ptype); } +#line 3194 "y.tab.c" break; - case 126: -#line 493 "xi-grammar.y" /* yacc.c:1646 */ - { (yyvsp[-1].ptype)->indirect(); (yyval.ptype) = (yyvsp[-1].ptype); } -#line 3072 "y.tab.c" /* yacc.c:1646 */ + case 126: /* PtrType: PtrType '*' */ +#line 495 "xi-grammar.y" + { (yyvsp[-1].ptype)->indirect(); (yyval.ptype) = (yyvsp[-1].ptype); } +#line 3200 "y.tab.c" break; - case 127: -#line 497 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.ftype) = new FuncType((yyvsp[-7].type), (yyvsp[-4].strval), (yyvsp[-1].plist)); } -#line 3078 "y.tab.c" /* yacc.c:1646 */ + case 127: /* FuncType: BaseType '(' '*' Name ')' '(' ParamList ')' */ +#line 499 "xi-grammar.y" + { (yyval.ftype) = new FuncType((yyvsp[-7].type), (yyvsp[-4].strval), (yyvsp[-1].plist)); } +#line 3206 "y.tab.c" break; - case 128: -#line 501 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.type) = (yyvsp[0].type); } -#line 3084 "y.tab.c" /* yacc.c:1646 */ + case 128: /* BaseType: SimpleType */ +#line 503 "xi-grammar.y" + { (yyval.type) = (yyvsp[0].type); } +#line 3212 "y.tab.c" break; - case 129: -#line 503 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.type) = (yyvsp[0].ptype); } -#line 3090 "y.tab.c" /* yacc.c:1646 */ + case 129: /* BaseType: OnePtrType */ +#line 505 "xi-grammar.y" + { (yyval.type) = (yyvsp[0].ptype); } +#line 3218 "y.tab.c" break; - case 130: -#line 505 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.type) = (yyvsp[0].ptype); } -#line 3096 "y.tab.c" /* yacc.c:1646 */ + case 130: /* BaseType: PtrType */ +#line 507 "xi-grammar.y" + { (yyval.type) = (yyvsp[0].ptype); } +#line 3224 "y.tab.c" break; - case 131: -#line 507 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.type) = (yyvsp[0].ftype); } -#line 3102 "y.tab.c" /* yacc.c:1646 */ + case 131: /* BaseType: FuncType */ +#line 509 "xi-grammar.y" + { (yyval.type) = (yyvsp[0].ftype); } +#line 3230 "y.tab.c" break; - case 132: -#line 509 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.type) = new ConstType((yyvsp[0].type)); } -#line 3108 "y.tab.c" /* yacc.c:1646 */ + case 132: /* BaseType: CONST BaseType */ +#line 511 "xi-grammar.y" + { (yyval.type) = new ConstType((yyvsp[0].type)); } +#line 3236 "y.tab.c" break; - case 133: -#line 511 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.type) = new ConstType((yyvsp[-1].type)); } -#line 3114 "y.tab.c" /* yacc.c:1646 */ + case 133: /* BaseType: BaseType CONST */ +#line 513 "xi-grammar.y" + { (yyval.type) = new ConstType((yyvsp[-1].type)); } +#line 3242 "y.tab.c" break; - case 134: -#line 515 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.type) = (yyvsp[0].type); } -#line 3120 "y.tab.c" /* yacc.c:1646 */ + case 134: /* BaseDataType: SimpleType */ +#line 517 "xi-grammar.y" + { (yyval.type) = (yyvsp[0].type); } +#line 3248 "y.tab.c" break; - case 135: -#line 517 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.type) = (yyvsp[0].ptype); } -#line 3126 "y.tab.c" /* yacc.c:1646 */ + case 135: /* BaseDataType: OnePtrType */ +#line 519 "xi-grammar.y" + { (yyval.type) = (yyvsp[0].ptype); } +#line 3254 "y.tab.c" break; - case 136: -#line 519 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.type) = (yyvsp[0].ptype); } -#line 3132 "y.tab.c" /* yacc.c:1646 */ + case 136: /* BaseDataType: PtrType */ +#line 521 "xi-grammar.y" + { (yyval.type) = (yyvsp[0].ptype); } +#line 3260 "y.tab.c" break; - case 137: -#line 521 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.type) = new ConstType((yyvsp[0].type)); } -#line 3138 "y.tab.c" /* yacc.c:1646 */ + case 137: /* BaseDataType: CONST BaseDataType */ +#line 523 "xi-grammar.y" + { (yyval.type) = new ConstType((yyvsp[0].type)); } +#line 3266 "y.tab.c" break; - case 138: -#line 523 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.type) = new ConstType((yyvsp[-1].type)); } -#line 3144 "y.tab.c" /* yacc.c:1646 */ + case 138: /* BaseDataType: BaseDataType CONST */ +#line 525 "xi-grammar.y" + { (yyval.type) = new ConstType((yyvsp[-1].type)); } +#line 3272 "y.tab.c" break; - case 139: -#line 527 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.type) = new EllipsisType(new RValueReferenceType((yyvsp[-5].type))); } -#line 3150 "y.tab.c" /* yacc.c:1646 */ + case 139: /* RestrictedType: BaseDataType '&' '&' '.' '.' '.' */ +#line 529 "xi-grammar.y" + { (yyval.type) = new EllipsisType(new RValueReferenceType((yyvsp[-5].type))); } +#line 3278 "y.tab.c" break; - case 140: -#line 529 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.type) = new EllipsisType(new ReferenceType((yyvsp[-4].type))); } -#line 3156 "y.tab.c" /* yacc.c:1646 */ + case 140: /* RestrictedType: BaseDataType '&' '.' '.' '.' */ +#line 531 "xi-grammar.y" + { (yyval.type) = new EllipsisType(new ReferenceType((yyvsp[-4].type))); } +#line 3284 "y.tab.c" break; - case 141: -#line 531 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.type) = new EllipsisType((yyvsp[-3].type)); } -#line 3162 "y.tab.c" /* yacc.c:1646 */ + case 141: /* RestrictedType: BaseDataType '.' '.' '.' */ +#line 533 "xi-grammar.y" + { (yyval.type) = new EllipsisType((yyvsp[-3].type)); } +#line 3290 "y.tab.c" break; - case 142: -#line 533 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.type) = new RValueReferenceType((yyvsp[-2].type)); } -#line 3168 "y.tab.c" /* yacc.c:1646 */ + case 142: /* RestrictedType: BaseDataType '&' '&' */ +#line 535 "xi-grammar.y" + { (yyval.type) = new RValueReferenceType((yyvsp[-2].type)); } +#line 3296 "y.tab.c" break; - case 143: -#line 535 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.type) = new ReferenceType((yyvsp[-1].type)); } -#line 3174 "y.tab.c" /* yacc.c:1646 */ + case 143: /* RestrictedType: BaseDataType '&' */ +#line 537 "xi-grammar.y" + { (yyval.type) = new ReferenceType((yyvsp[-1].type)); } +#line 3302 "y.tab.c" break; - case 144: -#line 537 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.type) = (yyvsp[0].type); } -#line 3180 "y.tab.c" /* yacc.c:1646 */ + case 144: /* RestrictedType: BaseDataType */ +#line 539 "xi-grammar.y" + { (yyval.type) = (yyvsp[0].type); } +#line 3308 "y.tab.c" break; - case 145: -#line 541 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.type) = new EllipsisType(new RValueReferenceType((yyvsp[-5].type))); } -#line 3186 "y.tab.c" /* yacc.c:1646 */ + case 145: /* Type: BaseType '&' '&' '.' '.' '.' */ +#line 543 "xi-grammar.y" + { (yyval.type) = new EllipsisType(new RValueReferenceType((yyvsp[-5].type))); } +#line 3314 "y.tab.c" break; - case 146: -#line 543 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.type) = new EllipsisType(new ReferenceType((yyvsp[-4].type))); } -#line 3192 "y.tab.c" /* yacc.c:1646 */ + case 146: /* Type: BaseType '&' '.' '.' '.' */ +#line 545 "xi-grammar.y" + { (yyval.type) = new EllipsisType(new ReferenceType((yyvsp[-4].type))); } +#line 3320 "y.tab.c" break; - case 147: -#line 545 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.type) = new EllipsisType((yyvsp[-3].type)); } -#line 3198 "y.tab.c" /* yacc.c:1646 */ + case 147: /* Type: BaseType '.' '.' '.' */ +#line 547 "xi-grammar.y" + { (yyval.type) = new EllipsisType((yyvsp[-3].type)); } +#line 3326 "y.tab.c" break; - case 148: -#line 547 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.type) = new RValueReferenceType((yyvsp[-2].type)); } -#line 3204 "y.tab.c" /* yacc.c:1646 */ + case 148: /* Type: BaseType '&' '&' */ +#line 549 "xi-grammar.y" + { (yyval.type) = new RValueReferenceType((yyvsp[-2].type)); } +#line 3332 "y.tab.c" break; - case 149: -#line 549 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.type) = new ReferenceType((yyvsp[-1].type)); } -#line 3210 "y.tab.c" /* yacc.c:1646 */ + case 149: /* Type: BaseType '&' */ +#line 551 "xi-grammar.y" + { (yyval.type) = new ReferenceType((yyvsp[-1].type)); } +#line 3338 "y.tab.c" break; - case 150: -#line 551 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.type) = (yyvsp[0].type); } -#line 3216 "y.tab.c" /* yacc.c:1646 */ + case 150: /* Type: BaseType */ +#line 553 "xi-grammar.y" + { (yyval.type) = (yyvsp[0].type); } +#line 3344 "y.tab.c" break; - case 151: -#line 555 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.val) = new Value((yyvsp[0].strval)); } -#line 3222 "y.tab.c" /* yacc.c:1646 */ + case 151: /* ArrayDim: CCode */ +#line 557 "xi-grammar.y" + { (yyval.val) = new Value((yyvsp[0].strval)); } +#line 3350 "y.tab.c" break; - case 152: -#line 559 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.val) = (yyvsp[-1].val); } -#line 3228 "y.tab.c" /* yacc.c:1646 */ + case 152: /* Dim: SParamBracketStart ArrayDim SParamBracketEnd */ +#line 561 "xi-grammar.y" + { (yyval.val) = (yyvsp[-1].val); } +#line 3356 "y.tab.c" break; - case 153: -#line 563 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.vallist) = 0; } -#line 3234 "y.tab.c" /* yacc.c:1646 */ + case 153: /* DimList: %empty */ +#line 565 "xi-grammar.y" + { (yyval.vallist) = 0; } +#line 3362 "y.tab.c" break; - case 154: -#line 565 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.vallist) = new ValueList((yyvsp[-1].val), (yyvsp[0].vallist)); } -#line 3240 "y.tab.c" /* yacc.c:1646 */ + case 154: /* DimList: Dim DimList */ +#line 567 "xi-grammar.y" + { (yyval.vallist) = new ValueList((yyvsp[-1].val), (yyvsp[0].vallist)); } +#line 3368 "y.tab.c" break; - case 155: -#line 569 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.readonly) = new Readonly(lineno, (yyvsp[-2].type), (yyvsp[-1].strval), (yyvsp[0].vallist)); } -#line 3246 "y.tab.c" /* yacc.c:1646 */ + case 155: /* Readonly: READONLY Type QualName DimList */ +#line 571 "xi-grammar.y" + { (yyval.readonly) = new Readonly(lineno, (yyvsp[-2].type), (yyvsp[-1].strval), (yyvsp[0].vallist)); } +#line 3374 "y.tab.c" break; - case 156: -#line 573 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.readonly) = new Readonly(lineno, (yyvsp[-3].type), (yyvsp[-1].strval), (yyvsp[0].vallist), 1); } -#line 3252 "y.tab.c" /* yacc.c:1646 */ + case 156: /* ReadonlyMsg: READONLY MESSAGE SimpleType '*' QualName DimList */ +#line 575 "xi-grammar.y" + { (yyval.readonly) = new Readonly(lineno, (yyvsp[-3].type), (yyvsp[-1].strval), (yyvsp[0].vallist), 1); } +#line 3380 "y.tab.c" break; - case 157: -#line 577 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.intval) = 0;} -#line 3258 "y.tab.c" /* yacc.c:1646 */ + case 157: /* OptVoid: %empty */ +#line 579 "xi-grammar.y" + { (yyval.intval) = 0;} +#line 3386 "y.tab.c" break; - case 158: -#line 579 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.intval) = 0;} -#line 3264 "y.tab.c" /* yacc.c:1646 */ + case 158: /* OptVoid: VOID */ +#line 581 "xi-grammar.y" + { (yyval.intval) = 0;} +#line 3392 "y.tab.c" break; - case 159: -#line 583 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.intval) = 0; } -#line 3270 "y.tab.c" /* yacc.c:1646 */ + case 159: /* MAttribs: %empty */ +#line 585 "xi-grammar.y" + { (yyval.intval) = 0; } +#line 3398 "y.tab.c" break; - case 160: -#line 585 "xi-grammar.y" /* yacc.c:1646 */ - { + case 160: /* MAttribs: '[' MAttribList ']' */ +#line 587 "xi-grammar.y" + { /* printf("Warning: Message attributes are being phased out.\n"); printf("Warning: Please remove them from interface files.\n"); */ (yyval.intval) = (yyvsp[-1].intval); } -#line 3282 "y.tab.c" /* yacc.c:1646 */ +#line 3410 "y.tab.c" break; - case 161: -#line 595 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.intval) = (yyvsp[0].intval); } -#line 3288 "y.tab.c" /* yacc.c:1646 */ + case 161: /* MAttribList: MAttrib */ +#line 597 "xi-grammar.y" + { (yyval.intval) = (yyvsp[0].intval); } +#line 3416 "y.tab.c" break; - case 162: -#line 597 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.intval) = (yyvsp[-2].intval) | (yyvsp[0].intval); } -#line 3294 "y.tab.c" /* yacc.c:1646 */ + case 162: /* MAttribList: MAttrib ',' MAttribList */ +#line 599 "xi-grammar.y" + { (yyval.intval) = (yyvsp[-2].intval) | (yyvsp[0].intval); } +#line 3422 "y.tab.c" break; - case 163: -#line 601 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.intval) = 0; } -#line 3300 "y.tab.c" /* yacc.c:1646 */ + case 163: /* MAttrib: PACKED */ +#line 603 "xi-grammar.y" + { (yyval.intval) = 0; } +#line 3428 "y.tab.c" break; - case 164: -#line 603 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.intval) = 0; } -#line 3306 "y.tab.c" /* yacc.c:1646 */ + case 164: /* MAttrib: VARSIZE */ +#line 605 "xi-grammar.y" + { (yyval.intval) = 0; } +#line 3434 "y.tab.c" break; - case 165: -#line 607 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.cattr) = 0; } -#line 3312 "y.tab.c" /* yacc.c:1646 */ + case 165: /* CAttribs: %empty */ +#line 609 "xi-grammar.y" + { (yyval.cattr) = 0; } +#line 3440 "y.tab.c" break; - case 166: -#line 609 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.cattr) = (yyvsp[-1].cattr); } -#line 3318 "y.tab.c" /* yacc.c:1646 */ + case 166: /* CAttribs: '[' CAttribList ']' */ +#line 611 "xi-grammar.y" + { (yyval.cattr) = (yyvsp[-1].cattr); } +#line 3446 "y.tab.c" break; - case 167: -#line 613 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.cattr) = (yyvsp[0].cattr); } -#line 3324 "y.tab.c" /* yacc.c:1646 */ + case 167: /* CAttribList: CAttrib */ +#line 615 "xi-grammar.y" + { (yyval.cattr) = (yyvsp[0].cattr); } +#line 3452 "y.tab.c" break; - case 168: -#line 615 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.cattr) = (yyvsp[-2].cattr) | (yyvsp[0].cattr); } -#line 3330 "y.tab.c" /* yacc.c:1646 */ + case 168: /* CAttribList: CAttrib ',' CAttribList */ +#line 617 "xi-grammar.y" + { (yyval.cattr) = (yyvsp[-2].cattr) | (yyvsp[0].cattr); } +#line 3458 "y.tab.c" break; - case 169: -#line 619 "xi-grammar.y" /* yacc.c:1646 */ - { python_doc = NULL; (yyval.intval) = 0; } -#line 3336 "y.tab.c" /* yacc.c:1646 */ + case 169: /* PythonOptions: %empty */ +#line 621 "xi-grammar.y" + { python_doc = NULL; (yyval.intval) = 0; } +#line 3464 "y.tab.c" break; - case 170: -#line 621 "xi-grammar.y" /* yacc.c:1646 */ - { python_doc = (yyvsp[0].strval); (yyval.intval) = 0; } -#line 3342 "y.tab.c" /* yacc.c:1646 */ + case 170: /* PythonOptions: LITERAL */ +#line 623 "xi-grammar.y" + { python_doc = (yyvsp[0].strval); (yyval.intval) = 0; } +#line 3470 "y.tab.c" break; - case 171: -#line 625 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.cattr) = Chare::CPYTHON; } -#line 3348 "y.tab.c" /* yacc.c:1646 */ + case 171: /* ArrayAttrib: PYTHON */ +#line 627 "xi-grammar.y" + { (yyval.cattr) = Chare::CPYTHON; } +#line 3476 "y.tab.c" break; - case 172: -#line 629 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.cattr) = 0; } -#line 3354 "y.tab.c" /* yacc.c:1646 */ + case 172: /* ArrayAttribs: %empty */ +#line 631 "xi-grammar.y" + { (yyval.cattr) = 0; } +#line 3482 "y.tab.c" break; - case 173: -#line 631 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.cattr) = (yyvsp[-1].cattr); } -#line 3360 "y.tab.c" /* yacc.c:1646 */ + case 173: /* ArrayAttribs: '[' ArrayAttribList ']' */ +#line 633 "xi-grammar.y" + { (yyval.cattr) = (yyvsp[-1].cattr); } +#line 3488 "y.tab.c" break; - case 174: -#line 635 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.cattr) = (yyvsp[0].cattr); } -#line 3366 "y.tab.c" /* yacc.c:1646 */ + case 174: /* ArrayAttribList: ArrayAttrib */ +#line 637 "xi-grammar.y" + { (yyval.cattr) = (yyvsp[0].cattr); } +#line 3494 "y.tab.c" break; - case 175: -#line 637 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.cattr) = (yyvsp[-2].cattr) | (yyvsp[0].cattr); } -#line 3372 "y.tab.c" /* yacc.c:1646 */ + case 175: /* ArrayAttribList: ArrayAttrib ',' ArrayAttribList */ +#line 639 "xi-grammar.y" + { (yyval.cattr) = (yyvsp[-2].cattr) | (yyvsp[0].cattr); } +#line 3500 "y.tab.c" break; - case 176: -#line 641 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.cattr) = Chare::CMIGRATABLE; } -#line 3378 "y.tab.c" /* yacc.c:1646 */ + case 176: /* CAttrib: MIGRATABLE */ +#line 643 "xi-grammar.y" + { (yyval.cattr) = Chare::CMIGRATABLE; } +#line 3506 "y.tab.c" break; - case 177: -#line 643 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.cattr) = Chare::CPYTHON; } -#line 3384 "y.tab.c" /* yacc.c:1646 */ + case 177: /* CAttrib: PYTHON */ +#line 645 "xi-grammar.y" + { (yyval.cattr) = Chare::CPYTHON; } +#line 3512 "y.tab.c" break; - case 178: -#line 647 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.intval) = 0; } -#line 3390 "y.tab.c" /* yacc.c:1646 */ + case 178: /* OptConditional: %empty */ +#line 649 "xi-grammar.y" + { (yyval.intval) = 0; } +#line 3518 "y.tab.c" break; - case 179: -#line 649 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.intval) = 1; } -#line 3396 "y.tab.c" /* yacc.c:1646 */ + case 179: /* OptConditional: CONDITIONAL */ +#line 651 "xi-grammar.y" + { (yyval.intval) = 1; } +#line 3524 "y.tab.c" break; - case 180: -#line 652 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.intval) = 0; } -#line 3402 "y.tab.c" /* yacc.c:1646 */ + case 180: /* MsgArray: %empty */ +#line 654 "xi-grammar.y" + { (yyval.intval) = 0; } +#line 3530 "y.tab.c" break; - case 181: -#line 654 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.intval) = 1; } -#line 3408 "y.tab.c" /* yacc.c:1646 */ + case 181: /* MsgArray: '[' ']' */ +#line 656 "xi-grammar.y" + { (yyval.intval) = 1; } +#line 3536 "y.tab.c" break; - case 182: -#line 657 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.mv) = new MsgVar((yyvsp[-3].type), (yyvsp[-2].strval), (yyvsp[-4].intval), (yyvsp[-1].intval)); } -#line 3414 "y.tab.c" /* yacc.c:1646 */ + case 182: /* Var: OptConditional Type Name MsgArray OneOrMoreSemiColon */ +#line 659 "xi-grammar.y" + { (yyval.mv) = new MsgVar((yyvsp[-3].type), (yyvsp[-2].strval), (yyvsp[-4].intval), (yyvsp[-1].intval)); } +#line 3542 "y.tab.c" break; - case 183: -#line 661 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.mvlist) = new MsgVarList((yyvsp[0].mv)); } -#line 3420 "y.tab.c" /* yacc.c:1646 */ + case 183: /* VarList: Var */ +#line 663 "xi-grammar.y" + { (yyval.mvlist) = new MsgVarList((yyvsp[0].mv)); } +#line 3548 "y.tab.c" break; - case 184: -#line 663 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.mvlist) = new MsgVarList((yyvsp[-1].mv), (yyvsp[0].mvlist)); } -#line 3426 "y.tab.c" /* yacc.c:1646 */ + case 184: /* VarList: Var VarList */ +#line 665 "xi-grammar.y" + { (yyval.mvlist) = new MsgVarList((yyvsp[-1].mv), (yyvsp[0].mvlist)); } +#line 3554 "y.tab.c" break; - case 185: -#line 667 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.message) = new Message(lineno, (yyvsp[0].ntype)); } -#line 3432 "y.tab.c" /* yacc.c:1646 */ + case 185: /* Message: MESSAGE MAttribs NamedType */ +#line 669 "xi-grammar.y" + { (yyval.message) = new Message(lineno, (yyvsp[0].ntype)); } +#line 3560 "y.tab.c" break; - case 186: -#line 669 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.message) = new Message(lineno, (yyvsp[-2].ntype)); } -#line 3438 "y.tab.c" /* yacc.c:1646 */ + case 186: /* Message: MESSAGE MAttribs NamedType '{' '}' */ +#line 671 "xi-grammar.y" + { (yyval.message) = new Message(lineno, (yyvsp[-2].ntype)); } +#line 3566 "y.tab.c" break; - case 187: -#line 671 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.message) = new Message(lineno, (yyvsp[-3].ntype), (yyvsp[-1].mvlist)); } -#line 3444 "y.tab.c" /* yacc.c:1646 */ + case 187: /* Message: MESSAGE MAttribs NamedType '{' VarList '}' */ +#line 673 "xi-grammar.y" + { (yyval.message) = new Message(lineno, (yyvsp[-3].ntype), (yyvsp[-1].mvlist)); } +#line 3572 "y.tab.c" break; - case 188: -#line 675 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.typelist) = 0; } -#line 3450 "y.tab.c" /* yacc.c:1646 */ + case 188: /* OptBaseList: %empty */ +#line 677 "xi-grammar.y" + { (yyval.typelist) = 0; } +#line 3578 "y.tab.c" break; - case 189: -#line 677 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.typelist) = (yyvsp[0].typelist); } -#line 3456 "y.tab.c" /* yacc.c:1646 */ + case 189: /* OptBaseList: ':' BaseList */ +#line 679 "xi-grammar.y" + { (yyval.typelist) = (yyvsp[0].typelist); } +#line 3584 "y.tab.c" break; - case 190: -#line 681 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.typelist) = new TypeList((yyvsp[0].ntype)); } -#line 3462 "y.tab.c" /* yacc.c:1646 */ + case 190: /* BaseList: QualNamedType */ +#line 683 "xi-grammar.y" + { (yyval.typelist) = new TypeList((yyvsp[0].ntype)); } +#line 3590 "y.tab.c" break; - case 191: -#line 683 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.typelist) = new TypeList((yyvsp[-2].ntype), (yyvsp[0].typelist)); } -#line 3468 "y.tab.c" /* yacc.c:1646 */ + case 191: /* BaseList: QualNamedType ',' BaseList */ +#line 685 "xi-grammar.y" + { (yyval.typelist) = new TypeList((yyvsp[-2].ntype), (yyvsp[0].typelist)); } +#line 3596 "y.tab.c" break; - case 192: -#line 687 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.chare) = new Chare(lineno, (yyvsp[-3].cattr)|Chare::CCHARE, (yyvsp[-2].ntype), (yyvsp[-1].typelist), (yyvsp[0].mbrlist)); } -#line 3474 "y.tab.c" /* yacc.c:1646 */ + case 192: /* Chare: CHARE CAttribs NamedType OptBaseList MemberEList */ +#line 689 "xi-grammar.y" + { (yyval.chare) = new Chare(lineno, (yyvsp[-3].cattr)|Chare::CCHARE, (yyvsp[-2].ntype), (yyvsp[-1].typelist), (yyvsp[0].mbrlist)); } +#line 3602 "y.tab.c" break; - case 193: -#line 689 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.chare) = new MainChare(lineno, (yyvsp[-3].cattr), (yyvsp[-2].ntype), (yyvsp[-1].typelist), (yyvsp[0].mbrlist)); } -#line 3480 "y.tab.c" /* yacc.c:1646 */ + case 193: /* Chare: MAINCHARE CAttribs NamedType OptBaseList MemberEList */ +#line 691 "xi-grammar.y" + { (yyval.chare) = new MainChare(lineno, (yyvsp[-3].cattr), (yyvsp[-2].ntype), (yyvsp[-1].typelist), (yyvsp[0].mbrlist)); } +#line 3608 "y.tab.c" break; - case 194: -#line 693 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.chare) = new Group(lineno, (yyvsp[-3].cattr), (yyvsp[-2].ntype), (yyvsp[-1].typelist), (yyvsp[0].mbrlist)); } -#line 3486 "y.tab.c" /* yacc.c:1646 */ + case 194: /* Group: GROUP CAttribs NamedType OptBaseList MemberEList */ +#line 695 "xi-grammar.y" + { (yyval.chare) = new Group(lineno, (yyvsp[-3].cattr), (yyvsp[-2].ntype), (yyvsp[-1].typelist), (yyvsp[0].mbrlist)); } +#line 3614 "y.tab.c" break; - case 195: -#line 697 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.chare) = new NodeGroup(lineno, (yyvsp[-3].cattr), (yyvsp[-2].ntype), (yyvsp[-1].typelist), (yyvsp[0].mbrlist)); } -#line 3492 "y.tab.c" /* yacc.c:1646 */ + case 195: /* NodeGroup: NODEGROUP CAttribs NamedType OptBaseList MemberEList */ +#line 699 "xi-grammar.y" + { (yyval.chare) = new NodeGroup(lineno, (yyvsp[-3].cattr), (yyvsp[-2].ntype), (yyvsp[-1].typelist), (yyvsp[0].mbrlist)); } +#line 3620 "y.tab.c" break; - case 196: -#line 701 "xi-grammar.y" /* yacc.c:1646 */ - {/*Stupid special case for [1D] indices*/ + case 196: /* ArrayIndexType: '[' NUMBER Name ']' */ +#line 703 "xi-grammar.y" + {/*Stupid special case for [1D] indices*/ char *buf=new char[40]; - sprintf(buf,"%sD",(yyvsp[-2].strval)); + snprintf(buf,40,"%sD",(yyvsp[-2].strval)); (yyval.ntype) = new NamedType(buf); } -#line 3502 "y.tab.c" /* yacc.c:1646 */ +#line 3630 "y.tab.c" break; - case 197: -#line 707 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.ntype) = (yyvsp[-1].ntype); } -#line 3508 "y.tab.c" /* yacc.c:1646 */ + case 197: /* ArrayIndexType: '[' QualNamedType ']' */ +#line 709 "xi-grammar.y" + { (yyval.ntype) = (yyvsp[-1].ntype); } +#line 3636 "y.tab.c" break; - case 198: -#line 711 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.chare) = new Array(lineno, (yyvsp[-4].cattr), (yyvsp[-3].ntype), (yyvsp[-2].ntype), (yyvsp[-1].typelist), (yyvsp[0].mbrlist)); } -#line 3514 "y.tab.c" /* yacc.c:1646 */ + case 198: /* Array: ARRAY ArrayAttribs ArrayIndexType NamedType OptBaseList MemberEList */ +#line 713 "xi-grammar.y" + { (yyval.chare) = new Array(lineno, (yyvsp[-4].cattr), (yyvsp[-3].ntype), (yyvsp[-2].ntype), (yyvsp[-1].typelist), (yyvsp[0].mbrlist)); } +#line 3642 "y.tab.c" break; - case 199: -#line 713 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.chare) = new Array(lineno, (yyvsp[-3].cattr), (yyvsp[-4].ntype), (yyvsp[-2].ntype), (yyvsp[-1].typelist), (yyvsp[0].mbrlist)); } -#line 3520 "y.tab.c" /* yacc.c:1646 */ + case 199: /* Array: ARRAY ArrayIndexType ArrayAttribs NamedType OptBaseList MemberEList */ +#line 715 "xi-grammar.y" + { (yyval.chare) = new Array(lineno, (yyvsp[-3].cattr), (yyvsp[-4].ntype), (yyvsp[-2].ntype), (yyvsp[-1].typelist), (yyvsp[0].mbrlist)); } +#line 3648 "y.tab.c" break; - case 200: -#line 717 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.chare) = new Chare(lineno, (yyvsp[-3].cattr)|Chare::CCHARE, new NamedType((yyvsp[-2].strval)), (yyvsp[-1].typelist), (yyvsp[0].mbrlist));} -#line 3526 "y.tab.c" /* yacc.c:1646 */ + case 200: /* TChare: CHARE CAttribs Name OptBaseList MemberEList */ +#line 719 "xi-grammar.y" + { (yyval.chare) = new Chare(lineno, (yyvsp[-3].cattr)|Chare::CCHARE, new NamedType((yyvsp[-2].strval)), (yyvsp[-1].typelist), (yyvsp[0].mbrlist));} +#line 3654 "y.tab.c" break; - case 201: -#line 719 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.chare) = new MainChare(lineno, (yyvsp[-3].cattr), new NamedType((yyvsp[-2].strval)), (yyvsp[-1].typelist), (yyvsp[0].mbrlist)); } -#line 3532 "y.tab.c" /* yacc.c:1646 */ + case 201: /* TChare: MAINCHARE CAttribs Name OptBaseList MemberEList */ +#line 721 "xi-grammar.y" + { (yyval.chare) = new MainChare(lineno, (yyvsp[-3].cattr), new NamedType((yyvsp[-2].strval)), (yyvsp[-1].typelist), (yyvsp[0].mbrlist)); } +#line 3660 "y.tab.c" break; - case 202: -#line 723 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.chare) = new Group(lineno, (yyvsp[-3].cattr), new NamedType((yyvsp[-2].strval)), (yyvsp[-1].typelist), (yyvsp[0].mbrlist)); } -#line 3538 "y.tab.c" /* yacc.c:1646 */ + case 202: /* TGroup: GROUP CAttribs Name OptBaseList MemberEList */ +#line 725 "xi-grammar.y" + { (yyval.chare) = new Group(lineno, (yyvsp[-3].cattr), new NamedType((yyvsp[-2].strval)), (yyvsp[-1].typelist), (yyvsp[0].mbrlist)); } +#line 3666 "y.tab.c" break; - case 203: -#line 727 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.chare) = new NodeGroup( lineno, (yyvsp[-3].cattr), new NamedType((yyvsp[-2].strval)), (yyvsp[-1].typelist), (yyvsp[0].mbrlist)); } -#line 3544 "y.tab.c" /* yacc.c:1646 */ + case 203: /* TNodeGroup: NODEGROUP CAttribs Name OptBaseList MemberEList */ +#line 729 "xi-grammar.y" + { (yyval.chare) = new NodeGroup( lineno, (yyvsp[-3].cattr), new NamedType((yyvsp[-2].strval)), (yyvsp[-1].typelist), (yyvsp[0].mbrlist)); } +#line 3672 "y.tab.c" break; - case 204: -#line 731 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.chare) = new Array( lineno, 0, (yyvsp[-3].ntype), new NamedType((yyvsp[-2].strval)), (yyvsp[-1].typelist), (yyvsp[0].mbrlist)); } -#line 3550 "y.tab.c" /* yacc.c:1646 */ + case 204: /* TArray: ARRAY ArrayIndexType Name OptBaseList MemberEList */ +#line 733 "xi-grammar.y" + { (yyval.chare) = new Array( lineno, 0, (yyvsp[-3].ntype), new NamedType((yyvsp[-2].strval)), (yyvsp[-1].typelist), (yyvsp[0].mbrlist)); } +#line 3678 "y.tab.c" break; - case 205: -#line 735 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.message) = new Message(lineno, new NamedType((yyvsp[-1].strval))); } -#line 3556 "y.tab.c" /* yacc.c:1646 */ + case 205: /* TMessage: MESSAGE MAttribs Name OneOrMoreSemiColon */ +#line 737 "xi-grammar.y" + { (yyval.message) = new Message(lineno, new NamedType((yyvsp[-1].strval))); } +#line 3684 "y.tab.c" break; - case 206: -#line 737 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.message) = new Message(lineno, new NamedType((yyvsp[-4].strval)), (yyvsp[-2].mvlist)); } -#line 3562 "y.tab.c" /* yacc.c:1646 */ + case 206: /* TMessage: MESSAGE MAttribs Name '{' VarList '}' OneOrMoreSemiColon */ +#line 739 "xi-grammar.y" + { (yyval.message) = new Message(lineno, new NamedType((yyvsp[-4].strval)), (yyvsp[-2].mvlist)); } +#line 3690 "y.tab.c" break; - case 207: -#line 741 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.type) = 0; } -#line 3568 "y.tab.c" /* yacc.c:1646 */ + case 207: /* OptTypeInit: %empty */ +#line 743 "xi-grammar.y" + { (yyval.type) = 0; } +#line 3696 "y.tab.c" break; - case 208: -#line 743 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.type) = (yyvsp[0].type); } -#line 3574 "y.tab.c" /* yacc.c:1646 */ + case 208: /* OptTypeInit: '=' Type */ +#line 745 "xi-grammar.y" + { (yyval.type) = (yyvsp[0].type); } +#line 3702 "y.tab.c" break; - case 209: -#line 747 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.strval) = 0; } -#line 3580 "y.tab.c" /* yacc.c:1646 */ + case 209: /* OptNameInit: %empty */ +#line 749 "xi-grammar.y" + { (yyval.strval) = 0; } +#line 3708 "y.tab.c" break; - case 210: -#line 749 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.strval) = (yyvsp[0].strval); } -#line 3586 "y.tab.c" /* yacc.c:1646 */ + case 210: /* OptNameInit: '=' NUMBER */ +#line 751 "xi-grammar.y" + { (yyval.strval) = (yyvsp[0].strval); } +#line 3714 "y.tab.c" break; - case 211: -#line 751 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.strval) = (yyvsp[0].strval); } -#line 3592 "y.tab.c" /* yacc.c:1646 */ + case 211: /* OptNameInit: '=' LITERAL */ +#line 753 "xi-grammar.y" + { (yyval.strval) = (yyvsp[0].strval); } +#line 3720 "y.tab.c" break; - case 212: -#line 753 "xi-grammar.y" /* yacc.c:1646 */ - { + case 212: /* OptNameInit: '=' QualNamedType */ +#line 755 "xi-grammar.y" + { XStr typeStr; (yyvsp[0].ntype)->print(typeStr); char *tmp = strdup(typeStr.get_string()); (yyval.strval) = tmp; } -#line 3603 "y.tab.c" /* yacc.c:1646 */ +#line 3731 "y.tab.c" break; - case 213: -#line 762 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.tvar) = new TTypeEllipsis(new NamedEllipsisType((yyvsp[-1].strval)), (yyvsp[0].type)); } -#line 3609 "y.tab.c" /* yacc.c:1646 */ + case 213: /* TVar: CLASS '.' '.' '.' Name OptTypeInit */ +#line 764 "xi-grammar.y" + { (yyval.tvar) = new TTypeEllipsis(new NamedEllipsisType((yyvsp[-1].strval)), (yyvsp[0].type)); } +#line 3737 "y.tab.c" break; - case 214: -#line 764 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.tvar) = new TTypeEllipsis(new NamedEllipsisType((yyvsp[-1].strval)), (yyvsp[0].type)); } -#line 3615 "y.tab.c" /* yacc.c:1646 */ + case 214: /* TVar: TYPENAME '.' '.' '.' IDENT OptTypeInit */ +#line 766 "xi-grammar.y" + { (yyval.tvar) = new TTypeEllipsis(new NamedEllipsisType((yyvsp[-1].strval)), (yyvsp[0].type)); } +#line 3743 "y.tab.c" break; - case 215: -#line 766 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.tvar) = new TType(new NamedType((yyvsp[-1].strval)), (yyvsp[0].type)); } -#line 3621 "y.tab.c" /* yacc.c:1646 */ + case 215: /* TVar: CLASS Name OptTypeInit */ +#line 768 "xi-grammar.y" + { (yyval.tvar) = new TType(new NamedType((yyvsp[-1].strval)), (yyvsp[0].type)); } +#line 3749 "y.tab.c" break; - case 216: -#line 768 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.tvar) = new TType(new NamedType((yyvsp[-1].strval)), (yyvsp[0].type)); } -#line 3627 "y.tab.c" /* yacc.c:1646 */ + case 216: /* TVar: TYPENAME IDENT OptTypeInit */ +#line 770 "xi-grammar.y" + { (yyval.tvar) = new TType(new NamedType((yyvsp[-1].strval)), (yyvsp[0].type)); } +#line 3755 "y.tab.c" break; - case 217: -#line 770 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.tvar) = new TFunc((yyvsp[-1].ftype), (yyvsp[0].strval)); } -#line 3633 "y.tab.c" /* yacc.c:1646 */ + case 217: /* TVar: FuncType OptNameInit */ +#line 772 "xi-grammar.y" + { (yyval.tvar) = new TFunc((yyvsp[-1].ftype), (yyvsp[0].strval)); } +#line 3761 "y.tab.c" break; - case 218: -#line 772 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.tvar) = new TName((yyvsp[-2].type), (yyvsp[-1].strval), (yyvsp[0].strval)); } -#line 3639 "y.tab.c" /* yacc.c:1646 */ + case 218: /* TVar: Type Name OptNameInit */ +#line 774 "xi-grammar.y" + { (yyval.tvar) = new TName((yyvsp[-2].type), (yyvsp[-1].strval), (yyvsp[0].strval)); } +#line 3767 "y.tab.c" break; - case 219: -#line 776 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.tvarlist) = new TVarList((yyvsp[0].tvar)); } -#line 3645 "y.tab.c" /* yacc.c:1646 */ + case 219: /* TVarList: TVar */ +#line 778 "xi-grammar.y" + { (yyval.tvarlist) = new TVarList((yyvsp[0].tvar)); } +#line 3773 "y.tab.c" break; - case 220: -#line 778 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.tvarlist) = new TVarList((yyvsp[-2].tvar), (yyvsp[0].tvarlist)); } -#line 3651 "y.tab.c" /* yacc.c:1646 */ + case 220: /* TVarList: TVar ',' TVarList */ +#line 780 "xi-grammar.y" + { (yyval.tvarlist) = new TVarList((yyvsp[-2].tvar), (yyvsp[0].tvarlist)); } +#line 3779 "y.tab.c" break; - case 221: -#line 782 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.tvarlist) = (yyvsp[-1].tvarlist); } -#line 3657 "y.tab.c" /* yacc.c:1646 */ + case 221: /* TemplateSpec: TEMPLATE '<' TVarList '>' */ +#line 784 "xi-grammar.y" + { (yyval.tvarlist) = (yyvsp[-1].tvarlist); } +#line 3785 "y.tab.c" break; - case 222: -#line 786 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.templat) = new Template((yyvsp[-1].tvarlist), (yyvsp[0].chare)); (yyvsp[0].chare)->setTemplate((yyval.templat)); } -#line 3663 "y.tab.c" /* yacc.c:1646 */ + case 222: /* Template: TemplateSpec TChare */ +#line 788 "xi-grammar.y" + { (yyval.templat) = new Template((yyvsp[-1].tvarlist), (yyvsp[0].chare)); (yyvsp[0].chare)->setTemplate((yyval.templat)); } +#line 3791 "y.tab.c" break; - case 223: -#line 788 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.templat) = new Template((yyvsp[-1].tvarlist), (yyvsp[0].chare)); (yyvsp[0].chare)->setTemplate((yyval.templat)); } -#line 3669 "y.tab.c" /* yacc.c:1646 */ + case 223: /* Template: TemplateSpec TGroup */ +#line 790 "xi-grammar.y" + { (yyval.templat) = new Template((yyvsp[-1].tvarlist), (yyvsp[0].chare)); (yyvsp[0].chare)->setTemplate((yyval.templat)); } +#line 3797 "y.tab.c" break; - case 224: -#line 790 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.templat) = new Template((yyvsp[-1].tvarlist), (yyvsp[0].chare)); (yyvsp[0].chare)->setTemplate((yyval.templat)); } -#line 3675 "y.tab.c" /* yacc.c:1646 */ + case 224: /* Template: TemplateSpec TNodeGroup */ +#line 792 "xi-grammar.y" + { (yyval.templat) = new Template((yyvsp[-1].tvarlist), (yyvsp[0].chare)); (yyvsp[0].chare)->setTemplate((yyval.templat)); } +#line 3803 "y.tab.c" break; - case 225: -#line 792 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.templat) = new Template((yyvsp[-1].tvarlist), (yyvsp[0].chare)); (yyvsp[0].chare)->setTemplate((yyval.templat)); } -#line 3681 "y.tab.c" /* yacc.c:1646 */ + case 225: /* Template: TemplateSpec TArray */ +#line 794 "xi-grammar.y" + { (yyval.templat) = new Template((yyvsp[-1].tvarlist), (yyvsp[0].chare)); (yyvsp[0].chare)->setTemplate((yyval.templat)); } +#line 3809 "y.tab.c" break; - case 226: -#line 794 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.templat) = new Template((yyvsp[-1].tvarlist), (yyvsp[0].message)); (yyvsp[0].message)->setTemplate((yyval.templat)); } -#line 3687 "y.tab.c" /* yacc.c:1646 */ + case 226: /* Template: TemplateSpec TMessage */ +#line 796 "xi-grammar.y" + { (yyval.templat) = new Template((yyvsp[-1].tvarlist), (yyvsp[0].message)); (yyvsp[0].message)->setTemplate((yyval.templat)); } +#line 3815 "y.tab.c" break; - case 227: -#line 798 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.mbrlist) = 0; } -#line 3693 "y.tab.c" /* yacc.c:1646 */ + case 227: /* MemberEList: OneOrMoreSemiColon */ +#line 800 "xi-grammar.y" + { (yyval.mbrlist) = 0; } +#line 3821 "y.tab.c" break; - case 228: -#line 800 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.mbrlist) = (yyvsp[-2].mbrlist); } -#line 3699 "y.tab.c" /* yacc.c:1646 */ + case 228: /* MemberEList: '{' MemberList '}' OptSemiColon */ +#line 802 "xi-grammar.y" + { (yyval.mbrlist) = (yyvsp[-2].mbrlist); } +#line 3827 "y.tab.c" break; - case 229: -#line 804 "xi-grammar.y" /* yacc.c:1646 */ - { + case 229: /* MemberList: %empty */ +#line 806 "xi-grammar.y" + { if (!connectEntries.empty()) { (yyval.mbrlist) = new AstChildren(connectEntries); } else { (yyval.mbrlist) = 0; } } -#line 3711 "y.tab.c" /* yacc.c:1646 */ +#line 3839 "y.tab.c" break; - case 230: -#line 812 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.mbrlist) = new AstChildren(-1, (yyvsp[-1].member), (yyvsp[0].mbrlist)); } -#line 3717 "y.tab.c" /* yacc.c:1646 */ + case 230: /* MemberList: Member MemberList */ +#line 814 "xi-grammar.y" + { (yyval.mbrlist) = new AstChildren(-1, (yyvsp[-1].member), (yyvsp[0].mbrlist)); } +#line 3845 "y.tab.c" break; - case 231: -#line 816 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.member) = (yyvsp[0].readonly); } -#line 3723 "y.tab.c" /* yacc.c:1646 */ + case 231: /* NonEntryMember: Readonly */ +#line 818 "xi-grammar.y" + { (yyval.member) = (yyvsp[0].readonly); } +#line 3851 "y.tab.c" break; - case 232: -#line 818 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.member) = (yyvsp[0].readonly); } -#line 3729 "y.tab.c" /* yacc.c:1646 */ + case 232: /* NonEntryMember: ReadonlyMsg */ +#line 820 "xi-grammar.y" + { (yyval.member) = (yyvsp[0].readonly); } +#line 3857 "y.tab.c" break; - case 234: -#line 821 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.member) = (yyvsp[0].member); } -#line 3735 "y.tab.c" /* yacc.c:1646 */ + case 234: /* NonEntryMember: InitNode */ +#line 823 "xi-grammar.y" + { (yyval.member) = (yyvsp[0].member); } +#line 3863 "y.tab.c" break; - case 235: -#line 823 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.member) = (yyvsp[0].pupable); } -#line 3741 "y.tab.c" /* yacc.c:1646 */ + case 235: /* NonEntryMember: PUPABLE PUPableClass */ +#line 825 "xi-grammar.y" + { (yyval.member) = (yyvsp[0].pupable); } +#line 3869 "y.tab.c" break; - case 236: -#line 825 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.member) = (yyvsp[0].includeFile); } -#line 3747 "y.tab.c" /* yacc.c:1646 */ + case 236: /* NonEntryMember: INCLUDE IncludeFile */ +#line 827 "xi-grammar.y" + { (yyval.member) = (yyvsp[0].includeFile); } +#line 3875 "y.tab.c" break; - case 237: -#line 827 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.member) = new ClassDeclaration(lineno,(yyvsp[0].strval)); } -#line 3753 "y.tab.c" /* yacc.c:1646 */ + case 237: /* NonEntryMember: CLASS Name */ +#line 829 "xi-grammar.y" + { (yyval.member) = new ClassDeclaration(lineno,(yyvsp[0].strval)); } +#line 3881 "y.tab.c" break; - case 238: -#line 831 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.member) = new InitCall(lineno, (yyvsp[0].strval), 1); } -#line 3759 "y.tab.c" /* yacc.c:1646 */ + case 238: /* InitNode: INITNODE OptVoid QualName */ +#line 833 "xi-grammar.y" + { (yyval.member) = new InitCall(lineno, (yyvsp[0].strval), 1); } +#line 3887 "y.tab.c" break; - case 239: -#line 833 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.member) = new InitCall(lineno, (yyvsp[-3].strval), 1); } -#line 3765 "y.tab.c" /* yacc.c:1646 */ + case 239: /* InitNode: INITNODE OptVoid QualName '(' OptVoid ')' */ +#line 835 "xi-grammar.y" + { (yyval.member) = new InitCall(lineno, (yyvsp[-3].strval), 1); } +#line 3893 "y.tab.c" break; - case 240: -#line 835 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.member) = new InitCall(lineno, + case 240: /* InitNode: INITNODE OptVoid QualName '<' TParamList '>' '(' OptVoid ')' */ +#line 837 "xi-grammar.y" + { (yyval.member) = new InitCall(lineno, strdup((std::string((yyvsp[-6].strval)) + '<' + ((yyvsp[-4].tparlist))->to_string() + '>').c_str()), 1); } -#line 3775 "y.tab.c" /* yacc.c:1646 */ +#line 3903 "y.tab.c" break; - case 241: -#line 841 "xi-grammar.y" /* yacc.c:1646 */ - { + case 241: /* InitNode: INITCALL OptVoid QualName */ +#line 843 "xi-grammar.y" + { WARNING("deprecated use of initcall. Use initnode or initproc instead", (yylsp[-2]).first_column, (yylsp[-2]).last_column, (yylsp[-2]).first_line); (yyval.member) = new InitCall(lineno, (yyvsp[0].strval), 1); } -#line 3785 "y.tab.c" /* yacc.c:1646 */ +#line 3913 "y.tab.c" break; - case 242: -#line 847 "xi-grammar.y" /* yacc.c:1646 */ - { + case 242: /* InitNode: INITCALL OptVoid QualName '(' OptVoid ')' */ +#line 849 "xi-grammar.y" + { WARNING("deprecated use of initcall. Use initnode or initproc instead", (yylsp[-5]).first_column, (yylsp[-5]).last_column, (yylsp[-5]).first_line); (yyval.member) = new InitCall(lineno, (yyvsp[-3].strval), 1); } -#line 3795 "y.tab.c" /* yacc.c:1646 */ +#line 3923 "y.tab.c" break; - case 243: -#line 856 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.member) = new InitCall(lineno, (yyvsp[0].strval), 0); } -#line 3801 "y.tab.c" /* yacc.c:1646 */ + case 243: /* InitProc: INITPROC OptVoid QualName */ +#line 858 "xi-grammar.y" + { (yyval.member) = new InitCall(lineno, (yyvsp[0].strval), 0); } +#line 3929 "y.tab.c" break; - case 244: -#line 858 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.member) = new InitCall(lineno, (yyvsp[-3].strval), 0); } -#line 3807 "y.tab.c" /* yacc.c:1646 */ + case 244: /* InitProc: INITPROC OptVoid QualName '(' OptVoid ')' */ +#line 860 "xi-grammar.y" + { (yyval.member) = new InitCall(lineno, (yyvsp[-3].strval), 0); } +#line 3935 "y.tab.c" break; - case 245: -#line 860 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.member) = new InitCall(lineno, + case 245: /* InitProc: INITPROC OptVoid QualName '<' TParamList '>' '(' OptVoid ')' */ +#line 862 "xi-grammar.y" + { (yyval.member) = new InitCall(lineno, strdup((std::string((yyvsp[-6].strval)) + '<' + ((yyvsp[-4].tparlist))->to_string() + '>').c_str()), 0); } -#line 3817 "y.tab.c" /* yacc.c:1646 */ +#line 3945 "y.tab.c" break; - case 246: -#line 866 "xi-grammar.y" /* yacc.c:1646 */ - { + case 246: /* InitProc: INITPROC '[' ACCEL ']' OptVoid QualName '(' OptVoid ')' */ +#line 868 "xi-grammar.y" + { InitCall* rtn = new InitCall(lineno, (yyvsp[-3].strval), 0); rtn->setAccel(); (yyval.member) = rtn; } -#line 3827 "y.tab.c" /* yacc.c:1646 */ +#line 3955 "y.tab.c" break; - case 247: -#line 874 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.pupable) = new PUPableClass(lineno,(yyvsp[0].ntype),0); } -#line 3833 "y.tab.c" /* yacc.c:1646 */ + case 247: /* PUPableClass: QualNamedType */ +#line 876 "xi-grammar.y" + { (yyval.pupable) = new PUPableClass(lineno,(yyvsp[0].ntype),0); } +#line 3961 "y.tab.c" break; - case 248: -#line 876 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.pupable) = new PUPableClass(lineno,(yyvsp[-2].ntype),(yyvsp[0].pupable)); } -#line 3839 "y.tab.c" /* yacc.c:1646 */ + case 248: /* PUPableClass: QualNamedType ',' PUPableClass */ +#line 878 "xi-grammar.y" + { (yyval.pupable) = new PUPableClass(lineno,(yyvsp[-2].ntype),(yyvsp[0].pupable)); } +#line 3967 "y.tab.c" break; - case 249: -#line 879 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.includeFile) = new IncludeFile(lineno,(yyvsp[0].strval)); } -#line 3845 "y.tab.c" /* yacc.c:1646 */ + case 249: /* IncludeFile: LITERAL */ +#line 881 "xi-grammar.y" + { (yyval.includeFile) = new IncludeFile(lineno,(yyvsp[0].strval)); } +#line 3973 "y.tab.c" break; - case 250: -#line 883 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.member) = (yyvsp[0].member); } -#line 3851 "y.tab.c" /* yacc.c:1646 */ + case 250: /* Member: MemberBody */ +#line 885 "xi-grammar.y" + { (yyval.member) = (yyvsp[0].member); } +#line 3979 "y.tab.c" break; - case 251: -#line 887 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.member) = (yyvsp[0].entry); } -#line 3857 "y.tab.c" /* yacc.c:1646 */ + case 251: /* MemberBody: Entry */ +#line 889 "xi-grammar.y" + { (yyval.member) = (yyvsp[0].entry); } +#line 3985 "y.tab.c" break; - case 252: -#line 889 "xi-grammar.y" /* yacc.c:1646 */ - { + case 252: /* MemberBody: TemplateSpec Entry */ +#line 891 "xi-grammar.y" + { (yyvsp[0].entry)->tspec = (yyvsp[-1].tvarlist); (yyval.member) = (yyvsp[0].entry); } -#line 3866 "y.tab.c" /* yacc.c:1646 */ +#line 3994 "y.tab.c" break; - case 253: -#line 894 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.member) = (yyvsp[-1].member); } -#line 3872 "y.tab.c" /* yacc.c:1646 */ + case 253: /* MemberBody: NonEntryMember OneOrMoreSemiColon */ +#line 896 "xi-grammar.y" + { (yyval.member) = (yyvsp[-1].member); } +#line 4000 "y.tab.c" break; - case 254: -#line 896 "xi-grammar.y" /* yacc.c:1646 */ - { + case 254: /* MemberBody: error */ +#line 898 "xi-grammar.y" + { ERROR("invalid SDAG member", (yyloc).first_column, (yyloc).last_column); YYABORT; } -#line 3882 "y.tab.c" /* yacc.c:1646 */ +#line 4010 "y.tab.c" break; - case 255: -#line 904 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.member) = 0; } -#line 3888 "y.tab.c" /* yacc.c:1646 */ + case 255: /* UnexpectedToken: ENTRY */ +#line 906 "xi-grammar.y" + { (yyval.member) = 0; } +#line 4016 "y.tab.c" break; - case 256: -#line 906 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.member) = 0; } -#line 3894 "y.tab.c" /* yacc.c:1646 */ + case 256: /* UnexpectedToken: '}' */ +#line 908 "xi-grammar.y" + { (yyval.member) = 0; } +#line 4022 "y.tab.c" break; - case 257: -#line 908 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.member) = 0; } -#line 3900 "y.tab.c" /* yacc.c:1646 */ + case 257: /* UnexpectedToken: INITCALL */ +#line 910 "xi-grammar.y" + { (yyval.member) = 0; } +#line 4028 "y.tab.c" break; - case 258: -#line 910 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.member) = 0; } -#line 3906 "y.tab.c" /* yacc.c:1646 */ + case 258: /* UnexpectedToken: INITNODE */ +#line 912 "xi-grammar.y" + { (yyval.member) = 0; } +#line 4034 "y.tab.c" break; - case 259: -#line 912 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.member) = 0; } -#line 3912 "y.tab.c" /* yacc.c:1646 */ + case 259: /* UnexpectedToken: INITPROC */ +#line 914 "xi-grammar.y" + { (yyval.member) = 0; } +#line 4040 "y.tab.c" break; - case 260: -#line 914 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.member) = 0; } -#line 3918 "y.tab.c" /* yacc.c:1646 */ + case 260: /* UnexpectedToken: CHARE */ +#line 916 "xi-grammar.y" + { (yyval.member) = 0; } +#line 4046 "y.tab.c" break; - case 261: -#line 916 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.member) = 0; } -#line 3924 "y.tab.c" /* yacc.c:1646 */ + case 261: /* UnexpectedToken: MAINCHARE */ +#line 918 "xi-grammar.y" + { (yyval.member) = 0; } +#line 4052 "y.tab.c" break; - case 262: -#line 918 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.member) = 0; } -#line 3930 "y.tab.c" /* yacc.c:1646 */ + case 262: /* UnexpectedToken: ARRAY */ +#line 920 "xi-grammar.y" + { (yyval.member) = 0; } +#line 4058 "y.tab.c" break; - case 263: -#line 920 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.member) = 0; } -#line 3936 "y.tab.c" /* yacc.c:1646 */ + case 263: /* UnexpectedToken: GROUP */ +#line 922 "xi-grammar.y" + { (yyval.member) = 0; } +#line 4064 "y.tab.c" break; - case 264: -#line 922 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.member) = 0; } -#line 3942 "y.tab.c" /* yacc.c:1646 */ + case 264: /* UnexpectedToken: NODEGROUP */ +#line 924 "xi-grammar.y" + { (yyval.member) = 0; } +#line 4070 "y.tab.c" break; - case 265: -#line 924 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.member) = 0; } -#line 3948 "y.tab.c" /* yacc.c:1646 */ + case 265: /* UnexpectedToken: READONLY */ +#line 926 "xi-grammar.y" + { (yyval.member) = 0; } +#line 4076 "y.tab.c" break; - case 266: -#line 927 "xi-grammar.y" /* yacc.c:1646 */ - { + case 266: /* Entry: ENTRY EAttribs EReturn Name EParameters OptStackSize OptSdagCode */ +#line 929 "xi-grammar.y" + { (yyval.entry) = new Entry(lineno, (yyvsp[-5].attr), (yyvsp[-4].type), (yyvsp[-3].strval), (yyvsp[-2].plist), (yyvsp[-1].val), (yyvsp[0].sentry), (const char *) NULL, (yylsp[-6]).first_line, (yyloc).last_line); if ((yyvsp[0].sentry) != 0) { (yyvsp[0].sentry)->con1 = new SdagConstruct(SIDENT, (yyvsp[-3].strval)); @@ -3959,12 +4087,12 @@ yyreduce: firstRdma = true; firstDeviceRdma = true; } -#line 3963 "y.tab.c" /* yacc.c:1646 */ +#line 4091 "y.tab.c" break; - case 267: -#line 938 "xi-grammar.y" /* yacc.c:1646 */ - { + case 267: /* Entry: ENTRY EAttribs Name EParameters OptSdagCode */ +#line 940 "xi-grammar.y" + { Entry *e = new Entry(lineno, (yyvsp[-3].attr), 0, (yyvsp[-2].strval), (yyvsp[-1].plist), 0, (yyvsp[0].sentry), (const char *) NULL, (yylsp[-4]).first_line, (yyloc).last_line); if ((yyvsp[0].sentry) != 0) { (yyvsp[0].sentry)->con1 = new SdagConstruct(SIDENT, (yyvsp[-2].strval)); @@ -3981,12 +4109,12 @@ yyreduce: (yyval.entry) = e; } } -#line 3985 "y.tab.c" /* yacc.c:1646 */ +#line 4113 "y.tab.c" break; - case 268: -#line 956 "xi-grammar.y" /* yacc.c:1646 */ - { + case 268: /* Entry: ENTRY '[' ACCEL ']' VOID Name EParameters AccelEParameters ParamBraceStart CCode ParamBraceEnd Name OneOrMoreSemiColon */ +#line 958 "xi-grammar.y" + { Attribute* attribs = new Attribute(SACCEL); const char* name = (yyvsp[-7].strval); ParamList* paramList = (yyvsp[-6].plist); @@ -4001,361 +4129,366 @@ yyreduce: firstRdma = true; firstDeviceRdma = true; } -#line 4005 "y.tab.c" /* yacc.c:1646 */ +#line 4133 "y.tab.c" break; - case 269: -#line 974 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.accelBlock) = new AccelBlock(lineno, new XStr((yyvsp[-2].strval))); } -#line 4011 "y.tab.c" /* yacc.c:1646 */ + case 269: /* AccelBlock: ACCELBLOCK ParamBraceStart CCode ParamBraceEnd OneOrMoreSemiColon */ +#line 976 "xi-grammar.y" + { (yyval.accelBlock) = new AccelBlock(lineno, new XStr((yyvsp[-2].strval))); } +#line 4139 "y.tab.c" break; - case 270: -#line 976 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.accelBlock) = new AccelBlock(lineno, NULL); } -#line 4017 "y.tab.c" /* yacc.c:1646 */ + case 270: /* AccelBlock: ACCELBLOCK OneOrMoreSemiColon */ +#line 978 "xi-grammar.y" + { (yyval.accelBlock) = new AccelBlock(lineno, NULL); } +#line 4145 "y.tab.c" break; - case 271: -#line 980 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.type) = (yyvsp[0].type); } -#line 4023 "y.tab.c" /* yacc.c:1646 */ + case 271: /* EReturn: RestrictedType */ +#line 982 "xi-grammar.y" + { (yyval.type) = (yyvsp[0].type); } +#line 4151 "y.tab.c" break; - case 272: -#line 984 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.attr) = 0; } -#line 4029 "y.tab.c" /* yacc.c:1646 */ + case 272: /* EAttribs: %empty */ +#line 986 "xi-grammar.y" + { (yyval.attr) = 0; } +#line 4157 "y.tab.c" break; - case 273: -#line 986 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.attr) = (yyvsp[-1].attr); } -#line 4035 "y.tab.c" /* yacc.c:1646 */ + case 273: /* EAttribs: '[' EAttribList ']' */ +#line 988 "xi-grammar.y" + { (yyval.attr) = (yyvsp[-1].attr); } +#line 4163 "y.tab.c" break; - case 274: -#line 988 "xi-grammar.y" /* yacc.c:1646 */ - { ERROR("invalid entry method attribute list", + case 274: /* EAttribs: error */ +#line 990 "xi-grammar.y" + { ERROR("invalid entry method attribute list", (yyloc).first_column, (yyloc).last_column); YYABORT; } -#line 4044 "y.tab.c" /* yacc.c:1646 */ +#line 4172 "y.tab.c" break; - case 275: -#line 994 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.attrarg) = new Attribute::Argument((yyvsp[-2].strval), atoi((yyvsp[0].strval))); } -#line 4050 "y.tab.c" /* yacc.c:1646 */ + case 275: /* AttributeArg: Name ':' NUMBER */ +#line 996 "xi-grammar.y" + { (yyval.attrarg) = new Attribute::Argument((yyvsp[-2].strval), atoi((yyvsp[0].strval))); } +#line 4178 "y.tab.c" break; - case 276: -#line 998 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.attrarg) = (yyvsp[0].attrarg); } -#line 4056 "y.tab.c" /* yacc.c:1646 */ + case 276: /* AttributeArgList: AttributeArg */ +#line 1000 "xi-grammar.y" + { (yyval.attrarg) = (yyvsp[0].attrarg); } +#line 4184 "y.tab.c" break; - case 277: -#line 999 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.attrarg) = (yyvsp[-2].attrarg); (yyvsp[-2].attrarg)->next = (yyvsp[0].attrarg); } -#line 4062 "y.tab.c" /* yacc.c:1646 */ + case 277: /* AttributeArgList: AttributeArg ',' AttributeArgList */ +#line 1001 "xi-grammar.y" + { (yyval.attrarg) = (yyvsp[-2].attrarg); (yyvsp[-2].attrarg)->next = (yyvsp[0].attrarg); } +#line 4190 "y.tab.c" break; - case 278: -#line 1003 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.attr) = new Attribute((yyvsp[0].intval)); } -#line 4068 "y.tab.c" /* yacc.c:1646 */ + case 278: /* EAttribList: EAttrib */ +#line 1005 "xi-grammar.y" + { (yyval.attr) = new Attribute((yyvsp[0].intval)); } +#line 4196 "y.tab.c" break; - case 279: -#line 1004 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.attr) = new Attribute((yyvsp[-3].intval), (yyvsp[-1].attrarg)); } -#line 4074 "y.tab.c" /* yacc.c:1646 */ + case 279: /* EAttribList: EAttrib '(' AttributeArgList ')' */ +#line 1006 "xi-grammar.y" + { (yyval.attr) = new Attribute((yyvsp[-3].intval), (yyvsp[-1].attrarg)); } +#line 4202 "y.tab.c" break; - case 280: -#line 1005 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.attr) = new Attribute((yyvsp[-2].intval), NULL, (yyvsp[0].attr)); } -#line 4080 "y.tab.c" /* yacc.c:1646 */ + case 280: /* EAttribList: EAttrib ',' EAttribList */ +#line 1007 "xi-grammar.y" + { (yyval.attr) = new Attribute((yyvsp[-2].intval), NULL, (yyvsp[0].attr)); } +#line 4208 "y.tab.c" break; - case 281: -#line 1006 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.attr) = new Attribute((yyvsp[-5].intval), (yyvsp[-3].attrarg), (yyvsp[0].attr)); } -#line 4086 "y.tab.c" /* yacc.c:1646 */ + case 281: /* EAttribList: EAttrib '(' AttributeArgList ')' ',' EAttribList */ +#line 1008 "xi-grammar.y" + { (yyval.attr) = new Attribute((yyvsp[-5].intval), (yyvsp[-3].attrarg), (yyvsp[0].attr)); } +#line 4214 "y.tab.c" break; - case 282: -#line 1010 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.intval) = STHREADED; } -#line 4092 "y.tab.c" /* yacc.c:1646 */ + case 282: /* EAttrib: THREADED */ +#line 1012 "xi-grammar.y" + { (yyval.intval) = STHREADED; } +#line 4220 "y.tab.c" break; - case 283: -#line 1012 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.intval) = SWHENIDLE; } -#line 4098 "y.tab.c" /* yacc.c:1646 */ + case 283: /* EAttrib: WHENIDLE */ +#line 1014 "xi-grammar.y" + { (yyval.intval) = SWHENIDLE; } +#line 4226 "y.tab.c" break; - case 284: -#line 1014 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.intval) = SSYNC; } -#line 4104 "y.tab.c" /* yacc.c:1646 */ + case 284: /* EAttrib: SYNC */ +#line 1016 "xi-grammar.y" + { (yyval.intval) = SSYNC; } +#line 4232 "y.tab.c" break; - case 285: -#line 1016 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.intval) = SIGET; } -#line 4110 "y.tab.c" /* yacc.c:1646 */ + case 285: /* EAttrib: IGET */ +#line 1018 "xi-grammar.y" + { (yyval.intval) = SIGET; } +#line 4238 "y.tab.c" break; - case 286: -#line 1018 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.intval) = SLOCKED; } -#line 4116 "y.tab.c" /* yacc.c:1646 */ + case 286: /* EAttrib: EXCLUSIVE */ +#line 1020 "xi-grammar.y" + { (yyval.intval) = SLOCKED; } +#line 4244 "y.tab.c" break; - case 287: -#line 1020 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.intval) = SCREATEHERE; } -#line 4122 "y.tab.c" /* yacc.c:1646 */ + case 287: /* EAttrib: CREATEHERE */ +#line 1022 "xi-grammar.y" + { (yyval.intval) = SCREATEHERE; } +#line 4250 "y.tab.c" break; - case 288: -#line 1022 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.intval) = SCREATEHOME; } -#line 4128 "y.tab.c" /* yacc.c:1646 */ + case 288: /* EAttrib: CREATEHOME */ +#line 1024 "xi-grammar.y" + { (yyval.intval) = SCREATEHOME; } +#line 4256 "y.tab.c" break; - case 289: -#line 1024 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.intval) = SNOKEEP; } -#line 4134 "y.tab.c" /* yacc.c:1646 */ + case 289: /* EAttrib: NOKEEP */ +#line 1026 "xi-grammar.y" + { (yyval.intval) = SNOKEEP; } +#line 4262 "y.tab.c" break; - case 290: -#line 1026 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.intval) = SNOTRACE; } -#line 4140 "y.tab.c" /* yacc.c:1646 */ + case 290: /* EAttrib: NOTRACE */ +#line 1028 "xi-grammar.y" + { (yyval.intval) = SNOTRACE; } +#line 4268 "y.tab.c" break; - case 291: -#line 1028 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.intval) = SAPPWORK; } -#line 4146 "y.tab.c" /* yacc.c:1646 */ + case 291: /* EAttrib: APPWORK */ +#line 1030 "xi-grammar.y" + { (yyval.intval) = SAPPWORK; } +#line 4274 "y.tab.c" break; - case 292: -#line 1030 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.intval) = SIMMEDIATE; } -#line 4152 "y.tab.c" /* yacc.c:1646 */ + case 292: /* EAttrib: IMMEDIATE */ +#line 1032 "xi-grammar.y" + { (yyval.intval) = SIMMEDIATE; } +#line 4280 "y.tab.c" break; - case 293: -#line 1032 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.intval) = SSKIPSCHED; } -#line 4158 "y.tab.c" /* yacc.c:1646 */ + case 293: /* EAttrib: SKIPSCHED */ +#line 1034 "xi-grammar.y" + { (yyval.intval) = SSKIPSCHED; } +#line 4286 "y.tab.c" break; - case 294: -#line 1034 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.intval) = SINLINE; } -#line 4164 "y.tab.c" /* yacc.c:1646 */ + case 294: /* EAttrib: INLINE */ +#line 1036 "xi-grammar.y" + { (yyval.intval) = SINLINE; } +#line 4292 "y.tab.c" break; - case 295: -#line 1036 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.intval) = SLOCAL; } -#line 4170 "y.tab.c" /* yacc.c:1646 */ + case 295: /* EAttrib: LOCAL */ +#line 1038 "xi-grammar.y" + { (yyval.intval) = SLOCAL; } +#line 4298 "y.tab.c" break; - case 296: -#line 1038 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.intval) = SPYTHON; } -#line 4176 "y.tab.c" /* yacc.c:1646 */ + case 296: /* EAttrib: PYTHON PythonOptions */ +#line 1040 "xi-grammar.y" + { (yyval.intval) = SPYTHON; } +#line 4304 "y.tab.c" break; - case 297: -#line 1040 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.intval) = SMEM; } -#line 4182 "y.tab.c" /* yacc.c:1646 */ + case 297: /* EAttrib: MEMCRITICAL */ +#line 1042 "xi-grammar.y" + { (yyval.intval) = SMEM; } +#line 4310 "y.tab.c" break; - case 298: -#line 1042 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.intval) = SREDUCE; } -#line 4188 "y.tab.c" /* yacc.c:1646 */ + case 298: /* EAttrib: REDUCTIONTARGET */ +#line 1044 "xi-grammar.y" + { (yyval.intval) = SREDUCE; } +#line 4316 "y.tab.c" break; - case 299: -#line 1044 "xi-grammar.y" /* yacc.c:1646 */ - { + case 299: /* EAttrib: AGGREGATE */ +#line 1046 "xi-grammar.y" + { (yyval.intval) = SAGGREGATE; } -#line 4196 "y.tab.c" /* yacc.c:1646 */ +#line 4324 "y.tab.c" break; - case 300: -#line 1048 "xi-grammar.y" /* yacc.c:1646 */ - { + case 300: /* EAttrib: error */ +#line 1050 "xi-grammar.y" + { ERROR("invalid entry method attribute", (yylsp[0]).first_column, (yylsp[0]).last_column); yyclearin; yyerrok; } -#line 4207 "y.tab.c" /* yacc.c:1646 */ +#line 4335 "y.tab.c" break; - case 301: -#line 1057 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.val) = new Value((yyvsp[0].strval)); } -#line 4213 "y.tab.c" /* yacc.c:1646 */ + case 301: /* DefaultParameter: LITERAL */ +#line 1059 "xi-grammar.y" + { (yyval.val) = new Value((yyvsp[0].strval)); } +#line 4341 "y.tab.c" break; - case 302: -#line 1059 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.val) = new Value((yyvsp[0].strval)); } -#line 4219 "y.tab.c" /* yacc.c:1646 */ + case 302: /* DefaultParameter: NUMBER */ +#line 1061 "xi-grammar.y" + { (yyval.val) = new Value((yyvsp[0].strval)); } +#line 4347 "y.tab.c" break; - case 303: -#line 1061 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.val) = new Value((yyvsp[0].strval)); } -#line 4225 "y.tab.c" /* yacc.c:1646 */ + case 303: /* DefaultParameter: QualName */ +#line 1063 "xi-grammar.y" + { (yyval.val) = new Value((yyvsp[0].strval)); } +#line 4353 "y.tab.c" break; - case 304: -#line 1065 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.strval) = ""; } -#line 4231 "y.tab.c" /* yacc.c:1646 */ + case 304: /* CPROGRAM_List: %empty */ +#line 1067 "xi-grammar.y" + { (yyval.strval) = ""; } +#line 4359 "y.tab.c" break; - case 305: -#line 1067 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.strval) = (yyvsp[0].strval); } -#line 4237 "y.tab.c" /* yacc.c:1646 */ + case 305: /* CPROGRAM_List: CPROGRAM */ +#line 1069 "xi-grammar.y" + { (yyval.strval) = (yyvsp[0].strval); } +#line 4365 "y.tab.c" break; - case 306: -#line 1069 "xi-grammar.y" /* yacc.c:1646 */ - { /*Returned only when in_bracket*/ - char *tmp = new char[strlen((yyvsp[-2].strval))+strlen((yyvsp[0].strval))+3]; - sprintf(tmp,"%s, %s", (yyvsp[-2].strval), (yyvsp[0].strval)); + case 306: /* CPROGRAM_List: CPROGRAM ',' CPROGRAM_List */ +#line 1071 "xi-grammar.y" + { /*Returned only when in_bracket*/ + int len = strlen((yyvsp[-2].strval))+strlen((yyvsp[0].strval))+3; + char *tmp = new char[len]; + snprintf(tmp,len,"%s, %s", (yyvsp[-2].strval), (yyvsp[0].strval)); (yyval.strval) = tmp; } -#line 4247 "y.tab.c" /* yacc.c:1646 */ +#line 4376 "y.tab.c" break; - case 307: -#line 1077 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.strval) = ""; } -#line 4253 "y.tab.c" /* yacc.c:1646 */ + case 307: /* CCode: %empty */ +#line 1080 "xi-grammar.y" + { (yyval.strval) = ""; } +#line 4382 "y.tab.c" break; - case 308: -#line 1079 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.strval) = (yyvsp[0].strval); } -#line 4259 "y.tab.c" /* yacc.c:1646 */ + case 308: /* CCode: CPROGRAM */ +#line 1082 "xi-grammar.y" + { (yyval.strval) = (yyvsp[0].strval); } +#line 4388 "y.tab.c" break; - case 309: -#line 1081 "xi-grammar.y" /* yacc.c:1646 */ - { /*Returned only when in_bracket*/ - char *tmp = new char[strlen((yyvsp[-4].strval))+strlen((yyvsp[-2].strval))+strlen((yyvsp[0].strval))+3]; - sprintf(tmp,"%s[%s]%s", (yyvsp[-4].strval), (yyvsp[-2].strval), (yyvsp[0].strval)); + case 309: /* CCode: CPROGRAM '[' CCode ']' CCode */ +#line 1084 "xi-grammar.y" + { /*Returned only when in_bracket*/ + int len = strlen((yyvsp[-4].strval))+strlen((yyvsp[-2].strval))+strlen((yyvsp[0].strval))+3; + char *tmp = new char[len]; + snprintf(tmp, len, "%s[%s]%s", (yyvsp[-4].strval), (yyvsp[-2].strval), (yyvsp[0].strval)); (yyval.strval) = tmp; } -#line 4269 "y.tab.c" /* yacc.c:1646 */ +#line 4399 "y.tab.c" break; - case 310: -#line 1087 "xi-grammar.y" /* yacc.c:1646 */ - { /*Returned only when in_braces*/ - char *tmp = new char[strlen((yyvsp[-4].strval))+strlen((yyvsp[-2].strval))+strlen((yyvsp[0].strval))+3]; - sprintf(tmp,"%s{%s}%s", (yyvsp[-4].strval), (yyvsp[-2].strval), (yyvsp[0].strval)); + case 310: /* CCode: CPROGRAM '{' CCode '}' CCode */ +#line 1091 "xi-grammar.y" + { /*Returned only when in_braces*/ + int len = strlen((yyvsp[-4].strval))+strlen((yyvsp[-2].strval))+strlen((yyvsp[0].strval))+3; + char *tmp = new char[len]; + snprintf(tmp, len, "%s{%s}%s", (yyvsp[-4].strval), (yyvsp[-2].strval), (yyvsp[0].strval)); (yyval.strval) = tmp; } -#line 4279 "y.tab.c" /* yacc.c:1646 */ +#line 4410 "y.tab.c" break; - case 311: -#line 1093 "xi-grammar.y" /* yacc.c:1646 */ - { /*Returned only when in_braces*/ - char *tmp = new char[strlen((yyvsp[-4].strval))+strlen((yyvsp[-2].strval))+strlen((yyvsp[0].strval))+3]; - sprintf(tmp,"%s(%s)%s", (yyvsp[-4].strval), (yyvsp[-2].strval), (yyvsp[0].strval)); + case 311: /* CCode: CPROGRAM '(' CPROGRAM_List ')' CCode */ +#line 1098 "xi-grammar.y" + { /*Returned only when in_braces*/ + int len = strlen((yyvsp[-4].strval))+strlen((yyvsp[-2].strval))+strlen((yyvsp[0].strval))+3; + char *tmp = new char[len]; + snprintf(tmp, len, "%s(%s)%s", (yyvsp[-4].strval), (yyvsp[-2].strval), (yyvsp[0].strval)); (yyval.strval) = tmp; } -#line 4289 "y.tab.c" /* yacc.c:1646 */ +#line 4421 "y.tab.c" break; - case 312: -#line 1099 "xi-grammar.y" /* yacc.c:1646 */ - { /*Returned only when in_braces*/ - char *tmp = new char[strlen((yyvsp[-2].strval))+strlen((yyvsp[0].strval))+3]; - sprintf(tmp,"(%s)%s", (yyvsp[-2].strval), (yyvsp[0].strval)); + case 312: /* CCode: '(' CCode ')' CCode */ +#line 1105 "xi-grammar.y" + { /*Returned only when in_braces*/ + int len = strlen((yyvsp[-2].strval))+strlen((yyvsp[0].strval))+3; + char *tmp = new char[len]; + snprintf(tmp, len, "(%s)%s", (yyvsp[-2].strval), (yyvsp[0].strval)); (yyval.strval) = tmp; } -#line 4299 "y.tab.c" /* yacc.c:1646 */ +#line 4432 "y.tab.c" break; - case 313: -#line 1107 "xi-grammar.y" /* yacc.c:1646 */ - { /*Start grabbing CPROGRAM segments*/ + case 313: /* ParamBracketStart: Type Name '[' */ +#line 1114 "xi-grammar.y" + { /*Start grabbing CPROGRAM segments*/ in_bracket=1; (yyval.pname) = new Parameter(lineno, (yyvsp[-2].type),(yyvsp[-1].strval)); } -#line 4308 "y.tab.c" /* yacc.c:1646 */ +#line 4441 "y.tab.c" break; - case 314: -#line 1114 "xi-grammar.y" /* yacc.c:1646 */ - { + case 314: /* ParamBraceStart: '{' */ +#line 1121 "xi-grammar.y" + { /*Start grabbing CPROGRAM segments*/ in_braces=1; (yyval.intval) = 0; } -#line 4318 "y.tab.c" /* yacc.c:1646 */ +#line 4451 "y.tab.c" break; - case 315: -#line 1122 "xi-grammar.y" /* yacc.c:1646 */ - { + case 315: /* ParamBraceEnd: '}' */ +#line 1129 "xi-grammar.y" + { in_braces=0; (yyval.intval) = 0; } -#line 4327 "y.tab.c" /* yacc.c:1646 */ +#line 4460 "y.tab.c" break; - case 316: -#line 1129 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.pname) = new Parameter(lineno, (yyvsp[0].type));} -#line 4333 "y.tab.c" /* yacc.c:1646 */ + case 316: /* Parameter: Type */ +#line 1136 "xi-grammar.y" + { (yyval.pname) = new Parameter(lineno, (yyvsp[0].type));} +#line 4466 "y.tab.c" break; - case 317: -#line 1131 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.pname) = new Parameter(lineno, (yyvsp[-2].type),(yyvsp[-1].strval)); (yyval.pname)->setConditional((yyvsp[0].intval)); } -#line 4339 "y.tab.c" /* yacc.c:1646 */ + case 317: /* Parameter: Type Name OptConditional */ +#line 1138 "xi-grammar.y" + { (yyval.pname) = new Parameter(lineno, (yyvsp[-2].type),(yyvsp[-1].strval)); (yyval.pname)->setConditional((yyvsp[0].intval)); } +#line 4472 "y.tab.c" break; - case 318: -#line 1133 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.pname) = new Parameter(lineno, (yyvsp[-3].type),(yyvsp[-2].strval),0,(yyvsp[0].val));} -#line 4345 "y.tab.c" /* yacc.c:1646 */ + case 318: /* Parameter: Type Name '=' DefaultParameter */ +#line 1140 "xi-grammar.y" + { (yyval.pname) = new Parameter(lineno, (yyvsp[-3].type),(yyvsp[-2].strval),0,(yyvsp[0].val));} +#line 4478 "y.tab.c" break; - case 319: -#line 1135 "xi-grammar.y" /* yacc.c:1646 */ - { /*Stop grabbing CPROGRAM segments*/ + case 319: /* Parameter: ParamBracketStart CCode ']' */ +#line 1142 "xi-grammar.y" + { /*Stop grabbing CPROGRAM segments*/ in_bracket=0; (yyval.pname) = new Parameter(lineno, (yyvsp[-2].pname)->getType(), (yyvsp[-2].pname)->getName() ,(yyvsp[-1].strval)); } -#line 4354 "y.tab.c" /* yacc.c:1646 */ +#line 4487 "y.tab.c" break; - case 320: -#line 1140 "xi-grammar.y" /* yacc.c:1646 */ - { /*Stop grabbing CPROGRAM segments*/ + case 320: /* Parameter: NOCOPY ParamBracketStart CCode ']' */ +#line 1147 "xi-grammar.y" + { /*Stop grabbing CPROGRAM segments*/ in_bracket=0; (yyval.pname) = new Parameter(lineno, (yyvsp[-2].pname)->getType(), (yyvsp[-2].pname)->getName() ,(yyvsp[-1].strval)); (yyval.pname)->setRdma(CMK_ZC_P2P_SEND_MSG); @@ -4364,12 +4497,12 @@ yyreduce: firstRdma = false; } } -#line 4368 "y.tab.c" /* yacc.c:1646 */ +#line 4501 "y.tab.c" break; - case 321: -#line 1150 "xi-grammar.y" /* yacc.c:1646 */ - { /*Stop grabbing CPROGRAM segments*/ + case 321: /* Parameter: NOCOPYPOST ParamBracketStart CCode ']' */ +#line 1157 "xi-grammar.y" + { /*Stop grabbing CPROGRAM segments*/ in_bracket=0; (yyval.pname) = new Parameter(lineno, (yyvsp[-2].pname)->getType(), (yyvsp[-2].pname)->getName() ,(yyvsp[-1].strval)); (yyval.pname)->setRdma(CMK_ZC_P2P_RECV_MSG); @@ -4378,12 +4511,12 @@ yyreduce: firstRdma = false; } } -#line 4382 "y.tab.c" /* yacc.c:1646 */ +#line 4515 "y.tab.c" break; - case 322: -#line 1160 "xi-grammar.y" /* yacc.c:1646 */ - { /*Stop grabbing CPROGRAM segments*/ + case 322: /* Parameter: NOCOPYDEVICE ParamBracketStart CCode ']' */ +#line 1167 "xi-grammar.y" + { /*Stop grabbing CPROGRAM segments*/ in_bracket=0; (yyval.pname) = new Parameter(lineno, (yyvsp[-2].pname)->getType(), (yyvsp[-2].pname)->getName() ,(yyvsp[-1].strval)); (yyval.pname)->setRdma(CMK_ZC_DEVICE_MSG); @@ -4392,528 +4525,529 @@ yyreduce: firstDeviceRdma = false; } } -#line 4396 "y.tab.c" /* yacc.c:1646 */ +#line 4529 "y.tab.c" break; - case 323: -#line 1171 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.intval) = Parameter::ACCEL_BUFFER_TYPE_READONLY; } -#line 4402 "y.tab.c" /* yacc.c:1646 */ + case 323: /* AccelBufferType: READONLY */ +#line 1178 "xi-grammar.y" + { (yyval.intval) = Parameter::ACCEL_BUFFER_TYPE_READONLY; } +#line 4535 "y.tab.c" break; - case 324: -#line 1172 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.intval) = Parameter::ACCEL_BUFFER_TYPE_READWRITE; } -#line 4408 "y.tab.c" /* yacc.c:1646 */ + case 324: /* AccelBufferType: READWRITE */ +#line 1179 "xi-grammar.y" + { (yyval.intval) = Parameter::ACCEL_BUFFER_TYPE_READWRITE; } +#line 4541 "y.tab.c" break; - case 325: -#line 1173 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.intval) = Parameter::ACCEL_BUFFER_TYPE_WRITEONLY; } -#line 4414 "y.tab.c" /* yacc.c:1646 */ + case 325: /* AccelBufferType: WRITEONLY */ +#line 1180 "xi-grammar.y" + { (yyval.intval) = Parameter::ACCEL_BUFFER_TYPE_WRITEONLY; } +#line 4547 "y.tab.c" break; - case 326: -#line 1176 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.xstrptr) = new XStr((yyvsp[0].strval)); } -#line 4420 "y.tab.c" /* yacc.c:1646 */ + case 326: /* AccelInstName: Name */ +#line 1183 "xi-grammar.y" + { (yyval.xstrptr) = new XStr((yyvsp[0].strval)); } +#line 4553 "y.tab.c" break; - case 327: -#line 1177 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.xstrptr) = new XStr(""); *((yyval.xstrptr)) << *((yyvsp[-3].xstrptr)) << "->" << (yyvsp[0].strval); } -#line 4426 "y.tab.c" /* yacc.c:1646 */ + case 327: /* AccelInstName: AccelInstName '-' '>' Name */ +#line 1184 "xi-grammar.y" + { (yyval.xstrptr) = new XStr(""); *((yyval.xstrptr)) << *((yyvsp[-3].xstrptr)) << "->" << (yyvsp[0].strval); } +#line 4559 "y.tab.c" break; - case 328: -#line 1178 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.xstrptr) = new XStr(""); *((yyval.xstrptr)) << *((yyvsp[-2].xstrptr)) << "." << (yyvsp[0].strval); } -#line 4432 "y.tab.c" /* yacc.c:1646 */ + case 328: /* AccelInstName: AccelInstName '.' Name */ +#line 1185 "xi-grammar.y" + { (yyval.xstrptr) = new XStr(""); *((yyval.xstrptr)) << *((yyvsp[-2].xstrptr)) << "." << (yyvsp[0].strval); } +#line 4565 "y.tab.c" break; - case 329: -#line 1180 "xi-grammar.y" /* yacc.c:1646 */ - { + case 329: /* AccelInstName: AccelInstName '[' AccelInstName ']' */ +#line 1187 "xi-grammar.y" + { (yyval.xstrptr) = new XStr(""); *((yyval.xstrptr)) << *((yyvsp[-3].xstrptr)) << "[" << *((yyvsp[-1].xstrptr)) << "]"; delete (yyvsp[-3].xstrptr); delete (yyvsp[-1].xstrptr); } -#line 4443 "y.tab.c" /* yacc.c:1646 */ +#line 4576 "y.tab.c" break; - case 330: -#line 1187 "xi-grammar.y" /* yacc.c:1646 */ - { + case 330: /* AccelInstName: AccelInstName '[' NUMBER ']' */ +#line 1194 "xi-grammar.y" + { (yyval.xstrptr) = new XStr(""); *((yyval.xstrptr)) << *((yyvsp[-3].xstrptr)) << "[" << (yyvsp[-1].strval) << "]"; delete (yyvsp[-3].xstrptr); } -#line 4453 "y.tab.c" /* yacc.c:1646 */ +#line 4586 "y.tab.c" break; - case 331: -#line 1193 "xi-grammar.y" /* yacc.c:1646 */ - { + case 331: /* AccelInstName: AccelInstName '(' AccelInstName ')' */ +#line 1200 "xi-grammar.y" + { (yyval.xstrptr) = new XStr(""); *((yyval.xstrptr)) << *((yyvsp[-3].xstrptr)) << "(" << *((yyvsp[-1].xstrptr)) << ")"; delete (yyvsp[-3].xstrptr); delete (yyvsp[-1].xstrptr); } -#line 4464 "y.tab.c" /* yacc.c:1646 */ +#line 4597 "y.tab.c" break; - case 332: -#line 1202 "xi-grammar.y" /* yacc.c:1646 */ - { + case 332: /* AccelArrayParam: ParamBracketStart CCode ']' */ +#line 1209 "xi-grammar.y" + { in_bracket = 0; (yyval.pname) = new Parameter(lineno, (yyvsp[-2].pname)->getType(), (yyvsp[-2].pname)->getName(), (yyvsp[-1].strval)); } -#line 4473 "y.tab.c" /* yacc.c:1646 */ +#line 4606 "y.tab.c" break; - case 333: -#line 1209 "xi-grammar.y" /* yacc.c:1646 */ - { + case 333: /* AccelParameter: AccelBufferType ':' Type Name '<' AccelInstName '>' */ +#line 1216 "xi-grammar.y" + { (yyval.pname) = new Parameter(lineno, (yyvsp[-4].type), (yyvsp[-3].strval)); (yyval.pname)->setAccelInstName((yyvsp[-1].xstrptr)); (yyval.pname)->setAccelBufferType((yyvsp[-6].intval)); } -#line 4483 "y.tab.c" /* yacc.c:1646 */ +#line 4616 "y.tab.c" break; - case 334: -#line 1215 "xi-grammar.y" /* yacc.c:1646 */ - { + case 334: /* AccelParameter: Type Name '<' AccelInstName '>' */ +#line 1222 "xi-grammar.y" + { (yyval.pname) = new Parameter(lineno, (yyvsp[-4].type), (yyvsp[-3].strval)); (yyval.pname)->setAccelInstName((yyvsp[-1].xstrptr)); (yyval.pname)->setAccelBufferType(Parameter::ACCEL_BUFFER_TYPE_READWRITE); } -#line 4493 "y.tab.c" /* yacc.c:1646 */ +#line 4626 "y.tab.c" break; - case 335: -#line 1221 "xi-grammar.y" /* yacc.c:1646 */ - { + case 335: /* AccelParameter: AccelBufferType ':' AccelArrayParam '<' AccelInstName '>' */ +#line 1228 "xi-grammar.y" + { (yyval.pname) = (yyvsp[-3].pname); (yyval.pname)->setAccelInstName((yyvsp[-1].xstrptr)); (yyval.pname)->setAccelBufferType((yyvsp[-5].intval)); } -#line 4503 "y.tab.c" /* yacc.c:1646 */ +#line 4636 "y.tab.c" break; - case 336: -#line 1229 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.plist) = new ParamList((yyvsp[0].pname)); } -#line 4509 "y.tab.c" /* yacc.c:1646 */ + case 336: /* ParamList: Parameter */ +#line 1236 "xi-grammar.y" + { (yyval.plist) = new ParamList((yyvsp[0].pname)); } +#line 4642 "y.tab.c" break; - case 337: -#line 1231 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.plist) = new ParamList((yyvsp[-2].pname),(yyvsp[0].plist)); } -#line 4515 "y.tab.c" /* yacc.c:1646 */ + case 337: /* ParamList: Parameter ',' ParamList */ +#line 1238 "xi-grammar.y" + { (yyval.plist) = new ParamList((yyvsp[-2].pname),(yyvsp[0].plist)); } +#line 4648 "y.tab.c" break; - case 338: -#line 1235 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.plist) = new ParamList((yyvsp[0].pname)); } -#line 4521 "y.tab.c" /* yacc.c:1646 */ + case 338: /* AccelParamList: AccelParameter */ +#line 1242 "xi-grammar.y" + { (yyval.plist) = new ParamList((yyvsp[0].pname)); } +#line 4654 "y.tab.c" break; - case 339: -#line 1237 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.plist) = new ParamList((yyvsp[-2].pname),(yyvsp[0].plist)); } -#line 4527 "y.tab.c" /* yacc.c:1646 */ + case 339: /* AccelParamList: AccelParameter ',' AccelParamList */ +#line 1244 "xi-grammar.y" + { (yyval.plist) = new ParamList((yyvsp[-2].pname),(yyvsp[0].plist)); } +#line 4660 "y.tab.c" break; - case 340: -#line 1241 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.plist) = (yyvsp[-1].plist); } -#line 4533 "y.tab.c" /* yacc.c:1646 */ + case 340: /* EParameters: '(' ParamList ')' */ +#line 1248 "xi-grammar.y" + { (yyval.plist) = (yyvsp[-1].plist); } +#line 4666 "y.tab.c" break; - case 341: -#line 1243 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.plist) = new ParamList(new Parameter(0, new BuiltinType("void"))); } -#line 4539 "y.tab.c" /* yacc.c:1646 */ + case 341: /* EParameters: '(' ')' */ +#line 1250 "xi-grammar.y" + { (yyval.plist) = new ParamList(new Parameter(0, new BuiltinType("void"))); } +#line 4672 "y.tab.c" break; - case 342: -#line 1247 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.plist) = (yyvsp[-1].plist); } -#line 4545 "y.tab.c" /* yacc.c:1646 */ + case 342: /* AccelEParameters: '[' AccelParamList ']' */ +#line 1254 "xi-grammar.y" + { (yyval.plist) = (yyvsp[-1].plist); } +#line 4678 "y.tab.c" break; - case 343: -#line 1249 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.plist) = 0; } -#line 4551 "y.tab.c" /* yacc.c:1646 */ + case 343: /* AccelEParameters: '[' ']' */ +#line 1256 "xi-grammar.y" + { (yyval.plist) = 0; } +#line 4684 "y.tab.c" break; - case 344: -#line 1253 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.val) = 0; } -#line 4557 "y.tab.c" /* yacc.c:1646 */ + case 344: /* OptStackSize: %empty */ +#line 1260 "xi-grammar.y" + { (yyval.val) = 0; } +#line 4690 "y.tab.c" break; - case 345: -#line 1255 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.val) = new Value((yyvsp[0].strval)); } -#line 4563 "y.tab.c" /* yacc.c:1646 */ + case 345: /* OptStackSize: STACKSIZE '=' NUMBER */ +#line 1262 "xi-grammar.y" + { (yyval.val) = new Value((yyvsp[0].strval)); } +#line 4696 "y.tab.c" break; - case 346: -#line 1259 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.sentry) = 0; } -#line 4569 "y.tab.c" /* yacc.c:1646 */ + case 346: /* OptSdagCode: OneOrMoreSemiColon */ +#line 1266 "xi-grammar.y" + { (yyval.sentry) = 0; } +#line 4702 "y.tab.c" break; - case 347: -#line 1261 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.sentry) = new SdagEntryConstruct((yyvsp[0].sc)); } -#line 4575 "y.tab.c" /* yacc.c:1646 */ + case 347: /* OptSdagCode: SingleConstruct */ +#line 1268 "xi-grammar.y" + { (yyval.sentry) = new SdagEntryConstruct((yyvsp[0].sc)); } +#line 4708 "y.tab.c" break; - case 348: -#line 1263 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.sentry) = new SdagEntryConstruct((yyvsp[-2].slist)); } -#line 4581 "y.tab.c" /* yacc.c:1646 */ + case 348: /* OptSdagCode: '{' Slist '}' OptSemiColon */ +#line 1270 "xi-grammar.y" + { (yyval.sentry) = new SdagEntryConstruct((yyvsp[-2].slist)); } +#line 4714 "y.tab.c" break; - case 349: -#line 1267 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.slist) = new SListConstruct((yyvsp[0].sc)); } -#line 4587 "y.tab.c" /* yacc.c:1646 */ + case 349: /* Slist: SingleConstruct */ +#line 1274 "xi-grammar.y" + { (yyval.slist) = new SListConstruct((yyvsp[0].sc)); } +#line 4720 "y.tab.c" break; - case 350: -#line 1269 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.slist) = new SListConstruct((yyvsp[-1].sc), (yyvsp[0].slist)); } -#line 4593 "y.tab.c" /* yacc.c:1646 */ + case 350: /* Slist: SingleConstruct Slist */ +#line 1276 "xi-grammar.y" + { (yyval.slist) = new SListConstruct((yyvsp[-1].sc), (yyvsp[0].slist)); } +#line 4726 "y.tab.c" break; - case 351: -#line 1273 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.olist) = new OListConstruct((yyvsp[0].sc)); } -#line 4599 "y.tab.c" /* yacc.c:1646 */ + case 351: /* Olist: SingleConstruct */ +#line 1280 "xi-grammar.y" + { (yyval.olist) = new OListConstruct((yyvsp[0].sc)); } +#line 4732 "y.tab.c" break; - case 352: -#line 1275 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.olist) = new OListConstruct((yyvsp[-1].sc), (yyvsp[0].slist)); } -#line 4605 "y.tab.c" /* yacc.c:1646 */ + case 352: /* Olist: SingleConstruct Slist */ +#line 1282 "xi-grammar.y" + { (yyval.olist) = new OListConstruct((yyvsp[-1].sc), (yyvsp[0].slist)); } +#line 4738 "y.tab.c" break; - case 353: -#line 1279 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.clist) = new CaseListConstruct((yyvsp[0].when)); } -#line 4611 "y.tab.c" /* yacc.c:1646 */ + case 353: /* CaseList: WhenConstruct */ +#line 1286 "xi-grammar.y" + { (yyval.clist) = new CaseListConstruct((yyvsp[0].when)); } +#line 4744 "y.tab.c" break; - case 354: -#line 1281 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.clist) = new CaseListConstruct((yyvsp[-1].when), (yyvsp[0].clist)); } -#line 4617 "y.tab.c" /* yacc.c:1646 */ + case 354: /* CaseList: WhenConstruct CaseList */ +#line 1288 "xi-grammar.y" + { (yyval.clist) = new CaseListConstruct((yyvsp[-1].when), (yyvsp[0].clist)); } +#line 4750 "y.tab.c" break; - case 355: -#line 1283 "xi-grammar.y" /* yacc.c:1646 */ - { + case 355: /* CaseList: NonWhenConstruct */ +#line 1290 "xi-grammar.y" + { ERROR("case blocks can only contain when clauses", (yylsp[0]).first_column, (yylsp[0]).last_column); (yyval.clist) = 0; } -#line 4627 "y.tab.c" /* yacc.c:1646 */ +#line 4760 "y.tab.c" break; - case 356: -#line 1291 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.strval) = (yyvsp[0].strval); } -#line 4633 "y.tab.c" /* yacc.c:1646 */ + case 356: /* OptTraceName: LITERAL */ +#line 1298 "xi-grammar.y" + { (yyval.strval) = (yyvsp[0].strval); } +#line 4766 "y.tab.c" break; - case 357: -#line 1293 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.strval) = 0; } -#line 4639 "y.tab.c" /* yacc.c:1646 */ + case 357: /* OptTraceName: %empty */ +#line 1300 "xi-grammar.y" + { (yyval.strval) = 0; } +#line 4772 "y.tab.c" break; - case 358: -#line 1297 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.when) = new WhenConstruct((yyvsp[-2].entrylist), 0); } -#line 4645 "y.tab.c" /* yacc.c:1646 */ + case 358: /* WhenConstruct: WHEN SEntryList '{' '}' */ +#line 1304 "xi-grammar.y" + { (yyval.when) = new WhenConstruct((yyvsp[-2].entrylist), 0); } +#line 4778 "y.tab.c" break; - case 359: -#line 1299 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.when) = new WhenConstruct((yyvsp[-1].entrylist), (yyvsp[0].sc)); } -#line 4651 "y.tab.c" /* yacc.c:1646 */ + case 359: /* WhenConstruct: WHEN SEntryList SingleConstruct */ +#line 1306 "xi-grammar.y" + { (yyval.when) = new WhenConstruct((yyvsp[-1].entrylist), (yyvsp[0].sc)); } +#line 4784 "y.tab.c" break; - case 360: -#line 1301 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.when) = new WhenConstruct((yyvsp[-3].entrylist), (yyvsp[-1].slist)); } -#line 4657 "y.tab.c" /* yacc.c:1646 */ + case 360: /* WhenConstruct: WHEN SEntryList '{' Slist '}' */ +#line 1308 "xi-grammar.y" + { (yyval.when) = new WhenConstruct((yyvsp[-3].entrylist), (yyvsp[-1].slist)); } +#line 4790 "y.tab.c" break; - case 361: -#line 1305 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.when) = 0; } -#line 4663 "y.tab.c" /* yacc.c:1646 */ + case 361: /* NonWhenConstruct: SERIAL OptTraceName ParamBraceStart CCode ParamBraceEnd OptSemiColon */ +#line 1312 "xi-grammar.y" + { (yyval.when) = 0; } +#line 4796 "y.tab.c" break; - case 362: -#line 1307 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.when) = 0; } -#line 4669 "y.tab.c" /* yacc.c:1646 */ + case 362: /* NonWhenConstruct: OVERLAP '{' Olist '}' */ +#line 1314 "xi-grammar.y" + { (yyval.when) = 0; } +#line 4802 "y.tab.c" break; - case 363: -#line 1309 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.when) = 0; } -#line 4675 "y.tab.c" /* yacc.c:1646 */ + case 363: /* NonWhenConstruct: CASE '{' CaseList '}' */ +#line 1316 "xi-grammar.y" + { (yyval.when) = 0; } +#line 4808 "y.tab.c" break; - case 364: -#line 1311 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.when) = 0; } -#line 4681 "y.tab.c" /* yacc.c:1646 */ + case 364: /* NonWhenConstruct: FOR StartIntExpr CCode ';' CCode ';' CCode EndIntExpr '{' Slist '}' */ +#line 1318 "xi-grammar.y" + { (yyval.when) = 0; } +#line 4814 "y.tab.c" break; - case 365: -#line 1313 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.when) = 0; } -#line 4687 "y.tab.c" /* yacc.c:1646 */ + case 365: /* NonWhenConstruct: FOR StartIntExpr CCode ';' CCode ';' CCode EndIntExpr SingleConstruct */ +#line 1320 "xi-grammar.y" + { (yyval.when) = 0; } +#line 4820 "y.tab.c" break; - case 366: -#line 1315 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.when) = 0; } -#line 4693 "y.tab.c" /* yacc.c:1646 */ + case 366: /* NonWhenConstruct: FORALL '[' IDENT ']' StartIntExpr CCode ':' CCode ',' CCode EndIntExpr SingleConstruct */ +#line 1322 "xi-grammar.y" + { (yyval.when) = 0; } +#line 4826 "y.tab.c" break; - case 367: -#line 1317 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.when) = 0; } -#line 4699 "y.tab.c" /* yacc.c:1646 */ + case 367: /* NonWhenConstruct: FORALL '[' IDENT ']' StartIntExpr CCode ':' CCode ',' CCode EndIntExpr '{' Slist '}' */ +#line 1324 "xi-grammar.y" + { (yyval.when) = 0; } +#line 4832 "y.tab.c" break; - case 368: -#line 1319 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.when) = 0; } -#line 4705 "y.tab.c" /* yacc.c:1646 */ + case 368: /* NonWhenConstruct: IF StartIntExpr CCode EndIntExpr SingleConstruct HasElse */ +#line 1326 "xi-grammar.y" + { (yyval.when) = 0; } +#line 4838 "y.tab.c" break; - case 369: -#line 1321 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.when) = 0; } -#line 4711 "y.tab.c" /* yacc.c:1646 */ + case 369: /* NonWhenConstruct: IF StartIntExpr CCode EndIntExpr '{' Slist '}' HasElse */ +#line 1328 "xi-grammar.y" + { (yyval.when) = 0; } +#line 4844 "y.tab.c" break; - case 370: -#line 1323 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.when) = 0; } -#line 4717 "y.tab.c" /* yacc.c:1646 */ + case 370: /* NonWhenConstruct: WHILE StartIntExpr CCode EndIntExpr SingleConstruct */ +#line 1330 "xi-grammar.y" + { (yyval.when) = 0; } +#line 4850 "y.tab.c" break; - case 371: -#line 1325 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.when) = 0; } -#line 4723 "y.tab.c" /* yacc.c:1646 */ + case 371: /* NonWhenConstruct: WHILE StartIntExpr CCode EndIntExpr '{' Slist '}' */ +#line 1332 "xi-grammar.y" + { (yyval.when) = 0; } +#line 4856 "y.tab.c" break; - case 372: -#line 1327 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.when) = 0; } -#line 4729 "y.tab.c" /* yacc.c:1646 */ + case 372: /* NonWhenConstruct: ParamBraceStart CCode ParamBraceEnd OptSemiColon */ +#line 1334 "xi-grammar.y" + { (yyval.when) = 0; } +#line 4862 "y.tab.c" break; - case 373: -#line 1331 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.sc) = new SerialConstruct((yyvsp[-2].strval), (yyvsp[-4].strval), (yylsp[-3]).first_line); } -#line 4735 "y.tab.c" /* yacc.c:1646 */ + case 373: /* SingleConstruct: SERIAL OptTraceName ParamBraceStart CCode ParamBraceEnd OptSemiColon */ +#line 1338 "xi-grammar.y" + { (yyval.sc) = new SerialConstruct((yyvsp[-2].strval), (yyvsp[-4].strval), (yylsp[-3]).first_line); } +#line 4868 "y.tab.c" break; - case 374: -#line 1333 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.sc) = new OverlapConstruct((yyvsp[-1].olist)); } -#line 4741 "y.tab.c" /* yacc.c:1646 */ + case 374: /* SingleConstruct: OVERLAP '{' Olist '}' */ +#line 1340 "xi-grammar.y" + { (yyval.sc) = new OverlapConstruct((yyvsp[-1].olist)); } +#line 4874 "y.tab.c" break; - case 375: -#line 1335 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.sc) = (yyvsp[0].when); } -#line 4747 "y.tab.c" /* yacc.c:1646 */ + case 375: /* SingleConstruct: WhenConstruct */ +#line 1342 "xi-grammar.y" + { (yyval.sc) = (yyvsp[0].when); } +#line 4880 "y.tab.c" break; - case 376: -#line 1337 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.sc) = new CaseConstruct((yyvsp[-1].clist)); } -#line 4753 "y.tab.c" /* yacc.c:1646 */ + case 376: /* SingleConstruct: CASE '{' CaseList '}' */ +#line 1344 "xi-grammar.y" + { (yyval.sc) = new CaseConstruct((yyvsp[-1].clist)); } +#line 4886 "y.tab.c" break; - case 377: -#line 1339 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.sc) = new ForConstruct((yyvsp[-8].intexpr), (yyvsp[-6].intexpr), (yyvsp[-4].intexpr), (yyvsp[-1].slist)); } -#line 4759 "y.tab.c" /* yacc.c:1646 */ + case 377: /* SingleConstruct: FOR StartIntExpr IntExpr ';' IntExpr ';' IntExpr EndIntExpr '{' Slist '}' */ +#line 1346 "xi-grammar.y" + { (yyval.sc) = new ForConstruct((yyvsp[-8].intexpr), (yyvsp[-6].intexpr), (yyvsp[-4].intexpr), (yyvsp[-1].slist)); } +#line 4892 "y.tab.c" break; - case 378: -#line 1341 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.sc) = new ForConstruct((yyvsp[-6].intexpr), (yyvsp[-4].intexpr), (yyvsp[-2].intexpr), (yyvsp[0].sc)); } -#line 4765 "y.tab.c" /* yacc.c:1646 */ + case 378: /* SingleConstruct: FOR StartIntExpr IntExpr ';' IntExpr ';' IntExpr EndIntExpr SingleConstruct */ +#line 1348 "xi-grammar.y" + { (yyval.sc) = new ForConstruct((yyvsp[-6].intexpr), (yyvsp[-4].intexpr), (yyvsp[-2].intexpr), (yyvsp[0].sc)); } +#line 4898 "y.tab.c" break; - case 379: -#line 1343 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.sc) = new ForallConstruct(new SdagConstruct(SIDENT, (yyvsp[-9].strval)), (yyvsp[-6].intexpr), + case 379: /* SingleConstruct: FORALL '[' IDENT ']' StartIntExpr IntExpr ':' IntExpr ',' IntExpr EndIntExpr SingleConstruct */ +#line 1350 "xi-grammar.y" + { (yyval.sc) = new ForallConstruct(new SdagConstruct(SIDENT, (yyvsp[-9].strval)), (yyvsp[-6].intexpr), (yyvsp[-4].intexpr), (yyvsp[-2].intexpr), (yyvsp[0].sc)); } -#line 4772 "y.tab.c" /* yacc.c:1646 */ +#line 4905 "y.tab.c" break; - case 380: -#line 1346 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.sc) = new ForallConstruct(new SdagConstruct(SIDENT, (yyvsp[-11].strval)), (yyvsp[-8].intexpr), + case 380: /* SingleConstruct: FORALL '[' IDENT ']' StartIntExpr IntExpr ':' IntExpr ',' IntExpr EndIntExpr '{' Slist '}' */ +#line 1353 "xi-grammar.y" + { (yyval.sc) = new ForallConstruct(new SdagConstruct(SIDENT, (yyvsp[-11].strval)), (yyvsp[-8].intexpr), (yyvsp[-6].intexpr), (yyvsp[-4].intexpr), (yyvsp[-1].slist)); } -#line 4779 "y.tab.c" /* yacc.c:1646 */ +#line 4912 "y.tab.c" break; - case 381: -#line 1349 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.sc) = new IfConstruct((yyvsp[-3].intexpr), (yyvsp[-1].sc), (yyvsp[0].sc)); } -#line 4785 "y.tab.c" /* yacc.c:1646 */ + case 381: /* SingleConstruct: IF StartIntExpr IntExpr EndIntExpr SingleConstruct HasElse */ +#line 1356 "xi-grammar.y" + { (yyval.sc) = new IfConstruct((yyvsp[-3].intexpr), (yyvsp[-1].sc), (yyvsp[0].sc)); } +#line 4918 "y.tab.c" break; - case 382: -#line 1351 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.sc) = new IfConstruct((yyvsp[-5].intexpr), (yyvsp[-2].slist), (yyvsp[0].sc)); } -#line 4791 "y.tab.c" /* yacc.c:1646 */ + case 382: /* SingleConstruct: IF StartIntExpr IntExpr EndIntExpr '{' Slist '}' HasElse */ +#line 1358 "xi-grammar.y" + { (yyval.sc) = new IfConstruct((yyvsp[-5].intexpr), (yyvsp[-2].slist), (yyvsp[0].sc)); } +#line 4924 "y.tab.c" break; - case 383: -#line 1353 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.sc) = new WhileConstruct((yyvsp[-2].intexpr), (yyvsp[0].sc)); } -#line 4797 "y.tab.c" /* yacc.c:1646 */ + case 383: /* SingleConstruct: WHILE StartIntExpr IntExpr EndIntExpr SingleConstruct */ +#line 1360 "xi-grammar.y" + { (yyval.sc) = new WhileConstruct((yyvsp[-2].intexpr), (yyvsp[0].sc)); } +#line 4930 "y.tab.c" break; - case 384: -#line 1355 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.sc) = new WhileConstruct((yyvsp[-4].intexpr), (yyvsp[-1].slist)); } -#line 4803 "y.tab.c" /* yacc.c:1646 */ + case 384: /* SingleConstruct: WHILE StartIntExpr IntExpr EndIntExpr '{' Slist '}' */ +#line 1362 "xi-grammar.y" + { (yyval.sc) = new WhileConstruct((yyvsp[-4].intexpr), (yyvsp[-1].slist)); } +#line 4936 "y.tab.c" break; - case 385: -#line 1357 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.sc) = new SerialConstruct((yyvsp[-2].strval), NULL, (yyloc).first_line); } -#line 4809 "y.tab.c" /* yacc.c:1646 */ + case 385: /* SingleConstruct: ParamBraceStart CCode ParamBraceEnd OptSemiColon */ +#line 1364 "xi-grammar.y" + { (yyval.sc) = new SerialConstruct((yyvsp[-2].strval), NULL, (yyloc).first_line); } +#line 4942 "y.tab.c" break; - case 386: -#line 1359 "xi-grammar.y" /* yacc.c:1646 */ - { + case 386: /* SingleConstruct: error */ +#line 1366 "xi-grammar.y" + { ERROR("unknown SDAG construct or malformed entry method declaration.\n" "You may have forgotten to terminate a previous entry method declaration with a" " semicolon or forgotten to mark a block of sequential SDAG code as 'serial'", (yyloc).first_column, (yyloc).last_column); YYABORT; } -#line 4821 "y.tab.c" /* yacc.c:1646 */ +#line 4954 "y.tab.c" break; - case 387: -#line 1369 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.sc) = 0; } -#line 4827 "y.tab.c" /* yacc.c:1646 */ + case 387: /* HasElse: %empty */ +#line 1376 "xi-grammar.y" + { (yyval.sc) = 0; } +#line 4960 "y.tab.c" break; - case 388: -#line 1371 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.sc) = new ElseConstruct((yyvsp[0].sc)); } -#line 4833 "y.tab.c" /* yacc.c:1646 */ + case 388: /* HasElse: ELSE SingleConstruct */ +#line 1378 "xi-grammar.y" + { (yyval.sc) = new ElseConstruct((yyvsp[0].sc)); } +#line 4966 "y.tab.c" break; - case 389: -#line 1373 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.sc) = new ElseConstruct((yyvsp[-1].slist)); } -#line 4839 "y.tab.c" /* yacc.c:1646 */ + case 389: /* HasElse: ELSE '{' Slist '}' */ +#line 1380 "xi-grammar.y" + { (yyval.sc) = new ElseConstruct((yyvsp[-1].slist)); } +#line 4972 "y.tab.c" break; - case 390: -#line 1377 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.intexpr) = new IntExprConstruct((yyvsp[0].strval)); } -#line 4845 "y.tab.c" /* yacc.c:1646 */ + case 390: /* IntExpr: CCode */ +#line 1384 "xi-grammar.y" + { (yyval.intexpr) = new IntExprConstruct((yyvsp[0].strval)); } +#line 4978 "y.tab.c" break; - case 391: -#line 1381 "xi-grammar.y" /* yacc.c:1646 */ - { in_int_expr = 0; (yyval.intval) = 0; } -#line 4851 "y.tab.c" /* yacc.c:1646 */ + case 391: /* EndIntExpr: ')' */ +#line 1388 "xi-grammar.y" + { in_int_expr = 0; (yyval.intval) = 0; } +#line 4984 "y.tab.c" break; - case 392: -#line 1385 "xi-grammar.y" /* yacc.c:1646 */ - { in_int_expr = 1; (yyval.intval) = 0; } -#line 4857 "y.tab.c" /* yacc.c:1646 */ + case 392: /* StartIntExpr: '(' */ +#line 1392 "xi-grammar.y" + { in_int_expr = 1; (yyval.intval) = 0; } +#line 4990 "y.tab.c" break; - case 393: -#line 1389 "xi-grammar.y" /* yacc.c:1646 */ - { + case 393: /* SEntry: IDENT EParameters */ +#line 1396 "xi-grammar.y" + { (yyval.entry) = new Entry(lineno, NULL, 0, (yyvsp[-1].strval), (yyvsp[0].plist), 0, 0, 0, (yyloc).first_line, (yyloc).last_line); firstRdma = true; firstDeviceRdma = true; } -#line 4867 "y.tab.c" /* yacc.c:1646 */ +#line 5000 "y.tab.c" break; - case 394: -#line 1395 "xi-grammar.y" /* yacc.c:1646 */ - { + case 394: /* SEntry: IDENT SParamBracketStart CCode SParamBracketEnd EParameters */ +#line 1402 "xi-grammar.y" + { (yyval.entry) = new Entry(lineno, NULL, 0, (yyvsp[-4].strval), (yyvsp[0].plist), 0, 0, (yyvsp[-2].strval), (yyloc).first_line, (yyloc).last_line); firstRdma = true; firstDeviceRdma = true; } -#line 4877 "y.tab.c" /* yacc.c:1646 */ +#line 5010 "y.tab.c" break; - case 395: -#line 1403 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.entrylist) = new EntryList((yyvsp[0].entry)); } -#line 4883 "y.tab.c" /* yacc.c:1646 */ + case 395: /* SEntryList: SEntry */ +#line 1410 "xi-grammar.y" + { (yyval.entrylist) = new EntryList((yyvsp[0].entry)); } +#line 5016 "y.tab.c" break; - case 396: -#line 1405 "xi-grammar.y" /* yacc.c:1646 */ - { (yyval.entrylist) = new EntryList((yyvsp[-2].entry),(yyvsp[0].entrylist)); } -#line 4889 "y.tab.c" /* yacc.c:1646 */ + case 396: /* SEntryList: SEntry ',' SEntryList */ +#line 1412 "xi-grammar.y" + { (yyval.entrylist) = new EntryList((yyvsp[-2].entry),(yyvsp[0].entrylist)); } +#line 5022 "y.tab.c" break; - case 397: -#line 1409 "xi-grammar.y" /* yacc.c:1646 */ - { in_bracket=1; } -#line 4895 "y.tab.c" /* yacc.c:1646 */ + case 397: /* SParamBracketStart: '[' */ +#line 1416 "xi-grammar.y" + { in_bracket=1; } +#line 5028 "y.tab.c" break; - case 398: -#line 1412 "xi-grammar.y" /* yacc.c:1646 */ - { in_bracket=0; } -#line 4901 "y.tab.c" /* yacc.c:1646 */ + case 398: /* SParamBracketEnd: ']' */ +#line 1419 "xi-grammar.y" + { in_bracket=0; } +#line 5034 "y.tab.c" break; - case 399: -#line 1416 "xi-grammar.y" /* yacc.c:1646 */ - { if (!macroDefined((yyvsp[0].strval), 1)) in_comment = 1; } -#line 4907 "y.tab.c" /* yacc.c:1646 */ + case 399: /* HashIFComment: HASHIF Name */ +#line 1423 "xi-grammar.y" + { if (!macroDefined((yyvsp[0].strval), 1)) in_comment = 1; } +#line 5040 "y.tab.c" break; - case 400: -#line 1420 "xi-grammar.y" /* yacc.c:1646 */ - { if (!macroDefined((yyvsp[0].strval), 0)) in_comment = 1; } -#line 4913 "y.tab.c" /* yacc.c:1646 */ + case 400: /* HashIFDefComment: HASHIFDEF Name */ +#line 1427 "xi-grammar.y" + { if (!macroDefined((yyvsp[0].strval), 0)) in_comment = 1; } +#line 5046 "y.tab.c" break; -#line 4917 "y.tab.c" /* yacc.c:1646 */ +#line 5050 "y.tab.c" + default: break; } /* User semantic actions sometimes alter yychar, and that requires @@ -4927,11 +5061,10 @@ yyreduce: case of YYERROR or YYBACKUP, subsequent parser actions might lead to an incorrect destructor call or verbose syntax error message before the lookahead is translated. */ - YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); + YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc); YYPOPSTACK (yylen); yylen = 0; - YY_STACK_PRINT (yyss, yyssp); *++yyvsp = yyval; *++yylsp = yyloc; @@ -4939,14 +5072,13 @@ yyreduce: /* Now 'shift' the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule number reduced by. */ - - yyn = yyr1[yyn]; - - yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; - if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) - yystate = yytable[yystate]; - else - yystate = yydefgoto[yyn - YYNTOKENS]; + { + const int yylhs = yyr1[yyn] - YYNTOKENS; + const int yyi = yypgoto[yylhs] + *yyssp; + yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp + ? yytable[yyi] + : yydefgoto[yylhs]); + } goto yynewstate; @@ -4957,50 +5089,15 @@ yyreduce: yyerrlab: /* Make sure we have latest lookahead translation. See comments at user semantic actions for why this is necessary. */ - yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); - + yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar); /* If not already recovering from an error, report this error. */ if (!yyerrstatus) { ++yynerrs; -#if ! YYERROR_VERBOSE yyerror (YY_("syntax error")); -#else -# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ - yyssp, yytoken) - { - char const *yymsgp = YY_("syntax error"); - int yysyntax_error_status; - yysyntax_error_status = YYSYNTAX_ERROR; - if (yysyntax_error_status == 0) - yymsgp = yymsg; - else if (yysyntax_error_status == 1) - { - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); - yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); - if (!yymsg) - { - yymsg = yymsgbuf; - yymsg_alloc = sizeof yymsgbuf; - yysyntax_error_status = 2; - } - else - { - yysyntax_error_status = YYSYNTAX_ERROR; - yymsgp = yymsg; - } - } - yyerror (yymsgp); - if (yysyntax_error_status == 2) - goto yyexhaustedlab; - } -# undef YYSYNTAX_ERROR -#endif } yyerror_range[1] = yylloc; - if (yyerrstatus == 3) { /* If just tried and failed to reuse lookahead token after an @@ -5029,14 +5126,12 @@ yyerrlab: | yyerrorlab -- error raised explicitly by YYERROR. | `---------------------------------------------------*/ yyerrorlab: + /* Pacify compilers when the user code never invokes YYERROR and the + label yyerrorlab therefore never appears in user code. */ + if (0) + YYERROR; + ++yynerrs; - /* Pacify compilers like GCC when the user code never invokes - YYERROR and the label yyerrorlab therefore never appears in user - code. */ - if (/*CONSTCOND*/ 0) - goto yyerrorlab; - - yyerror_range[1] = yylsp[1-yylen]; /* Do not reclaim the symbols of the rule whose action triggered this YYERROR. */ YYPOPSTACK (yylen); @@ -5052,13 +5147,14 @@ yyerrorlab: yyerrlab1: yyerrstatus = 3; /* Each real token shifted decrements this. */ + /* Pop stack until we find a state that shifts the error token. */ for (;;) { yyn = yypact[yystate]; if (!yypact_value_is_default (yyn)) { - yyn += YYTERROR; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) + yyn += YYSYMBOL_YYerror; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) { yyn = yytable[yyn]; if (0 < yyn) @@ -5072,7 +5168,7 @@ yyerrlab1: yyerror_range[1] = *yylsp; yydestruct ("Error: popping", - yystos[yystate], yyvsp, yylsp); + YY_ACCESSING_SYMBOL (yystate), yyvsp, yylsp); YYPOPSTACK (1); yystate = *yyssp; YY_STACK_PRINT (yyss, yyssp); @@ -5083,13 +5179,11 @@ yyerrlab1: YY_IGNORE_MAYBE_UNINITIALIZED_END yyerror_range[2] = yylloc; - /* Using YYLLOC is tempting, but would change the location of - the lookahead. YYLOC is available though. */ - YYLLOC_DEFAULT (yyloc, yyerror_range, 2); - *++yylsp = yyloc; + ++yylsp; + YYLLOC_DEFAULT (*yylsp, yyerror_range, 2); /* Shift the error token. */ - YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); + YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp); yystate = yyn; goto yynewstate; @@ -5100,26 +5194,30 @@ yyerrlab1: `-------------------------------------*/ yyacceptlab: yyresult = 0; - goto yyreturn; + goto yyreturnlab; + /*-----------------------------------. | yyabortlab -- YYABORT comes here. | `-----------------------------------*/ yyabortlab: yyresult = 1; - goto yyreturn; + goto yyreturnlab; + -#if !defined yyoverflow || YYERROR_VERBOSE -/*-------------------------------------------------. -| yyexhaustedlab -- memory exhaustion comes here. | -`-------------------------------------------------*/ +/*-----------------------------------------------------------. +| yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here. | +`-----------------------------------------------------------*/ yyexhaustedlab: yyerror (YY_("memory exhausted")); yyresult = 2; - /* Fall through. */ -#endif + goto yyreturnlab; + -yyreturn: +/*----------------------------------------------------------. +| yyreturnlab -- parsing is finished, clean up and return. | +`----------------------------------------------------------*/ +yyreturnlab: if (yychar != YYEMPTY) { /* Make sure we have latest lookahead translation. See comments at @@ -5135,20 +5233,18 @@ yyreturn: while (yyssp != yyss) { yydestruct ("Cleanup: popping", - yystos[*yyssp], yyvsp, yylsp); + YY_ACCESSING_SYMBOL (+*yyssp), yyvsp, yylsp); YYPOPSTACK (1); } #ifndef yyoverflow if (yyss != yyssa) YYSTACK_FREE (yyss); #endif -#if YYERROR_VERBOSE - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); -#endif + return yyresult; } -#line 1423 "xi-grammar.y" /* yacc.c:1906 */ + +#line 1430 "xi-grammar.y" void yyerror(const char *s) diff --git a/src/xlat-i/xi-grammar.tab.h b/src/xlat-i/xi-grammar.tab.h index 3fd2adcb33..ed35ede7d0 100644 --- a/src/xlat-i/xi-grammar.tab.h +++ b/src/xlat-i/xi-grammar.tab.h @@ -1,8 +1,9 @@ -/* A Bison parser, made by GNU Bison 3.0.4. */ +/* A Bison parser, made by GNU Bison 3.8.2. */ /* Bison interface for Yacc-like parsers in C - Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. + Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 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 @@ -15,7 +16,7 @@ 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 . */ + along with this program. If not, see . */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work @@ -30,6 +31,10 @@ This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ +/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual, + especially those whose name start with YY_ or yy_. They are + private implementation details that can be changed or removed. */ + #ifndef YY_YY_Y_TAB_H_INCLUDED # define YY_YY_Y_TAB_H_INCLUDED /* Debug traces. */ @@ -40,90 +45,99 @@ extern int yydebug; #endif -/* Token type. */ +/* Token kinds. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE enum yytokentype { - MODULE = 258, - MAINMODULE = 259, - EXTERN = 260, - READONLY = 261, - INITCALL = 262, - INITNODE = 263, - INITPROC = 264, - PUPABLE = 265, - CHARE = 266, - MAINCHARE = 267, - GROUP = 268, - NODEGROUP = 269, - ARRAY = 270, - MESSAGE = 271, - CONDITIONAL = 272, - CLASS = 273, - INCLUDE = 274, - STACKSIZE = 275, - THREADED = 276, - TEMPLATE = 277, - WHENIDLE = 278, - SYNC = 279, - IGET = 280, - EXCLUSIVE = 281, - IMMEDIATE = 282, - SKIPSCHED = 283, - INLINE = 284, - VIRTUAL = 285, - MIGRATABLE = 286, - AGGREGATE = 287, - CREATEHERE = 288, - CREATEHOME = 289, - NOKEEP = 290, - NOTRACE = 291, - APPWORK = 292, - VOID = 293, - CONST = 294, - NOCOPY = 295, - NOCOPYPOST = 296, - NOCOPYDEVICE = 297, - PACKED = 298, - VARSIZE = 299, - ENTRY = 300, - FOR = 301, - FORALL = 302, - WHILE = 303, - WHEN = 304, - OVERLAP = 305, - SERIAL = 306, - IF = 307, - ELSE = 308, - PYTHON = 309, - LOCAL = 310, - NAMESPACE = 311, - USING = 312, - IDENT = 313, - NUMBER = 314, - LITERAL = 315, - CPROGRAM = 316, - HASHIF = 317, - HASHIFDEF = 318, - INT = 319, - LONG = 320, - SHORT = 321, - CHAR = 322, - FLOAT = 323, - DOUBLE = 324, - UNSIGNED = 325, - ACCEL = 326, - READWRITE = 327, - WRITEONLY = 328, - ACCELBLOCK = 329, - MEMCRITICAL = 330, - REDUCTIONTARGET = 331, - CASE = 332, - TYPENAME = 333 + YYEMPTY = -2, + YYEOF = 0, /* "end of file" */ + YYerror = 256, /* error */ + YYUNDEF = 257, /* "invalid token" */ + MODULE = 258, /* MODULE */ + MAINMODULE = 259, /* MAINMODULE */ + EXTERN = 260, /* EXTERN */ + READONLY = 261, /* READONLY */ + INITCALL = 262, /* INITCALL */ + INITNODE = 263, /* INITNODE */ + INITPROC = 264, /* INITPROC */ + PUPABLE = 265, /* PUPABLE */ + CHARE = 266, /* CHARE */ + MAINCHARE = 267, /* MAINCHARE */ + GROUP = 268, /* GROUP */ + NODEGROUP = 269, /* NODEGROUP */ + ARRAY = 270, /* ARRAY */ + MESSAGE = 271, /* MESSAGE */ + CONDITIONAL = 272, /* CONDITIONAL */ + CLASS = 273, /* CLASS */ + INCLUDE = 274, /* INCLUDE */ + STACKSIZE = 275, /* STACKSIZE */ + THREADED = 276, /* THREADED */ + TEMPLATE = 277, /* TEMPLATE */ + WHENIDLE = 278, /* WHENIDLE */ + SYNC = 279, /* SYNC */ + IGET = 280, /* IGET */ + EXCLUSIVE = 281, /* EXCLUSIVE */ + IMMEDIATE = 282, /* IMMEDIATE */ + SKIPSCHED = 283, /* SKIPSCHED */ + INLINE = 284, /* INLINE */ + VIRTUAL = 285, /* VIRTUAL */ + MIGRATABLE = 286, /* MIGRATABLE */ + AGGREGATE = 287, /* AGGREGATE */ + CREATEHERE = 288, /* CREATEHERE */ + CREATEHOME = 289, /* CREATEHOME */ + NOKEEP = 290, /* NOKEEP */ + NOTRACE = 291, /* NOTRACE */ + APPWORK = 292, /* APPWORK */ + VOID = 293, /* VOID */ + CONST = 294, /* CONST */ + NOCOPY = 295, /* NOCOPY */ + NOCOPYPOST = 296, /* NOCOPYPOST */ + NOCOPYDEVICE = 297, /* NOCOPYDEVICE */ + PACKED = 298, /* PACKED */ + VARSIZE = 299, /* VARSIZE */ + ENTRY = 300, /* ENTRY */ + FOR = 301, /* FOR */ + FORALL = 302, /* FORALL */ + WHILE = 303, /* WHILE */ + WHEN = 304, /* WHEN */ + OVERLAP = 305, /* OVERLAP */ + SERIAL = 306, /* SERIAL */ + IF = 307, /* IF */ + ELSE = 308, /* ELSE */ + PYTHON = 309, /* PYTHON */ + LOCAL = 310, /* LOCAL */ + NAMESPACE = 311, /* NAMESPACE */ + USING = 312, /* USING */ + IDENT = 313, /* IDENT */ + NUMBER = 314, /* NUMBER */ + LITERAL = 315, /* LITERAL */ + CPROGRAM = 316, /* CPROGRAM */ + HASHIF = 317, /* HASHIF */ + HASHIFDEF = 318, /* HASHIFDEF */ + INT = 319, /* INT */ + LONG = 320, /* LONG */ + SHORT = 321, /* SHORT */ + CHAR = 322, /* CHAR */ + FLOAT = 323, /* FLOAT */ + DOUBLE = 324, /* DOUBLE */ + UNSIGNED = 325, /* UNSIGNED */ + ACCEL = 326, /* ACCEL */ + READWRITE = 327, /* READWRITE */ + WRITEONLY = 328, /* WRITEONLY */ + ACCELBLOCK = 329, /* ACCELBLOCK */ + MEMCRITICAL = 330, /* MEMCRITICAL */ + REDUCTIONTARGET = 331, /* REDUCTIONTARGET */ + CASE = 332, /* CASE */ + TYPENAME = 333 /* TYPENAME */ }; + typedef enum yytokentype yytoken_kind_t; #endif -/* Tokens. */ +/* Token kinds. */ +#define YYEMPTY -2 +#define YYEOF 0 +#define YYerror 256 +#define YYUNDEF 257 #define MODULE 258 #define MAINMODULE 259 #define EXTERN 260 @@ -203,10 +217,9 @@ extern int yydebug; /* Value type. */ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED - union YYSTYPE { -#line 54 "xi-grammar.y" /* yacc.c:1909 */ +#line 54 "xi-grammar.y" Attribute *attr; Attribute::Argument *attrarg; @@ -252,9 +265,9 @@ union YYSTYPE XStr* xstrptr; AccelBlock* accelBlock; -#line 256 "y.tab.h" /* yacc.c:1909 */ -}; +#line 269 "y.tab.h" +}; typedef union YYSTYPE YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define YYSTYPE_IS_DECLARED 1 @@ -277,6 +290,8 @@ struct YYLTYPE extern YYSTYPE yylval; extern YYLTYPE yylloc; + int yyparse (void); + #endif /* !YY_YY_Y_TAB_H_INCLUDED */ diff --git a/src/xlat-i/xi-grammar.y b/src/xlat-i/xi-grammar.y index 9069f07ad9..30e91c0f7a 100644 --- a/src/xlat-i/xi-grammar.y +++ b/src/xlat-i/xi-grammar.y @@ -301,14 +301,16 @@ QualName : IDENT { $$ = $1; } | QualName ':'':' IDENT { - char *tmp = new char[strlen($1)+strlen($4)+3]; - sprintf(tmp,"%s::%s", $1, $4); + int len = strlen($1)+strlen($4)+3; + char *tmp = new char[len]; + snprintf(tmp,len,"%s::%s", $1, $4); $$ = tmp; } | QualName ':'':' ARRAY { - char *tmp = new char[strlen($1)+5+3]; - sprintf(tmp,"%s::array", $1); + int len = strlen($1)+5+3; + char *tmp = new char[len]; + snprintf(tmp, len, "%s::array", $1); $$ = tmp; } ; @@ -700,7 +702,7 @@ NodeGroup : NODEGROUP CAttribs NamedType OptBaseList MemberEList ArrayIndexType : '[' NUMBER Name ']' {/*Stupid special case for [1D] indices*/ char *buf=new char[40]; - sprintf(buf,"%sD",$2); + snprintf(buf,40,"%sD",$2); $$ = new NamedType(buf); } | '[' QualNamedType ']' @@ -1067,8 +1069,9 @@ CPROGRAM_List : /* Empty */ { $$ = $1; } | CPROGRAM ',' CPROGRAM_List { /*Returned only when in_bracket*/ - char *tmp = new char[strlen($1)+strlen($3)+3]; - sprintf(tmp,"%s, %s", $1, $3); + int len = strlen($1)+strlen($3)+3; + char *tmp = new char[len]; + snprintf(tmp,len,"%s, %s", $1, $3); $$ = tmp; } ; @@ -1079,26 +1082,30 @@ CCode : /* Empty */ { $$ = $1; } | CPROGRAM '[' CCode ']' CCode { /*Returned only when in_bracket*/ - char *tmp = new char[strlen($1)+strlen($3)+strlen($5)+3]; - sprintf(tmp,"%s[%s]%s", $1, $3, $5); + int len = strlen($1)+strlen($3)+strlen($5)+3; + char *tmp = new char[len]; + snprintf(tmp, len, "%s[%s]%s", $1, $3, $5); $$ = tmp; } | CPROGRAM '{' CCode '}' CCode { /*Returned only when in_braces*/ - char *tmp = new char[strlen($1)+strlen($3)+strlen($5)+3]; - sprintf(tmp,"%s{%s}%s", $1, $3, $5); + int len = strlen($1)+strlen($3)+strlen($5)+3; + char *tmp = new char[len]; + snprintf(tmp, len, "%s{%s}%s", $1, $3, $5); $$ = tmp; } | CPROGRAM '(' CPROGRAM_List ')' CCode { /*Returned only when in_braces*/ - char *tmp = new char[strlen($1)+strlen($3)+strlen($5)+3]; - sprintf(tmp,"%s(%s)%s", $1, $3, $5); + int len = strlen($1)+strlen($3)+strlen($5)+3; + char *tmp = new char[len]; + snprintf(tmp, len, "%s(%s)%s", $1, $3, $5); $$ = tmp; } |'(' CCode ')' CCode { /*Returned only when in_braces*/ - char *tmp = new char[strlen($2)+strlen($4)+3]; - sprintf(tmp,"(%s)%s", $2, $4); + int len = strlen($2)+strlen($4)+3; + char *tmp = new char[len]; + snprintf(tmp, len, "(%s)%s", $2, $4); $$ = tmp; } ; diff --git a/src/xlat-i/xi-main.C b/src/xlat-i/xi-main.C index b64a120507..74eb31f5f6 100644 --- a/src/xlat-i/xi-main.C +++ b/src/xlat-i/xi-main.C @@ -43,7 +43,7 @@ void ReservedWord(int token, int fCol, int lCol) { break; } } - sprintf(text, "Reserved word '%s' used as an identifier", word); + snprintf(text, sizeof(text), "Reserved word '%s' used as an identifier", word); xi::pretty_msg("error", text, fCol, lCol); yyerror(text); } diff --git a/src/xlat-i/xi-util.C b/src/xlat-i/xi-util.C index 219849ca35..c341eba7a1 100644 --- a/src/xlat-i/xi-util.C +++ b/src/xlat-i/xi-util.C @@ -45,7 +45,7 @@ void XStr::clear() { XStr& XStr::operator<<(int i) { char tmp[100]; - sprintf(tmp, "%d", i); + snprintf(tmp, sizeof(tmp), "%d", i); append(tmp); return *this; } From a6d573c6bc452868e3ccc52b2c8384d5c81b58bf Mon Sep 17 00:00:00 2001 From: Matthias Diener Date: Tue, 18 Apr 2023 09:53:22 -0500 Subject: [PATCH 025/155] CI: Make NAMD a neutral test for external forks --- .github/workflows/namd.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/namd.yml b/.github/workflows/namd.yml index 550981b81b..f7bb08998e 100644 --- a/.github/workflows/namd.yml +++ b/.github/workflows/namd.yml @@ -7,19 +7,24 @@ jobs: # Since NAMD requires a secret to download its source from Gitlab, CI builds from outside PPl # always fail in this test since the secret is not available. build-and-test-namd: + env: + namd_secret: ${{ secrets.NAMD_CI_USERNAME_TOKEN }} runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2 - name: install-prerequisites + if: ${{ env.namd_secret != '' }} run: | sudo apt-get update sudo apt-get -y install sfftw-dev # test build without Fortran support sudo apt-get -y remove gfortran - name: build-charm++ + if: ${{ env.namd_secret != '' }} run: ./build LIBS netlrts-linux-x86_64 -g -j4 --with-production - name: build-namd + if: ${{ env.namd_secret != '' }} run: | cd .. git clone https://${{ secrets.NAMD_CI_USERNAME_TOKEN }}@gitlab.com/tcbgUIUC/namd.git @@ -28,11 +33,13 @@ jobs: cd Linux-x86_64-g++ make -j4 - name: test-namd-alanin + if: ${{ env.namd_secret != '' }} run: | cd ../namd/Linux-x86_64-g++ ./charmrun ++local +p2 ./namd2 src/alanin - name: Cache apoa1 files + if: ${{ env.namd_secret != '' }} id: cache-apoa1-files uses: actions/cache@v2.0.0 with: @@ -50,6 +57,7 @@ jobs: rm apoa1.tar.gz - name: test-namd-apoa1 + if: ${{ env.namd_secret != '' }} run: | cd ../namd/Linux-x86_64-g++ ./charmrun ++local +p4 ./namd2 ~/namddata/apoa1/apoa1.namd From b9dc7195ce952ed785cb2ee32d47ab2c960cf518 Mon Sep 17 00:00:00 2001 From: Evan Ramos Date: Tue, 18 Apr 2023 03:36:50 -0500 Subject: [PATCH 026/155] Update LZ4 to 1.9.4 --- src/arch/util/lz4.c | 1825 ++++++++++++++++++++++++++++++------------- src/arch/util/lz4.h | 699 +++++++++++------ 2 files changed, 1744 insertions(+), 780 deletions(-) diff --git a/src/arch/util/lz4.c b/src/arch/util/lz4.c index 4046102e6d..654bfdf32f 100755 --- a/src/arch/util/lz4.c +++ b/src/arch/util/lz4.c @@ -1,6 +1,6 @@ /* LZ4 - Fast LZ compression algorithm - Copyright (C) 2011-present, Yann Collet. + Copyright (C) 2011-2020, Yann Collet. BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php) @@ -32,7 +32,6 @@ - LZ4 source repository : https://github.com/lz4/lz4 */ - /*-************************************ * Tuning parameters **************************************/ @@ -46,10 +45,16 @@ #endif /* - * ACCELERATION_DEFAULT : + * LZ4_ACCELERATION_DEFAULT : * Select "acceleration" for LZ4_compress_fast() when parameter value <= 0 */ -#define ACCELERATION_DEFAULT 1 +#define LZ4_ACCELERATION_DEFAULT 1 +/* + * LZ4_ACCELERATION_MAX : + * Any "acceleration" value higher than this threshold + * get treated as LZ4_ACCELERATION_MAX instead (fix #876) + */ +#define LZ4_ACCELERATION_MAX 65537 /*-************************************ @@ -83,6 +88,7 @@ * Define this parameter if your target system or compiler does not support hardware bit count */ #if defined(_MSC_VER) && defined(_WIN32_WCE) /* Visual Studio for WinCE doesn't support Hardware bit count */ +# undef LZ4_FORCE_SW_BITCOUNT /* avoid double def */ # define LZ4_FORCE_SW_BITCOUNT #endif @@ -91,8 +97,23 @@ /*-************************************ * Dependency **************************************/ +/* + * LZ4_SRC_INCLUDED: + * Amalgamation flag, whether lz4.c is included + */ +#ifndef LZ4_SRC_INCLUDED +# define LZ4_SRC_INCLUDED 1 +#endif + +#ifndef LZ4_STATIC_LINKING_ONLY #define LZ4_STATIC_LINKING_ONLY +#endif + +#ifndef LZ4_DISABLE_DEPRECATE_WARNINGS #define LZ4_DISABLE_DEPRECATE_WARNINGS /* due to LZ4_decompress_safe_withPrefix64k */ +#endif + +#define LZ4_STATIC_LINKING_ONLY /* LZ4_DISTANCE_MAX */ #include "lz4.h" /* see also "memory routines" below */ @@ -100,10 +121,10 @@ /*-************************************ * Compiler Options **************************************/ -#ifdef _MSC_VER /* Visual Studio */ -# include -# pragma warning(disable : 4127) /* disable: C4127: conditional expression is constant */ -# pragma warning(disable : 4293) /* disable: C4293: too large shift (32-bits) */ +#if defined(_MSC_VER) && (_MSC_VER >= 1400) /* Visual Studio 2005+ */ +# include /* only present in VS2005+ */ +# pragma warning(disable : 4127) /* disable: C4127: conditional expression is constant */ +# pragma warning(disable : 6237) /* disable: C6237: conditional expression is always 0 */ #endif /* _MSC_VER */ #ifndef LZ4_FORCE_INLINE @@ -122,8 +143,8 @@ # endif /* _MSC_VER */ #endif /* LZ4_FORCE_INLINE */ -/* LZ4_FORCE_O2_GCC_PPC64LE and LZ4_FORCE_O2_INLINE_GCC_PPC64LE - * Gcc on ppc64le generates an unrolled SIMDized loop for LZ4_wildCopy, +/* LZ4_FORCE_O2 and LZ4_FORCE_INLINE + * gcc on ppc64le generates an unrolled SIMDized loop for LZ4_wildCopy8, * together with a simple 8-byte copy loop as a fall-back path. * However, this optimization hurts the decompression speed by >30%, * because the execution does not go to the optimized loop @@ -131,17 +152,17 @@ * before going to the fall-back path become useless overhead. * This optimization happens only with the -O3 flag, and -O2 generates * a simple 8-byte copy loop. - * With gcc on ppc64le, all of the LZ4_decompress_* and LZ4_wildCopy + * With gcc on ppc64le, all of the LZ4_decompress_* and LZ4_wildCopy8 * functions are annotated with __attribute__((optimize("O2"))), - * and also LZ4_wildCopy is forcibly inlined, so that the O2 attribute - * of LZ4_wildCopy does not affect the compression speed. + * and also LZ4_wildCopy8 is forcibly inlined, so that the O2 attribute + * of LZ4_wildCopy8 does not affect the compression speed. */ -#if defined(__PPC64__) && defined(__LITTLE_ENDIAN__) && defined(__GNUC__) -# define LZ4_FORCE_O2_GCC_PPC64LE __attribute__((optimize("O2"))) -# define LZ4_FORCE_O2_INLINE_GCC_PPC64LE __attribute__((optimize("O2"))) LZ4_FORCE_INLINE +#if defined(__PPC64__) && defined(__LITTLE_ENDIAN__) && defined(__GNUC__) && !defined(__clang__) +# define LZ4_FORCE_O2 __attribute__((optimize("O2"))) +# undef LZ4_FORCE_INLINE +# define LZ4_FORCE_INLINE static __inline __attribute__((optimize("O2"),always_inline)) #else -# define LZ4_FORCE_O2_GCC_PPC64LE -# define LZ4_FORCE_O2_INLINE_GCC_PPC64LE static +# define LZ4_FORCE_O2 #endif #if (defined(__GNUC__) && (__GNUC__ >= 3)) || (defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 800)) || defined(__clang__) @@ -157,21 +178,125 @@ #define unlikely(expr) expect((expr) != 0, 0) #endif +/* Should the alignment test prove unreliable, for some reason, + * it can be disabled by setting LZ4_ALIGN_TEST to 0 */ +#ifndef LZ4_ALIGN_TEST /* can be externally provided */ +# define LZ4_ALIGN_TEST 1 +#endif + /*-************************************ * Memory routines **************************************/ -#include /* malloc, calloc, free */ -#define ALLOC(s) malloc(s) -#define ALLOC_AND_ZERO(s) calloc(1,s) -#define FREEMEM(p) free(p) -#include /* memset, memcpy */ -#define MEM_INIT(p,v,s) memset((p),(v),(s)) + +/*! LZ4_STATIC_LINKING_ONLY_DISABLE_MEMORY_ALLOCATION : + * Disable relatively high-level LZ4/HC functions that use dynamic memory + * allocation functions (malloc(), calloc(), free()). + * + * Note that this is a compile-time switch. And since it disables + * public/stable LZ4 v1 API functions, we don't recommend using this + * symbol to generate a library for distribution. + * + * The following public functions are removed when this symbol is defined. + * - lz4 : LZ4_createStream, LZ4_freeStream, + * LZ4_createStreamDecode, LZ4_freeStreamDecode, LZ4_create (deprecated) + * - lz4hc : LZ4_createStreamHC, LZ4_freeStreamHC, + * LZ4_createHC (deprecated), LZ4_freeHC (deprecated) + * - lz4frame, lz4file : All LZ4F_* functions + */ +#if defined(LZ4_STATIC_LINKING_ONLY_DISABLE_MEMORY_ALLOCATION) +# define ALLOC(s) lz4_error_memory_allocation_is_disabled +# define ALLOC_AND_ZERO(s) lz4_error_memory_allocation_is_disabled +# define FREEMEM(p) lz4_error_memory_allocation_is_disabled +#elif defined(LZ4_USER_MEMORY_FUNCTIONS) +/* memory management functions can be customized by user project. + * Below functions must exist somewhere in the Project + * and be available at link time */ +void* LZ4_malloc(size_t s); +void* LZ4_calloc(size_t n, size_t s); +void LZ4_free(void* p); +# define ALLOC(s) LZ4_malloc(s) +# define ALLOC_AND_ZERO(s) LZ4_calloc(1,s) +# define FREEMEM(p) LZ4_free(p) +#else +# include /* malloc, calloc, free */ +# define ALLOC(s) malloc(s) +# define ALLOC_AND_ZERO(s) calloc(1,s) +# define FREEMEM(p) free(p) +#endif + +#if ! LZ4_FREESTANDING +# include /* memset, memcpy */ +#endif +#if !defined(LZ4_memset) +# define LZ4_memset(p,v,s) memset((p),(v),(s)) +#endif +#define MEM_INIT(p,v,s) LZ4_memset((p),(v),(s)) + + +/*-************************************ +* Common Constants +**************************************/ +#define MINMATCH 4 + +#define WILDCOPYLENGTH 8 +#define LASTLITERALS 5 /* see ../doc/lz4_Block_format.md#parsing-restrictions */ +#define MFLIMIT 12 /* see ../doc/lz4_Block_format.md#parsing-restrictions */ +#define MATCH_SAFEGUARD_DISTANCE ((2*WILDCOPYLENGTH) - MINMATCH) /* ensure it's possible to write 2 x wildcopyLength without overflowing output buffer */ +#define FASTLOOP_SAFE_DISTANCE 64 +static const int LZ4_minLength = (MFLIMIT+1); + +#define KB *(1 <<10) +#define MB *(1 <<20) +#define GB *(1U<<30) + +#define LZ4_DISTANCE_ABSOLUTE_MAX 65535 +#if (LZ4_DISTANCE_MAX > LZ4_DISTANCE_ABSOLUTE_MAX) /* max supported by LZ4 format */ +# error "LZ4_DISTANCE_MAX is too big : must be <= 65535" +#endif + +#define ML_BITS 4 +#define ML_MASK ((1U<=1) +# include +#else +# ifndef assert +# define assert(condition) ((void)0) +# endif +#endif + +#define LZ4_STATIC_ASSERT(c) { enum { LZ4_static_assert = 1/(int)(!!(c)) }; } /* use after variable declarations */ + +#if defined(LZ4_DEBUG) && (LZ4_DEBUG>=2) +# include + static int g_debuglog_enable = 1; +# define DEBUGLOG(l, ...) { \ + if ((g_debuglog_enable) && (l<=LZ4_DEBUG)) { \ + fprintf(stderr, __FILE__ ": "); \ + fprintf(stderr, __VA_ARGS__); \ + fprintf(stderr, " \n"); \ + } } +#else +# define DEBUGLOG(l, ...) {} /* disabled */ +#endif + +static int LZ4_isAligned(const void* ptr, size_t alignment) +{ + return ((size_t)ptr & (alignment -1)) == 0; +} + + +/*-************************************ +* Types +**************************************/ +#include #if defined(__cplusplus) || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */) # include typedef uint8_t BYTE; @@ -181,6 +306,9 @@ typedef uint64_t U64; typedef uintptr_t uptrval; #else +# if UINT_MAX != 4294967295UL +# error "LZ4 code (when not C++ or C99) assumes that sizeof(int) == 4" +# endif typedef unsigned char BYTE; typedef unsigned short U16; typedef unsigned int U32; @@ -195,9 +323,41 @@ typedef size_t reg_t; /* 32-bits in x32 mode */ #endif +typedef enum { + notLimited = 0, + limitedOutput = 1, + fillOutput = 2 +} limitedOutput_directive; + + /*-************************************ * Reading and writing into memory **************************************/ + +/** + * LZ4 relies on memcpy with a constant size being inlined. In freestanding + * environments, the compiler can't assume the implementation of memcpy() is + * standard compliant, so it can't apply its specialized memcpy() inlining + * logic. When possible, use __builtin_memcpy() to tell the compiler to analyze + * memcpy() as if it were standard compliant, so it can inline it in freestanding + * environments. This is needed when decompressing the Linux Kernel, for example. + */ +#if !defined(LZ4_memcpy) +# if defined(__GNUC__) && (__GNUC__ >= 4) +# define LZ4_memcpy(dst, src, size) __builtin_memcpy(dst, src, size) +# else +# define LZ4_memcpy(dst, src, size) memcpy(dst, src, size) +# endif +#endif + +#if !defined(LZ4_memmove) +# if defined(__GNUC__) && (__GNUC__ >= 4) +# define LZ4_memmove __builtin_memmove +# else +# define LZ4_memmove memmove +# endif +#endif + static unsigned LZ4_isLittleEndian(void) { const union { U32 u; BYTE c[4]; } one = { 1 }; /* don't use static : performance detrimental */ @@ -219,40 +379,40 @@ static void LZ4_write32(void* memPtr, U32 value) { *(U32*)memPtr = value; } /* __pack instructions are safer, but compiler specific, hence potentially problematic for some compilers */ /* currently only defined for gcc and icc */ -typedef union { U16 u16; U32 u32; reg_t uArch; } __attribute__((packed)) unalign; +typedef union { U16 u16; U32 u32; reg_t uArch; } __attribute__((packed)) LZ4_unalign; -static U16 LZ4_read16(const void* ptr) { return ((const unalign*)ptr)->u16; } -static U32 LZ4_read32(const void* ptr) { return ((const unalign*)ptr)->u32; } -static reg_t LZ4_read_ARCH(const void* ptr) { return ((const unalign*)ptr)->uArch; } +static U16 LZ4_read16(const void* ptr) { return ((const LZ4_unalign*)ptr)->u16; } +static U32 LZ4_read32(const void* ptr) { return ((const LZ4_unalign*)ptr)->u32; } +static reg_t LZ4_read_ARCH(const void* ptr) { return ((const LZ4_unalign*)ptr)->uArch; } -static void LZ4_write16(void* memPtr, U16 value) { ((unalign*)memPtr)->u16 = value; } -static void LZ4_write32(void* memPtr, U32 value) { ((unalign*)memPtr)->u32 = value; } +static void LZ4_write16(void* memPtr, U16 value) { ((LZ4_unalign*)memPtr)->u16 = value; } +static void LZ4_write32(void* memPtr, U32 value) { ((LZ4_unalign*)memPtr)->u32 = value; } -#else /* safe and portable access through memcpy() */ +#else /* safe and portable access using memcpy() */ static U16 LZ4_read16(const void* memPtr) { - U16 val; memcpy(&val, memPtr, sizeof(val)); return val; + U16 val; LZ4_memcpy(&val, memPtr, sizeof(val)); return val; } static U32 LZ4_read32(const void* memPtr) { - U32 val; memcpy(&val, memPtr, sizeof(val)); return val; + U32 val; LZ4_memcpy(&val, memPtr, sizeof(val)); return val; } static reg_t LZ4_read_ARCH(const void* memPtr) { - reg_t val; memcpy(&val, memPtr, sizeof(val)); return val; + reg_t val; LZ4_memcpy(&val, memPtr, sizeof(val)); return val; } static void LZ4_write16(void* memPtr, U16 value) { - memcpy(memPtr, &value, sizeof(value)); + LZ4_memcpy(memPtr, &value, sizeof(value)); } static void LZ4_write32(void* memPtr, U32 value) { - memcpy(memPtr, &value, sizeof(value)); + LZ4_memcpy(memPtr, &value, sizeof(value)); } #endif /* LZ4_FORCE_MEMORY_ACCESS */ @@ -280,65 +440,115 @@ static void LZ4_writeLE16(void* memPtr, U16 value) } /* customized variant of memcpy, which can overwrite up to 8 bytes beyond dstEnd */ -LZ4_FORCE_O2_INLINE_GCC_PPC64LE -void LZ4_wildCopy(void* dstPtr, const void* srcPtr, void* dstEnd) +LZ4_FORCE_INLINE +void LZ4_wildCopy8(void* dstPtr, const void* srcPtr, void* dstEnd) { BYTE* d = (BYTE*)dstPtr; const BYTE* s = (const BYTE*)srcPtr; BYTE* const e = (BYTE*)dstEnd; - do { memcpy(d,s,8); d+=8; s+=8; } while (d= 16. */ +LZ4_FORCE_INLINE void +LZ4_wildCopy32(void* dstPtr, const void* srcPtr, void* dstEnd) +{ + BYTE* d = (BYTE*)dstPtr; + const BYTE* s = (const BYTE*)srcPtr; + BYTE* const e = (BYTE*)dstEnd; + do { LZ4_memcpy(d,s,16); LZ4_memcpy(d+16,s+16,16); d+=32; s+=32; } while (d=1) -# include -#else -# ifndef assert -# define assert(condition) ((void)0) -# endif -#endif +/* LZ4_memcpy_using_offset() presumes : + * - dstEnd >= dstPtr + MINMATCH + * - there is at least 8 bytes available to write after dstEnd */ +LZ4_FORCE_INLINE void +LZ4_memcpy_using_offset(BYTE* dstPtr, const BYTE* srcPtr, BYTE* dstEnd, const size_t offset) +{ + BYTE v[8]; -#define LZ4_STATIC_ASSERT(c) { enum { LZ4_static_assert = 1/(int)(!!(c)) }; } /* use after variable declarations */ + assert(dstEnd >= dstPtr + MINMATCH); -#if defined(LZ4_DEBUG) && (LZ4_DEBUG>=2) -# include -static int g_debuglog_enable = 1; -# define DEBUGLOG(l, ...) { \ - if ((g_debuglog_enable) && (l<=LZ4_DEBUG)) { \ - fprintf(stderr, __FILE__ ": "); \ - fprintf(stderr, __VA_ARGS__); \ - fprintf(stderr, " \n"); \ - } } -#else -# define DEBUGLOG(l, ...) {} /* disabled */ + switch(offset) { + case 1: + MEM_INIT(v, *srcPtr, 8); + break; + case 2: + LZ4_memcpy(v, srcPtr, 2); + LZ4_memcpy(&v[2], srcPtr, 2); +#if defined(_MSC_VER) && (_MSC_VER <= 1933) /* MSVC 2022 ver 17.3 or earlier */ +# pragma warning(push) +# pragma warning(disable : 6385) /* warning C6385: Reading invalid data from 'v'. */ +#endif + LZ4_memcpy(&v[4], v, 4); +#if defined(_MSC_VER) && (_MSC_VER <= 1933) /* MSVC 2022 ver 17.3 or earlier */ +# pragma warning(pop) +#endif + break; + case 4: + LZ4_memcpy(v, srcPtr, 4); + LZ4_memcpy(&v[4], srcPtr, 4); + break; + default: + LZ4_memcpy_using_offset_base(dstPtr, srcPtr, dstEnd, offset); + return; + } + + LZ4_memcpy(dstPtr, v, 8); + dstPtr += 8; + while (dstPtr < dstEnd) { + LZ4_memcpy(dstPtr, v, 8); + dstPtr += 8; + } +} #endif @@ -347,75 +557,103 @@ static int g_debuglog_enable = 1; **************************************/ static unsigned LZ4_NbCommonBytes (reg_t val) { + assert(val != 0); if (LZ4_isLittleEndian()) { - if (sizeof(val)==8) { -# if defined(_MSC_VER) && defined(_WIN64) && !defined(LZ4_FORCE_SW_BITCOUNT) + if (sizeof(val) == 8) { +# if defined(_MSC_VER) && (_MSC_VER >= 1800) && (defined(_M_AMD64) && !defined(_M_ARM64EC)) && !defined(LZ4_FORCE_SW_BITCOUNT) +/*-************************************************************************************************* +* ARM64EC is a Microsoft-designed ARM64 ABI compatible with AMD64 applications on ARM64 Windows 11. +* The ARM64EC ABI does not support AVX/AVX2/AVX512 instructions, nor their relevant intrinsics +* including _tzcnt_u64. Therefore, we need to neuter the _tzcnt_u64 code path for ARM64EC. +****************************************************************************************************/ +# if defined(__clang__) && (__clang_major__ < 10) + /* Avoid undefined clang-cl intrinsics issue. + * See https://github.com/lz4/lz4/pull/1017 for details. */ + return (unsigned)__builtin_ia32_tzcnt_u64(val) >> 3; +# else + /* x64 CPUS without BMI support interpret `TZCNT` as `REP BSF` */ + return (unsigned)_tzcnt_u64(val) >> 3; +# endif +# elif defined(_MSC_VER) && defined(_WIN64) && !defined(LZ4_FORCE_SW_BITCOUNT) unsigned long r = 0; - _BitScanForward64( &r, (U64)val ); - return (int)(r>>3); -# elif (defined(__clang__) || (defined(__GNUC__) && (__GNUC__>=3))) && !defined(LZ4_FORCE_SW_BITCOUNT) - return (__builtin_ctzll((U64)val) >> 3); + _BitScanForward64(&r, (U64)val); + return (unsigned)r >> 3; +# elif (defined(__clang__) || (defined(__GNUC__) && ((__GNUC__ > 3) || \ + ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 4))))) && \ + !defined(LZ4_FORCE_SW_BITCOUNT) + return (unsigned)__builtin_ctzll((U64)val) >> 3; # else - static const int DeBruijnBytePos[64] = { 0, 0, 0, 0, 0, 1, 1, 2, - 0, 3, 1, 3, 1, 4, 2, 7, - 0, 2, 3, 6, 1, 5, 3, 5, - 1, 3, 4, 4, 2, 5, 6, 7, - 7, 0, 1, 2, 3, 3, 4, 6, - 2, 6, 5, 5, 3, 4, 5, 6, - 7, 1, 2, 4, 6, 4, 4, 5, - 7, 2, 6, 5, 7, 6, 7, 7 }; - return DeBruijnBytePos[((U64)((val & -(long long)val) * 0x0218A392CDABBD3FULL)) >> 58]; + const U64 m = 0x0101010101010101ULL; + val ^= val - 1; + return (unsigned)(((U64)((val & (m - 1)) * m)) >> 56); # endif } else /* 32 bits */ { -# if defined(_MSC_VER) && !defined(LZ4_FORCE_SW_BITCOUNT) +# if defined(_MSC_VER) && (_MSC_VER >= 1400) && !defined(LZ4_FORCE_SW_BITCOUNT) unsigned long r; - _BitScanForward( &r, (U32)val ); - return (int)(r>>3); -# elif (defined(__clang__) || (defined(__GNUC__) && (__GNUC__>=3))) && !defined(LZ4_FORCE_SW_BITCOUNT) - return (__builtin_ctz((U32)val) >> 3); + _BitScanForward(&r, (U32)val); + return (unsigned)r >> 3; +# elif (defined(__clang__) || (defined(__GNUC__) && ((__GNUC__ > 3) || \ + ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 4))))) && \ + !defined(__TINYC__) && !defined(LZ4_FORCE_SW_BITCOUNT) + return (unsigned)__builtin_ctz((U32)val) >> 3; # else - static const int DeBruijnBytePos[32] = { 0, 0, 3, 0, 3, 1, 3, 0, - 3, 2, 2, 1, 3, 2, 0, 1, - 3, 3, 1, 2, 2, 2, 2, 0, - 3, 1, 2, 0, 1, 0, 1, 1 }; - return DeBruijnBytePos[((U32)((val & -(S32)val) * 0x077CB531U)) >> 27]; + const U32 m = 0x01010101; + return (unsigned)((((val - 1) ^ val) & (m - 1)) * m) >> 24; # endif } } else /* Big Endian CPU */ { - if (sizeof(val)==8) { /* 64-bits */ -# if defined(_MSC_VER) && defined(_WIN64) && !defined(LZ4_FORCE_SW_BITCOUNT) - unsigned long r = 0; - _BitScanReverse64( &r, val ); - return (unsigned)(r>>3); -# elif (defined(__clang__) || (defined(__GNUC__) && (__GNUC__>=3))) && !defined(LZ4_FORCE_SW_BITCOUNT) - return (__builtin_clzll((U64)val) >> 3); + if (sizeof(val)==8) { +# if (defined(__clang__) || (defined(__GNUC__) && ((__GNUC__ > 3) || \ + ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 4))))) && \ + !defined(__TINYC__) && !defined(LZ4_FORCE_SW_BITCOUNT) + return (unsigned)__builtin_clzll((U64)val) >> 3; # else +#if 1 + /* this method is probably faster, + * but adds a 128 bytes lookup table */ + static const unsigned char ctz7_tab[128] = { + 7, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, + 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, + 5, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, + 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, + 6, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, + 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, + 5, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, + 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, + }; + U64 const mask = 0x0101010101010101ULL; + U64 const t = (((val >> 8) - mask) | val) & mask; + return ctz7_tab[(t * 0x0080402010080402ULL) >> 57]; +#else + /* this method doesn't consume memory space like the previous one, + * but it contains several branches, + * that may end up slowing execution */ static const U32 by32 = sizeof(val)*4; /* 32 on 64 bits (goal), 16 on 32 bits. - Just to avoid some static analyzer complaining about shift by 32 on 32-bits target. - Note that this code path is never triggered in 32-bits mode. */ + Just to avoid some static analyzer complaining about shift by 32 on 32-bits target. + Note that this code path is never triggered in 32-bits mode. */ unsigned r; if (!(val>>by32)) { r=4; } else { r=0; val>>=by32; } if (!(val>>16)) { r+=2; val>>=8; } else { val>>=24; } r += (!val); return r; +#endif # endif } else /* 32 bits */ { -# if defined(_MSC_VER) && !defined(LZ4_FORCE_SW_BITCOUNT) - unsigned long r = 0; - _BitScanReverse( &r, (unsigned long)val ); - return (unsigned)(r>>3); -# elif (defined(__clang__) || (defined(__GNUC__) && (__GNUC__>=3))) && !defined(LZ4_FORCE_SW_BITCOUNT) - return (__builtin_clz((U32)val) >> 3); +# if (defined(__clang__) || (defined(__GNUC__) && ((__GNUC__ > 3) || \ + ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 4))))) && \ + !defined(LZ4_FORCE_SW_BITCOUNT) + return (unsigned)__builtin_clz((U32)val) >> 3; # else - unsigned r; - if (!(val>>16)) { r=2; val>>=8; } else { r=0; val>>=24; } - r += (!val); - return r; + val >>= 8; + val = ((((val + 0x00FFFF00) | 0x00FFFFFF) + val) | + (val + 0x00FF0000)) >> 24; + return (unsigned)val ^ 3; # endif } } } + #define STEPSIZE sizeof(reg_t) LZ4_FORCE_INLINE unsigned LZ4_count(const BYTE* pIn, const BYTE* pMatch, const BYTE* pInLimit) @@ -455,7 +693,6 @@ static const U32 LZ4_skipTrigger = 6; /* Increase this value ==> compression ru /*-************************************ * Local Structures and types **************************************/ -typedef enum { notLimited = 0, limitedOutput = 1, fillOutput = 2 } limitedOutput_directive; typedef enum { clearedTable = 0, byPtr, byU32, byU16 } tableType_t; /** @@ -471,10 +708,10 @@ typedef enum { clearedTable = 0, byPtr, byU32, byU16 } tableType_t; * - usingExtDict : Like withPrefix64k, but the preceding content is somewhere * else in memory, starting at ctx->dictionary with length * ctx->dictSize. - * - usingDictCtx : Like usingExtDict, but everything concerning the preceding - * content is in a separate context, pointed to by - * ctx->dictCtx. ctx->dictionary, ctx->dictSize, and table - * entries in the current context that refer to positions + * - usingDictCtx : Everything concerning the preceding content is + * in a separate context, pointed to by ctx->dictCtx. + * ctx->dictionary, ctx->dictSize, and table entries + * in the current context that refer to positions * preceding the beginning of the current compression are * ignored. Instead, ctx->dictCtx->dictionary and ctx->dictCtx * ->dictSize describe the location and size of the preceding @@ -491,20 +728,24 @@ typedef enum { noDictIssue = 0, dictSmall } dictIssue_directive; int LZ4_versionNumber (void) { return LZ4_VERSION_NUMBER; } const char* LZ4_versionString(void) { return LZ4_VERSION_STRING; } int LZ4_compressBound(int isize) { return LZ4_COMPRESSBOUND(isize); } -int LZ4_sizeofState() { return LZ4_STREAMSIZE; } +int LZ4_sizeofState(void) { return sizeof(LZ4_stream_t); } -/*-************************************ -* Internal Definitions used in Tests -**************************************/ +/*-**************************************** +* Internal Definitions, used only in Tests +*******************************************/ #if defined (__cplusplus) extern "C" { #endif -int LZ4_compress_forceExtDict (LZ4_stream_t* LZ4_stream, const char* source, char* dest, int inputSize); - -int LZ4_decompress_safe_forceExtDict(const char* in, char* out, int inSize, int outSize, const void* dict, size_t dictSize); +int LZ4_compress_forceExtDict (LZ4_stream_t* LZ4_dict, const char* source, char* dest, int srcSize); +int LZ4_decompress_safe_forceExtDict(const char* source, char* dest, + int compressedSize, int maxOutputSize, + const void* dictStart, size_t dictSize); +int LZ4_decompress_safe_partial_forceExtDict(const char* source, char* dest, + int compressedSize, int targetOutputSize, int dstCapacity, + const void* dictStart, size_t dictSize); #if defined (__cplusplus) } #endif @@ -512,7 +753,7 @@ int LZ4_decompress_safe_forceExtDict(const char* in, char* out, int inSize, int /*-****************************** * Compression functions ********************************/ -static U32 LZ4_hash4(U32 sequence, tableType_t const tableType) +LZ4_FORCE_INLINE U32 LZ4_hash4(U32 sequence, tableType_t const tableType) { if (tableType == byU16) return ((sequence * 2654435761U) >> ((MINMATCH*8)-(LZ4_HASHLOG+1))); @@ -520,15 +761,16 @@ static U32 LZ4_hash4(U32 sequence, tableType_t const tableType) return ((sequence * 2654435761U) >> ((MINMATCH*8)-LZ4_HASHLOG)); } -static U32 LZ4_hash5(U64 sequence, tableType_t const tableType) +LZ4_FORCE_INLINE U32 LZ4_hash5(U64 sequence, tableType_t const tableType) { - static const U64 prime5bytes = 889523592379ULL; - static const U64 prime8bytes = 11400714785074694791ULL; const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; - if (LZ4_isLittleEndian()) + if (LZ4_isLittleEndian()) { + const U64 prime5bytes = 889523592379ULL; return (U32)(((sequence << 24) * prime5bytes) >> (64 - hashLog)); - else + } else { + const U64 prime8bytes = 11400714785074694791ULL; return (U32)(((sequence >> 24) * prime8bytes) >> (64 - hashLog)); + } } LZ4_FORCE_INLINE U32 LZ4_hashPosition(const void* const p, tableType_t const tableType) @@ -537,7 +779,19 @@ LZ4_FORCE_INLINE U32 LZ4_hashPosition(const void* const p, tableType_t const tab return LZ4_hash4(LZ4_read32(p), tableType); } -static void LZ4_putIndexOnHash(U32 idx, U32 h, void* tableBase, tableType_t const tableType) +LZ4_FORCE_INLINE void LZ4_clearHash(U32 h, void* tableBase, tableType_t const tableType) +{ + switch (tableType) + { + default: /* fallthrough */ + case clearedTable: { /* illegal! */ assert(0); return; } + case byPtr: { const BYTE** hashTable = (const BYTE**)tableBase; hashTable[h] = NULL; return; } + case byU32: { U32* hashTable = (U32*) tableBase; hashTable[h] = 0; return; } + case byU16: { U16* hashTable = (U16*) tableBase; hashTable[h] = 0; return; } + } +} + +LZ4_FORCE_INLINE void LZ4_putIndexOnHash(U32 idx, U32 h, void* tableBase, tableType_t const tableType) { switch (tableType) { @@ -549,7 +803,7 @@ static void LZ4_putIndexOnHash(U32 idx, U32 h, void* tableBase, tableType_t cons } } -static void LZ4_putPositionOnHash(const BYTE* p, U32 h, +LZ4_FORCE_INLINE void LZ4_putPositionOnHash(const BYTE* p, U32 h, void* tableBase, tableType_t const tableType, const BYTE* srcBase) { @@ -574,7 +828,7 @@ LZ4_FORCE_INLINE void LZ4_putPosition(const BYTE* p, void* tableBase, tableType_ * Assumption 1 : only valid if tableType == byU32 or byU16. * Assumption 2 : h is presumed valid (within limits of hash table) */ -static U32 LZ4_getIndexOnHash(U32 h, const void* tableBase, tableType_t tableType) +LZ4_FORCE_INLINE U32 LZ4_getIndexOnHash(U32 h, const void* tableBase, tableType_t tableType) { LZ4_STATIC_ASSERT(LZ4_MEMORY_USAGE > 2); if (tableType == byU32) { @@ -597,41 +851,44 @@ static const BYTE* LZ4_getPositionOnHash(U32 h, const void* tableBase, tableType { const U16* const hashTable = (const U16*) tableBase; return hashTable[h] + srcBase; } /* default, to ensure a return */ } -LZ4_FORCE_INLINE const BYTE* LZ4_getPosition(const BYTE* p, - const void* tableBase, tableType_t tableType, - const BYTE* srcBase) +LZ4_FORCE_INLINE const BYTE* +LZ4_getPosition(const BYTE* p, + const void* tableBase, tableType_t tableType, + const BYTE* srcBase) { U32 const h = LZ4_hashPosition(p, tableType); return LZ4_getPositionOnHash(h, tableBase, tableType, srcBase); } -LZ4_FORCE_INLINE void LZ4_prepareTable( - LZ4_stream_t_internal* const cctx, - const int inputSize, - const tableType_t tableType) { +LZ4_FORCE_INLINE void +LZ4_prepareTable(LZ4_stream_t_internal* const cctx, + const int inputSize, + const tableType_t tableType) { /* If the table hasn't been used, it's guaranteed to be zeroed out, and is * therefore safe to use no matter what mode we're in. Otherwise, we figure * out if it's safe to leave as is or whether it needs to be reset. */ - if (cctx->tableType != clearedTable) { - if (cctx->tableType != tableType - || (tableType == byU16 && cctx->currentOffset + inputSize >= 0xFFFFU) - || (tableType == byU32 && cctx->currentOffset > 1 GB) + if ((tableType_t)cctx->tableType != clearedTable) { + assert(inputSize >= 0); + if ((tableType_t)cctx->tableType != tableType + || ((tableType == byU16) && cctx->currentOffset + (unsigned)inputSize >= 0xFFFFU) + || ((tableType == byU32) && cctx->currentOffset > 1 GB) || tableType == byPtr || inputSize >= 4 KB) { DEBUGLOG(4, "LZ4_prepareTable: Resetting table in %p", cctx); MEM_INIT(cctx->hashTable, 0, LZ4_HASHTABLESIZE); cctx->currentOffset = 0; - cctx->tableType = clearedTable; + cctx->tableType = (U32)clearedTable; } else { DEBUGLOG(4, "LZ4_prepareTable: Re-use hash table (no reset)"); } } - /* Adding a gap, so all previous entries are > MAX_DISTANCE back, is faster - * than compressing without a gap. However, compressing with - * currentOffset == 0 is faster still, so we preserve that case. + /* Adding a gap, so all previous entries are > LZ4_DISTANCE_MAX back, + * is faster than compressing without a gap. + * However, compressing with currentOffset == 0 is faster still, + * so we preserve that case. */ if (cctx->currentOffset != 0 && tableType == byU32) { DEBUGLOG(5, "LZ4_prepareTable: adding 64KB to currentOffset"); @@ -645,20 +902,25 @@ LZ4_FORCE_INLINE void LZ4_prepareTable( } /** LZ4_compress_generic() : - inlined, to ensure branches are decided at compilation time */ -LZ4_FORCE_INLINE int LZ4_compress_generic( + * inlined, to ensure branches are decided at compilation time. + * Presumed already validated at this stage: + * - source != NULL + * - inputSize > 0 + */ +LZ4_FORCE_INLINE int LZ4_compress_generic_validated( LZ4_stream_t_internal* const cctx, const char* const source, char* const dest, const int inputSize, - int *inputConsumed, /* only written when outputLimited == fillOutput */ + int* inputConsumed, /* only written when outputDirective == fillOutput */ const int maxOutputSize, - const limitedOutput_directive outputLimited, + const limitedOutput_directive outputDirective, const tableType_t tableType, const dict_directive dictDirective, const dictIssue_directive dictIssue, - const U32 acceleration) + const int acceleration) { + int result; const BYTE* ip = (const BYTE*) source; U32 const startIndex = cctx->currentOffset; @@ -674,7 +936,7 @@ LZ4_FORCE_INLINE int LZ4_compress_generic( int const maybe_extMem = (dictDirective == usingExtDict) || (dictDirective == usingDictCtx); U32 const prefixIdxLimit = startIndex - dictSize; /* used when dictDirective == dictSmall */ - const BYTE* const dictEnd = dictionary + dictSize; + const BYTE* const dictEnd = dictionary ? dictionary + dictSize : dictionary; const BYTE* anchor = (const BYTE*) source; const BYTE* const iend = ip + inputSize; const BYTE* const mflimitPlusOne = iend - MFLIMIT + 1; @@ -682,7 +944,8 @@ LZ4_FORCE_INLINE int LZ4_compress_generic( /* the dictCtx currentOffset is indexed on the start of the dictionary, * while a dictionary in the current context precedes the currentOffset */ - const BYTE* dictBase = (dictDirective == usingDictCtx) ? + const BYTE* dictBase = (dictionary == NULL) ? NULL : + (dictDirective == usingDictCtx) ? dictionary + dictSize - dictCtx->currentOffset : dictionary + dictSize - startIndex; @@ -692,11 +955,12 @@ LZ4_FORCE_INLINE int LZ4_compress_generic( U32 offset = 0; U32 forwardH; - DEBUGLOG(5, "LZ4_compress_generic: srcSize=%i, tableType=%u", inputSize, tableType); - /* Init conditions */ - if (outputLimited == fillOutput && maxOutputSize < 1) return 0; /* Impossible to store anything */ - if ((U32)inputSize > (U32)LZ4_MAX_INPUT_SIZE) return 0; /* Unsupported inputSize, too large (or negative) */ - if ((tableType == byU16) && (inputSize>=LZ4_64Klimit)) return 0; /* Size too large (not within 64K limit) */ + DEBUGLOG(5, "LZ4_compress_generic_validated: srcSize=%i, tableType=%u", inputSize, tableType); + assert(ip != NULL); + /* If init conditions are not met, we don't have to mark stream + * as having dirty context, since no action was taken yet */ + if (outputDirective == fillOutput && maxOutputSize < 1) { return 0; } /* Impossible to store anything */ + if ((tableType == byU16) && (inputSize>=LZ4_64Klimit)) { return 0; } /* Size too large (not within 64K limit) */ if (tableType==byPtr) assert(dictDirective==noDict); /* only supported use case with byPtr */ assert(acceleration >= 1); @@ -712,7 +976,7 @@ LZ4_FORCE_INLINE int LZ4_compress_generic( cctx->dictSize += (U32)inputSize; } cctx->currentOffset += (U32)inputSize; - cctx->tableType = (U16)tableType; + cctx->tableType = (U32)tableType; if (inputSizehashTable, tableType, base); - } while ( (match+MAX_DISTANCE < ip) + } while ( (match+LZ4_DISTANCE_MAX < ip) || (LZ4_read32(match) != LZ4_read32(ip)) ); } else { /* byU32, byU16 */ const BYTE* forwardIp = ip; - unsigned step = 1; - unsigned searchMatchNb = acceleration << LZ4_skipTrigger; + int step = 1; + int searchMatchNb = acceleration << LZ4_skipTrigger; do { U32 const h = forwardH; U32 const current = (U32)(forwardIp - base); @@ -776,10 +1041,11 @@ LZ4_FORCE_INLINE int LZ4_compress_generic( match = base + matchIndex; lowLimit = (const BYTE*)source; } - } else if (dictDirective==usingExtDict) { + } else if (dictDirective == usingExtDict) { if (matchIndex < startIndex) { DEBUGLOG(7, "extDict candidate: matchIndex=%5u < startIndex=%5u", matchIndex, startIndex); assert(startIndex - matchIndex >= MINMATCH); + assert(dictBase); match = dictBase + matchIndex; lowLimit = dictionary; } else { @@ -792,10 +1058,14 @@ LZ4_FORCE_INLINE int LZ4_compress_generic( forwardH = LZ4_hashPosition(forwardIp, tableType); LZ4_putIndexOnHash(current, h, cctx->hashTable, tableType); - if ((dictIssue == dictSmall) && (matchIndex < prefixIdxLimit)) continue; /* match outside of valid area */ + DEBUGLOG(7, "candidate at pos=%u (offset=%u \n", matchIndex, current - matchIndex); + if ((dictIssue == dictSmall) && (matchIndex < prefixIdxLimit)) { continue; } /* match outside of valid area */ assert(matchIndex < current); - if ((tableType != byU16) && (matchIndex+MAX_DISTANCE < current)) continue; /* too far */ - if (tableType == byU16) assert((current - matchIndex) <= MAX_DISTANCE); /* too_far presumed impossible with byU16 */ + if ( ((tableType != byU16) || (LZ4_DISTANCE_MAX < LZ4_DISTANCE_ABSOLUTE_MAX)) + && (matchIndex+LZ4_DISTANCE_MAX < current)) { + continue; + } /* too far */ + assert((current - matchIndex) <= LZ4_DISTANCE_MAX); /* match now expected within distance */ if (LZ4_read32(match) == LZ4_read32(ip)) { if (maybe_extMem) offset = current - matchIndex; @@ -806,21 +1076,23 @@ LZ4_FORCE_INLINE int LZ4_compress_generic( } /* Catch up */ + filledIp = ip; while (((ip>anchor) & (match > lowLimit)) && (unlikely(ip[-1]==match[-1]))) { ip--; match--; } /* Encode Literals */ { unsigned const litLength = (unsigned)(ip - anchor); token = op++; - if ((outputLimited == limitedOutput) && /* Check output buffer overflow */ - (unlikely(op + litLength + (2 + 1 + LASTLITERALS) + (litLength/255) > olimit))) - return 0; - if ((outputLimited == fillOutput) && + if ((outputDirective == limitedOutput) && /* Check output buffer overflow */ + (unlikely(op + litLength + (2 + 1 + LASTLITERALS) + (litLength/255) > olimit)) ) { + return 0; /* cannot compress within `dst` budget. Stored indexes in hash table are nonetheless fine */ + } + if ((outputDirective == fillOutput) && (unlikely(op + (litLength+240)/255 /* litlen */ + litLength /* literals */ + 2 /* offset */ + 1 /* token */ + MFLIMIT - MINMATCH /* min last literals so last match is <= end - MFLIMIT */ > olimit))) { op--; goto _last_literals; } if (litLength >= RUN_MASK) { - int len = (int)litLength-RUN_MASK; + int len = (int)(litLength - RUN_MASK); *token = (RUN_MASK<= 255 ; len-=255) *op++ = 255; *op++ = (BYTE)len; @@ -828,7 +1100,7 @@ LZ4_FORCE_INLINE int LZ4_compress_generic( else *token = (BYTE)(litLength< olimit)) { /* the match was too close to the end, rewind and go to last literals */ op = token; @@ -853,11 +1125,11 @@ LZ4_FORCE_INLINE int LZ4_compress_generic( /* Encode Offset */ if (maybe_extMem) { /* static test */ DEBUGLOG(6, " with offset=%u (ext if > %i)", offset, (int)(ip - (const BYTE*)source)); - assert(offset <= MAX_DISTANCE && offset > 0); + assert(offset <= LZ4_DISTANCE_MAX && offset > 0); LZ4_writeLE16(op, (U16)offset); op+=2; } else { DEBUGLOG(6, " with offset=%u (same segment)", (U32)(ip - match)); - assert(ip-match <= MAX_DISTANCE); + assert(ip-match <= LZ4_DISTANCE_MAX); LZ4_writeLE16(op, (U16)(ip - match)); op+=2; } @@ -870,7 +1142,7 @@ LZ4_FORCE_INLINE int LZ4_compress_generic( assert(dictEnd > match); if (limit > matchlimit) limit = matchlimit; matchCode = LZ4_count(ip+MINMATCH, match+MINMATCH, limit); - ip += MINMATCH + matchCode; + ip += (size_t)matchCode + MINMATCH; if (ip==limit) { unsigned const more = LZ4_count(limit, (const BYTE*)source, matchlimit); matchCode += more; @@ -879,19 +1151,34 @@ LZ4_FORCE_INLINE int LZ4_compress_generic( DEBUGLOG(6, " with matchLength=%u starting in extDict", matchCode+MINMATCH); } else { matchCode = LZ4_count(ip+MINMATCH, match+MINMATCH, matchlimit); - ip += MINMATCH + matchCode; + ip += (size_t)matchCode + MINMATCH; DEBUGLOG(6, " with matchLength=%u", matchCode+MINMATCH); } - if ((outputLimited) && /* Check output buffer overflow */ - (unlikely(op + (1 + LASTLITERALS) + (matchCode>>8) > olimit)) ) { - if (outputLimited == limitedOutput) - return 0; - if (outputLimited == fillOutput) { + if ((outputDirective) && /* Check output buffer overflow */ + (unlikely(op + (1 + LASTLITERALS) + (matchCode+240)/255 > olimit)) ) { + if (outputDirective == fillOutput) { /* Match description too long : reduce it */ - U32 newMatchCode = 15 /* in token */ - 1 /* to avoid needing a zero byte */ + ((U32)(olimit - op) - 2 - 1 - LASTLITERALS) * 255; + U32 newMatchCode = 15 /* in token */ - 1 /* to avoid needing a zero byte */ + ((U32)(olimit - op) - 1 - LASTLITERALS) * 255; ip -= matchCode - newMatchCode; + assert(newMatchCode < matchCode); matchCode = newMatchCode; + if (unlikely(ip <= filledIp)) { + /* We have already filled up to filledIp so if ip ends up less than filledIp + * we have positions in the hash table beyond the current position. This is + * a problem if we reuse the hash table. So we have to remove these positions + * from the hash table. + */ + const BYTE* ptr; + DEBUGLOG(5, "Clearing %u positions", (U32)(filledIp - ip)); + for (ptr = ip; ptr <= filledIp; ++ptr) { + U32 const h = LZ4_hashPosition(ptr, tableType); + LZ4_clearHash(h, cctx->hashTable, tableType); + } + } + } else { + assert(outputDirective == limitedOutput); + return 0; /* cannot compress within `dst` budget. Stored indexes in hash table are nonetheless fine */ } } if (matchCode >= ML_MASK) { @@ -908,6 +1195,8 @@ LZ4_FORCE_INLINE int LZ4_compress_generic( } else *token += (BYTE)(matchCode); } + /* Ensure we have enough space for the last literals. */ + assert(!(outputDirective == fillOutput && op + 1 + LASTLITERALS > olimit)); anchor = ip; @@ -922,7 +1211,7 @@ LZ4_FORCE_INLINE int LZ4_compress_generic( match = LZ4_getPosition(ip, cctx->hashTable, tableType, base); LZ4_putPosition(ip, cctx->hashTable, tableType, base); - if ( (match+MAX_DISTANCE >= ip) + if ( (match+LZ4_DISTANCE_MAX >= ip) && (LZ4_read32(match) == LZ4_read32(ip)) ) { token=op++; *token=0; goto _next_match; } @@ -945,6 +1234,7 @@ LZ4_FORCE_INLINE int LZ4_compress_generic( } } else if (dictDirective==usingExtDict) { if (matchIndex < startIndex) { + assert(dictBase); match = dictBase + matchIndex; lowLimit = dictionary; /* required for match length counter */ } else { @@ -957,7 +1247,7 @@ LZ4_FORCE_INLINE int LZ4_compress_generic( LZ4_putIndexOnHash(current, h, cctx->hashTable, tableType); assert(matchIndex < current); if ( ((dictIssue==dictSmall) ? (matchIndex >= prefixIdxLimit) : 1) - && ((tableType==byU16) ? 1 : (matchIndex+MAX_DISTANCE >= current)) + && (((tableType==byU16) && (LZ4_DISTANCE_MAX == LZ4_DISTANCE_ABSOLUTE_MAX)) ? 1 : (matchIndex+LZ4_DISTANCE_MAX >= current)) && (LZ4_read32(match) == LZ4_read32(ip)) ) { token=op++; *token=0; @@ -976,16 +1266,19 @@ LZ4_FORCE_INLINE int LZ4_compress_generic( _last_literals: /* Encode Last Literals */ { size_t lastRun = (size_t)(iend - anchor); - if ( (outputLimited) && /* Check output buffer overflow */ + if ( (outputDirective) && /* Check output buffer overflow */ (op + lastRun + 1 + ((lastRun+255-RUN_MASK)/255) > olimit)) { - if (outputLimited == fillOutput) { + if (outputDirective == fillOutput) { /* adapt lastRun to fill 'dst' */ - lastRun = (olimit-op) - 1; - lastRun -= (lastRun+240)/255; + assert(olimit >= op); + lastRun = (size_t)(olimit-op) - 1/*token*/; + lastRun -= (lastRun + 256 - RUN_MASK) / 256; /*additional length tokens*/ + } else { + assert(outputDirective == limitedOutput); + return 0; /* cannot compress within `dst` budget. Stored indexes in hash table are nonetheless fine */ } - if (outputLimited == limitedOutput) - return 0; } + DEBUGLOG(6, "Final literal run : %i literals", (int)lastRun); if (lastRun >= RUN_MASK) { size_t accumulator = lastRun - RUN_MASK; *op++ = RUN_MASK << ML_BITS; @@ -994,36 +1287,80 @@ LZ4_FORCE_INLINE int LZ4_compress_generic( } else { *op++ = (BYTE)(lastRun< 0); + DEBUGLOG(5, "LZ4_compress_generic: compressed %i bytes into %i bytes", inputSize, result); + return result; +} + +/** LZ4_compress_generic() : + * inlined, to ensure branches are decided at compilation time; + * takes care of src == (NULL, 0) + * and forward the rest to LZ4_compress_generic_validated */ +LZ4_FORCE_INLINE int LZ4_compress_generic( + LZ4_stream_t_internal* const cctx, + const char* const src, + char* const dst, + const int srcSize, + int *inputConsumed, /* only written when outputDirective == fillOutput */ + const int dstCapacity, + const limitedOutput_directive outputDirective, + const tableType_t tableType, + const dict_directive dictDirective, + const dictIssue_directive dictIssue, + const int acceleration) +{ + DEBUGLOG(5, "LZ4_compress_generic: srcSize=%i, dstCapacity=%i", + srcSize, dstCapacity); + + if ((U32)srcSize > (U32)LZ4_MAX_INPUT_SIZE) { return 0; } /* Unsupported srcSize, too large (or negative) */ + if (srcSize == 0) { /* src == NULL supported if srcSize == 0 */ + if (outputDirective != notLimited && dstCapacity <= 0) return 0; /* no output, can't write anything */ + DEBUGLOG(5, "Generating an empty block"); + assert(outputDirective == notLimited || dstCapacity >= 1); + assert(dst != NULL); + dst[0] = 0; + if (outputDirective == fillOutput) { + assert (inputConsumed != NULL); + *inputConsumed = 0; + } + return 1; + } + assert(src != NULL); + + return LZ4_compress_generic_validated(cctx, src, dst, srcSize, + inputConsumed, /* only written into if outputDirective == fillOutput */ + dstCapacity, outputDirective, + tableType, dictDirective, dictIssue, acceleration); } int LZ4_compress_fast_extState(void* state, const char* source, char* dest, int inputSize, int maxOutputSize, int acceleration) { - LZ4_stream_t_internal* ctx = &((LZ4_stream_t*)state)->internal_donotuse; - if (acceleration < 1) acceleration = ACCELERATION_DEFAULT; - LZ4_resetStream((LZ4_stream_t*)state); + LZ4_stream_t_internal* const ctx = & LZ4_initStream(state, sizeof(LZ4_stream_t)) -> internal_donotuse; + assert(ctx != NULL); + if (acceleration < 1) acceleration = LZ4_ACCELERATION_DEFAULT; + if (acceleration > LZ4_ACCELERATION_MAX) acceleration = LZ4_ACCELERATION_MAX; if (maxOutputSize >= LZ4_compressBound(inputSize)) { if (inputSize < LZ4_64Klimit) { return LZ4_compress_generic(ctx, source, dest, inputSize, NULL, 0, notLimited, byU16, noDict, noDictIssue, acceleration); } else { - const tableType_t tableType = ((sizeof(void*)==4) && ((uptrval)source > MAX_DISTANCE)) ? byPtr : byU32; + const tableType_t tableType = ((sizeof(void*)==4) && ((uptrval)source > LZ4_DISTANCE_MAX)) ? byPtr : byU32; return LZ4_compress_generic(ctx, source, dest, inputSize, NULL, 0, notLimited, tableType, noDict, noDictIssue, acceleration); } } else { - if (inputSize < LZ4_64Klimit) {; + if (inputSize < LZ4_64Klimit) { return LZ4_compress_generic(ctx, source, dest, inputSize, NULL, maxOutputSize, limitedOutput, byU16, noDict, noDictIssue, acceleration); } else { - const tableType_t tableType = ((sizeof(void*)==4) && ((uptrval)source > MAX_DISTANCE)) ? byPtr : byU32; + const tableType_t tableType = ((sizeof(void*)==4) && ((uptrval)source > LZ4_DISTANCE_MAX)) ? byPtr : byU32; return LZ4_compress_generic(ctx, source, dest, inputSize, NULL, maxOutputSize, limitedOutput, tableType, noDict, noDictIssue, acceleration); } } @@ -1041,7 +1378,8 @@ int LZ4_compress_fast_extState(void* state, const char* source, char* dest, int int LZ4_compress_fast_extState_fastReset(void* state, const char* src, char* dst, int srcSize, int dstCapacity, int acceleration) { LZ4_stream_t_internal* ctx = &((LZ4_stream_t*)state)->internal_donotuse; - if (acceleration < 1) acceleration = ACCELERATION_DEFAULT; + if (acceleration < 1) acceleration = LZ4_ACCELERATION_DEFAULT; + if (acceleration > LZ4_ACCELERATION_MAX) acceleration = LZ4_ACCELERATION_MAX; if (dstCapacity >= LZ4_compressBound(srcSize)) { if (srcSize < LZ4_64Klimit) { @@ -1053,7 +1391,7 @@ int LZ4_compress_fast_extState_fastReset(void* state, const char* src, char* dst return LZ4_compress_generic(ctx, src, dst, srcSize, NULL, 0, notLimited, tableType, noDict, noDictIssue, acceleration); } } else { - const tableType_t tableType = ((sizeof(void*)==4) && ((uptrval)src > MAX_DISTANCE)) ? byPtr : byU32; + const tableType_t tableType = ((sizeof(void*)==4) && ((uptrval)src > LZ4_DISTANCE_MAX)) ? byPtr : byU32; LZ4_prepareTable(ctx, srcSize, tableType); return LZ4_compress_generic(ctx, src, dst, srcSize, NULL, 0, notLimited, tableType, noDict, noDictIssue, acceleration); } @@ -1067,7 +1405,7 @@ int LZ4_compress_fast_extState_fastReset(void* state, const char* src, char* dst return LZ4_compress_generic(ctx, src, dst, srcSize, NULL, dstCapacity, limitedOutput, tableType, noDict, noDictIssue, acceleration); } } else { - const tableType_t tableType = ((sizeof(void*)==4) && ((uptrval)src > MAX_DISTANCE)) ? byPtr : byU32; + const tableType_t tableType = ((sizeof(void*)==4) && ((uptrval)src > LZ4_DISTANCE_MAX)) ? byPtr : byU32; LZ4_prepareTable(ctx, srcSize, tableType); return LZ4_compress_generic(ctx, src, dst, srcSize, NULL, dstCapacity, limitedOutput, tableType, noDict, noDictIssue, acceleration); } @@ -1079,7 +1417,7 @@ int LZ4_compress_fast(const char* source, char* dest, int inputSize, int maxOutp { int result; #if (LZ4_HEAPMODE) - LZ4_stream_t* ctxPtr = ALLOC(sizeof(LZ4_stream_t)); /* malloc-calloc always properly aligned */ + LZ4_stream_t* ctxPtr = (LZ4_stream_t*)ALLOC(sizeof(LZ4_stream_t)); /* malloc-calloc always properly aligned */ if (ctxPtr == NULL) return 0; #else LZ4_stream_t ctx; @@ -1094,23 +1432,9 @@ int LZ4_compress_fast(const char* source, char* dest, int inputSize, int maxOutp } -int LZ4_compress_default(const char* source, char* dest, int inputSize, int maxOutputSize) +int LZ4_compress_default(const char* src, char* dst, int srcSize, int maxOutputSize) { - return LZ4_compress_fast(source, dest, inputSize, maxOutputSize, 1); -} - - -/* hidden debug function */ -/* strangely enough, gcc generates faster code when this function is uncommented, even if unused */ -int LZ4_compress_fast_force(const char* source, char* dest, int inputSize, int maxOutputSize, int acceleration) -{ - LZ4_stream_t ctx; - LZ4_resetStream(&ctx); - - if (inputSize < LZ4_64Klimit) - return LZ4_compress_generic(&ctx.internal_donotuse, source, dest, inputSize, NULL, maxOutputSize, limitedOutput, byU16, noDict, noDictIssue, acceleration); - else - return LZ4_compress_generic(&ctx.internal_donotuse, source, dest, inputSize, NULL, maxOutputSize, limitedOutput, sizeof(void*)==8 ? byU32 : byPtr, noDict, noDictIssue, acceleration); + return LZ4_compress_fast(src, dst, srcSize, maxOutputSize, 1); } @@ -1119,7 +1443,8 @@ int LZ4_compress_fast_force(const char* source, char* dest, int inputSize, int m * _continue() call without resetting it. */ static int LZ4_compress_destSize_extState (LZ4_stream_t* state, const char* src, char* dst, int* srcSizePtr, int targetDstSize) { - LZ4_resetStream(state); + void* const s = LZ4_initStream(state, sizeof (*state)); + assert(s != NULL); (void)s; if (targetDstSize >= LZ4_compressBound(*srcSizePtr)) { /* compression success is guaranteed */ return LZ4_compress_fast_extState(state, src, dst, *srcSizePtr, targetDstSize, 1); @@ -1127,8 +1452,8 @@ static int LZ4_compress_destSize_extState (LZ4_stream_t* state, const char* src, if (*srcSizePtr < LZ4_64Klimit) { return LZ4_compress_generic(&state->internal_donotuse, src, dst, *srcSizePtr, srcSizePtr, targetDstSize, fillOutput, byU16, noDict, noDictIssue, 1); } else { - tableType_t const tableType = ((sizeof(void*)==4) && ((uptrval)src > MAX_DISTANCE)) ? byPtr : byU32; - return LZ4_compress_generic(&state->internal_donotuse, src, dst, *srcSizePtr, srcSizePtr, targetDstSize, fillOutput, tableType, noDict, noDictIssue, 1); + tableType_t const addrMode = ((sizeof(void*)==4) && ((uptrval)src > LZ4_DISTANCE_MAX)) ? byPtr : byU32; + return LZ4_compress_generic(&state->internal_donotuse, src, dst, *srcSizePtr, srcSizePtr, targetDstSize, fillOutput, addrMode, noDict, noDictIssue, 1); } } } @@ -1157,26 +1482,51 @@ int LZ4_compress_destSize(const char* src, char* dst, int* srcSizePtr, int targe * Streaming functions ********************************/ +#if !defined(LZ4_STATIC_LINKING_ONLY_DISABLE_MEMORY_ALLOCATION) LZ4_stream_t* LZ4_createStream(void) { - LZ4_stream_t* lz4s = (LZ4_stream_t*)ALLOC(sizeof(LZ4_stream_t)); - LZ4_STATIC_ASSERT(LZ4_STREAMSIZE >= sizeof(LZ4_stream_t_internal)); /* A compilation error here means LZ4_STREAMSIZE is not large enough */ + LZ4_stream_t* const lz4s = (LZ4_stream_t*)ALLOC(sizeof(LZ4_stream_t)); + LZ4_STATIC_ASSERT(sizeof(LZ4_stream_t) >= sizeof(LZ4_stream_t_internal)); DEBUGLOG(4, "LZ4_createStream %p", lz4s); if (lz4s == NULL) return NULL; - LZ4_resetStream(lz4s); + LZ4_initStream(lz4s, sizeof(*lz4s)); return lz4s; } +#endif +static size_t LZ4_stream_t_alignment(void) +{ +#if LZ4_ALIGN_TEST + typedef struct { char c; LZ4_stream_t t; } t_a; + return sizeof(t_a) - sizeof(LZ4_stream_t); +#else + return 1; /* effectively disabled */ +#endif +} + +LZ4_stream_t* LZ4_initStream (void* buffer, size_t size) +{ + DEBUGLOG(5, "LZ4_initStream"); + if (buffer == NULL) { return NULL; } + if (size < sizeof(LZ4_stream_t)) { return NULL; } + if (!LZ4_isAligned(buffer, LZ4_stream_t_alignment())) return NULL; + MEM_INIT(buffer, 0, sizeof(LZ4_stream_t_internal)); + return (LZ4_stream_t*)buffer; +} + +/* resetStream is now deprecated, + * prefer initStream() which is more general */ void LZ4_resetStream (LZ4_stream_t* LZ4_stream) { DEBUGLOG(5, "LZ4_resetStream (ctx:%p)", LZ4_stream); - MEM_INIT(LZ4_stream, 0, sizeof(LZ4_stream_t)); + MEM_INIT(LZ4_stream, 0, sizeof(LZ4_stream_t_internal)); } void LZ4_resetStream_fast(LZ4_stream_t* ctx) { LZ4_prepareTable(&(ctx->internal_donotuse), 0, byU32); } +#if !defined(LZ4_STATIC_LINKING_ONLY_DISABLE_MEMORY_ALLOCATION) int LZ4_freeStream (LZ4_stream_t* LZ4_stream) { if (!LZ4_stream) return 0; /* support free on NULL */ @@ -1184,6 +1534,7 @@ int LZ4_freeStream (LZ4_stream_t* LZ4_stream) FREEMEM(LZ4_stream); return (0); } +#endif #define HASH_UNIT sizeof(reg_t) @@ -1209,46 +1560,59 @@ int LZ4_loadDict (LZ4_stream_t* LZ4_dict, const char* dictionary, int dictSize) * there are only valid offsets in the window, which allows an optimization * in LZ4_compress_fast_continue() where it uses noDictIssue even when the * dictionary isn't a full 64k. */ - - if ((dictEnd - p) > 64 KB) p = dictEnd - 64 KB; - base = dictEnd - 64 KB - dict->currentOffset; - dict->dictionary = p; - dict->dictSize = (U32)(dictEnd - p); dict->currentOffset += 64 KB; - dict->tableType = tableType; if (dictSize < (int)HASH_UNIT) { return 0; } + if ((dictEnd - p) > 64 KB) p = dictEnd - 64 KB; + base = dictEnd - dict->currentOffset; + dict->dictionary = p; + dict->dictSize = (U32)(dictEnd - p); + dict->tableType = (U32)tableType; + while (p <= dictEnd-HASH_UNIT) { LZ4_putPosition(p, dict->hashTable, tableType, base); p+=3; } - return dict->dictSize; + return (int)dict->dictSize; } -void LZ4_attach_dictionary(LZ4_stream_t *working_stream, const LZ4_stream_t *dictionary_stream) { - if (dictionary_stream != NULL) { +void LZ4_attach_dictionary(LZ4_stream_t* workingStream, const LZ4_stream_t* dictionaryStream) +{ + const LZ4_stream_t_internal* dictCtx = (dictionaryStream == NULL) ? NULL : + &(dictionaryStream->internal_donotuse); + + DEBUGLOG(4, "LZ4_attach_dictionary (%p, %p, size %u)", + workingStream, dictionaryStream, + dictCtx != NULL ? dictCtx->dictSize : 0); + + if (dictCtx != NULL) { /* If the current offset is zero, we will never look in the * external dictionary context, since there is no value a table * entry can take that indicate a miss. In that case, we need * to bump the offset to something non-zero. */ - if (working_stream->internal_donotuse.currentOffset == 0) { - working_stream->internal_donotuse.currentOffset = 64 KB; + if (workingStream->internal_donotuse.currentOffset == 0) { + workingStream->internal_donotuse.currentOffset = 64 KB; + } + + /* Don't actually attach an empty dictionary. + */ + if (dictCtx->dictSize == 0) { + dictCtx = NULL; } - working_stream->internal_donotuse.dictCtx = &(dictionary_stream->internal_donotuse); - } else { - working_stream->internal_donotuse.dictCtx = NULL; } + workingStream->internal_donotuse.dictCtx = dictCtx; } static void LZ4_renormDictT(LZ4_stream_t_internal* LZ4_dict, int nextSize) { - if (LZ4_dict->currentOffset + nextSize > 0x80000000) { /* potential ptrdiff_t overflow (32-bits mode) */ + assert(nextSize >= 0); + if (LZ4_dict->currentOffset + (unsigned)nextSize > 0x80000000) { /* potential ptrdiff_t overflow (32-bits mode) */ /* rescale hash table */ U32 const delta = LZ4_dict->currentOffset - 64 KB; const BYTE* dictEnd = LZ4_dict->dictionary + LZ4_dict->dictSize; @@ -1265,39 +1629,46 @@ static void LZ4_renormDictT(LZ4_stream_t_internal* LZ4_dict, int nextSize) } -int LZ4_compress_fast_continue (LZ4_stream_t* LZ4_stream, const char* source, char* dest, int inputSize, int maxOutputSize, int acceleration) +int LZ4_compress_fast_continue (LZ4_stream_t* LZ4_stream, + const char* source, char* dest, + int inputSize, int maxOutputSize, + int acceleration) { const tableType_t tableType = byU32; - LZ4_stream_t_internal* streamPtr = &LZ4_stream->internal_donotuse; - const BYTE* dictEnd = streamPtr->dictionary + streamPtr->dictSize; + LZ4_stream_t_internal* const streamPtr = &LZ4_stream->internal_donotuse; + const char* dictEnd = streamPtr->dictSize ? (const char*)streamPtr->dictionary + streamPtr->dictSize : NULL; - DEBUGLOG(5, "LZ4_compress_fast_continue (inputSize=%i)", inputSize); + DEBUGLOG(5, "LZ4_compress_fast_continue (inputSize=%i, dictSize=%u)", inputSize, streamPtr->dictSize); - if (streamPtr->initCheck) return 0; /* Uninitialized structure detected */ - LZ4_renormDictT(streamPtr, inputSize); /* avoid index overflow */ - if (acceleration < 1) acceleration = ACCELERATION_DEFAULT; + LZ4_renormDictT(streamPtr, inputSize); /* fix index overflow */ + if (acceleration < 1) acceleration = LZ4_ACCELERATION_DEFAULT; + if (acceleration > LZ4_ACCELERATION_MAX) acceleration = LZ4_ACCELERATION_MAX; /* invalidate tiny dictionaries */ - if ( (streamPtr->dictSize-1 < 4) /* intentional underflow */ - && (dictEnd != (const BYTE*)source) ) { + if ( (streamPtr->dictSize < 4) /* tiny dictionary : not enough for a hash */ + && (dictEnd != source) /* prefix mode */ + && (inputSize > 0) /* tolerance : don't lose history, in case next invocation would use prefix mode */ + && (streamPtr->dictCtx == NULL) /* usingDictCtx */ + ) { DEBUGLOG(5, "LZ4_compress_fast_continue: dictSize(%u) at addr:%p is too small", streamPtr->dictSize, streamPtr->dictionary); + /* remove dictionary existence from history, to employ faster prefix mode */ streamPtr->dictSize = 0; streamPtr->dictionary = (const BYTE*)source; - dictEnd = (const BYTE*)source; + dictEnd = source; } /* Check overlapping input/dictionary space */ - { const BYTE* sourceEnd = (const BYTE*) source + inputSize; - if ((sourceEnd > streamPtr->dictionary) && (sourceEnd < dictEnd)) { + { const char* const sourceEnd = source + inputSize; + if ((sourceEnd > (const char*)streamPtr->dictionary) && (sourceEnd < dictEnd)) { streamPtr->dictSize = (U32)(dictEnd - sourceEnd); if (streamPtr->dictSize > 64 KB) streamPtr->dictSize = 64 KB; if (streamPtr->dictSize < 4) streamPtr->dictSize = 0; - streamPtr->dictionary = dictEnd - streamPtr->dictSize; + streamPtr->dictionary = (const BYTE*)dictEnd - streamPtr->dictSize; } } /* prefix mode : source data follows dictionary */ - if (dictEnd == (const BYTE*)source) { + if (dictEnd == source) { if ((streamPtr->dictSize < 64 KB) && (streamPtr->dictSize < streamPtr->currentOffset)) return LZ4_compress_generic(streamPtr, source, dest, inputSize, NULL, maxOutputSize, limitedOutput, tableType, withPrefix64k, dictSmall, acceleration); else @@ -1318,12 +1689,12 @@ int LZ4_compress_fast_continue (LZ4_stream_t* LZ4_stream, const char* source, ch * cost to copy the dictionary's tables into the active context, * so that the compression loop is only looking into one table. */ - memcpy(streamPtr, streamPtr->dictCtx, sizeof(LZ4_stream_t)); + LZ4_memcpy(streamPtr, streamPtr->dictCtx, sizeof(*streamPtr)); result = LZ4_compress_generic(streamPtr, source, dest, inputSize, NULL, maxOutputSize, limitedOutput, tableType, usingExtDict, noDictIssue, acceleration); } else { result = LZ4_compress_generic(streamPtr, source, dest, inputSize, NULL, maxOutputSize, limitedOutput, tableType, usingDictCtx, noDictIssue, acceleration); } - } else { + } else { /* small data <= 4 KB */ if ((streamPtr->dictSize < 64 KB) && (streamPtr->dictSize < streamPtr->currentOffset)) { result = LZ4_compress_generic(streamPtr, source, dest, inputSize, NULL, maxOutputSize, limitedOutput, tableType, usingExtDict, dictSmall, acceleration); } else { @@ -1361,19 +1732,25 @@ int LZ4_compress_forceExtDict (LZ4_stream_t* LZ4_dict, const char* source, char* /*! LZ4_saveDict() : * If previously compressed data block is not guaranteed to remain available at its memory location, * save it into a safer place (char* safeBuffer). - * Note : you don't need to call LZ4_loadDict() afterwards, - * dictionary is immediately usable, you can therefore call LZ4_compress_fast_continue(). - * Return : saved dictionary size in bytes (necessarily <= dictSize), or 0 if error. + * Note : no need to call LZ4_loadDict() afterwards, dictionary is immediately usable, + * one can therefore call LZ4_compress_fast_continue() right after. + * @return : saved dictionary size in bytes (necessarily <= dictSize), or 0 if error. */ int LZ4_saveDict (LZ4_stream_t* LZ4_dict, char* safeBuffer, int dictSize) { LZ4_stream_t_internal* const dict = &LZ4_dict->internal_donotuse; - const BYTE* const previousDictEnd = dict->dictionary + dict->dictSize; - if ((U32)dictSize > 64 KB) dictSize = 64 KB; /* useless to define a dictionary > 64 KB */ - if ((U32)dictSize > dict->dictSize) dictSize = dict->dictSize; + DEBUGLOG(5, "LZ4_saveDict : dictSize=%i, safeBuffer=%p", dictSize, safeBuffer); + + if ((U32)dictSize > 64 KB) { dictSize = 64 KB; } /* useless to define a dictionary > 64 KB */ + if ((U32)dictSize > dict->dictSize) { dictSize = (int)dict->dictSize; } - memmove(safeBuffer, previousDictEnd - dictSize, dictSize); + if (safeBuffer == NULL) assert(dictSize == 0); + if (dictSize > 0) { + const BYTE* const previousDictEnd = dict->dictionary + dict->dictSize; + assert(dict->dictionary); + LZ4_memmove(safeBuffer, previousDictEnd - dictSize, (size_t)dictSize); + } dict->dictionary = (const BYTE*)safeBuffer; dict->dictSize = (U32)dictSize; @@ -1387,12 +1764,169 @@ int LZ4_saveDict (LZ4_stream_t* LZ4_dict, char* safeBuffer, int dictSize) * Decompression functions ********************************/ -typedef enum { endOnOutputSize = 0, endOnInputSize = 1 } endCondition_directive; typedef enum { decode_full_block = 0, partial_decode = 1 } earlyEnd_directive; #undef MIN #define MIN(a,b) ( (a) < (b) ? (a) : (b) ) + +/* variant for decompress_unsafe() + * does not know end of input + * presumes input is well formed + * note : will consume at least one byte */ +size_t read_long_length_no_check(const BYTE** pp) +{ + size_t b, l = 0; + do { b = **pp; (*pp)++; l += b; } while (b==255); + DEBUGLOG(6, "read_long_length_no_check: +length=%zu using %zu input bytes", l, l/255 + 1) + return l; +} + +/* core decoder variant for LZ4_decompress_fast*() + * for legacy support only : these entry points are deprecated. + * - Presumes input is correctly formed (no defense vs malformed inputs) + * - Does not know input size (presume input buffer is "large enough") + * - Decompress a full block (only) + * @return : nb of bytes read from input. + * Note : this variant is not optimized for speed, just for maintenance. + * the goal is to remove support of decompress_fast*() variants by v2.0 +**/ +LZ4_FORCE_INLINE int +LZ4_decompress_unsafe_generic( + const BYTE* const istart, + BYTE* const ostart, + int decompressedSize, + + size_t prefixSize, + const BYTE* const dictStart, /* only if dict==usingExtDict */ + const size_t dictSize /* note: =0 if dictStart==NULL */ + ) +{ + const BYTE* ip = istart; + BYTE* op = (BYTE*)ostart; + BYTE* const oend = ostart + decompressedSize; + const BYTE* const prefixStart = ostart - prefixSize; + + DEBUGLOG(5, "LZ4_decompress_unsafe_generic"); + if (dictStart == NULL) assert(dictSize == 0); + + while (1) { + /* start new sequence */ + unsigned token = *ip++; + + /* literals */ + { size_t ll = token >> ML_BITS; + if (ll==15) { + /* long literal length */ + ll += read_long_length_no_check(&ip); + } + if ((size_t)(oend-op) < ll) return -1; /* output buffer overflow */ + LZ4_memmove(op, ip, ll); /* support in-place decompression */ + op += ll; + ip += ll; + if ((size_t)(oend-op) < MFLIMIT) { + if (op==oend) break; /* end of block */ + DEBUGLOG(5, "invalid: literals end at distance %zi from end of block", oend-op); + /* incorrect end of block : + * last match must start at least MFLIMIT==12 bytes before end of output block */ + return -1; + } } + + /* match */ + { size_t ml = token & 15; + size_t const offset = LZ4_readLE16(ip); + ip+=2; + + if (ml==15) { + /* long literal length */ + ml += read_long_length_no_check(&ip); + } + ml += MINMATCH; + + if ((size_t)(oend-op) < ml) return -1; /* output buffer overflow */ + + { const BYTE* match = op - offset; + + /* out of range */ + if (offset > (size_t)(op - prefixStart) + dictSize) { + DEBUGLOG(6, "offset out of range"); + return -1; + } + + /* check special case : extDict */ + if (offset > (size_t)(op - prefixStart)) { + /* extDict scenario */ + const BYTE* const dictEnd = dictStart + dictSize; + const BYTE* extMatch = dictEnd - (offset - (size_t)(op-prefixStart)); + size_t const extml = (size_t)(dictEnd - extMatch); + if (extml > ml) { + /* match entirely within extDict */ + LZ4_memmove(op, extMatch, ml); + op += ml; + ml = 0; + } else { + /* match split between extDict & prefix */ + LZ4_memmove(op, extMatch, extml); + op += extml; + ml -= extml; + } + match = prefixStart; + } + + /* match copy - slow variant, supporting overlap copy */ + { size_t u; + for (u=0; u= ipmax before start of loop. Returns initial_error if so. + * @error (output) - error code. Must be set to 0 before call. +**/ +typedef size_t Rvl_t; +static const Rvl_t rvl_error = (Rvl_t)(-1); +LZ4_FORCE_INLINE Rvl_t +read_variable_length(const BYTE** ip, const BYTE* ilimit, + int initial_check) +{ + Rvl_t s, length = 0; + assert(ip != NULL); + assert(*ip != NULL); + assert(ilimit != NULL); + if (initial_check && unlikely((*ip) >= ilimit)) { /* read limit reached */ + return rvl_error; + } + do { + s = **ip; + (*ip)++; + length += s; + if (unlikely((*ip) > ilimit)) { /* read limit reached */ + return rvl_error; + } + /* accumulator overflow detection (32-bit mode only) */ + if ((sizeof(length)<8) && unlikely(length > ((Rvl_t)(-1)/2)) ) { + return rvl_error; + } + } while (s==255); + + return length; +} + /*! LZ4_decompress_generic() : * This generic decompression function covers all use cases. * It shall be instantiated several times, using different sets of directives. @@ -1406,7 +1940,6 @@ LZ4_decompress_generic( int srcSize, int outputSize, /* If endOnInput==endOnInputSize, this value is `dstCapacity` */ - endCondition_directive endOnInput, /* endOnOutputSize, endOnInputSize */ earlyEnd_directive partialDecoding, /* full, partial */ dict_directive dict, /* noDict, withPrefix64k, usingExtDict */ const BYTE* const lowPrefix, /* always <= dst, == dst when no prefix */ @@ -1414,308 +1947,500 @@ LZ4_decompress_generic( const size_t dictSize /* note : = 0 if noDict */ ) { - const BYTE* ip = (const BYTE*) src; - const BYTE* const iend = ip + srcSize; + if ((src == NULL) || (outputSize < 0)) { return -1; } - BYTE* op = (BYTE*) dst; - BYTE* const oend = op + outputSize; - BYTE* cpy; + { const BYTE* ip = (const BYTE*) src; + const BYTE* const iend = ip + srcSize; - const BYTE* const dictEnd = (const BYTE*)dictStart + dictSize; - const unsigned inc32table[8] = {0, 1, 2, 1, 0, 4, 4, 4}; - const int dec64table[8] = {0, 0, 0, -1, -4, 1, 2, 3}; + BYTE* op = (BYTE*) dst; + BYTE* const oend = op + outputSize; + BYTE* cpy; - const int safeDecode = (endOnInput==endOnInputSize); - const int checkOffset = ((safeDecode) && (dictSize < (int)(64 KB))); + const BYTE* const dictEnd = (dictStart == NULL) ? NULL : dictStart + dictSize; - /* Set up the "end" pointers for the shortcut. */ - const BYTE* const shortiend = iend - (endOnInput ? 14 : 8) /*maxLL*/ - 2 /*offset*/; - const BYTE* const shortoend = oend - (endOnInput ? 14 : 8) /*maxLL*/ - 18 /*maxML*/; + const int checkOffset = (dictSize < (int)(64 KB)); - DEBUGLOG(5, "LZ4_decompress_generic (srcSize:%i, dstSize:%i)", srcSize, outputSize); - /* Special cases */ - assert(lowPrefix <= op); - assert(src != NULL); - if ((endOnInput) && (unlikely(outputSize==0))) return ((srcSize==1) && (*ip==0)) ? 0 : -1; /* Empty output buffer */ - if ((!endOnInput) && (unlikely(outputSize==0))) return (*ip==0 ? 1 : -1); - if ((endOnInput) && unlikely(srcSize==0)) return -1; + /* Set up the "end" pointers for the shortcut. */ + const BYTE* const shortiend = iend - 14 /*maxLL*/ - 2 /*offset*/; + const BYTE* const shortoend = oend - 14 /*maxLL*/ - 18 /*maxML*/; - /* Main Loop : decode sequences */ - while (1) { const BYTE* match; size_t offset; + unsigned token; + size_t length; - unsigned const token = *ip++; - size_t length = token >> ML_BITS; /* literal length */ - assert(!endOnInput || ip <= iend); /* ip < iend before the increment */ + DEBUGLOG(5, "LZ4_decompress_generic (srcSize:%i, dstSize:%i)", srcSize, outputSize); - /* A two-stage shortcut for the most common case: - * 1) If the literal length is 0..14, and there is enough space, - * enter the shortcut and copy 16 bytes on behalf of the literals - * (in the fast mode, only 8 bytes can be safely copied this way). - * 2) Further if the match length is 4..18, copy 18 bytes in a similar - * manner; but we ensure that there's enough space in the output for - * those 18 bytes earlier, upon entering the shortcut (in other words, - * there is a combined check for both stages). - */ - if ( (endOnInput ? length != RUN_MASK : length <= 8) - /* strictly "less than" on input, to re-enter the loop with at least one byte */ - && likely((endOnInput ? ip < shortiend : 1) & (op <= shortoend)) ) { - /* Copy the literals */ - memcpy(op, ip, endOnInput ? 16 : 8); - op += length; ip += length; - - /* The second stage: prepare for match copying, decode full info. - * If it doesn't work out, the info won't be wasted. */ - length = token & ML_MASK; /* match length */ - offset = LZ4_readLE16(ip); ip += 2; - match = op - offset; - assert(match <= op); /* check overflow */ - - /* Do not deal with overlapping matches. */ - if ( (length != ML_MASK) - && (offset >= 8) - && (dict==withPrefix64k || match >= lowPrefix) ) { - /* Copy the match. */ - memcpy(op + 0, match + 0, 8); - memcpy(op + 8, match + 8, 8); - memcpy(op +16, match +16, 2); - op += length + MINMATCH; - /* Both stages worked, load the next token. */ - continue; - } - - /* The second stage didn't work out, but the info is ready. - * Propel it right to the point of match copying. */ - goto _copy_match; + /* Special cases */ + assert(lowPrefix <= op); + if (unlikely(outputSize==0)) { + /* Empty output buffer */ + if (partialDecoding) return 0; + return ((srcSize==1) && (*ip==0)) ? 0 : -1; } - - /* decode literal length */ - if (length == RUN_MASK) { - unsigned s; - if (unlikely(endOnInput ? ip >= iend-RUN_MASK : 0)) goto _output_error; /* overflow detection */ - do { - s = *ip++; - length += s; - } while ( likely(endOnInput ? ip= WILDCOPYLENGTH); - if ( ((endOnInput) && ((cpy>oend-MFLIMIT) || (ip+length>iend-(2+1+LASTLITERALS))) ) - || ((!endOnInput) && (cpy>oend-WILDCOPYLENGTH)) ) - { - if (partialDecoding) { - if (cpy > oend) { cpy = oend; length = oend-op; } /* Partial decoding : stop in the middle of literal segment */ - if ((endOnInput) && (ip+length > iend)) goto _output_error; /* Error : read attempt beyond end of input buffer */ + /* Fast loop : decode sequences as long as output < oend-FASTLOOP_SAFE_DISTANCE */ + while (1) { + /* Main fastloop assertion: We can always wildcopy FASTLOOP_SAFE_DISTANCE */ + assert(oend - op >= FASTLOOP_SAFE_DISTANCE); + assert(ip < iend); + token = *ip++; + length = token >> ML_BITS; /* literal length */ + + /* decode literal length */ + if (length == RUN_MASK) { + size_t const addl = read_variable_length(&ip, iend-RUN_MASK, 1); + if (addl == rvl_error) { goto _output_error; } + length += addl; + if (unlikely((uptrval)(op)+length<(uptrval)(op))) { goto _output_error; } /* overflow detection */ + if (unlikely((uptrval)(ip)+length<(uptrval)(ip))) { goto _output_error; } /* overflow detection */ + + /* copy literals */ + cpy = op+length; + LZ4_STATIC_ASSERT(MFLIMIT >= WILDCOPYLENGTH); + if ((cpy>oend-32) || (ip+length>iend-32)) { goto safe_literal_copy; } + LZ4_wildCopy32(op, ip, cpy); + ip += length; op = cpy; } else { - if ((!endOnInput) && (cpy != oend)) goto _output_error; /* Error : block decoding must stop exactly there */ - if ((endOnInput) && ((ip+length != iend) || (cpy > oend))) goto _output_error; /* Error : input must be consumed */ - } - memcpy(op, ip, length); - ip += length; - op += length; - if (!partialDecoding || (cpy == oend)) { - /* Necessarily EOF, due to parsing restrictions */ - break; + cpy = op+length; + DEBUGLOG(7, "copy %u bytes in a 16-bytes stripe", (unsigned)length); + /* We don't need to check oend, since we check it once for each loop below */ + if (ip > iend-(16 + 1/*max lit + offset + nextToken*/)) { goto safe_literal_copy; } + /* Literals can only be <= 14, but hope compilers optimize better when copy by a register size */ + LZ4_memcpy(op, ip, 16); + ip += length; op = cpy; } - } else { - LZ4_wildCopy(op, ip, cpy); /* may overwrite up to WILDCOPYLENGTH beyond cpy */ - ip += length; op = cpy; - } + /* get offset */ + offset = LZ4_readLE16(ip); ip+=2; + match = op - offset; + assert(match <= op); /* overflow check */ + + /* get matchlength */ + length = token & ML_MASK; + + if (length == ML_MASK) { + size_t const addl = read_variable_length(&ip, iend - LASTLITERALS + 1, 0); + if (addl == rvl_error) { goto _output_error; } + length += addl; + length += MINMATCH; + if (unlikely((uptrval)(op)+length<(uptrval)op)) { goto _output_error; } /* overflow detection */ + if ((checkOffset) && (unlikely(match + dictSize < lowPrefix))) { goto _output_error; } /* Error : offset outside buffers */ + if (op + length >= oend - FASTLOOP_SAFE_DISTANCE) { + goto safe_match_copy; + } + } else { + length += MINMATCH; + if (op + length >= oend - FASTLOOP_SAFE_DISTANCE) { + goto safe_match_copy; + } - /* get offset */ - offset = LZ4_readLE16(ip); ip+=2; - match = op - offset; + /* Fastpath check: skip LZ4_wildCopy32 when true */ + if ((dict == withPrefix64k) || (match >= lowPrefix)) { + if (offset >= 8) { + assert(match >= lowPrefix); + assert(match <= op); + assert(op + 18 <= oend); + + LZ4_memcpy(op, match, 8); + LZ4_memcpy(op+8, match+8, 8); + LZ4_memcpy(op+16, match+16, 2); + op += length; + continue; + } } } + + if (checkOffset && (unlikely(match + dictSize < lowPrefix))) { goto _output_error; } /* Error : offset outside buffers */ + /* match starting within external dictionary */ + if ((dict==usingExtDict) && (match < lowPrefix)) { + assert(dictEnd != NULL); + if (unlikely(op+length > oend-LASTLITERALS)) { + if (partialDecoding) { + DEBUGLOG(7, "partialDecoding: dictionary match, close to dstEnd"); + length = MIN(length, (size_t)(oend-op)); + } else { + goto _output_error; /* end-of-block condition violated */ + } } - /* get matchlength */ - length = token & ML_MASK; + if (length <= (size_t)(lowPrefix-match)) { + /* match fits entirely within external dictionary : just copy */ + LZ4_memmove(op, dictEnd - (lowPrefix-match), length); + op += length; + } else { + /* match stretches into both external dictionary and current block */ + size_t const copySize = (size_t)(lowPrefix - match); + size_t const restSize = length - copySize; + LZ4_memcpy(op, dictEnd - copySize, copySize); + op += copySize; + if (restSize > (size_t)(op - lowPrefix)) { /* overlap copy */ + BYTE* const endOfMatch = op + restSize; + const BYTE* copyFrom = lowPrefix; + while (op < endOfMatch) { *op++ = *copyFrom++; } + } else { + LZ4_memcpy(op, lowPrefix, restSize); + op += restSize; + } } + continue; + } -_copy_match: - if ((checkOffset) && (unlikely(match + dictSize < lowPrefix))) goto _output_error; /* Error : offset outside buffers */ - if (!partialDecoding) { - assert(oend > op); - assert(oend - op >= 4); - LZ4_write32(op, 0); /* silence an msan warning when offset==0; costs <1%; */ - } /* note : when partialDecoding, there is no guarantee that at least 4 bytes remain available in output buffer */ + /* copy match within block */ + cpy = op + length; - if (length == ML_MASK) { - unsigned s; - do { - s = *ip++; - if ((endOnInput) && (ip > iend-LASTLITERALS)) goto _output_error; - length += s; - } while (s==255); - if ((safeDecode) && unlikely((uptrval)(op)+length<(uptrval)op)) goto _output_error; /* overflow detection */ + assert((op <= oend) && (oend-op >= 32)); + if (unlikely(offset<16)) { + LZ4_memcpy_using_offset(op, match, cpy, offset); + } else { + LZ4_wildCopy32(op, match, cpy); + } + + op = cpy; /* wildcopy correction */ } - length += MINMATCH; + safe_decode: +#endif + + /* Main Loop : decode remaining sequences where output < FASTLOOP_SAFE_DISTANCE */ + while (1) { + assert(ip < iend); + token = *ip++; + length = token >> ML_BITS; /* literal length */ + + /* A two-stage shortcut for the most common case: + * 1) If the literal length is 0..14, and there is enough space, + * enter the shortcut and copy 16 bytes on behalf of the literals + * (in the fast mode, only 8 bytes can be safely copied this way). + * 2) Further if the match length is 4..18, copy 18 bytes in a similar + * manner; but we ensure that there's enough space in the output for + * those 18 bytes earlier, upon entering the shortcut (in other words, + * there is a combined check for both stages). + */ + if ( (length != RUN_MASK) + /* strictly "less than" on input, to re-enter the loop with at least one byte */ + && likely((ip < shortiend) & (op <= shortoend)) ) { + /* Copy the literals */ + LZ4_memcpy(op, ip, 16); + op += length; ip += length; + + /* The second stage: prepare for match copying, decode full info. + * If it doesn't work out, the info won't be wasted. */ + length = token & ML_MASK; /* match length */ + offset = LZ4_readLE16(ip); ip += 2; + match = op - offset; + assert(match <= op); /* check overflow */ + + /* Do not deal with overlapping matches. */ + if ( (length != ML_MASK) + && (offset >= 8) + && (dict==withPrefix64k || match >= lowPrefix) ) { + /* Copy the match. */ + LZ4_memcpy(op + 0, match + 0, 8); + LZ4_memcpy(op + 8, match + 8, 8); + LZ4_memcpy(op +16, match +16, 2); + op += length + MINMATCH; + /* Both stages worked, load the next token. */ + continue; + } + + /* The second stage didn't work out, but the info is ready. + * Propel it right to the point of match copying. */ + goto _copy_match; + } - /* match starting within external dictionary */ - if ((dict==usingExtDict) && (match < lowPrefix)) { - if (unlikely(op+length > oend-LASTLITERALS)) { - if (partialDecoding) length = MIN(length, (size_t)(oend-op)); - else goto _output_error; /* doesn't respect parsing restriction */ + /* decode literal length */ + if (length == RUN_MASK) { + size_t const addl = read_variable_length(&ip, iend-RUN_MASK, 1); + if (addl == rvl_error) { goto _output_error; } + length += addl; + if (unlikely((uptrval)(op)+length<(uptrval)(op))) { goto _output_error; } /* overflow detection */ + if (unlikely((uptrval)(ip)+length<(uptrval)(ip))) { goto _output_error; } /* overflow detection */ } - if (length <= (size_t)(lowPrefix-match)) { - /* match fits entirely within external dictionary : just copy */ - memmove(op, dictEnd - (lowPrefix-match), length); + /* copy literals */ + cpy = op+length; +#if LZ4_FAST_DEC_LOOP + safe_literal_copy: +#endif + LZ4_STATIC_ASSERT(MFLIMIT >= WILDCOPYLENGTH); + if ((cpy>oend-MFLIMIT) || (ip+length>iend-(2+1+LASTLITERALS))) { + /* We've either hit the input parsing restriction or the output parsing restriction. + * In the normal scenario, decoding a full block, it must be the last sequence, + * otherwise it's an error (invalid input or dimensions). + * In partialDecoding scenario, it's necessary to ensure there is no buffer overflow. + */ + if (partialDecoding) { + /* Since we are partial decoding we may be in this block because of the output parsing + * restriction, which is not valid since the output buffer is allowed to be undersized. + */ + DEBUGLOG(7, "partialDecoding: copying literals, close to input or output end") + DEBUGLOG(7, "partialDecoding: literal length = %u", (unsigned)length); + DEBUGLOG(7, "partialDecoding: remaining space in dstBuffer : %i", (int)(oend - op)); + DEBUGLOG(7, "partialDecoding: remaining space in srcBuffer : %i", (int)(iend - ip)); + /* Finishing in the middle of a literals segment, + * due to lack of input. + */ + if (ip+length > iend) { + length = (size_t)(iend-ip); + cpy = op + length; + } + /* Finishing in the middle of a literals segment, + * due to lack of output space. + */ + if (cpy > oend) { + cpy = oend; + assert(op<=oend); + length = (size_t)(oend-op); + } + } else { + /* We must be on the last sequence (or invalid) because of the parsing limitations + * so check that we exactly consume the input and don't overrun the output buffer. + */ + if ((ip+length != iend) || (cpy > oend)) { + DEBUGLOG(6, "should have been last run of literals") + DEBUGLOG(6, "ip(%p) + length(%i) = %p != iend (%p)", ip, (int)length, ip+length, iend); + DEBUGLOG(6, "or cpy(%p) > oend(%p)", cpy, oend); + goto _output_error; + } + } + LZ4_memmove(op, ip, length); /* supports overlapping memory regions, for in-place decompression scenarios */ + ip += length; op += length; + /* Necessarily EOF when !partialDecoding. + * When partialDecoding, it is EOF if we've either + * filled the output buffer or + * can't proceed with reading an offset for following match. + */ + if (!partialDecoding || (cpy == oend) || (ip >= (iend-2))) { + break; + } } else { - /* match stretches into both external dictionary and current block */ - size_t const copySize = (size_t)(lowPrefix - match); - size_t const restSize = length - copySize; - memcpy(op, dictEnd - copySize, copySize); - op += copySize; - if (restSize > (size_t)(op - lowPrefix)) { /* overlap copy */ - BYTE* const endOfMatch = op + restSize; - const BYTE* copyFrom = lowPrefix; - while (op < endOfMatch) *op++ = *copyFrom++; + LZ4_wildCopy8(op, ip, cpy); /* can overwrite up to 8 bytes beyond cpy */ + ip += length; op = cpy; + } + + /* get offset */ + offset = LZ4_readLE16(ip); ip+=2; + match = op - offset; + + /* get matchlength */ + length = token & ML_MASK; + + _copy_match: + if (length == ML_MASK) { + size_t const addl = read_variable_length(&ip, iend - LASTLITERALS + 1, 0); + if (addl == rvl_error) { goto _output_error; } + length += addl; + if (unlikely((uptrval)(op)+length<(uptrval)op)) goto _output_error; /* overflow detection */ + } + length += MINMATCH; + +#if LZ4_FAST_DEC_LOOP + safe_match_copy: +#endif + if ((checkOffset) && (unlikely(match + dictSize < lowPrefix))) goto _output_error; /* Error : offset outside buffers */ + /* match starting within external dictionary */ + if ((dict==usingExtDict) && (match < lowPrefix)) { + assert(dictEnd != NULL); + if (unlikely(op+length > oend-LASTLITERALS)) { + if (partialDecoding) length = MIN(length, (size_t)(oend-op)); + else goto _output_error; /* doesn't respect parsing restriction */ + } + + if (length <= (size_t)(lowPrefix-match)) { + /* match fits entirely within external dictionary : just copy */ + LZ4_memmove(op, dictEnd - (lowPrefix-match), length); + op += length; } else { - memcpy(op, lowPrefix, restSize); - op += restSize; - } } - continue; - } + /* match stretches into both external dictionary and current block */ + size_t const copySize = (size_t)(lowPrefix - match); + size_t const restSize = length - copySize; + LZ4_memcpy(op, dictEnd - copySize, copySize); + op += copySize; + if (restSize > (size_t)(op - lowPrefix)) { /* overlap copy */ + BYTE* const endOfMatch = op + restSize; + const BYTE* copyFrom = lowPrefix; + while (op < endOfMatch) *op++ = *copyFrom++; + } else { + LZ4_memcpy(op, lowPrefix, restSize); + op += restSize; + } } + continue; + } + assert(match >= lowPrefix); + + /* copy match within block */ + cpy = op + length; + + /* partialDecoding : may end anywhere within the block */ + assert(op<=oend); + if (partialDecoding && (cpy > oend-MATCH_SAFEGUARD_DISTANCE)) { + size_t const mlen = MIN(length, (size_t)(oend-op)); + const BYTE* const matchEnd = match + mlen; + BYTE* const copyEnd = op + mlen; + if (matchEnd > op) { /* overlap copy */ + while (op < copyEnd) { *op++ = *match++; } + } else { + LZ4_memcpy(op, match, mlen); + } + op = copyEnd; + if (op == oend) { break; } + continue; + } - /* copy match within block */ - cpy = op + length; - - /* partialDecoding : may not respect endBlock parsing restrictions */ - assert(op<=oend); - if (partialDecoding && (cpy > oend-MATCH_SAFEGUARD_DISTANCE)) { - size_t const mlen = MIN(length, (size_t)(oend-op)); - const BYTE* const matchEnd = match + mlen; - BYTE* const copyEnd = op + mlen; - if (matchEnd > op) { /* overlap copy */ - while (op < copyEnd) *op++ = *match++; + if (unlikely(offset<8)) { + LZ4_write32(op, 0); /* silence msan warning when offset==0 */ + op[0] = match[0]; + op[1] = match[1]; + op[2] = match[2]; + op[3] = match[3]; + match += inc32table[offset]; + LZ4_memcpy(op+4, match, 4); + match -= dec64table[offset]; } else { - memcpy(op, match, mlen); + LZ4_memcpy(op, match, 8); + match += 8; } - op = copyEnd; - if (op==oend) break; - continue; - } - - if (unlikely(offset<8)) { - op[0] = match[0]; - op[1] = match[1]; - op[2] = match[2]; - op[3] = match[3]; - match += inc32table[offset]; - memcpy(op+4, match, 4); - match -= dec64table[offset]; - } else { - memcpy(op, match, 8); - match += 8; - } - op += 8; - - if (unlikely(cpy > oend-MATCH_SAFEGUARD_DISTANCE)) { - BYTE* const oCopyLimit = oend - (WILDCOPYLENGTH-1); - if (cpy > oend-LASTLITERALS) goto _output_error; /* Error : last LASTLITERALS bytes must be literals (uncompressed) */ - if (op < oCopyLimit) { - LZ4_wildCopy(op, match, oCopyLimit); - match += oCopyLimit - op; - op = oCopyLimit; + op += 8; + + if (unlikely(cpy > oend-MATCH_SAFEGUARD_DISTANCE)) { + BYTE* const oCopyLimit = oend - (WILDCOPYLENGTH-1); + if (cpy > oend-LASTLITERALS) { goto _output_error; } /* Error : last LASTLITERALS bytes must be literals (uncompressed) */ + if (op < oCopyLimit) { + LZ4_wildCopy8(op, match, oCopyLimit); + match += oCopyLimit - op; + op = oCopyLimit; + } + while (op < cpy) { *op++ = *match++; } + } else { + LZ4_memcpy(op, match, 8); + if (length > 16) { LZ4_wildCopy8(op+8, match+8, cpy); } } - while (op < cpy) *op++ = *match++; - } else { - memcpy(op, match, 8); - if (length > 16) LZ4_wildCopy(op+8, match+8, cpy); + op = cpy; /* wildcopy correction */ } - op = cpy; /* wildcopy correction */ - } - /* end of decoding */ - if (endOnInput) - return (int) (((char*)op)-dst); /* Nb of output bytes decoded */ - else - return (int) (((const char*)ip)-src); /* Nb of input bytes read */ + /* end of decoding */ + DEBUGLOG(5, "decoded %i bytes", (int) (((char*)op)-dst)); + return (int) (((char*)op)-dst); /* Nb of output bytes decoded */ - /* Overflow error detected */ -_output_error: - return (int) (-(((const char*)ip)-src))-1; + /* Overflow error detected */ + _output_error: + return (int) (-(((const char*)ip)-src))-1; + } } /*===== Instantiate the API decoding functions. =====*/ -LZ4_FORCE_O2_GCC_PPC64LE +LZ4_FORCE_O2 int LZ4_decompress_safe(const char* source, char* dest, int compressedSize, int maxDecompressedSize) { return LZ4_decompress_generic(source, dest, compressedSize, maxDecompressedSize, - endOnInputSize, decode_full_block, noDict, + decode_full_block, noDict, (BYTE*)dest, NULL, 0); } -LZ4_FORCE_O2_GCC_PPC64LE +LZ4_FORCE_O2 int LZ4_decompress_safe_partial(const char* src, char* dst, int compressedSize, int targetOutputSize, int dstCapacity) { dstCapacity = MIN(targetOutputSize, dstCapacity); return LZ4_decompress_generic(src, dst, compressedSize, dstCapacity, - endOnInputSize, partial_decode, + partial_decode, noDict, (BYTE*)dst, NULL, 0); } -LZ4_FORCE_O2_GCC_PPC64LE +LZ4_FORCE_O2 int LZ4_decompress_fast(const char* source, char* dest, int originalSize) { - return LZ4_decompress_generic(source, dest, 0, originalSize, - endOnOutputSize, decode_full_block, withPrefix64k, - (BYTE*)dest - 64 KB, NULL, 0); + DEBUGLOG(5, "LZ4_decompress_fast"); + return LZ4_decompress_unsafe_generic( + (const BYTE*)source, (BYTE*)dest, originalSize, + 0, NULL, 0); } /*===== Instantiate a few more decoding cases, used more than once. =====*/ -LZ4_FORCE_O2_GCC_PPC64LE /* Exported, an obsolete API function. */ +LZ4_FORCE_O2 /* Exported, an obsolete API function. */ int LZ4_decompress_safe_withPrefix64k(const char* source, char* dest, int compressedSize, int maxOutputSize) { return LZ4_decompress_generic(source, dest, compressedSize, maxOutputSize, - endOnInputSize, decode_full_block, withPrefix64k, + decode_full_block, withPrefix64k, + (BYTE*)dest - 64 KB, NULL, 0); +} + +LZ4_FORCE_O2 +static int LZ4_decompress_safe_partial_withPrefix64k(const char* source, char* dest, int compressedSize, int targetOutputSize, int dstCapacity) +{ + dstCapacity = MIN(targetOutputSize, dstCapacity); + return LZ4_decompress_generic(source, dest, compressedSize, dstCapacity, + partial_decode, withPrefix64k, (BYTE*)dest - 64 KB, NULL, 0); } /* Another obsolete API function, paired with the previous one. */ int LZ4_decompress_fast_withPrefix64k(const char* source, char* dest, int originalSize) { - /* LZ4_decompress_fast doesn't validate match offsets, - * and thus serves well with any prefixed dictionary. */ - return LZ4_decompress_fast(source, dest, originalSize); + return LZ4_decompress_unsafe_generic( + (const BYTE*)source, (BYTE*)dest, originalSize, + 64 KB, NULL, 0); } -LZ4_FORCE_O2_GCC_PPC64LE +LZ4_FORCE_O2 static int LZ4_decompress_safe_withSmallPrefix(const char* source, char* dest, int compressedSize, int maxOutputSize, size_t prefixSize) { return LZ4_decompress_generic(source, dest, compressedSize, maxOutputSize, - endOnInputSize, decode_full_block, noDict, + decode_full_block, noDict, (BYTE*)dest-prefixSize, NULL, 0); } -LZ4_FORCE_O2_GCC_PPC64LE +LZ4_FORCE_O2 +static int LZ4_decompress_safe_partial_withSmallPrefix(const char* source, char* dest, int compressedSize, int targetOutputSize, int dstCapacity, + size_t prefixSize) +{ + dstCapacity = MIN(targetOutputSize, dstCapacity); + return LZ4_decompress_generic(source, dest, compressedSize, dstCapacity, + partial_decode, noDict, + (BYTE*)dest-prefixSize, NULL, 0); +} + +LZ4_FORCE_O2 int LZ4_decompress_safe_forceExtDict(const char* source, char* dest, int compressedSize, int maxOutputSize, const void* dictStart, size_t dictSize) { return LZ4_decompress_generic(source, dest, compressedSize, maxOutputSize, - endOnInputSize, decode_full_block, usingExtDict, + decode_full_block, usingExtDict, (BYTE*)dest, (const BYTE*)dictStart, dictSize); } -LZ4_FORCE_O2_GCC_PPC64LE +LZ4_FORCE_O2 +int LZ4_decompress_safe_partial_forceExtDict(const char* source, char* dest, + int compressedSize, int targetOutputSize, int dstCapacity, + const void* dictStart, size_t dictSize) +{ + dstCapacity = MIN(targetOutputSize, dstCapacity); + return LZ4_decompress_generic(source, dest, compressedSize, dstCapacity, + partial_decode, usingExtDict, + (BYTE*)dest, (const BYTE*)dictStart, dictSize); +} + +LZ4_FORCE_O2 static int LZ4_decompress_fast_extDict(const char* source, char* dest, int originalSize, const void* dictStart, size_t dictSize) { - return LZ4_decompress_generic(source, dest, 0, originalSize, - endOnOutputSize, decode_full_block, usingExtDict, - (BYTE*)dest, (const BYTE*)dictStart, dictSize); + return LZ4_decompress_unsafe_generic( + (const BYTE*)source, (BYTE*)dest, originalSize, + 0, (const BYTE*)dictStart, dictSize); } /* The "double dictionary" mode, for use with e.g. ring buffers: the first part @@ -1727,33 +2452,26 @@ int LZ4_decompress_safe_doubleDict(const char* source, char* dest, int compresse size_t prefixSize, const void* dictStart, size_t dictSize) { return LZ4_decompress_generic(source, dest, compressedSize, maxOutputSize, - endOnInputSize, decode_full_block, usingExtDict, - (BYTE*)dest-prefixSize, (const BYTE*)dictStart, dictSize); -} - -LZ4_FORCE_INLINE -int LZ4_decompress_fast_doubleDict(const char* source, char* dest, int originalSize, - size_t prefixSize, const void* dictStart, size_t dictSize) -{ - return LZ4_decompress_generic(source, dest, 0, originalSize, - endOnOutputSize, decode_full_block, usingExtDict, + decode_full_block, usingExtDict, (BYTE*)dest-prefixSize, (const BYTE*)dictStart, dictSize); } /*===== streaming decompression functions =====*/ +#if !defined(LZ4_STATIC_LINKING_ONLY_DISABLE_MEMORY_ALLOCATION) LZ4_streamDecode_t* LZ4_createStreamDecode(void) { - LZ4_streamDecode_t* lz4s = (LZ4_streamDecode_t*) ALLOC_AND_ZERO(sizeof(LZ4_streamDecode_t)); - return lz4s; + LZ4_STATIC_ASSERT(sizeof(LZ4_streamDecode_t) >= sizeof(LZ4_streamDecode_t_internal)); + return (LZ4_streamDecode_t*) ALLOC_AND_ZERO(sizeof(LZ4_streamDecode_t)); } int LZ4_freeStreamDecode (LZ4_streamDecode_t* LZ4_stream) { - if (!LZ4_stream) return 0; /* support free on NULL */ + if (LZ4_stream == NULL) { return 0; } /* support free on NULL */ FREEMEM(LZ4_stream); return 0; } +#endif /*! LZ4_setStreamDecode() : * Use this function to instruct where to find the dictionary. @@ -1764,8 +2482,13 @@ int LZ4_freeStreamDecode (LZ4_streamDecode_t* LZ4_stream) int LZ4_setStreamDecode (LZ4_streamDecode_t* LZ4_streamDecode, const char* dictionary, int dictSize) { LZ4_streamDecode_t_internal* lz4sd = &LZ4_streamDecode->internal_donotuse; - lz4sd->prefixSize = (size_t) dictSize; - lz4sd->prefixEnd = (const BYTE*) dictionary + dictSize; + lz4sd->prefixSize = (size_t)dictSize; + if (dictSize) { + assert(dictionary != NULL); + lz4sd->prefixEnd = (const BYTE*) dictionary + dictSize; + } else { + lz4sd->prefixEnd = (const BYTE*) dictionary; + } lz4sd->externalDict = NULL; lz4sd->extDictSize = 0; return 1; @@ -1797,7 +2520,7 @@ int LZ4_decoderRingBufferSize(int maxBlockSize) If it's not possible, save the relevant part of decoded data into a safe buffer, and indicate where it stands using LZ4_setStreamDecode() */ -LZ4_FORCE_O2_GCC_PPC64LE +LZ4_FORCE_O2 int LZ4_decompress_safe_continue (LZ4_streamDecode_t* LZ4_streamDecode, const char* source, char* dest, int compressedSize, int maxOutputSize) { LZ4_streamDecode_t_internal* lz4sd = &LZ4_streamDecode->internal_donotuse; @@ -1808,7 +2531,7 @@ int LZ4_decompress_safe_continue (LZ4_streamDecode_t* LZ4_streamDecode, const ch assert(lz4sd->extDictSize == 0); result = LZ4_decompress_safe(source, dest, compressedSize, maxOutputSize); if (result <= 0) return result; - lz4sd->prefixSize = result; + lz4sd->prefixSize = (size_t)result; lz4sd->prefixEnd = (BYTE*)dest + result; } else if (lz4sd->prefixEnd == (BYTE*)dest) { /* They're rolling the current segment. */ @@ -1821,7 +2544,7 @@ int LZ4_decompress_safe_continue (LZ4_streamDecode_t* LZ4_streamDecode, const ch result = LZ4_decompress_safe_doubleDict(source, dest, compressedSize, maxOutputSize, lz4sd->prefixSize, lz4sd->externalDict, lz4sd->extDictSize); if (result <= 0) return result; - lz4sd->prefixSize += result; + lz4sd->prefixSize += (size_t)result; lz4sd->prefixEnd += result; } else { /* The buffer wraps around, or they're switching to another buffer. */ @@ -1830,41 +2553,48 @@ int LZ4_decompress_safe_continue (LZ4_streamDecode_t* LZ4_streamDecode, const ch result = LZ4_decompress_safe_forceExtDict(source, dest, compressedSize, maxOutputSize, lz4sd->externalDict, lz4sd->extDictSize); if (result <= 0) return result; - lz4sd->prefixSize = result; + lz4sd->prefixSize = (size_t)result; lz4sd->prefixEnd = (BYTE*)dest + result; } return result; } -LZ4_FORCE_O2_GCC_PPC64LE -int LZ4_decompress_fast_continue (LZ4_streamDecode_t* LZ4_streamDecode, const char* source, char* dest, int originalSize) +LZ4_FORCE_O2 int +LZ4_decompress_fast_continue (LZ4_streamDecode_t* LZ4_streamDecode, + const char* source, char* dest, int originalSize) { - LZ4_streamDecode_t_internal* lz4sd = &LZ4_streamDecode->internal_donotuse; + LZ4_streamDecode_t_internal* const lz4sd = + (assert(LZ4_streamDecode!=NULL), &LZ4_streamDecode->internal_donotuse); int result; + DEBUGLOG(5, "LZ4_decompress_fast_continue (toDecodeSize=%i)", originalSize); + assert(originalSize >= 0); + if (lz4sd->prefixSize == 0) { + DEBUGLOG(5, "first invocation : no prefix nor extDict"); assert(lz4sd->extDictSize == 0); result = LZ4_decompress_fast(source, dest, originalSize); if (result <= 0) return result; - lz4sd->prefixSize = originalSize; + lz4sd->prefixSize = (size_t)originalSize; lz4sd->prefixEnd = (BYTE*)dest + originalSize; } else if (lz4sd->prefixEnd == (BYTE*)dest) { - if (lz4sd->prefixSize >= 64 KB - 1 || lz4sd->extDictSize == 0) - result = LZ4_decompress_fast(source, dest, originalSize); - else - result = LZ4_decompress_fast_doubleDict(source, dest, originalSize, - lz4sd->prefixSize, lz4sd->externalDict, lz4sd->extDictSize); + DEBUGLOG(5, "continue using existing prefix"); + result = LZ4_decompress_unsafe_generic( + (const BYTE*)source, (BYTE*)dest, originalSize, + lz4sd->prefixSize, + lz4sd->externalDict, lz4sd->extDictSize); if (result <= 0) return result; - lz4sd->prefixSize += originalSize; + lz4sd->prefixSize += (size_t)originalSize; lz4sd->prefixEnd += originalSize; } else { + DEBUGLOG(5, "prefix becomes extDict"); lz4sd->extDictSize = lz4sd->prefixSize; lz4sd->externalDict = lz4sd->prefixEnd - lz4sd->extDictSize; result = LZ4_decompress_fast_extDict(source, dest, originalSize, lz4sd->externalDict, lz4sd->extDictSize); if (result <= 0) return result; - lz4sd->prefixSize = originalSize; + lz4sd->prefixSize = (size_t)originalSize; lz4sd->prefixEnd = (BYTE*)dest + originalSize; } @@ -1884,18 +2614,39 @@ int LZ4_decompress_safe_usingDict(const char* source, char* dest, int compressed if (dictSize==0) return LZ4_decompress_safe(source, dest, compressedSize, maxOutputSize); if (dictStart+dictSize == dest) { - if (dictSize >= 64 KB - 1) + if (dictSize >= 64 KB - 1) { return LZ4_decompress_safe_withPrefix64k(source, dest, compressedSize, maxOutputSize); - return LZ4_decompress_safe_withSmallPrefix(source, dest, compressedSize, maxOutputSize, dictSize); + } + assert(dictSize >= 0); + return LZ4_decompress_safe_withSmallPrefix(source, dest, compressedSize, maxOutputSize, (size_t)dictSize); } - return LZ4_decompress_safe_forceExtDict(source, dest, compressedSize, maxOutputSize, dictStart, dictSize); + assert(dictSize >= 0); + return LZ4_decompress_safe_forceExtDict(source, dest, compressedSize, maxOutputSize, dictStart, (size_t)dictSize); +} + +int LZ4_decompress_safe_partial_usingDict(const char* source, char* dest, int compressedSize, int targetOutputSize, int dstCapacity, const char* dictStart, int dictSize) +{ + if (dictSize==0) + return LZ4_decompress_safe_partial(source, dest, compressedSize, targetOutputSize, dstCapacity); + if (dictStart+dictSize == dest) { + if (dictSize >= 64 KB - 1) { + return LZ4_decompress_safe_partial_withPrefix64k(source, dest, compressedSize, targetOutputSize, dstCapacity); + } + assert(dictSize >= 0); + return LZ4_decompress_safe_partial_withSmallPrefix(source, dest, compressedSize, targetOutputSize, dstCapacity, (size_t)dictSize); + } + assert(dictSize >= 0); + return LZ4_decompress_safe_partial_forceExtDict(source, dest, compressedSize, targetOutputSize, dstCapacity, dictStart, (size_t)dictSize); } int LZ4_decompress_fast_usingDict(const char* source, char* dest, int originalSize, const char* dictStart, int dictSize) { if (dictSize==0 || dictStart+dictSize == dest) - return LZ4_decompress_fast(source, dest, originalSize); - return LZ4_decompress_fast_extDict(source, dest, originalSize, dictStart, dictSize); + return LZ4_decompress_unsafe_generic( + (const BYTE*)source, (BYTE*)dest, originalSize, + (size_t)dictSize, NULL, 0); + assert(dictSize >= 0); + return LZ4_decompress_fast_extDict(source, dest, originalSize, dictStart, (size_t)dictSize); } @@ -1907,9 +2658,9 @@ int LZ4_compress_limitedOutput(const char* source, char* dest, int inputSize, in { return LZ4_compress_default(source, dest, inputSize, maxOutputSize); } -int LZ4_compress(const char* source, char* dest, int inputSize) +int LZ4_compress(const char* src, char* dest, int srcSize) { - return LZ4_compress_default(source, dest, inputSize, LZ4_compressBound(inputSize)); + return LZ4_compress_default(src, dest, srcSize, LZ4_compressBound(srcSize)); } int LZ4_compress_limitedOutput_withState (void* state, const char* src, char* dst, int srcSize, int dstSize) { @@ -1945,7 +2696,7 @@ int LZ4_uncompress_unknownOutputSize (const char* source, char* dest, int isize, /* Obsolete Streaming functions */ -int LZ4_sizeofStreamState() { return LZ4_STREAMSIZE; } +int LZ4_sizeofStreamState(void) { return sizeof(LZ4_stream_t); } int LZ4_resetStreamState(void* state, char* inputBuffer) { @@ -1954,11 +2705,13 @@ int LZ4_resetStreamState(void* state, char* inputBuffer) return 0; } +#if !defined(LZ4_STATIC_LINKING_ONLY_DISABLE_MEMORY_ALLOCATION) void* LZ4_create (char* inputBuffer) { (void)inputBuffer; return LZ4_createStream(); } +#endif char* LZ4_slideInputBuffer (void* state) { diff --git a/src/arch/util/lz4.h b/src/arch/util/lz4.h index 059ef7c1b7..491c6087c4 100755 --- a/src/arch/util/lz4.h +++ b/src/arch/util/lz4.h @@ -1,7 +1,7 @@ /* * LZ4 - Fast LZ compression algorithm * Header File - * Copyright (C) 2011-present, Yann Collet. + * Copyright (C) 2011-2020, Yann Collet. BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php) @@ -46,24 +46,31 @@ extern "C" { /** Introduction - LZ4 is lossless compression algorithm, providing compression speed at 500 MB/s per core, + LZ4 is lossless compression algorithm, providing compression speed >500 MB/s per core, scalable with multi-cores CPU. It features an extremely fast decoder, with speed in multiple GB/s per core, typically reaching RAM speed limits on multi-core systems. The LZ4 compression library provides in-memory compression and decompression functions. + It gives full buffer control to user. Compression can be done in: - a single step (described as Simple Functions) - a single step, reusing a context (described in Advanced Functions) - unbounded multiple steps (described as Streaming compression) - lz4.h provides block compression functions. It gives full buffer control to user. - Decompressing an lz4-compressed block also requires metadata (such as compressed size). - Each application is free to encode such metadata in whichever way it wants. + lz4.h generates and decodes LZ4-compressed blocks (doc/lz4_Block_format.md). + Decompressing such a compressed block requires additional metadata. + Exact metadata depends on exact decompression function. + For the typical case of LZ4_decompress_safe(), + metadata includes block's compressed size, and maximum bound of decompressed size. + Each application is free to encode and pass such metadata in whichever way it wants. - An additional format, called LZ4 frame specification (doc/lz4_Frame_format.md), - take care of encoding standard metadata alongside LZ4-compressed blocks. - Frame format is required for interoperability. - It is delivered through a companion API, declared in lz4frame.h. + lz4.h only handle blocks, it can not generate Frames. + + Blocks are different from Frames (doc/lz4_Frame_format.md). + Frames bundle both blocks and metadata in a specified manner. + Embedding metadata is required for compressed data to be self-contained and portable. + Frame format is delivered through a companion API, declared in lz4frame.h. + The `lz4` CLI can only manage frames. */ /*^*************************************************************** @@ -90,62 +97,111 @@ extern "C" { # define LZ4LIB_API LZ4LIB_VISIBILITY #endif +/*! LZ4_FREESTANDING : + * When this macro is set to 1, it enables "freestanding mode" that is + * suitable for typical freestanding environment which doesn't support + * standard C library. + * + * - LZ4_FREESTANDING is a compile-time switch. + * - It requires the following macros to be defined: + * LZ4_memcpy, LZ4_memmove, LZ4_memset. + * - It only enables LZ4/HC functions which don't use heap. + * All LZ4F_* functions are not supported. + * - See tests/freestanding.c to check its basic setup. + */ +#if defined(LZ4_FREESTANDING) && (LZ4_FREESTANDING == 1) +# define LZ4_HEAPMODE 0 +# define LZ4HC_HEAPMODE 0 +# define LZ4_STATIC_LINKING_ONLY_DISABLE_MEMORY_ALLOCATION 1 +# if !defined(LZ4_memcpy) +# error "LZ4_FREESTANDING requires macro 'LZ4_memcpy'." +# endif +# if !defined(LZ4_memset) +# error "LZ4_FREESTANDING requires macro 'LZ4_memset'." +# endif +# if !defined(LZ4_memmove) +# error "LZ4_FREESTANDING requires macro 'LZ4_memmove'." +# endif +#elif ! defined(LZ4_FREESTANDING) +# define LZ4_FREESTANDING 0 +#endif + + /*------ Version ------*/ #define LZ4_VERSION_MAJOR 1 /* for breaking interface changes */ -#define LZ4_VERSION_MINOR 8 /* for new (non-breaking) interface capabilities */ -#define LZ4_VERSION_RELEASE 3 /* for tweaks, bug-fixes, or development */ +#define LZ4_VERSION_MINOR 9 /* for new (non-breaking) interface capabilities */ +#define LZ4_VERSION_RELEASE 4 /* for tweaks, bug-fixes, or development */ #define LZ4_VERSION_NUMBER (LZ4_VERSION_MAJOR *100*100 + LZ4_VERSION_MINOR *100 + LZ4_VERSION_RELEASE) #define LZ4_LIB_VERSION LZ4_VERSION_MAJOR.LZ4_VERSION_MINOR.LZ4_VERSION_RELEASE #define LZ4_QUOTE(str) #str #define LZ4_EXPAND_AND_QUOTE(str) LZ4_QUOTE(str) -#define LZ4_VERSION_STRING LZ4_EXPAND_AND_QUOTE(LZ4_LIB_VERSION) +#define LZ4_VERSION_STRING LZ4_EXPAND_AND_QUOTE(LZ4_LIB_VERSION) /* requires v1.7.3+ */ -LZ4LIB_API int LZ4_versionNumber (void); /**< library version number; useful to check dll version */ -LZ4LIB_API const char* LZ4_versionString (void); /**< library version string; unseful to check dll version */ +LZ4LIB_API int LZ4_versionNumber (void); /**< library version number; useful to check dll version; requires v1.3.0+ */ +LZ4LIB_API const char* LZ4_versionString (void); /**< library version string; useful to check dll version; requires v1.7.5+ */ /*-************************************ * Tuning parameter **************************************/ +#define LZ4_MEMORY_USAGE_MIN 10 +#define LZ4_MEMORY_USAGE_DEFAULT 14 +#define LZ4_MEMORY_USAGE_MAX 20 + /*! * LZ4_MEMORY_USAGE : - * Memory usage formula : N->2^N Bytes (examples : 10 -> 1KB; 12 -> 4KB ; 16 -> 64KB; 20 -> 1MB; etc.) - * Increasing memory usage improves compression ratio - * Reduced memory usage may improve speed, thanks to cache effect + * Memory usage formula : N->2^N Bytes (examples : 10 -> 1KB; 12 -> 4KB ; 16 -> 64KB; 20 -> 1MB; ) + * Increasing memory usage improves compression ratio, at the cost of speed. + * Reduced memory usage may improve speed at the cost of ratio, thanks to better cache locality. * Default value is 14, for 16KB, which nicely fits into Intel x86 L1 cache */ #ifndef LZ4_MEMORY_USAGE -# define LZ4_MEMORY_USAGE 14 +# define LZ4_MEMORY_USAGE LZ4_MEMORY_USAGE_DEFAULT +#endif + +#if (LZ4_MEMORY_USAGE < LZ4_MEMORY_USAGE_MIN) +# error "LZ4_MEMORY_USAGE is too small !" +#endif + +#if (LZ4_MEMORY_USAGE > LZ4_MEMORY_USAGE_MAX) +# error "LZ4_MEMORY_USAGE is too large !" #endif /*-************************************ * Simple Functions **************************************/ /*! LZ4_compress_default() : - Compresses 'srcSize' bytes from buffer 'src' - into already allocated 'dst' buffer of size 'dstCapacity'. - Compression is guaranteed to succeed if 'dstCapacity' >= LZ4_compressBound(srcSize). - It also runs faster, so it's a recommended setting. - If the function cannot compress 'src' into a more limited 'dst' budget, - compression stops *immediately*, and the function result is zero. - Note : as a consequence, 'dst' content is not valid. - Note 2 : This function is protected against buffer overflow scenarios (never writes outside 'dst' buffer, nor read outside 'source' buffer). - srcSize : max supported value is LZ4_MAX_INPUT_SIZE. - dstCapacity : size of buffer 'dst' (which must be already allocated) - return : the number of bytes written into buffer 'dst' (necessarily <= dstCapacity) - or 0 if compression fails */ + * Compresses 'srcSize' bytes from buffer 'src' + * into already allocated 'dst' buffer of size 'dstCapacity'. + * Compression is guaranteed to succeed if 'dstCapacity' >= LZ4_compressBound(srcSize). + * It also runs faster, so it's a recommended setting. + * If the function cannot compress 'src' into a more limited 'dst' budget, + * compression stops *immediately*, and the function result is zero. + * In which case, 'dst' content is undefined (invalid). + * srcSize : max supported value is LZ4_MAX_INPUT_SIZE. + * dstCapacity : size of buffer 'dst' (which must be already allocated) + * @return : the number of bytes written into buffer 'dst' (necessarily <= dstCapacity) + * or 0 if compression fails + * Note : This function is protected against buffer overflow scenarios (never writes outside 'dst' buffer, nor read outside 'source' buffer). + */ LZ4LIB_API int LZ4_compress_default(const char* src, char* dst, int srcSize, int dstCapacity); /*! LZ4_decompress_safe() : - compressedSize : is the exact complete size of the compressed block. - dstCapacity : is the size of destination buffer, which must be already allocated. - return : the number of bytes decompressed into destination buffer (necessarily <= dstCapacity) - If destination buffer is not large enough, decoding will stop and output an error code (negative value). - If the source stream is detected malformed, the function will stop decoding and return a negative result. - This function is protected against malicious data packets. -*/ + * compressedSize : is the exact complete size of the compressed block. + * dstCapacity : is the size of destination buffer (which must be already allocated), presumed an upper bound of decompressed size. + * @return : the number of bytes decompressed into destination buffer (necessarily <= dstCapacity) + * If destination buffer is not large enough, decoding will stop and output an error code (negative value). + * If the source stream is detected malformed, the function will stop decoding and return a negative result. + * Note 1 : This function is protected against malicious data packets : + * it will never writes outside 'dst' buffer, nor read outside 'source' buffer, + * even if the compressed block is maliciously modified to order the decoder to do these actions. + * In such case, the decoder stops immediately, and considers the compressed block malformed. + * Note 2 : compressedSize and dstCapacity must be provided to the function, the compressed block does not contain them. + * The implementation is free to send / store / derive this information in whichever way is most beneficial. + * If there is a need for a different format which bundles together both compressed data and its metadata, consider looking at lz4frame.h instead. + */ LZ4LIB_API int LZ4_decompress_safe (const char* src, char* dst, int compressedSize, int dstCapacity); @@ -155,8 +211,7 @@ LZ4LIB_API int LZ4_decompress_safe (const char* src, char* dst, int compressedSi #define LZ4_MAX_INPUT_SIZE 0x7E000000 /* 2 113 929 216 bytes */ #define LZ4_COMPRESSBOUND(isize) ((unsigned)(isize) > (unsigned)LZ4_MAX_INPUT_SIZE ? 0 : (isize) + ((isize)/255) + 16) -/*! -LZ4_compressBound() : +/*! LZ4_compressBound() : Provides the maximum size that LZ4 compression may output in a "worst case" scenario (input data not compressible) This function is primarily useful for memory allocation purposes (destination buffer size). Macro LZ4_COMPRESSBOUND() is also provided for compilation-time evaluation (stack memory allocation for example). @@ -167,24 +222,23 @@ LZ4_compressBound() : */ LZ4LIB_API int LZ4_compressBound(int inputSize); -/*! -LZ4_compress_fast() : +/*! LZ4_compress_fast() : Same as LZ4_compress_default(), but allows selection of "acceleration" factor. The larger the acceleration value, the faster the algorithm, but also the lesser the compression. It's a trade-off. It can be fine tuned, with each successive value providing roughly +~3% to speed. An acceleration value of "1" is the same as regular LZ4_compress_default() - Values <= 0 will be replaced by ACCELERATION_DEFAULT (currently == 1, see lz4.c). + Values <= 0 will be replaced by LZ4_ACCELERATION_DEFAULT (currently == 1, see lz4.c). + Values > LZ4_ACCELERATION_MAX will be replaced by LZ4_ACCELERATION_MAX (currently == 65537, see lz4.c). */ LZ4LIB_API int LZ4_compress_fast (const char* src, char* dst, int srcSize, int dstCapacity, int acceleration); -/*! -LZ4_compress_fast_extState() : - Same compression function, just using an externally allocated memory space to store compression state. - Use LZ4_sizeofState() to know how much memory must be allocated, - and allocate it on 8-bytes boundaries (using malloc() typically). - Then, provide this buffer as 'void* state' to compression function. -*/ +/*! LZ4_compress_fast_extState() : + * Same as LZ4_compress_fast(), using an externally allocated memory space for its state. + * Use LZ4_sizeofState() to know how much memory must be allocated, + * and allocate it on 8-bytes boundaries (using `malloc()` typically). + * Then, provide this buffer as `void* state` to compression function. + */ LZ4LIB_API int LZ4_sizeofState(void); LZ4LIB_API int LZ4_compress_fast_extState (void* state, const char* src, char* dst, int srcSize, int dstCapacity, int acceleration); @@ -200,54 +254,54 @@ LZ4LIB_API int LZ4_compress_fast_extState (void* state, const char* src, char* d * New value is necessarily <= input value. * @return : Nb bytes written into 'dst' (necessarily <= targetDestSize) * or 0 if compression fails. -*/ -LZ4LIB_API int LZ4_compress_destSize (const char* src, char* dst, int* srcSizePtr, int targetDstSize); - - -/*! LZ4_decompress_fast() : **unsafe!** - * This function used to be a bit faster than LZ4_decompress_safe(), - * though situation has changed in recent versions, - * and now `LZ4_decompress_safe()` can be as fast and sometimes faster than `LZ4_decompress_fast()`. - * Moreover, LZ4_decompress_fast() is not protected vs malformed input, as it doesn't perform full validation of compressed data. - * As a consequence, this function is no longer recommended, and may be deprecated in future versions. - * It's only remaining specificity is that it can decompress data without knowing its compressed size. * - * originalSize : is the uncompressed size to regenerate. - * `dst` must be already allocated, its size must be >= 'originalSize' bytes. - * @return : number of bytes read from source buffer (== compressed size). - * If the source stream is detected malformed, the function stops decoding and returns a negative result. - * note : This function requires uncompressed originalSize to be known in advance. - * The function never writes past the output buffer. - * However, since it doesn't know its 'src' size, it may read past the intended input. - * Also, because match offsets are not validated during decoding, - * reads from 'src' may underflow. - * Use this function in trusted environment **only**. + * Note : from v1.8.2 to v1.9.1, this function had a bug (fixed un v1.9.2+): + * the produced compressed content could, in specific circumstances, + * require to be decompressed into a destination buffer larger + * by at least 1 byte than the content to decompress. + * If an application uses `LZ4_compress_destSize()`, + * it's highly recommended to update liblz4 to v1.9.2 or better. + * If this can't be done or ensured, + * the receiving decompression function should provide + * a dstCapacity which is > decompressedSize, by at least 1 byte. + * See https://github.com/lz4/lz4/issues/859 for details */ -LZ4LIB_API int LZ4_decompress_fast (const char* src, char* dst, int originalSize); +LZ4LIB_API int LZ4_compress_destSize (const char* src, char* dst, int* srcSizePtr, int targetDstSize); + /*! LZ4_decompress_safe_partial() : * Decompress an LZ4 compressed block, of size 'srcSize' at position 'src', * into destination buffer 'dst' of size 'dstCapacity'. * Up to 'targetOutputSize' bytes will be decoded. - * The function stops decoding on reaching this objective, - * which can boost performance when only the beginning of a block is required. + * The function stops decoding on reaching this objective. + * This can be useful to boost performance + * whenever only the beginning of a block is required. * - * @return : the number of bytes decoded in `dst` (necessarily <= dstCapacity) + * @return : the number of bytes decoded in `dst` (necessarily <= targetOutputSize) * If source stream is detected malformed, function returns a negative result. * - * Note : @return can be < targetOutputSize, if compressed block contains less data. + * Note 1 : @return can be < targetOutputSize, if compressed block contains less data. * - * Note 2 : this function features 2 parameters, targetOutputSize and dstCapacity, - * and expects targetOutputSize <= dstCapacity. - * It effectively stops decoding on reaching targetOutputSize, + * Note 2 : targetOutputSize must be <= dstCapacity + * + * Note 3 : this function effectively stops decoding on reaching targetOutputSize, * so dstCapacity is kind of redundant. - * This is because in a previous version of this function, - * decoding operation would not "break" a sequence in the middle. - * As a consequence, there was no guarantee that decoding would stop at exactly targetOutputSize, + * This is because in older versions of this function, + * decoding operation would still write complete sequences. + * Therefore, there was no guarantee that it would stop writing at exactly targetOutputSize, * it could write more bytes, though only up to dstCapacity. * Some "margin" used to be required for this operation to work properly. - * This is no longer necessary. - * The function nonetheless keeps its signature, in an effort to not break API. + * Thankfully, this is no longer necessary. + * The function nonetheless keeps the same signature, in an effort to preserve API compatibility. + * + * Note 4 : If srcSize is the exact size of the block, + * then targetOutputSize can be any value, + * including larger than the block's decompressed size. + * The function will, at most, generate block's decompressed size. + * + * Note 5 : If srcSize is _larger_ than block's compressed size, + * then targetOutputSize **MUST** be <= block's decompressed size. + * Otherwise, *silent corruption will occur*. */ LZ4LIB_API int LZ4_decompress_safe_partial (const char* src, char* dst, int srcSize, int targetOutputSize, int dstCapacity); @@ -257,30 +311,66 @@ LZ4LIB_API int LZ4_decompress_safe_partial (const char* src, char* dst, int srcS ***********************************************/ typedef union LZ4_stream_u LZ4_stream_t; /* incomplete type (defined later) */ -/*! LZ4_createStream() and LZ4_freeStream() : - * LZ4_createStream() will allocate and initialize an `LZ4_stream_t` structure. - * LZ4_freeStream() releases its memory. - */ +/** + Note about RC_INVOKED + + - RC_INVOKED is predefined symbol of rc.exe (the resource compiler which is part of MSVC/Visual Studio). + https://docs.microsoft.com/en-us/windows/win32/menurc/predefined-macros + + - Since rc.exe is a legacy compiler, it truncates long symbol (> 30 chars) + and reports warning "RC4011: identifier truncated". + + - To eliminate the warning, we surround long preprocessor symbol with + "#if !defined(RC_INVOKED) ... #endif" block that means + "skip this block when rc.exe is trying to read it". +*/ +#if !defined(RC_INVOKED) /* https://docs.microsoft.com/en-us/windows/win32/menurc/predefined-macros */ +#if !defined(LZ4_STATIC_LINKING_ONLY_DISABLE_MEMORY_ALLOCATION) LZ4LIB_API LZ4_stream_t* LZ4_createStream(void); LZ4LIB_API int LZ4_freeStream (LZ4_stream_t* streamPtr); +#endif /* !defined(LZ4_STATIC_LINKING_ONLY_DISABLE_MEMORY_ALLOCATION) */ +#endif -/*! LZ4_resetStream() : - * An LZ4_stream_t structure can be allocated once and re-used multiple times. - * Use this function to start compressing a new stream. +/*! LZ4_resetStream_fast() : v1.9.0+ + * Use this to prepare an LZ4_stream_t for a new chain of dependent blocks + * (e.g., LZ4_compress_fast_continue()). + * + * An LZ4_stream_t must be initialized once before usage. + * This is automatically done when created by LZ4_createStream(). + * However, should the LZ4_stream_t be simply declared on stack (for example), + * it's necessary to initialize it first, using LZ4_initStream(). + * + * After init, start any new stream with LZ4_resetStream_fast(). + * A same LZ4_stream_t can be re-used multiple times consecutively + * and compress multiple streams, + * provided that it starts each new stream with LZ4_resetStream_fast(). + * + * LZ4_resetStream_fast() is much faster than LZ4_initStream(), + * but is not compatible with memory regions containing garbage data. + * + * Note: it's only useful to call LZ4_resetStream_fast() + * in the context of streaming compression. + * The *extState* functions perform their own resets. + * Invoking LZ4_resetStream_fast() before is redundant, and even counterproductive. */ -LZ4LIB_API void LZ4_resetStream (LZ4_stream_t* streamPtr); +LZ4LIB_API void LZ4_resetStream_fast (LZ4_stream_t* streamPtr); /*! LZ4_loadDict() : - * Use this function to load a static dictionary into LZ4_stream_t. - * Any previous data will be forgotten, only 'dictionary' will remain in memory. + * Use this function to reference a static dictionary into LZ4_stream_t. + * The dictionary must remain available during compression. + * LZ4_loadDict() triggers a reset, so any previous data will be forgotten. + * The same dictionary will have to be loaded on decompression side for successful decoding. + * Dictionary are useful for better compression of small data (KB range). + * While LZ4 accept any input as dictionary, + * results are generally better when using Zstandard's Dictionary Builder. * Loading a size of 0 is allowed, and is the same as reset. - * @return : dictionary size, in bytes (necessarily <= 64 KB) + * @return : loaded dictionary size, in bytes (necessarily <= 64 KB) */ LZ4LIB_API int LZ4_loadDict (LZ4_stream_t* streamPtr, const char* dictionary, int dictSize); /*! LZ4_compress_fast_continue() : * Compress 'src' content using data from previously compressed blocks, for better compression ratio. - * 'dst' buffer must be already allocated. + * 'dst' buffer must be already allocated. * If dstCapacity >= LZ4_compressBound(srcSize), compression is guaranteed to succeed, and runs faster. * * @return : size of compressed block @@ -288,10 +378,10 @@ LZ4LIB_API int LZ4_loadDict (LZ4_stream_t* streamPtr, const char* dictionary, in * * Note 1 : Each invocation to LZ4_compress_fast_continue() generates a new block. * Each block has precise boundaries. + * Each block must be decompressed separately, calling LZ4_decompress_*() with relevant metadata. * It's not possible to append blocks together and expect a single invocation of LZ4_decompress_*() to decompress them together. - * Each block must be decompressed separately, calling LZ4_decompress_*() with associated metadata. * - * Note 2 : The previous 64KB of source data is __assumed__ to remain present, unmodified, at same address in memory! + * Note 2 : The previous 64KB of source data is __assumed__ to remain present, unmodified, at same address in memory ! * * Note 3 : When input is structured as a double-buffer, each buffer can have any size, including < 64 KB. * Make sure that buffers are separated, by at least one byte. @@ -299,7 +389,7 @@ LZ4LIB_API int LZ4_loadDict (LZ4_stream_t* streamPtr, const char* dictionary, in * * Note 4 : If input buffer is a ring-buffer, it can have any size, including < 64 KB. * - * Note 5 : After an error, the stream status is invalid, it can only be reset or freed. + * Note 5 : After an error, the stream status is undefined (invalid), it can only be reset or freed. */ LZ4LIB_API int LZ4_compress_fast_continue (LZ4_stream_t* streamPtr, const char* src, char* dst, int srcSize, int dstCapacity, int acceleration); @@ -323,8 +413,12 @@ typedef union LZ4_streamDecode_u LZ4_streamDecode_t; /* tracking context */ * creation / destruction of streaming decompression tracking context. * A tracking context can be re-used multiple times. */ +#if !defined(RC_INVOKED) /* https://docs.microsoft.com/en-us/windows/win32/menurc/predefined-macros */ +#if !defined(LZ4_STATIC_LINKING_ONLY_DISABLE_MEMORY_ALLOCATION) LZ4LIB_API LZ4_streamDecode_t* LZ4_createStreamDecode(void); LZ4LIB_API int LZ4_freeStreamDecode (LZ4_streamDecode_t* LZ4_stream); +#endif /* !defined(LZ4_STATIC_LINKING_ONLY_DISABLE_MEMORY_ALLOCATION) */ +#endif /*! LZ4_setStreamDecode() : * An LZ4_streamDecode_t context can be allocated once and re-used multiple times. @@ -335,7 +429,7 @@ LZ4LIB_API int LZ4_freeStreamDecode (LZ4_streamDecode_t* LZ4_str */ LZ4LIB_API int LZ4_setStreamDecode (LZ4_streamDecode_t* LZ4_streamDecode, const char* dictionary, int dictSize); -/*! LZ4_decoderRingBufferSize() : v1.8.2 +/*! LZ4_decoderRingBufferSize() : v1.8.2+ * Note : in a ring buffer scenario (optional), * blocks are presumed decompressed next to each other * up to the moment there is not enough remaining space for next block (remainingSize < maxBlockSize), @@ -347,7 +441,7 @@ LZ4LIB_API int LZ4_setStreamDecode (LZ4_streamDecode_t* LZ4_streamDecode, const * or 0 if there is an error (invalid maxBlockSize). */ LZ4LIB_API int LZ4_decoderRingBufferSize(int maxBlockSize); -#define LZ4_DECODER_RING_BUFFER_SIZE(mbs) (65536 + 14 + (mbs)) /* for static allocation; mbs presumed valid */ +#define LZ4_DECODER_RING_BUFFER_SIZE(maxBlockSize) (65536 + 14 + (maxBlockSize)) /* for static allocation; maxBlockSize presumed valid */ /*! LZ4_decompress_*_continue() : * These decoding functions allow decompression of consecutive blocks in "streaming" mode. @@ -374,84 +468,85 @@ LZ4LIB_API int LZ4_decoderRingBufferSize(int maxBlockSize); * save the last 64KB of decoded data into a safe buffer where it can't be modified during decompression, * then indicate where this data is saved using LZ4_setStreamDecode(), before decompressing next block. */ -LZ4LIB_API int LZ4_decompress_safe_continue (LZ4_streamDecode_t* LZ4_streamDecode, const char* src, char* dst, int srcSize, int dstCapacity); -LZ4LIB_API int LZ4_decompress_fast_continue (LZ4_streamDecode_t* LZ4_streamDecode, const char* src, char* dst, int originalSize); +LZ4LIB_API int +LZ4_decompress_safe_continue (LZ4_streamDecode_t* LZ4_streamDecode, + const char* src, char* dst, + int srcSize, int dstCapacity); /*! LZ4_decompress_*_usingDict() : * These decoding functions work the same as * a combination of LZ4_setStreamDecode() followed by LZ4_decompress_*_continue() * They are stand-alone, and don't need an LZ4_streamDecode_t structure. - * Dictionary is presumed stable : it must remain accessible and unmodified during next decompression. + * Dictionary is presumed stable : it must remain accessible and unmodified during decompression. + * Performance tip : Decompression speed can be substantially increased + * when dst == dictStart + dictSize. */ -LZ4LIB_API int LZ4_decompress_safe_usingDict (const char* src, char* dst, int srcSize, int dstCapcity, const char* dictStart, int dictSize); -LZ4LIB_API int LZ4_decompress_fast_usingDict (const char* src, char* dst, int originalSize, const char* dictStart, int dictSize); +LZ4LIB_API int +LZ4_decompress_safe_usingDict(const char* src, char* dst, + int srcSize, int dstCapacity, + const char* dictStart, int dictSize); + +LZ4LIB_API int +LZ4_decompress_safe_partial_usingDict(const char* src, char* dst, + int compressedSize, + int targetOutputSize, int maxOutputSize, + const char* dictStart, int dictSize); + +#endif /* LZ4_H_2983827168210 */ -/*^********************************************** +/*^************************************* * !!!!!! STATIC LINKING ONLY !!!!!! - ***********************************************/ + ***************************************/ -/*-************************************ - * Unstable declarations - ************************************** - * Declarations in this section should be considered unstable. - * Use at your own peril, etc., etc. - * They may be removed in the future. - * Their signatures may change. - **************************************/ +/*-**************************************************************************** + * Experimental section + * + * Symbols declared in this section must be considered unstable. Their + * signatures or semantics may change, or they may be removed altogether in the + * future. They are therefore only safe to depend on when the caller is + * statically linked against the library. + * + * To protect against unsafe usage, not only are the declarations guarded, + * the definitions are hidden by default + * when building LZ4 as a shared/dynamic library. + * + * In order to access these declarations, + * define LZ4_STATIC_LINKING_ONLY in your application + * before including LZ4's headers. + * + * In order to make their implementations accessible dynamically, you must + * define LZ4_PUBLISH_STATIC_FUNCTIONS when building the LZ4 library. + ******************************************************************************/ #ifdef LZ4_STATIC_LINKING_ONLY -/*! LZ4_resetStream_fast() : - * Use this, like LZ4_resetStream(), to prepare a context for a new chain of - * calls to a streaming API (e.g., LZ4_compress_fast_continue()). - * - * Note: - * Using this in advance of a non- streaming-compression function is redundant, - * and potentially bad for performance, since they all perform their own custom - * reset internally. - * - * Differences from LZ4_resetStream(): - * When an LZ4_stream_t is known to be in a internally coherent state, - * it can often be prepared for a new compression with almost no work, only - * sometimes falling back to the full, expensive reset that is always required - * when the stream is in an indeterminate state (i.e., the reset performed by - * LZ4_resetStream()). - * - * LZ4_streams are guaranteed to be in a valid state when: - * - returned from LZ4_createStream() - * - reset by LZ4_resetStream() - * - memset(stream, 0, sizeof(LZ4_stream_t)), though this is discouraged - * - the stream was in a valid state and was reset by LZ4_resetStream_fast() - * - the stream was in a valid state and was then used in any compression call - * that returned success - * - the stream was in an indeterminate state and was used in a compression - * call that fully reset the state (e.g., LZ4_compress_fast_extState()) and - * that returned success - * - * When a stream isn't known to be in a valid state, it is not safe to pass to - * any fastReset or streaming function. It must first be cleansed by the full - * LZ4_resetStream(). - */ -LZ4LIB_API void LZ4_resetStream_fast (LZ4_stream_t* streamPtr); +#ifndef LZ4_STATIC_3504398509 +#define LZ4_STATIC_3504398509 + +#ifdef LZ4_PUBLISH_STATIC_FUNCTIONS +#define LZ4LIB_STATIC_API LZ4LIB_API +#else +#define LZ4LIB_STATIC_API +#endif + /*! LZ4_compress_fast_extState_fastReset() : * A variant of LZ4_compress_fast_extState(). * - * Using this variant avoids an expensive initialization step. It is only safe - * to call if the state buffer is known to be correctly initialized already - * (see above comment on LZ4_resetStream_fast() for a definition of "correctly - * initialized"). From a high level, the difference is that this function - * initializes the provided state with a call to something like - * LZ4_resetStream_fast() while LZ4_compress_fast_extState() starts with a - * call to LZ4_resetStream(). + * Using this variant avoids an expensive initialization step. + * It is only safe to call if the state buffer is known to be correctly initialized already + * (see above comment on LZ4_resetStream_fast() for a definition of "correctly initialized"). + * From a high level, the difference is that + * this function initializes the provided state with a call to something like LZ4_resetStream_fast() + * while LZ4_compress_fast_extState() starts with a call to LZ4_resetStream(). */ -LZ4LIB_API int LZ4_compress_fast_extState_fastReset (void* state, const char* src, char* dst, int srcSize, int dstCapacity, int acceleration); +LZ4LIB_STATIC_API int LZ4_compress_fast_extState_fastReset (void* state, const char* src, char* dst, int srcSize, int dstCapacity, int acceleration); /*! LZ4_attach_dictionary() : - * This is an experimental API that allows for the efficient use of a - * static dictionary many times. + * This is an experimental API that allows + * efficient use of a static dictionary many times. * * Rather than re-loading the dictionary buffer into a working context before * each compression, or copying a pre-loaded dictionary's LZ4_stream_t into a @@ -462,8 +557,8 @@ LZ4LIB_API int LZ4_compress_fast_extState_fastReset (void* state, const char* sr * Currently, only streams which have been prepared by LZ4_loadDict() should * be expected to work. * - * Alternatively, the provided dictionary stream pointer may be NULL, in which - * case any existing dictionary stream is unset. + * Alternatively, the provided dictionaryStream may be NULL, + * in which case any existing dictionary stream is unset. * * If a dictionary is provided, it replaces any pre-existing stream history. * The dictionary contents are the only history that can be referenced and @@ -475,137 +570,211 @@ LZ4LIB_API int LZ4_compress_fast_extState_fastReset (void* state, const char* sr * stream (and source buffer) must remain in-place / accessible / unchanged * through the completion of the first compression call on the stream. */ -LZ4LIB_API void LZ4_attach_dictionary(LZ4_stream_t *working_stream, const LZ4_stream_t *dictionary_stream); +LZ4LIB_STATIC_API void +LZ4_attach_dictionary(LZ4_stream_t* workingStream, + const LZ4_stream_t* dictionaryStream); + +/*! In-place compression and decompression + * + * It's possible to have input and output sharing the same buffer, + * for highly constrained memory environments. + * In both cases, it requires input to lay at the end of the buffer, + * and decompression to start at beginning of the buffer. + * Buffer size must feature some margin, hence be larger than final size. + * + * |<------------------------buffer--------------------------------->| + * |<-----------compressed data--------->| + * |<-----------decompressed size------------------>| + * |<----margin---->| + * + * This technique is more useful for decompression, + * since decompressed size is typically larger, + * and margin is short. + * + * In-place decompression will work inside any buffer + * which size is >= LZ4_DECOMPRESS_INPLACE_BUFFER_SIZE(decompressedSize). + * This presumes that decompressedSize > compressedSize. + * Otherwise, it means compression actually expanded data, + * and it would be more efficient to store such data with a flag indicating it's not compressed. + * This can happen when data is not compressible (already compressed, or encrypted). + * + * For in-place compression, margin is larger, as it must be able to cope with both + * history preservation, requiring input data to remain unmodified up to LZ4_DISTANCE_MAX, + * and data expansion, which can happen when input is not compressible. + * As a consequence, buffer size requirements are much higher, + * and memory savings offered by in-place compression are more limited. + * + * There are ways to limit this cost for compression : + * - Reduce history size, by modifying LZ4_DISTANCE_MAX. + * Note that it is a compile-time constant, so all compressions will apply this limit. + * Lower values will reduce compression ratio, except when input_size < LZ4_DISTANCE_MAX, + * so it's a reasonable trick when inputs are known to be small. + * - Require the compressor to deliver a "maximum compressed size". + * This is the `dstCapacity` parameter in `LZ4_compress*()`. + * When this size is < LZ4_COMPRESSBOUND(inputSize), then compression can fail, + * in which case, the return code will be 0 (zero). + * The caller must be ready for these cases to happen, + * and typically design a backup scheme to send data uncompressed. + * The combination of both techniques can significantly reduce + * the amount of margin required for in-place compression. + * + * In-place compression can work in any buffer + * which size is >= (maxCompressedSize) + * with maxCompressedSize == LZ4_COMPRESSBOUND(srcSize) for guaranteed compression success. + * LZ4_COMPRESS_INPLACE_BUFFER_SIZE() depends on both maxCompressedSize and LZ4_DISTANCE_MAX, + * so it's possible to reduce memory requirements by playing with them. + */ + +#define LZ4_DECOMPRESS_INPLACE_MARGIN(compressedSize) (((compressedSize) >> 8) + 32) +#define LZ4_DECOMPRESS_INPLACE_BUFFER_SIZE(decompressedSize) ((decompressedSize) + LZ4_DECOMPRESS_INPLACE_MARGIN(decompressedSize)) /**< note: presumes that compressedSize < decompressedSize. note2: margin is overestimated a bit, since it could use compressedSize instead */ + +#ifndef LZ4_DISTANCE_MAX /* history window size; can be user-defined at compile time */ +# define LZ4_DISTANCE_MAX 65535 /* set to maximum value by default */ #endif -/*-************************************ - * Private definitions - ************************************** - * Do not use these definitions. - * They are exposed to allow static allocation of `LZ4_stream_t` and `LZ4_streamDecode_t`. - * Using these definitions will expose code to API and/or ABI break in future versions of the library. - **************************************/ +#define LZ4_COMPRESS_INPLACE_MARGIN (LZ4_DISTANCE_MAX + 32) /* LZ4_DISTANCE_MAX can be safely replaced by srcSize when it's smaller */ +#define LZ4_COMPRESS_INPLACE_BUFFER_SIZE(maxCompressedSize) ((maxCompressedSize) + LZ4_COMPRESS_INPLACE_MARGIN) /**< maxCompressedSize is generally LZ4_COMPRESSBOUND(inputSize), but can be set to any lower value, with the risk that compression can fail (return code 0(zero)) */ + +#endif /* LZ4_STATIC_3504398509 */ +#endif /* LZ4_STATIC_LINKING_ONLY */ + + + +#ifndef LZ4_H_98237428734687 +#define LZ4_H_98237428734687 + +/*-************************************************************ + * Private Definitions + ************************************************************** + * Do not use these definitions directly. + * They are only exposed to allow static allocation of `LZ4_stream_t` and `LZ4_streamDecode_t`. + * Accessing members will expose user code to API and/or ABI break in future versions of the library. + **************************************************************/ #define LZ4_HASHLOG (LZ4_MEMORY_USAGE-2) #define LZ4_HASHTABLESIZE (1 << LZ4_MEMORY_USAGE) #define LZ4_HASH_SIZE_U32 (1 << LZ4_HASHLOG) /* required as macro for static allocation */ #if defined(__cplusplus) || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */) -#include +# include + typedef int8_t LZ4_i8; + typedef uint8_t LZ4_byte; + typedef uint16_t LZ4_u16; + typedef uint32_t LZ4_u32; +#else + typedef signed char LZ4_i8; + typedef unsigned char LZ4_byte; + typedef unsigned short LZ4_u16; + typedef unsigned int LZ4_u32; +#endif + +/*! LZ4_stream_t : + * Never ever use below internal definitions directly ! + * These definitions are not API/ABI safe, and may change in future versions. + * If you need static allocation, declare or allocate an LZ4_stream_t object. +**/ typedef struct LZ4_stream_t_internal LZ4_stream_t_internal; struct LZ4_stream_t_internal { - uint32_t hashTable[LZ4_HASH_SIZE_U32]; - uint32_t currentOffset; - uint16_t initCheck; - uint16_t tableType; - const uint8_t* dictionary; + LZ4_u32 hashTable[LZ4_HASH_SIZE_U32]; + const LZ4_byte* dictionary; const LZ4_stream_t_internal* dictCtx; - uint32_t dictSize; + LZ4_u32 currentOffset; + LZ4_u32 tableType; + LZ4_u32 dictSize; + /* Implicit padding to ensure structure is aligned */ }; -typedef struct { - const uint8_t* externalDict; - size_t extDictSize; - const uint8_t* prefixEnd; - size_t prefixSize; -} LZ4_streamDecode_t_internal; - -#else +#define LZ4_STREAM_MINSIZE ((1UL << LZ4_MEMORY_USAGE) + 32) /* static size, for inter-version compatibility */ +union LZ4_stream_u { + char minStateSize[LZ4_STREAM_MINSIZE]; + LZ4_stream_t_internal internal_donotuse; +}; /* previously typedef'd to LZ4_stream_t */ -typedef struct LZ4_stream_t_internal LZ4_stream_t_internal; -struct LZ4_stream_t_internal { - unsigned int hashTable[LZ4_HASH_SIZE_U32]; - unsigned int currentOffset; - unsigned short initCheck; - unsigned short tableType; - const unsigned char* dictionary; - const LZ4_stream_t_internal* dictCtx; - unsigned int dictSize; -}; +/*! LZ4_initStream() : v1.9.0+ + * An LZ4_stream_t structure must be initialized at least once. + * This is automatically done when invoking LZ4_createStream(), + * but it's not when the structure is simply declared on stack (for example). + * + * Use LZ4_initStream() to properly initialize a newly declared LZ4_stream_t. + * It can also initialize any arbitrary buffer of sufficient size, + * and will @return a pointer of proper type upon initialization. + * + * Note : initialization fails if size and alignment conditions are not respected. + * In which case, the function will @return NULL. + * Note2: An LZ4_stream_t structure guarantees correct alignment and size. + * Note3: Before v1.9.0, use LZ4_resetStream() instead +**/ +LZ4LIB_API LZ4_stream_t* LZ4_initStream (void* buffer, size_t size); + + +/*! LZ4_streamDecode_t : + * Never ever use below internal definitions directly ! + * These definitions are not API/ABI safe, and may change in future versions. + * If you need static allocation, declare or allocate an LZ4_streamDecode_t object. +**/ typedef struct { - const unsigned char* externalDict; + const LZ4_byte* externalDict; + const LZ4_byte* prefixEnd; size_t extDictSize; - const unsigned char* prefixEnd; size_t prefixSize; } LZ4_streamDecode_t_internal; -#endif - -/*! - * LZ4_stream_t : - * information structure to track an LZ4 stream. - * init this structure before first use. - * note : only use in association with static linking ! - * this definition is not API/ABI safe, - * it may change in a future version ! - */ -#define LZ4_STREAMSIZE_U64 ((1 << (LZ4_MEMORY_USAGE-3)) + 4) -#define LZ4_STREAMSIZE (LZ4_STREAMSIZE_U64 * sizeof(unsigned long long)) -union LZ4_stream_u { - unsigned long long table[LZ4_STREAMSIZE_U64]; - LZ4_stream_t_internal internal_donotuse; -} ; /* previously typedef'd to LZ4_stream_t */ - - -/*! - * LZ4_streamDecode_t : - * information structure to track an LZ4 stream during decompression. - * init this structure using LZ4_setStreamDecode (or memset()) before first use - * note : only use in association with static linking ! - * this definition is not API/ABI safe, - * and may change in a future version ! - */ -#define LZ4_STREAMDECODESIZE_U64 4 -#define LZ4_STREAMDECODESIZE (LZ4_STREAMDECODESIZE_U64 * sizeof(unsigned long long)) +#define LZ4_STREAMDECODE_MINSIZE 32 union LZ4_streamDecode_u { - unsigned long long table[LZ4_STREAMDECODESIZE_U64]; + char minStateSize[LZ4_STREAMDECODE_MINSIZE]; LZ4_streamDecode_t_internal internal_donotuse; } ; /* previously typedef'd to LZ4_streamDecode_t */ + /*-************************************ * Obsolete Functions **************************************/ /*! Deprecation warnings - Should deprecation warnings be a problem, - it is generally possible to disable them, - typically with -Wno-deprecated-declarations for gcc - or _CRT_SECURE_NO_WARNINGS in Visual. - Otherwise, it's also possible to define LZ4_DISABLE_DEPRECATE_WARNINGS */ + * + * Deprecated functions make the compiler generate a warning when invoked. + * This is meant to invite users to update their source code. + * Should deprecation warnings be a problem, it is generally possible to disable them, + * typically with -Wno-deprecated-declarations for gcc + * or _CRT_SECURE_NO_WARNINGS in Visual. + * + * Another method is to define LZ4_DISABLE_DEPRECATE_WARNINGS + * before including the header file. + */ #ifdef LZ4_DISABLE_DEPRECATE_WARNINGS # define LZ4_DEPRECATED(message) /* disable deprecation warnings */ #else -# define LZ4_GCC_VERSION (__GNUC__ * 100 + __GNUC_MINOR__) # if defined (__cplusplus) && (__cplusplus >= 201402) /* C++14 or greater */ # define LZ4_DEPRECATED(message) [[deprecated(message)]] -# elif (LZ4_GCC_VERSION >= 405) || defined(__clang__) -# define LZ4_DEPRECATED(message) __attribute__((deprecated(message))) -# elif (LZ4_GCC_VERSION >= 301) -# define LZ4_DEPRECATED(message) __attribute__((deprecated)) # elif defined(_MSC_VER) # define LZ4_DEPRECATED(message) __declspec(deprecated(message)) +# elif defined(__clang__) || (defined(__GNUC__) && (__GNUC__ * 10 + __GNUC_MINOR__ >= 45)) +# define LZ4_DEPRECATED(message) __attribute__((deprecated(message))) +# elif defined(__GNUC__) && (__GNUC__ * 10 + __GNUC_MINOR__ >= 31) +# define LZ4_DEPRECATED(message) __attribute__((deprecated)) # else -# pragma message("WARNING: You need to implement LZ4_DEPRECATED for this compiler") -# define LZ4_DEPRECATED(message) +# pragma message("WARNING: LZ4_DEPRECATED needs custom implementation for this compiler") +# define LZ4_DEPRECATED(message) /* disabled */ # endif #endif /* LZ4_DISABLE_DEPRECATE_WARNINGS */ -/* Obsolete compression functions */ -LZ4_DEPRECATED("use LZ4_compress_default() instead") LZ4LIB_API int LZ4_compress (const char* source, char* dest, int sourceSize); -LZ4_DEPRECATED("use LZ4_compress_default() instead") LZ4LIB_API int LZ4_compress_limitedOutput (const char* source, char* dest, int sourceSize, int maxOutputSize); +/*! Obsolete compression functions (since v1.7.3) */ +LZ4_DEPRECATED("use LZ4_compress_default() instead") LZ4LIB_API int LZ4_compress (const char* src, char* dest, int srcSize); +LZ4_DEPRECATED("use LZ4_compress_default() instead") LZ4LIB_API int LZ4_compress_limitedOutput (const char* src, char* dest, int srcSize, int maxOutputSize); LZ4_DEPRECATED("use LZ4_compress_fast_extState() instead") LZ4LIB_API int LZ4_compress_withState (void* state, const char* source, char* dest, int inputSize); LZ4_DEPRECATED("use LZ4_compress_fast_extState() instead") LZ4LIB_API int LZ4_compress_limitedOutput_withState (void* state, const char* source, char* dest, int inputSize, int maxOutputSize); LZ4_DEPRECATED("use LZ4_compress_fast_continue() instead") LZ4LIB_API int LZ4_compress_continue (LZ4_stream_t* LZ4_streamPtr, const char* source, char* dest, int inputSize); LZ4_DEPRECATED("use LZ4_compress_fast_continue() instead") LZ4LIB_API int LZ4_compress_limitedOutput_continue (LZ4_stream_t* LZ4_streamPtr, const char* source, char* dest, int inputSize, int maxOutputSize); -/* Obsolete decompression functions */ +/*! Obsolete decompression functions (since v1.8.0) */ LZ4_DEPRECATED("use LZ4_decompress_fast() instead") LZ4LIB_API int LZ4_uncompress (const char* source, char* dest, int outputSize); LZ4_DEPRECATED("use LZ4_decompress_safe() instead") LZ4LIB_API int LZ4_uncompress_unknownOutputSize (const char* source, char* dest, int isize, int maxOutputSize); -/* Obsolete streaming functions; degraded functionality; do not use! +/* Obsolete streaming functions (since v1.7.0) + * degraded functionality; do not use! * * In order to perform streaming compression, these functions depended on data * that is no longer tracked in the state. They have been preserved as well as @@ -616,14 +785,56 @@ LZ4_DEPRECATED("use LZ4_decompress_safe() instead") LZ4LIB_API int LZ4_uncompres */ LZ4_DEPRECATED("Use LZ4_createStream() instead") LZ4LIB_API void* LZ4_create (char* inputBuffer); LZ4_DEPRECATED("Use LZ4_createStream() instead") LZ4LIB_API int LZ4_sizeofStreamState(void); -LZ4_DEPRECATED("Use LZ4_resetStream() instead") LZ4LIB_API int LZ4_resetStreamState(void* state, char* inputBuffer); -LZ4_DEPRECATED("Use LZ4_saveDict() instead") LZ4LIB_API char* LZ4_slideInputBuffer (void* state); +LZ4_DEPRECATED("Use LZ4_resetStream() instead") LZ4LIB_API int LZ4_resetStreamState(void* state, char* inputBuffer); +LZ4_DEPRECATED("Use LZ4_saveDict() instead") LZ4LIB_API char* LZ4_slideInputBuffer (void* state); -/* Obsolete streaming decoding functions */ +/*! Obsolete streaming decoding functions (since v1.7.0) */ LZ4_DEPRECATED("use LZ4_decompress_safe_usingDict() instead") LZ4LIB_API int LZ4_decompress_safe_withPrefix64k (const char* src, char* dst, int compressedSize, int maxDstSize); LZ4_DEPRECATED("use LZ4_decompress_fast_usingDict() instead") LZ4LIB_API int LZ4_decompress_fast_withPrefix64k (const char* src, char* dst, int originalSize); -#endif /* LZ4_H_2983827168210 */ +/*! Obsolete LZ4_decompress_fast variants (since v1.9.0) : + * These functions used to be faster than LZ4_decompress_safe(), + * but this is no longer the case. They are now slower. + * This is because LZ4_decompress_fast() doesn't know the input size, + * and therefore must progress more cautiously into the input buffer to not read beyond the end of block. + * On top of that `LZ4_decompress_fast()` is not protected vs malformed or malicious inputs, making it a security liability. + * As a consequence, LZ4_decompress_fast() is strongly discouraged, and deprecated. + * + * The last remaining LZ4_decompress_fast() specificity is that + * it can decompress a block without knowing its compressed size. + * Such functionality can be achieved in a more secure manner + * by employing LZ4_decompress_safe_partial(). + * + * Parameters: + * originalSize : is the uncompressed size to regenerate. + * `dst` must be already allocated, its size must be >= 'originalSize' bytes. + * @return : number of bytes read from source buffer (== compressed size). + * The function expects to finish at block's end exactly. + * If the source stream is detected malformed, the function stops decoding and returns a negative result. + * note : LZ4_decompress_fast*() requires originalSize. Thanks to this information, it never writes past the output buffer. + * However, since it doesn't know its 'src' size, it may read an unknown amount of input, past input buffer bounds. + * Also, since match offsets are not validated, match reads from 'src' may underflow too. + * These issues never happen if input (compressed) data is correct. + * But they may happen if input data is invalid (error or intentional tampering). + * As a consequence, use these functions in trusted environments with trusted data **only**. + */ +LZ4_DEPRECATED("This function is deprecated and unsafe. Consider using LZ4_decompress_safe() instead") +LZ4LIB_API int LZ4_decompress_fast (const char* src, char* dst, int originalSize); +LZ4_DEPRECATED("This function is deprecated and unsafe. Consider using LZ4_decompress_safe_continue() instead") +LZ4LIB_API int LZ4_decompress_fast_continue (LZ4_streamDecode_t* LZ4_streamDecode, const char* src, char* dst, int originalSize); +LZ4_DEPRECATED("This function is deprecated and unsafe. Consider using LZ4_decompress_safe_usingDict() instead") +LZ4LIB_API int LZ4_decompress_fast_usingDict (const char* src, char* dst, int originalSize, const char* dictStart, int dictSize); + +/*! LZ4_resetStream() : + * An LZ4_stream_t structure must be initialized at least once. + * This is done with LZ4_initStream(), or LZ4_resetStream(). + * Consider switching to LZ4_initStream(), + * invoking LZ4_resetStream() will trigger deprecation warnings in the future. + */ +LZ4LIB_API void LZ4_resetStream (LZ4_stream_t* streamPtr); + + +#endif /* LZ4_H_98237428734687 */ #if defined (__cplusplus) From 4ea92f9a661cf3cc1ae862d77adff9a43182cbfe Mon Sep 17 00:00:00 2001 From: Evan Ramos Date: Tue, 18 Apr 2023 03:40:08 -0500 Subject: [PATCH 027/155] Update LZ4 to 202d647ff420d614bd16adf5257ad79580eaeb1c --- src/arch/util/lz4.c | 145 ++++++++++++++++++++++++++------------------ src/arch/util/lz4.h | 42 +++++++++---- 2 files changed, 118 insertions(+), 69 deletions(-) diff --git a/src/arch/util/lz4.c b/src/arch/util/lz4.c index 654bfdf32f..6f09b7354f 100755 --- a/src/arch/util/lz4.c +++ b/src/arch/util/lz4.c @@ -37,7 +37,8 @@ **************************************/ /* * LZ4_HEAPMODE : - * Select how default compression functions will allocate memory for their hash table, + * Select how stateless compression functions like `LZ4_compress_default()` + * allocate memory for their hash table, * in memory stack (0:default, fastest), or in memory heap (1:requires malloc()). */ #ifndef LZ4_HEAPMODE @@ -279,7 +280,7 @@ static const int LZ4_minLength = (MFLIMIT+1); static int g_debuglog_enable = 1; # define DEBUGLOG(l, ...) { \ if ((g_debuglog_enable) && (l<=LZ4_DEBUG)) { \ - fprintf(stderr, __FILE__ ": "); \ + fprintf(stderr, __FILE__ " %i: ", __LINE__); \ fprintf(stderr, __VA_ARGS__); \ fprintf(stderr, " \n"); \ } } @@ -379,14 +380,16 @@ static void LZ4_write32(void* memPtr, U32 value) { *(U32*)memPtr = value; } /* __pack instructions are safer, but compiler specific, hence potentially problematic for some compilers */ /* currently only defined for gcc and icc */ -typedef union { U16 u16; U32 u32; reg_t uArch; } __attribute__((packed)) LZ4_unalign; +typedef struct { U16 u16; } __attribute__((packed)) LZ4_unalign16; +typedef struct { U32 u32; } __attribute__((packed)) LZ4_unalign32; +typedef struct { reg_t uArch; } __attribute__((packed)) LZ4_unalignST; -static U16 LZ4_read16(const void* ptr) { return ((const LZ4_unalign*)ptr)->u16; } -static U32 LZ4_read32(const void* ptr) { return ((const LZ4_unalign*)ptr)->u32; } -static reg_t LZ4_read_ARCH(const void* ptr) { return ((const LZ4_unalign*)ptr)->uArch; } +static U16 LZ4_read16(const void* ptr) { return ((const LZ4_unalign16*)ptr)->u16; } +static U32 LZ4_read32(const void* ptr) { return ((const LZ4_unalign32*)ptr)->u32; } +static reg_t LZ4_read_ARCH(const void* ptr) { return ((const LZ4_unalignST*)ptr)->uArch; } -static void LZ4_write16(void* memPtr, U16 value) { ((LZ4_unalign*)memPtr)->u16 = value; } -static void LZ4_write32(void* memPtr, U32 value) { ((LZ4_unalign*)memPtr)->u32 = value; } +static void LZ4_write16(void* memPtr, U16 value) { ((LZ4_unalign16*)memPtr)->u16 = value; } +static void LZ4_write32(void* memPtr, U32 value) { ((LZ4_unalign32*)memPtr)->u32 = value; } #else /* safe and portable access using memcpy() */ @@ -803,23 +806,19 @@ LZ4_FORCE_INLINE void LZ4_putIndexOnHash(U32 idx, U32 h, void* tableBase, tableT } } +/* LZ4_putPosition*() : only used in byPtr mode */ LZ4_FORCE_INLINE void LZ4_putPositionOnHash(const BYTE* p, U32 h, - void* tableBase, tableType_t const tableType, - const BYTE* srcBase) + void* tableBase, tableType_t const tableType) { - switch (tableType) - { - case clearedTable: { /* illegal! */ assert(0); return; } - case byPtr: { const BYTE** hashTable = (const BYTE**)tableBase; hashTable[h] = p; return; } - case byU32: { U32* hashTable = (U32*) tableBase; hashTable[h] = (U32)(p-srcBase); return; } - case byU16: { U16* hashTable = (U16*) tableBase; hashTable[h] = (U16)(p-srcBase); return; } - } + const BYTE** const hashTable = (const BYTE**)tableBase; + assert(tableType == byPtr); (void)tableType; + hashTable[h] = p; } -LZ4_FORCE_INLINE void LZ4_putPosition(const BYTE* p, void* tableBase, tableType_t tableType, const BYTE* srcBase) +LZ4_FORCE_INLINE void LZ4_putPosition(const BYTE* p, void* tableBase, tableType_t tableType) { U32 const h = LZ4_hashPosition(p, tableType); - LZ4_putPositionOnHash(p, h, tableBase, tableType, srcBase); + LZ4_putPositionOnHash(p, h, tableBase, tableType); } /* LZ4_getIndexOnHash() : @@ -844,20 +843,18 @@ LZ4_FORCE_INLINE U32 LZ4_getIndexOnHash(U32 h, const void* tableBase, tableType_ assert(0); return 0; /* forbidden case */ } -static const BYTE* LZ4_getPositionOnHash(U32 h, const void* tableBase, tableType_t tableType, const BYTE* srcBase) +static const BYTE* LZ4_getPositionOnHash(U32 h, const void* tableBase, tableType_t tableType) { - if (tableType == byPtr) { const BYTE* const* hashTable = (const BYTE* const*) tableBase; return hashTable[h]; } - if (tableType == byU32) { const U32* const hashTable = (const U32*) tableBase; return hashTable[h] + srcBase; } - { const U16* const hashTable = (const U16*) tableBase; return hashTable[h] + srcBase; } /* default, to ensure a return */ + assert(tableType == byPtr); (void)tableType; + { const BYTE* const* hashTable = (const BYTE* const*) tableBase; return hashTable[h]; } } LZ4_FORCE_INLINE const BYTE* LZ4_getPosition(const BYTE* p, - const void* tableBase, tableType_t tableType, - const BYTE* srcBase) + const void* tableBase, tableType_t tableType) { U32 const h = LZ4_hashPosition(p, tableType); - return LZ4_getPositionOnHash(h, tableBase, tableType, srcBase); + return LZ4_getPositionOnHash(h, tableBase, tableType); } LZ4_FORCE_INLINE void @@ -903,7 +900,7 @@ LZ4_prepareTable(LZ4_stream_t_internal* const cctx, /** LZ4_compress_generic() : * inlined, to ensure branches are decided at compilation time. - * Presumed already validated at this stage: + * The following conditions are presumed already validated: * - source != NULL * - inputSize > 0 */ @@ -921,10 +918,10 @@ LZ4_FORCE_INLINE int LZ4_compress_generic_validated( const int acceleration) { int result; - const BYTE* ip = (const BYTE*) source; + const BYTE* ip = (const BYTE*)source; U32 const startIndex = cctx->currentOffset; - const BYTE* base = (const BYTE*) source - startIndex; + const BYTE* base = (const BYTE*)source - startIndex; const BYTE* lowLimit; const LZ4_stream_t_internal* dictCtx = (const LZ4_stream_t_internal*) cctx->dictCtx; @@ -932,7 +929,8 @@ LZ4_FORCE_INLINE int LZ4_compress_generic_validated( dictDirective == usingDictCtx ? dictCtx->dictionary : cctx->dictionary; const U32 dictSize = dictDirective == usingDictCtx ? dictCtx->dictSize : cctx->dictSize; - const U32 dictDelta = (dictDirective == usingDictCtx) ? startIndex - dictCtx->currentOffset : 0; /* make indexes in dictCtx comparable with index in current context */ + const U32 dictDelta = + (dictDirective == usingDictCtx) ? startIndex - dictCtx->currentOffset : 0; /* make indexes in dictCtx comparable with indexes in current context */ int const maybe_extMem = (dictDirective == usingExtDict) || (dictDirective == usingDictCtx); U32 const prefixIdxLimit = startIndex - dictSize; /* used when dictDirective == dictSmall */ @@ -957,11 +955,11 @@ LZ4_FORCE_INLINE int LZ4_compress_generic_validated( DEBUGLOG(5, "LZ4_compress_generic_validated: srcSize=%i, tableType=%u", inputSize, tableType); assert(ip != NULL); + if (tableType == byU16) assert(inputSize=LZ4_64Klimit)) { return 0; } /* Size too large (not within 64K limit) */ - if (tableType==byPtr) assert(dictDirective==noDict); /* only supported use case with byPtr */ assert(acceleration >= 1); lowLimit = (const BYTE*)source - (dictDirective == withPrefix64k ? dictSize : 0); @@ -981,7 +979,12 @@ LZ4_FORCE_INLINE int LZ4_compress_generic_validated( if (inputSizehashTable, tableType, base); + { U32 const h = LZ4_hashPosition(ip, tableType); + if (tableType == byPtr) { + LZ4_putPositionOnHash(ip, h, cctx->hashTable, byPtr); + } else { + LZ4_putIndexOnHash(startIndex, h, cctx->hashTable, tableType); + } } ip++; forwardH = LZ4_hashPosition(ip, tableType); /* Main Loop */ @@ -1004,9 +1007,9 @@ LZ4_FORCE_INLINE int LZ4_compress_generic_validated( if (unlikely(forwardIp > mflimitPlusOne)) goto _last_literals; assert(ip < mflimitPlusOne); - match = LZ4_getPositionOnHash(h, cctx->hashTable, tableType, base); + match = LZ4_getPositionOnHash(h, cctx->hashTable, tableType); forwardH = LZ4_hashPosition(forwardIp, tableType); - LZ4_putPositionOnHash(ip, h, cctx->hashTable, tableType, base); + LZ4_putPositionOnHash(ip, h, cctx->hashTable, tableType); } while ( (match+LZ4_DISTANCE_MAX < ip) || (LZ4_read32(match) != LZ4_read32(ip)) ); @@ -1204,13 +1207,19 @@ LZ4_FORCE_INLINE int LZ4_compress_generic_validated( if (ip >= mflimitPlusOne) break; /* Fill table */ - LZ4_putPosition(ip-2, cctx->hashTable, tableType, base); + { U32 const h = LZ4_hashPosition(ip-2, tableType); + if (tableType == byPtr) { + LZ4_putPositionOnHash(ip-2, h, cctx->hashTable, byPtr); + } else { + U32 const idx = (U32)((ip-2) - base); + LZ4_putIndexOnHash(idx, h, cctx->hashTable, tableType); + } } /* Test next position */ if (tableType == byPtr) { - match = LZ4_getPosition(ip, cctx->hashTable, tableType, base); - LZ4_putPosition(ip, cctx->hashTable, tableType, base); + match = LZ4_getPosition(ip, cctx->hashTable, tableType); + LZ4_putPosition(ip, cctx->hashTable, tableType); if ( (match+LZ4_DISTANCE_MAX >= ip) && (LZ4_read32(match) == LZ4_read32(ip)) ) { token=op++; *token=0; goto _next_match; } @@ -1224,6 +1233,7 @@ LZ4_FORCE_INLINE int LZ4_compress_generic_validated( if (dictDirective == usingDictCtx) { if (matchIndex < startIndex) { /* there was no match, try the dictionary */ + assert(tableType == byU32); matchIndex = LZ4_getIndexOnHash(h, dictCtx->hashTable, byU32); match = dictBase + matchIndex; lowLimit = dictionary; /* required for match length counter */ @@ -1377,9 +1387,10 @@ int LZ4_compress_fast_extState(void* state, const char* source, char* dest, int */ int LZ4_compress_fast_extState_fastReset(void* state, const char* src, char* dst, int srcSize, int dstCapacity, int acceleration) { - LZ4_stream_t_internal* ctx = &((LZ4_stream_t*)state)->internal_donotuse; + LZ4_stream_t_internal* const ctx = &((LZ4_stream_t*)state)->internal_donotuse; if (acceleration < 1) acceleration = LZ4_ACCELERATION_DEFAULT; if (acceleration > LZ4_ACCELERATION_MAX) acceleration = LZ4_ACCELERATION_MAX; + assert(ctx != NULL); if (dstCapacity >= LZ4_compressBound(srcSize)) { if (srcSize < LZ4_64Klimit) { @@ -1413,17 +1424,17 @@ int LZ4_compress_fast_extState_fastReset(void* state, const char* src, char* dst } -int LZ4_compress_fast(const char* source, char* dest, int inputSize, int maxOutputSize, int acceleration) +int LZ4_compress_fast(const char* src, char* dest, int srcSize, int dstCapacity, int acceleration) { int result; #if (LZ4_HEAPMODE) - LZ4_stream_t* ctxPtr = (LZ4_stream_t*)ALLOC(sizeof(LZ4_stream_t)); /* malloc-calloc always properly aligned */ + LZ4_stream_t* const ctxPtr = (LZ4_stream_t*)ALLOC(sizeof(LZ4_stream_t)); /* malloc-calloc always properly aligned */ if (ctxPtr == NULL) return 0; #else LZ4_stream_t ctx; LZ4_stream_t* const ctxPtr = &ctx; #endif - result = LZ4_compress_fast_extState(ctxPtr, source, dest, inputSize, maxOutputSize, acceleration); + result = LZ4_compress_fast_extState(ctxPtr, src, dest, srcSize, dstCapacity, acceleration); #if (LZ4_HEAPMODE) FREEMEM(ctxPtr); @@ -1432,9 +1443,9 @@ int LZ4_compress_fast(const char* source, char* dest, int inputSize, int maxOutp } -int LZ4_compress_default(const char* src, char* dst, int srcSize, int maxOutputSize) +int LZ4_compress_default(const char* src, char* dst, int srcSize, int dstCapacity) { - return LZ4_compress_fast(src, dst, srcSize, maxOutputSize, 1); + return LZ4_compress_fast(src, dst, srcSize, dstCapacity, 1); } @@ -1461,11 +1472,11 @@ static int LZ4_compress_destSize_extState (LZ4_stream_t* state, const char* src, int LZ4_compress_destSize(const char* src, char* dst, int* srcSizePtr, int targetDstSize) { #if (LZ4_HEAPMODE) - LZ4_stream_t* ctx = (LZ4_stream_t*)ALLOC(sizeof(LZ4_stream_t)); /* malloc-calloc always properly aligned */ + LZ4_stream_t* const ctx = (LZ4_stream_t*)ALLOC(sizeof(LZ4_stream_t)); /* malloc-calloc always properly aligned */ if (ctx == NULL) return 0; #else LZ4_stream_t ctxBody; - LZ4_stream_t* ctx = &ctxBody; + LZ4_stream_t* const ctx = &ctxBody; #endif int result = LZ4_compress_destSize_extState(ctx, src, dst, srcSizePtr, targetDstSize); @@ -1540,11 +1551,11 @@ int LZ4_freeStream (LZ4_stream_t* LZ4_stream) #define HASH_UNIT sizeof(reg_t) int LZ4_loadDict (LZ4_stream_t* LZ4_dict, const char* dictionary, int dictSize) { - LZ4_stream_t_internal* dict = &LZ4_dict->internal_donotuse; + LZ4_stream_t_internal* const dict = &LZ4_dict->internal_donotuse; const tableType_t tableType = byU32; const BYTE* p = (const BYTE*)dictionary; const BYTE* const dictEnd = p + dictSize; - const BYTE* base; + U32 idx32; DEBUGLOG(4, "LZ4_loadDict (%i bytes from %p into %p)", dictSize, dictionary, LZ4_dict); @@ -1567,14 +1578,15 @@ int LZ4_loadDict (LZ4_stream_t* LZ4_dict, const char* dictionary, int dictSize) } if ((dictEnd - p) > 64 KB) p = dictEnd - 64 KB; - base = dictEnd - dict->currentOffset; dict->dictionary = p; dict->dictSize = (U32)(dictEnd - p); dict->tableType = (U32)tableType; + idx32 = dict->currentOffset - dict->dictSize; while (p <= dictEnd-HASH_UNIT) { - LZ4_putPosition(p, dict->hashTable, tableType, base); - p+=3; + U32 const h = LZ4_hashPosition(p, tableType); + LZ4_putIndexOnHash(idx32, h, dict->hashTable, tableType); + p+=3; idx32+=3; } return (int)dict->dictSize; @@ -1711,7 +1723,7 @@ int LZ4_compress_fast_continue (LZ4_stream_t* LZ4_stream, /* Hidden debug function, to force-test external dictionary mode */ int LZ4_compress_forceExtDict (LZ4_stream_t* LZ4_dict, const char* source, char* dest, int srcSize) { - LZ4_stream_t_internal* streamPtr = &LZ4_dict->internal_donotuse; + LZ4_stream_t_internal* const streamPtr = &LZ4_dict->internal_donotuse; int result; LZ4_renormDictT(streamPtr, srcSize); @@ -1774,7 +1786,7 @@ typedef enum { decode_full_block = 0, partial_decode = 1 } earlyEnd_directive; * does not know end of input * presumes input is well formed * note : will consume at least one byte */ -size_t read_long_length_no_check(const BYTE** pp) +static size_t read_long_length_no_check(const BYTE** pp) { size_t b, l = 0; do { b = **pp; (*pp)++; l += b; } while (b==255); @@ -1993,6 +2005,7 @@ LZ4_decompress_generic( } /* Fast loop : decode sequences as long as output < oend-FASTLOOP_SAFE_DISTANCE */ + DEBUGLOG(6, "using fast decode loop"); while (1) { /* Main fastloop assertion: We can always wildcopy FASTLOOP_SAFE_DISTANCE */ assert(oend - op >= FASTLOOP_SAFE_DISTANCE); @@ -2003,7 +2016,10 @@ LZ4_decompress_generic( /* decode literal length */ if (length == RUN_MASK) { size_t const addl = read_variable_length(&ip, iend-RUN_MASK, 1); - if (addl == rvl_error) { goto _output_error; } + if (addl == rvl_error) { + DEBUGLOG(6, "error reading long literal length"); + goto _output_error; + } length += addl; if (unlikely((uptrval)(op)+length<(uptrval)(op))) { goto _output_error; } /* overflow detection */ if (unlikely((uptrval)(ip)+length<(uptrval)(ip))) { goto _output_error; } /* overflow detection */ @@ -2026,6 +2042,7 @@ LZ4_decompress_generic( /* get offset */ offset = LZ4_readLE16(ip); ip+=2; + DEBUGLOG(6, " offset = %zu", offset); match = op - offset; assert(match <= op); /* overflow check */ @@ -2034,11 +2051,17 @@ LZ4_decompress_generic( if (length == ML_MASK) { size_t const addl = read_variable_length(&ip, iend - LASTLITERALS + 1, 0); - if (addl == rvl_error) { goto _output_error; } + if (addl == rvl_error) { + DEBUGLOG(6, "error reading long match length"); + goto _output_error; + } length += addl; length += MINMATCH; if (unlikely((uptrval)(op)+length<(uptrval)op)) { goto _output_error; } /* overflow detection */ - if ((checkOffset) && (unlikely(match + dictSize < lowPrefix))) { goto _output_error; } /* Error : offset outside buffers */ + if ((checkOffset) && (unlikely(match + dictSize < lowPrefix))) { + DEBUGLOG(6, "Error : offset outside buffers"); + goto _output_error; + } if (op + length >= oend - FASTLOOP_SAFE_DISTANCE) { goto safe_match_copy; } @@ -2062,7 +2085,10 @@ LZ4_decompress_generic( continue; } } } - if (checkOffset && (unlikely(match + dictSize < lowPrefix))) { goto _output_error; } /* Error : offset outside buffers */ + if ( checkOffset && (unlikely(match + dictSize < lowPrefix)) ) { + DEBUGLOG(6, "Error : pos=%zi, offset=%zi => outside buffers", op-lowPrefix, op-match); + goto _output_error; + } /* match starting within external dictionary */ if ((dict==usingExtDict) && (match < lowPrefix)) { assert(dictEnd != NULL); @@ -2071,7 +2097,8 @@ LZ4_decompress_generic( DEBUGLOG(7, "partialDecoding: dictionary match, close to dstEnd"); length = MIN(length, (size_t)(oend-op)); } else { - goto _output_error; /* end-of-block condition violated */ + DEBUGLOG(6, "end-of-block condition violated") + goto _output_error; } } if (length <= (size_t)(lowPrefix-match)) { @@ -2111,6 +2138,7 @@ LZ4_decompress_generic( #endif /* Main Loop : decode remaining sequences where output < FASTLOOP_SAFE_DISTANCE */ + DEBUGLOG(6, "using safe decode loop"); while (1) { assert(ip < iend); token = *ip++; @@ -2418,6 +2446,7 @@ int LZ4_decompress_safe_forceExtDict(const char* source, char* dest, int compressedSize, int maxOutputSize, const void* dictStart, size_t dictSize) { + DEBUGLOG(5, "LZ4_decompress_safe_forceExtDict"); return LZ4_decompress_generic(source, dest, compressedSize, maxOutputSize, decode_full_block, usingExtDict, (BYTE*)dest, (const BYTE*)dictStart, dictSize); diff --git a/src/arch/util/lz4.h b/src/arch/util/lz4.h index 491c6087c4..f7b255dc7e 100755 --- a/src/arch/util/lz4.h +++ b/src/arch/util/lz4.h @@ -189,8 +189,9 @@ LZ4LIB_API const char* LZ4_versionString (void); /**< library version string; LZ4LIB_API int LZ4_compress_default(const char* src, char* dst, int srcSize, int dstCapacity); /*! LZ4_decompress_safe() : - * compressedSize : is the exact complete size of the compressed block. - * dstCapacity : is the size of destination buffer (which must be already allocated), presumed an upper bound of decompressed size. + * @compressedSize : is the exact complete size of the compressed block. + * @dstCapacity : is the size of destination buffer (which must be already allocated), + * is an upper bound of decompressed size. * @return : the number of bytes decompressed into destination buffer (necessarily <= dstCapacity) * If destination buffer is not large enough, decoding will stop and output an error code (negative value). * If the source stream is detected malformed, the function will stop decoding and return a negative result. @@ -443,11 +444,24 @@ LZ4LIB_API int LZ4_setStreamDecode (LZ4_streamDecode_t* LZ4_streamDecode, const LZ4LIB_API int LZ4_decoderRingBufferSize(int maxBlockSize); #define LZ4_DECODER_RING_BUFFER_SIZE(maxBlockSize) (65536 + 14 + (maxBlockSize)) /* for static allocation; maxBlockSize presumed valid */ -/*! LZ4_decompress_*_continue() : - * These decoding functions allow decompression of consecutive blocks in "streaming" mode. - * A block is an unsplittable entity, it must be presented entirely to a decompression function. - * Decompression functions only accepts one block at a time. - * The last 64KB of previously decoded data *must* remain available and unmodified at the memory position where they were decoded. +/*! LZ4_decompress_safe_continue() : + * This decoding function allows decompression of consecutive blocks in "streaming" mode. + * The difference with the usual independent blocks is that + * new blocks are allowed to find references into former blocks. + * A block is an unsplittable entity, and must be presented entirely to the decompression function. + * LZ4_decompress_safe_continue() only accepts one block at a time. + * It's modeled after `LZ4_decompress_safe()` and behaves similarly. + * + * @LZ4_streamDecode : decompression state, tracking the position in memory of past data + * @compressedSize : exact complete size of one compressed block. + * @dstCapacity : size of destination buffer (which must be already allocated), + * must be an upper bound of decompressed size. + * @return : number of bytes decompressed into destination buffer (necessarily <= dstCapacity) + * If destination buffer is not large enough, decoding will stop and output an error code (negative value). + * If the source stream is detected malformed, the function will stop decoding and return a negative result. + * + * The last 64KB of previously decoded data *must* remain available and unmodified + * at the memory position where they were previously decoded. * If less than 64KB of data has been decoded, all the data must be present. * * Special : if decompression side sets a ring buffer, it must respect one of the following conditions : @@ -474,10 +488,10 @@ LZ4_decompress_safe_continue (LZ4_streamDecode_t* LZ4_streamDecode, int srcSize, int dstCapacity); -/*! LZ4_decompress_*_usingDict() : - * These decoding functions work the same as - * a combination of LZ4_setStreamDecode() followed by LZ4_decompress_*_continue() - * They are stand-alone, and don't need an LZ4_streamDecode_t structure. +/*! LZ4_decompress_safe_usingDict() : + * Works the same as + * a combination of LZ4_setStreamDecode() followed by LZ4_decompress_safe_continue() + * However, it's stateless: it doesn't need any LZ4_streamDecode_t state. * Dictionary is presumed stable : it must remain accessible and unmodified during decompression. * Performance tip : Decompression speed can be substantially increased * when dst == dictStart + dictSize. @@ -487,6 +501,12 @@ LZ4_decompress_safe_usingDict(const char* src, char* dst, int srcSize, int dstCapacity, const char* dictStart, int dictSize); +/*! LZ4_decompress_safe_partial_usingDict() : + * Behaves the same as LZ4_decompress_safe_partial() + * with the added ability to specify a memory segment for past data. + * Performance tip : Decompression speed can be substantially increased + * when dst == dictStart + dictSize. + */ LZ4LIB_API int LZ4_decompress_safe_partial_usingDict(const char* src, char* dst, int compressedSize, From ec1825e5884cba8a8fd1089fae438b57a5f0dca7 Mon Sep 17 00:00:00 2001 From: Evan Ramos Date: Tue, 18 Apr 2023 20:02:40 -0500 Subject: [PATCH 028/155] CMake: Link charmrun with `-seq` --- src/util/charmrun-src/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/util/charmrun-src/CMakeLists.txt b/src/util/charmrun-src/CMakeLists.txt index 756075b62d..45f177d51b 100644 --- a/src/util/charmrun-src/CMakeLists.txt +++ b/src/util/charmrun-src/CMakeLists.txt @@ -1,11 +1,14 @@ add_executable(charmd daemon.C daemon.h ../sockRoutines.C) target_compile_options(charmd PRIVATE -seq -DCMK_NOT_USE_CONVERSE=1) +target_link_libraries(charmd PRIVATE -seq) add_executable(charmd_faceless daemon.C daemon.h ../sockRoutines.C) target_compile_options(charmd_faceless PRIVATE -seq -DFACELESS -DCMK_NOT_USE_CONVERSE=1) +target_link_libraries(charmd_faceless PRIVATE -seq) add_executable(charmrun charmrun.C) target_compile_options(charmrun PRIVATE -seq -DCMK_NOT_USE_CONVERSE=1) +target_link_libraries(charmrun PRIVATE -seq) target_include_directories(charmrun PRIVATE ../../conv-ccs ..) # for ccs-auth.c sockRoutines.c From 465c971a6641c2f73f2d0a1d95f478d7a2758ae3 Mon Sep 17 00:00:00 2001 From: Evan Ramos Date: Tue, 18 Apr 2023 20:07:46 -0500 Subject: [PATCH 029/155] charmc: Ensure `-Wl,* `parameters are added to $OPTS_LD and not $OPTS Previously, the wildcard for `-W*` warnings took effect before `-Wl,*`. --- src/scripts/charmc | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/scripts/charmc b/src/scripts/charmc index 22b14b1f61..2b0b4d2390 100755 --- a/src/scripts/charmc +++ b/src/scripts/charmc @@ -791,10 +791,6 @@ do PRODUCTION_MODE=false ;; - "-pg"|"-g"|-W*|-O*) - OPTS+=("$arg") - ;; - "-fmoddir") F90_MODDIR+=("$1") shift @@ -876,6 +872,12 @@ do INPUT_GIVEN='1' ;; + # compatibility with libtool + -install_name|-current_version|-compatibility_version) + [[ -n "$POST_LANGUAGE" ]] && POST_LIBRARIES+=("-Wl,$arg,$1") || PRE_LIBRARIES+=("-Wl,$arg,$1") + shift + ;; + "-whole-archive") LINK_WHOLE_ARCHIVE=true ;; @@ -887,6 +889,11 @@ do -s) ARG_OPTS_LD+=("$arg") ;; + + "-pg"|"-g"|-W*|-O*) + OPTS+=("$arg") + ;; + -no-charmrun) COPY_CHARMRUN=false ;; @@ -940,12 +947,6 @@ do POST_LIBRARIES=() ;; - # compatibility with libtool - -install_name|-current_version|-compatibility_version) - OPTS+=("-Wl,$arg,$1") - shift - ;; - -*|+*) # Warning "passing unrecognized option $arg to all compilers and linkers" OPTS+=("$arg") From 57b4c47f4b4da3e90096fb28d218ed09c1e3124f Mon Sep 17 00:00:00 2001 From: Evan Ramos Date: Tue, 18 Apr 2023 21:34:04 -0500 Subject: [PATCH 030/155] Avoid warning due to use of `override` in a class using `PUPable_decl` warning: 'get_PUP_ID' overrides a member function but is not marked 'override' [-Winconsistent-missing-override] --- examples/charm++/PUP/STLPUP/SimplePUP.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/charm++/PUP/STLPUP/SimplePUP.h b/examples/charm++/PUP/STLPUP/SimplePUP.h index fb29f1be4f..9d4e17ac1d 100644 --- a/examples/charm++/PUP/STLPUP/SimplePUP.h +++ b/examples/charm++/PUP/STLPUP/SimplePUP.h @@ -22,7 +22,7 @@ class Ping: public PUP::able { Ping(CkMigrateMessage *m) : PUP::able(m) { } virtual ~Ping() { } - virtual void pup(PUP::er &p) override { + virtual void pup(PUP::er &p) { PUP::able::pup(p); p | value_; } From 8d5bb53275de151e0ad7ceee70ede3fc4e26d756 Mon Sep 17 00:00:00 2001 From: Evan Ramos Date: Tue, 18 Apr 2023 20:57:17 -0500 Subject: [PATCH 031/155] METIS: Fix warning: 'sscanf' may overflow [-Wfortify-source] --- src/libs/ck-libs/metis/GKlib/pdb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/ck-libs/metis/GKlib/pdb.c b/src/libs/ck-libs/metis/GKlib/pdb.c index b4d222653e..3cdbf7f4fd 100644 --- a/src/libs/ck-libs/metis/GKlib/pdb.c +++ b/src/libs/ck-libs/metis/GKlib/pdb.c @@ -131,7 +131,7 @@ that structure. /************************************************************************/ pdbf *gk_readpdbfile(char *fname) { /* {{{ */ int i=0, res=0; - char linetype[6]; + char linetype[8]; int aserial; char aname[5] = " \0"; char altLoc = ' '; From 4753d11083224bba9dc75424ac12695667ad7795 Mon Sep 17 00:00:00 2001 From: Evan Ramos Date: Tue, 18 Apr 2023 21:10:44 -0500 Subject: [PATCH 032/155] Fix more sprintf warnings in tests --- benchmarks/charm++/queueperf/msgqtest.C | 2 -- benchmarks/charm++/queueperf/pgm.C | 1 - examples/charm++/speeds/speed.C | 4 ++-- tests/charm++/io/iotest.C | 2 +- tests/charm++/io/iotest.ci | 2 +- tests/charm++/megatest/arrayring.h | 2 +- tests/charm++/megatest/groupcast.h | 2 +- tests/charm++/megatest/groupmulti.h | 2 +- tests/charm++/megatest/immediatering.C | 2 +- tests/charm++/megatest/immediatering.h | 2 +- tests/charm++/megatest/nodecast.h | 2 +- tests/charm++/megatest/synctest.h | 2 +- tests/charm++/queue/msgqtest.C | 2 -- tests/charm++/queue/pgm.C | 1 - 14 files changed, 11 insertions(+), 17 deletions(-) diff --git a/benchmarks/charm++/queueperf/msgqtest.C b/benchmarks/charm++/queueperf/msgqtest.C index f9000a2f77..201bfc8c17 100644 --- a/benchmarks/charm++/queueperf/msgqtest.C +++ b/benchmarks/charm++/queueperf/msgqtest.C @@ -2,8 +2,6 @@ #include #include -using std::sprintf; - #include "main.decl.h" #include "msgq.h" diff --git a/benchmarks/charm++/queueperf/pgm.C b/benchmarks/charm++/queueperf/pgm.C index d8893aeb05..5622fa47a7 100644 --- a/benchmarks/charm++/queueperf/pgm.C +++ b/benchmarks/charm++/queueperf/pgm.C @@ -5,7 +5,6 @@ using std::cerr; using std::endl; -using std::sprintf; #include "queueing.h" #include "main.decl.h" diff --git a/examples/charm++/speeds/speed.C b/examples/charm++/speeds/speed.C index 6a9f416179..f65200d3b9 100644 --- a/examples/charm++/speeds/speed.C +++ b/examples/charm++/speeds/speed.C @@ -95,10 +95,10 @@ test::distrib(void) { char *str = new char[1024]; char stmp[32]; - sprintf(str, "Distrib: "); + strcpy(str, "Distrib: "); for(i=0;i%d ", i, cp[i]); + snprintf(stmp, sizeof(stmp), "%d=>%d ", i, cp[i]); strcat(str, stmp); } CkPrintf("%s\n", str); diff --git a/tests/charm++/io/iotest.C b/tests/charm++/io/iotest.C index 042d92a371..a4b3ac9882 100644 --- a/tests/charm++/io/iotest.C +++ b/tests/charm++/io/iotest.C @@ -30,7 +30,7 @@ public: struct test : public CBase_test { test(Ck::IO::Session token) { char out[11]; - sprintf(out, "%9d\n", thisIndex); + snprintf(out, sizeof(out), "%9d\n", thisIndex); Ck::IO::write(token, out, 10, 10*thisIndex); } test(CkMigrateMessage *m) {} diff --git a/tests/charm++/io/iotest.ci b/tests/charm++/io/iotest.ci index e58256b9e9..6a3f8ce898 100644 --- a/tests/charm++/io/iotest.ci +++ b/tests/charm++/io/iotest.ci @@ -13,7 +13,7 @@ mainmodule iotest { CkCallback opened(CkIndex_Main::ready(NULL), thisProxy); opened.setRefnum(iter + 0); char name[20]; - sprintf(name, "test%d", iter); + snprintf(name, sizeof(name), "test%d", iter); Ck::IO::open(name, opened, opts); } when ready[iter + 0](Ck::IO::FileReadyMsg *m) serial { diff --git a/tests/charm++/megatest/arrayring.h b/tests/charm++/megatest/arrayring.h index ead253c0d5..19a01ec79d 100644 --- a/tests/charm++/megatest/arrayring.h +++ b/tests/charm++/megatest/arrayring.h @@ -8,7 +8,7 @@ class arrayMessage : public CMessage_arrayMessage { char data[7]; public: int iter; - arrayMessage(void) { sprintf(data, "Array!"); iter = 0; }; + arrayMessage(void) { strcpy(data, "Array!"); iter = 0; } int check(void) { return !strcmp(data, "Array!"); } }; diff --git a/tests/charm++/megatest/groupcast.h b/tests/charm++/megatest/groupcast.h index 47f58dd0d8..dcc067b844 100644 --- a/tests/charm++/megatest/groupcast.h +++ b/tests/charm++/megatest/groupcast.h @@ -15,7 +15,7 @@ class groupcast_BCMsg : public CMessage_groupcast_BCMsg { double dval; char checkString[11]; public: - groupcast_BCMsg(void) { dval = 3.145; sprintf(checkString, "Broadcast!");} + groupcast_BCMsg(void) { dval = 3.145; strcpy(checkString, "Broadcast!"); } groupcast_BCMsg(CkMigrateMessage *m) {} int check(void) { if (strcmp("Broadcast!", checkString) == 0 && dval == 3.145) diff --git a/tests/charm++/megatest/groupmulti.h b/tests/charm++/megatest/groupmulti.h index 5a9dcf0bee..1ec53260b5 100644 --- a/tests/charm++/megatest/groupmulti.h +++ b/tests/charm++/megatest/groupmulti.h @@ -15,7 +15,7 @@ class groupmulti_BCMsg : public CMessage_groupmulti_BCMsg { double dval; char checkString[11]; public: - groupmulti_BCMsg(void) { dval = 3.145; sprintf(checkString, "Multicast!");} + groupmulti_BCMsg(void) { dval = 3.145; strcpy(checkString, "Multicast!"); } groupmulti_BCMsg(CkMigrateMessage *m) {} int check(void) { if (strcmp("Multicast!", checkString) == 0 && dval == 3.145) diff --git a/tests/charm++/megatest/immediatering.C b/tests/charm++/megatest/immediatering.C index 2ac58011b5..5a349acd4a 100644 --- a/tests/charm++/megatest/immediatering.C +++ b/tests/charm++/megatest/immediatering.C @@ -13,7 +13,7 @@ static int numTests = 0; static void sendImmediate(int destNode,int iter) { immediateMsg *msg=(immediateMsg *)CmiAlloc(sizeof(immediateMsg)); msg->iter=iter; - sprintf(msg->data, "Array!"); + strcpy(msg->data, "Array!"); CmiSetHandler(msg, immediatering_startHandlerIdx); #if 1 /* Use immediate converse message */ CmiBecomeImmediate(msg); diff --git a/tests/charm++/megatest/immediatering.h b/tests/charm++/megatest/immediatering.h index 299687fabf..743c92958c 100644 --- a/tests/charm++/megatest/immediatering.h +++ b/tests/charm++/megatest/immediatering.h @@ -15,7 +15,7 @@ class immMessage : public CMessage_immMessage { char data[7]; public: int iter; - immMessage(void) { sprintf(data, "Array!"); iter = 0; }; + immMessage(void) { strcpy(data, "Array!"); iter = 0; } int check(void) { return !strcmp(data, "Array!"); } }; diff --git a/tests/charm++/megatest/nodecast.h b/tests/charm++/megatest/nodecast.h index 9a4215a8d9..b0e2079a13 100644 --- a/tests/charm++/megatest/nodecast.h +++ b/tests/charm++/megatest/nodecast.h @@ -14,7 +14,7 @@ class nodecast_BCMsg : public CMessage_nodecast_BCMsg { private: char checkString[11]; public: - nodecast_BCMsg(void) { sprintf(checkString, "Broadcast!");} + nodecast_BCMsg(void) { strcpy(checkString, "Broadcast!"); } int check(void) { if (strcmp("Broadcast!", checkString) == 0) return 1; diff --git a/tests/charm++/megatest/synctest.h b/tests/charm++/megatest/synctest.h index f690ad9159..89ce22c2ed 100644 --- a/tests/charm++/megatest/synctest.h +++ b/tests/charm++/megatest/synctest.h @@ -22,7 +22,7 @@ class synctest_SyncSendMsg : public CMessage_synctest_SyncSendMsg { private: char checkString[6]; public: - synctest_SyncSendMsg(void) { sprintf(checkString, "Sync!");} + synctest_SyncSendMsg(void) { strcpy(checkString, "Sync!"); } int check(void) { if (strcmp("Sync!", checkString) == 0) return 1; diff --git a/tests/charm++/queue/msgqtest.C b/tests/charm++/queue/msgqtest.C index fb6dcd677e..5184b94f24 100644 --- a/tests/charm++/queue/msgqtest.C +++ b/tests/charm++/queue/msgqtest.C @@ -2,8 +2,6 @@ #include #include -using std::sprintf; - #include "main.decl.h" #include "msgq.h" diff --git a/tests/charm++/queue/pgm.C b/tests/charm++/queue/pgm.C index 5a7dc337c0..9abb48b54d 100644 --- a/tests/charm++/queue/pgm.C +++ b/tests/charm++/queue/pgm.C @@ -5,7 +5,6 @@ using std::cerr; using std::endl; -using std::sprintf; #include "queueing.h" #include "main.decl.h" From 55354c43c445f4bb47bf1132f92ed29289828efd Mon Sep 17 00:00:00 2001 From: Evan Ramos Date: Tue, 18 Apr 2023 20:28:09 -0500 Subject: [PATCH 033/155] AMPI: Reimplement interception of `main` using macro tricks Avoids warning: a function declaration without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] --- src/libs/ck-libs/ampi/CMakeLists.txt | 4 ++-- src/libs/ck-libs/ampi/Makefile | 8 +------- src/libs/ck-libs/ampi/ampi.C | 17 ++++++---------- src/libs/ck-libs/ampi/ampi.h | 28 +++++++++++++++++--------- src/libs/ck-libs/ampi/compat_ampi.c | 16 --------------- src/libs/ck-libs/ampi/compat_ampicm.C | 5 ----- src/libs/ck-libs/ampi/compat_ampicpp.C | 5 ++++- 7 files changed, 32 insertions(+), 51 deletions(-) delete mode 100644 src/libs/ck-libs/ampi/compat_ampi.c delete mode 100644 src/libs/ck-libs/ampi/compat_ampicm.C diff --git a/src/libs/ck-libs/ampi/CMakeLists.txt b/src/libs/ck-libs/ampi/CMakeLists.txt index d251f0679d..4569e5ecb2 100644 --- a/src/libs/ck-libs/ampi/CMakeLists.txt +++ b/src/libs/ck-libs/ampi/CMakeLists.txt @@ -5,8 +5,8 @@ set(ampi-f90-sources ampifimpl.f90 ampimod.f90) set(ampi-h-sources ampi.h ampi-interoperate.h ampif.h ampiimpl.h ddt.h ampi_functions.h ampi_funcptr.h ampi_funcptr_loader.h romio-stub/mpio_functions.h romio-stub/mpio.h romio-stub/mpio_globals.h romio-stub/mpiof.h) -add_library(ampi-compat compat_ampi.c - compat_ampim.C compat_ampifm.C compat_ampicm.C +add_library(ampi-compat + compat_ampim.C compat_ampifm.C compat_ampicpp.C compat_ampins.C compat_ampirs.C) diff --git a/src/libs/ck-libs/ampi/Makefile b/src/libs/ck-libs/ampi/Makefile index 407f20bfb5..3b58fc0808 100644 --- a/src/libs/ck-libs/ampi/Makefile +++ b/src/libs/ck-libs/ampi/Makefile @@ -7,8 +7,7 @@ HEADERS=ampi.h ampif.h ampi_functions.h \ $(addprefix romio-stub/,mpio.h mpiof.h mpio_functions.h mpio_globals.h) HEADDEP=$(HEADERS) \ ../tcharm/tcharm.h ../tcharm/tcharm_impl.h -COMPAT=compat_ampi.o \ - compat_ampim.o compat_ampifm.o compat_ampicm.o \ +COMPAT=compat_ampim.o compat_ampifm.o \ compat_ampicpp.o compat_ampins.o compat_ampirs.o OBJS=ampi.o $(AMPIF_OBJ) ampiOneSided.o \ ampiMisc.o ddt.o mpich-alltoall.o ampi_mpix.o ampi_noimpl.o @@ -215,11 +214,6 @@ compat_ampim.o: compat_ampim.C compat_ampifm.o: compat_ampifm.C -compat_ampicm.o: compat_ampicm.C - -compat_ampi.o: compat_ampi.c - $(CHARMC) -c compat_ampi.c - compat_ampins.o: compat_ampins.C $(CHARMC) -c $< diff --git a/src/libs/ck-libs/ampi/ampi.C b/src/libs/ck-libs/ampi/ampi.C index c8178d96e6..582c42ee21 100644 --- a/src/libs/ck-libs/ampi/ampi.C +++ b/src/libs/ck-libs/ampi/ampi.C @@ -1148,11 +1148,10 @@ void AMPI_threadstart(void *data) CtvAccess(stackBottom) = &argv; int ret = 0; - // Only one of the following four main functions actually runs application code, + // Only one of the following main functions actually runs application code, // the others are stubs provided by compat_ampi*. - ret += AMPI_Main_cpp(); - ret += AMPI_Main_cpp(argc,argv); - ret += AMPI_Main_c(argc,argv); + ret += AMPI_Main_noargs(); + ret += AMPI_Main(argc,argv); FTN_NAME(MPI_MAIN,mpi_main)(); // returns void AMPI_Exit(ret); } @@ -11767,13 +11766,9 @@ void TCHARM_Element_Setup(int myelement, int numelements, CmiIsomallocContext ct #if defined _WIN32 || CMK_DLL_USE_DLOPEN static ampi_maintype AMPI_Main_Get_C(SharedObject myexe) { - auto AMPI_Main_cpp_ptr = (ampi_maintype)dlsym(myexe, "AMPI_Main_cpp"); - if (AMPI_Main_cpp_ptr) - return AMPI_Main_cpp_ptr; - - auto AMPI_Main_c_ptr = (ampi_maintype)dlsym(myexe, "AMPI_Main_c"); - if (AMPI_Main_c_ptr) - return AMPI_Main_c_ptr; + auto AMPI_Main_noargs_ptr = (ampi_maintype)dlsym(myexe, "AMPI_Main_noargs"); + if (AMPI_Main_noargs_ptr) + return AMPI_Main_noargs_ptr; auto AMPI_Main_ptr = (ampi_maintype)dlsym(myexe, "AMPI_Main"); if (AMPI_Main_ptr) diff --git a/src/libs/ck-libs/ampi/ampi.h b/src/libs/ck-libs/ampi/ampi.h index 894abd48e0..5e874767da 100644 --- a/src/libs/ck-libs/ampi/ampi.h +++ b/src/libs/ck-libs/ampi/ampi.h @@ -76,18 +76,28 @@ Silently rename the user's main routine. This is needed so we can call the routine as a new thread, instead of as an actual "main". */ -#ifdef __cplusplus /* C++ version-- rename "main" as "AMPI_Main_cpp" */ -# define main AMPI_Main_cpp -CLINKAGE CMI_EXPORT int AMPI_Main_cpp(int argc,char **argv); /* prototype for C++ main routine */ -CMI_EXPORT int AMPI_Main_cpp(void); /* prototype for C++ main routines without args, as in autoconf tests */ - +#ifdef __cplusplus extern "C" { -#else /* C version-- rename "main" as "AMPI_Main" */ -# define main AMPI_Main #endif -CMI_EXPORT int AMPI_Main(); /* declaration for C main routine (not a strict prototype!) */ -CMI_EXPORT int AMPI_Main_c(int argc,char **argv); /* C wrapper for calling AMPI_Main() from C++ */ +CMI_EXPORT int AMPI_Main_noargs(void); +CMI_EXPORT int AMPI_Main(int argc, char **argv); + +/* Optional parameters for main() - based on +https://stackoverflow.com/a/28074198/1250282 +Simulates compiler magic for accepting both forms, +without abusing now-deprecated K&R declarations. */ + +#define AMPIMAIN_2(x, y) AMPI_Main(x, y) +#define AMPIMAIN_1(x) AMPI_Main(x) +#define AMPIMAIN_0() AMPI_Main_noargs() + +#define AMPIMAIN_FUNC_CHOOSER(_f1, _f2, _f3, ...) _f3 +#define AMPIMAIN_FUNC_RECOMPOSER(argsWithParentheses) AMPIMAIN_FUNC_CHOOSER argsWithParentheses +#define AMPIMAIN_CHOOSE_FROM_ARG_COUNT(...) AMPIMAIN_FUNC_RECOMPOSER((__VA_ARGS__, AMPIMAIN_2, AMPIMAIN_1, )) +#define AMPIMAIN_NO_ARG_EXPANDER() ,,AMPIMAIN_0 +#define AMPIMAIN_MACRO_CHOOSER(...) AMPIMAIN_CHOOSE_FROM_ARG_COUNT(AMPIMAIN_NO_ARG_EXPANDER __VA_ARGS__ ()) +#define main(...) AMPIMAIN_MACRO_CHOOSER(__VA_ARGS__)(__VA_ARGS__) typedef int MPI_Datatype; typedef intptr_t MPI_Aint; diff --git a/src/libs/ck-libs/ampi/compat_ampi.c b/src/libs/ck-libs/ampi/compat_ampi.c deleted file mode 100644 index cb905bbc3c..0000000000 --- a/src/libs/ck-libs/ampi/compat_ampi.c +++ /dev/null @@ -1,16 +0,0 @@ -/* - * C wrapper for calling AMPI_Main(). - */ - -#ifdef __cplusplus -extern "C" -#endif -int AMPI_Main(int argc, char **argv); - -#ifdef __cplusplus -extern "C" -#endif -int AMPI_Main_c(int argc, char **argv) -{ - return AMPI_Main(argc, argv); /* call C main routine */ -} diff --git a/src/libs/ck-libs/ampi/compat_ampicm.C b/src/libs/ck-libs/ampi/compat_ampicm.C deleted file mode 100644 index 2d5e86819a..0000000000 --- a/src/libs/ck-libs/ampi/compat_ampicm.C +++ /dev/null @@ -1,5 +0,0 @@ -extern "C" int AMPI_Main_cpp(int argc,char **argv) -{ - (void)argc; (void)argv; - return 0; -} diff --git a/src/libs/ck-libs/ampi/compat_ampicpp.C b/src/libs/ck-libs/ampi/compat_ampicpp.C index 97a0fc6cdd..30dc3eece2 100644 --- a/src/libs/ck-libs/ampi/compat_ampicpp.C +++ b/src/libs/ck-libs/ampi/compat_ampicpp.C @@ -1,5 +1,8 @@ /* prototype for C++ main routines without args, as in autoconf tests */ -int AMPI_Main_cpp(void) + +#include "charm-api.h" + +CLINKAGE int AMPI_Main_noargs(void) { return 0; } From 327ebb35510fa0224e3fbe9e380a225c34f2f965 Mon Sep 17 00:00:00 2001 From: Evan Ramos Date: Tue, 18 Apr 2023 22:16:17 -0500 Subject: [PATCH 034/155] AMPI: Use __thread for variables in tlsglobals test Avoids this linker error with GCC 12 on macOS ARM64: Undefined symbols for architecture arm64: "__ZTH25extern_threadlocal_shared", referenced from: __ZTW25extern_threadlocal_shared in tlsglobals-test-cxx.o "__ZTH25extern_threadlocal_static", referenced from: __ZTW25extern_threadlocal_static in tlsglobals-test-cxx.o ld: symbol(s) not found for architecture arm64 collect2: error: ld returned 1 exit status --- tests/ampi/privatization/test.C | 4 ++-- tests/ampi/privatization/test.h | 10 ++++++++-- tests/ampi/privatization/vars-dynamic.C | 8 ++++---- tests/ampi/privatization/vars-shared.C | 6 +++--- tests/ampi/privatization/vars-static.C | 6 +++--- 5 files changed, 20 insertions(+), 14 deletions(-) diff --git a/tests/ampi/privatization/test.C b/tests/ampi/privatization/test.C index 315befa4ae..b4d9937771 100644 --- a/tests/ampi/privatization/test.C +++ b/tests/ampi/privatization/test.C @@ -192,8 +192,8 @@ extern int global_myrank; int global_myrank; #endif #if defined test_threadlocalvars -thread_local extern int threadlocal_myrank; -thread_local int threadlocal_myrank; +extern THREAD_LOCAL int threadlocal_myrank; +THREAD_LOCAL int threadlocal_myrank; #endif #endif diff --git a/tests/ampi/privatization/test.h b/tests/ampi/privatization/test.h index 28272dcb74..fc594de5e4 100644 --- a/tests/ampi/privatization/test.h +++ b/tests/ampi/privatization/test.h @@ -3,6 +3,12 @@ #include "charm-api.h" +#if defined _MSC_VER +# define THREAD_LOCAL __declspec(thread) +#else +# define THREAD_LOCAL __thread +#endif + #ifdef __cplusplus extern "C" { #endif @@ -17,7 +23,7 @@ int * get_scoped_global_static(); #endif #endif #if defined test_threadlocalvars -thread_local extern int extern_threadlocal_static; +extern THREAD_LOCAL int extern_threadlocal_static; #if defined test_staticvars int * get_static_threadlocal_static(); int * get_scoped_threadlocal_static(); @@ -33,7 +39,7 @@ CMI_EXPORT int * get_scoped_global_shared(); #endif #endif #if defined test_threadlocalvars -thread_local extern CMI_EXPORT int extern_threadlocal_shared; +extern THREAD_LOCAL CMI_EXPORT int extern_threadlocal_shared; #if defined test_staticvars CMI_EXPORT int * get_static_threadlocal_shared(); CMI_EXPORT int * get_scoped_threadlocal_shared(); diff --git a/tests/ampi/privatization/vars-dynamic.C b/tests/ampi/privatization/vars-dynamic.C index db759107a3..84230b1607 100644 --- a/tests/ampi/privatization/vars-dynamic.C +++ b/tests/ampi/privatization/vars-dynamic.C @@ -23,11 +23,11 @@ CLINKAGE CMI_EXPORT int * get_scoped_global_dynamic() #endif #if defined test_threadlocalvars -thread_local extern CMI_EXPORT int extern_threadlocal_dynamic; -thread_local int extern_threadlocal_dynamic; +extern THREAD_LOCAL CMI_EXPORT int extern_threadlocal_dynamic; +THREAD_LOCAL int extern_threadlocal_dynamic; #if defined test_staticvars -thread_local static int static_threadlocal_dynamic; +static THREAD_LOCAL int static_threadlocal_dynamic; CLINKAGE CMI_EXPORT int * get_static_threadlocal_dynamic() { return &static_threadlocal_dynamic; @@ -35,7 +35,7 @@ CLINKAGE CMI_EXPORT int * get_static_threadlocal_dynamic() CLINKAGE CMI_EXPORT int * get_scoped_threadlocal_dynamic() { - thread_local static int scoped_threadlocal_dynamic; + static THREAD_LOCAL int scoped_threadlocal_dynamic; return &scoped_threadlocal_dynamic; } #endif diff --git a/tests/ampi/privatization/vars-shared.C b/tests/ampi/privatization/vars-shared.C index 5aa9adc7c5..987d249571 100644 --- a/tests/ampi/privatization/vars-shared.C +++ b/tests/ampi/privatization/vars-shared.C @@ -22,10 +22,10 @@ int * get_scoped_global_shared() #endif #if defined test_threadlocalvars -thread_local int extern_threadlocal_shared; +THREAD_LOCAL int extern_threadlocal_shared; #if defined test_staticvars -thread_local static int static_threadlocal_shared; +static THREAD_LOCAL int static_threadlocal_shared; int * get_static_threadlocal_shared() { return &static_threadlocal_shared; @@ -33,7 +33,7 @@ int * get_static_threadlocal_shared() int * get_scoped_threadlocal_shared() { - thread_local static int scoped_threadlocal_shared; + static THREAD_LOCAL int scoped_threadlocal_shared; return &scoped_threadlocal_shared; } #endif diff --git a/tests/ampi/privatization/vars-static.C b/tests/ampi/privatization/vars-static.C index a77989a867..bbd5d9d7ba 100644 --- a/tests/ampi/privatization/vars-static.C +++ b/tests/ampi/privatization/vars-static.C @@ -20,10 +20,10 @@ int * get_scoped_global_static() #endif #if defined test_threadlocalvars -thread_local int extern_threadlocal_static; +THREAD_LOCAL int extern_threadlocal_static; #if defined test_staticvars -thread_local static int static_threadlocal_static; +static THREAD_LOCAL int static_threadlocal_static; int * get_static_threadlocal_static() { return &static_threadlocal_static; @@ -31,7 +31,7 @@ int * get_static_threadlocal_static() int * get_scoped_threadlocal_static() { - thread_local static int scoped_threadlocal_static; + static THREAD_LOCAL int scoped_threadlocal_static; return &scoped_threadlocal_static; } #endif From f89e98fb11e15e7b5dcf75abbc1dffe1b9d4d4f5 Mon Sep 17 00:00:00 2001 From: Evan Ramos Date: Tue, 18 Apr 2023 22:23:43 -0500 Subject: [PATCH 035/155] QuickThreads: Silence warnings related to stack pointer manipulation warning: '_longjmp' accessing 192 bytes in a region of size 8 [-Wstringop-overflow=] --- src/QuickThreads/md/setjmp.c | 9 +++++++++ src/QuickThreads/md/setjmp64.c | 8 ++++++++ src/QuickThreads/md/setjmp64_.c | 9 +++++++++ src/QuickThreads/md/setjmp_m.c | 9 +++++++++ src/QuickThreads/md/sjalloca.c | 9 +++++++++ 5 files changed, 44 insertions(+) diff --git a/src/QuickThreads/md/setjmp.c b/src/QuickThreads/md/setjmp.c index 422fa32135..0d43fbb890 100644 --- a/src/QuickThreads/md/setjmp.c +++ b/src/QuickThreads/md/setjmp.c @@ -29,6 +29,11 @@ struct helpdesc { qt_helper_t *hfn; qt_t *jb; void *oldptr; void *newptr; }; # endif #endif +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wstringop-overflow" +#endif + static void qt_args_1(qt_t *rjb, void *u, void *t, qt_userf_t *userf, qt_only_t *only) { @@ -83,3 +88,7 @@ void *qt_abort(qt_helper_t *hfn, void *oldptr, void *newptr, qt_t *sp) SHIFTSP(sp); longjmp(*(jmp_buf *)&sp, (int)(intptr_t)&help); } + +#ifdef __GNUC__ +#pragma GCC diagnostic pop +#endif diff --git a/src/QuickThreads/md/setjmp64.c b/src/QuickThreads/md/setjmp64.c index 6407d045d6..8474e6d1fd 100644 --- a/src/QuickThreads/md/setjmp64.c +++ b/src/QuickThreads/md/setjmp64.c @@ -40,6 +40,10 @@ struct helpdesc { qt_helper_t *hfn; qt_t *jb; void *oldptr; void *newptr; }; static TLS_SPECIFIER void * pbuf[MAXTABLE] = {0}; static TLS_SPECIFIER int pcounter = 1; +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wstringop-overflow" +#endif static int push_buf(void *ptr) { @@ -111,3 +115,7 @@ void *qt_abort(qt_helper_t *hfn, void *oldptr, void *newptr, qt_t *sp) SHIFTSP(sp); longjmp(*(jmp_buf *)&sp, push_buf((void *)&help)); } + +#ifdef __GNUC__ +#pragma GCC diagnostic pop +#endif diff --git a/src/QuickThreads/md/setjmp64_.c b/src/QuickThreads/md/setjmp64_.c index c5094e9bde..be208f6234 100644 --- a/src/QuickThreads/md/setjmp64_.c +++ b/src/QuickThreads/md/setjmp64_.c @@ -46,6 +46,11 @@ struct helpdesc { qt_helper_t *hfn; qt_t *jb; void *oldptr; void *newptr; }; static TLS_SPECIFIER void * pbuf[MAXTABLE] = {0}; static TLS_SPECIFIER int pcounter = 1; +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wstringop-overflow" +#endif + static int push_buf(void *ptr) { int cur = pcounter; @@ -117,3 +122,7 @@ void *qt_abort(qt_helper_t *hfn, void *oldptr, void *newptr, qt_t *sp) SHIFTSP(sp); _longjmp(*(jmp_buf *)&sp, push_buf((void *)&help)); } + +#ifdef __GNUC__ +#pragma GCC diagnostic pop +#endif diff --git a/src/QuickThreads/md/setjmp_m.c b/src/QuickThreads/md/setjmp_m.c index 4126725fb5..19746ec193 100644 --- a/src/QuickThreads/md/setjmp_m.c +++ b/src/QuickThreads/md/setjmp_m.c @@ -34,6 +34,11 @@ struct helpdesc { qt_helper_t *hfn; qt_t *jb; void *oldptr; void *newptr; }; # endif #endif +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wstringop-overflow" +#endif + static void qt_args_1(qt_t *rjb, void *u, void *t, qt_userf_t *userf, qt_only_t *only) { @@ -88,3 +93,7 @@ void *qt_abort(qt_helper_t *hfn, void *oldptr, void *newptr, qt_t *sp) SHIFTSP(sp); _longjmp(*(jmp_buf *)&sp, (int)(intptr_t)&help); } + +#ifdef __GNUC__ +#pragma GCC diagnostic pop +#endif diff --git a/src/QuickThreads/md/sjalloca.c b/src/QuickThreads/md/sjalloca.c index 8cf52e8ca6..36233de8e0 100644 --- a/src/QuickThreads/md/sjalloca.c +++ b/src/QuickThreads/md/sjalloca.c @@ -17,6 +17,11 @@ struct helpdesc { qt_helper_t *hfn; qt_t *jb; void *oldptr; void *newptr; }; #define SHIFTSP(pos) {char *osp = (char *)alloca(0); alloca((((char*)pos)-osp)+256); } #endif +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wstringop-overflow" +#endif + static void qt_args_1(qt_t *rjb, void *u, void *t, qt_userf_t *userf, qt_only_t *only) { @@ -71,3 +76,7 @@ void *qt_abort(qt_helper_t *hfn, void *oldptr, void *newptr, qt_t *sp) SHIFTSP(sp); longjmp(*(jmp_buf *)&sp, (int)(intptr_t)&help); } + +#ifdef __GNUC__ +#pragma GCC diagnostic pop +#endif From 38ec2f1f26c95537ae12f5c3d8e0a7d6a279acbe Mon Sep 17 00:00:00 2001 From: Evan Ramos Date: Tue, 18 Apr 2023 23:04:21 -0500 Subject: [PATCH 036/155] Silence `mallinfo` deprecation warnings --- src/conv-core/memory.C | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/conv-core/memory.C b/src/conv-core/memory.C index cfec42c97e..20a91f5248 100644 --- a/src/conv-core/memory.C +++ b/src/conv-core/memory.C @@ -629,7 +629,21 @@ INLINE static CMK_TYPEDEF_UINT8 MemusageMallinfo(void){ initialize_memory_wrapper(); mi = (*mm_impl_mallinfo)(); #else +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#endif +#ifdef __INTEL_COMPILER +#pragma warning push +#pragma warning disable 1478 +#endif mi = mallinfo(); +#ifdef __GNUC__ +#pragma GCC diagnostic pop +#endif +#ifdef __INTEL_COMPILER +#pragma warning pop +#endif #endif CMK_TYPEDEF_UINT8 memtotal = (CMK_TYPEDEF_UINT8) mi.uordblks; /* malloc */ CMK_TYPEDEF_UINT8 memtotal2 = (CMK_TYPEDEF_UINT8) mi.usmblks; /* unused */ From 1136e25785f4a14b768af2b40edc2653075348ad Mon Sep 17 00:00:00 2001 From: Evan Ramos Date: Wed, 19 Apr 2023 01:42:53 -0500 Subject: [PATCH 037/155] Clean up CmiEnforceMsg macros Fixes #3708 --- src/conv-core/converse.h | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/src/conv-core/converse.h b/src/conv-core/converse.h index 34c7b4780e..daccf93412 100644 --- a/src/conv-core/converse.h +++ b/src/conv-core/converse.h @@ -1075,19 +1075,13 @@ void __CmiEnforceMsgHelper(const char* expr, const char* fileName, __CMK_XSTRING(__LINE__)), \ 0))) -#define _CmiEnforceMsg(expr, msg, ...) \ - ((void)((expr) \ - ? 0 \ - : (__CmiEnforceMsgHelper(__CMK_STRING(expr), __FILE__, \ - __CMK_XSTRING(__LINE__), msg "%s", __VA_ARGS__), \ +#define CmiEnforceMsg(expr, ...) \ + ((void)((expr) \ + ? 0 \ + : (__CmiEnforceMsgHelper(__CMK_STRING(expr), __FILE__, \ + __CMK_XSTRING(__LINE__), __VA_ARGS__), \ 0))) -// Very much a hack, but necessary to support the case when no arguments are given to the -// format string. Append an empty string so that __VA_ARGS__ is never empty in the above -// _CmiEnforceMsg macro and add a dummy "%s" to the end of the format string there to eat -// it. -#define CmiEnforceMsg(expr, ...) _CmiEnforceMsg(expr, __VA_ARGS__, "") - #if !CMK_ERROR_CHECKING # define CmiAssert(expr) ((void)0) # define CmiAssertMsg(expr, ...) ((void)0) From 755ef45b14c4f6175ecbe309661dfa770fb46f76 Mon Sep 17 00:00:00 2001 From: Evan Ramos Date: Wed, 19 Apr 2023 01:57:37 -0500 Subject: [PATCH 038/155] Fix uninitialized variable in BaseLB --- src/ck-ldb/BaseLB.C | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ck-ldb/BaseLB.C b/src/ck-ldb/BaseLB.C index ab0f246c9c..936b2d5c73 100644 --- a/src/ck-ldb/BaseLB.C +++ b/src/ck-ldb/BaseLB.C @@ -296,7 +296,7 @@ void BaseLB::LDStats::normalize_speed() { void BaseLB::LDStats::print() { #if CMK_LBDB_ON - int i; + int i = 0; CkPrintf("------------- Processor Data: %zu -------------\n", procs.size()); for (const auto& proc : procs) { From e76c3353602457887905e6bda799a3ce41a6d1b4 Mon Sep 17 00:00:00 2001 From: Evan Ramos Date: Wed, 19 Apr 2023 02:03:44 -0500 Subject: [PATCH 039/155] Run `autoupdate` on configure.ac Fixes: configure.ac:14: warning: The macro `AC_CONFIG_HEADER' is obsolete. configure.ac:14: You should run autoupdate. --- src/scripts/configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/scripts/configure.ac b/src/scripts/configure.ac index fd9b1d9130..e781575c11 100644 --- a/src/scripts/configure.ac +++ b/src/scripts/configure.ac @@ -7,11 +7,11 @@ # Increment the second and third digits when making a minor feature release # Increment the first digit when making a major feature release -AC_INIT([Charm++], [70000], [charm@cs.illinois.edu], [charm], [https://charm.cs.illinois.edu/]) +AC_INIT([Charm++],[70000],[charm@cs.illinois.edu],[charm],[https://charm.cs.illinois.edu/]) AC_CONFIG_SRCDIR(./Makefile) -AC_CONFIG_HEADER(conv-autoconfig.h) +AC_CONFIG_HEADERS([conv-autoconfig.h]) AC_CONFIG_COMMANDS([config-cleanup], [sed -i -e 's:^#define\s\+PACKAGE://&:' conv-autoconfig.h]) From 2688a9eb8672c28a3e2862ce00b7391c032fb701 Mon Sep 17 00:00:00 2001 From: Evan Ramos Date: Wed, 19 Apr 2023 02:12:57 -0500 Subject: [PATCH 040/155] AMPI: Fix warning: pattern recipe did not update peer target --- tests/ampi/privatization/Makefile | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/tests/ampi/privatization/Makefile b/tests/ampi/privatization/Makefile index 3207b65b84..97f2d9c370 100644 --- a/tests/ampi/privatization/Makefile +++ b/tests/ampi/privatization/Makefile @@ -107,13 +107,22 @@ $1-f90: $1-framework.o $1-test-f90.o lib$1-%-cxx.so: $1-%-cxx-so.o $$(AMPICC) -o $$@ $$(OPTS_$1_cxx) -shared -fvisibility=hidden -standalone $$^ -$1-%.o $1-%-cxx.o: %.C +$1-%.o: %.C $$(AMPICC) -o $$@ $$(OPTS_$1_cxx) -Dprivatization_method=$1 $$(foreach i,$$(FEATURES_$1_cxx),-Dtest_$$i) -c $$< -$1-%-so.o $1-%-cxx-so.o: %.C +$1-%-cxx.o: %.C + $$(AMPICC) -o $$@ $$(OPTS_$1_cxx) -Dprivatization_method=$1 $$(foreach i,$$(FEATURES_$1_cxx),-Dtest_$$i) -c $$< + +$1-%-so.o: %.C + $$(AMPICC) -o $$@ $$(OPTS_$1_cxx) -Dprivatization_method=$1 $$(foreach i,$$(FEATURES_$1_cxx),-Dtest_$$i) -shared -fvisibility=hidden -c $$< + +$1-%-cxx-so.o: %.C $$(AMPICC) -o $$@ $$(OPTS_$1_cxx) -Dprivatization_method=$1 $$(foreach i,$$(FEATURES_$1_cxx),-Dtest_$$i) -shared -fvisibility=hidden -c $$< -$1-%.o $1-%-f90.o: %.f90 +$1-%.o: %.f90 + $$(AMPIF90) -o $$@ $$(OPTS_$1_f90) -c $$< + +$1-%-f90.o: %.f90 $$(AMPIF90) -o $$@ $$(OPTS_$1_f90) -c $$< # test From 7c7ba731de1f73d7760dd2f14b72fcdc64b65869 Mon Sep 17 00:00:00 2001 From: Evan Ramos Date: Wed, 19 Apr 2023 02:21:42 -0500 Subject: [PATCH 041/155] Add fallback for when MPI_Comm_dup_with_info is not available Fixes Microsoft MPI, which uses version 2.0 of the MPI standard. --- src/arch/mpi/machine.C | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/arch/mpi/machine.C b/src/arch/mpi/machine.C index d8bcc3096f..368cb53d7c 100644 --- a/src/arch/mpi/machine.C +++ b/src/arch/mpi/machine.C @@ -1416,12 +1416,16 @@ void LrtsInit(int *argc, char ***argv, int *numNodes, int *myNodeID) { largv = *argv; if(!CharmLibInterOperate || userDrivenMode) { +#if MPI_VERSION >= 3 /* Create our communicator, with info hints (such as us not requiring * message ordering) to enable possible MPI runtime optimizations. */ MPI_Info hints; MPI_Info_create(&hints); MPI_Info_set(hints, "mpi_assert_allow_overtaking", "true"); MPI_Comm_dup_with_info(MPI_COMM_WORLD, hints, &charmComm); +#else + MPI_Comm_dup(MPI_COMM_WORLD, &charmComm); +#endif } MPI_Comm_size(charmComm, numNodes); From 2046ad126c63671a0e131ec2004dace34a45b737 Mon Sep 17 00:00:00 2001 From: Jozsef Bakosi Date: Mon, 26 Sep 2022 17:05:24 +0100 Subject: [PATCH 042/155] Make fortran optional in cmake --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fa57fb912b..5bcfef7e5a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -73,7 +73,9 @@ if(NOT CMK_COMPILER STREQUAL "msvc") enable_language(Fortran OPTIONAL) endif() -if(CMAKE_Fortran_COMPILER) +option(ENABLE_FORTRAN "Enable Fortran" ON) + +if(ENABLE_FORTRAN AND CMAKE_Fortran_COMPILER) include(FortranCInterface) FortranCInterface_VERIFY() FortranCInterface_VERIFY(CXX) From 9df06accf8d471d0afa2d08bc50bba886093871b Mon Sep 17 00:00:00 2001 From: Jozsef Bakosi Date: Tue, 27 Sep 2022 18:13:13 +0100 Subject: [PATCH 043/155] Move finding MPI before Fortran is required Otherwise if a fortran compiler is unavailable FindMPI.cmake errors out since there is no mpifc available either. --- CMakeLists.txt | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5bcfef7e5a..ad345fff83 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -31,6 +31,15 @@ project(Charm++ LANGUAGES CXX C ASM VERSION 7.0.0) find_package(Threads) find_package(OpenMP) # Do this before Fortran, in case we don't have a Fortran compiler +set(CMK_BUILD_MPI 0) +set(CMK_BUILD_ON_MPI 0) +set(CMK_CXX_MPI_BINDINGS 1) # Always true, this just checked for a conflict with old mpich versions. +if(${NETWORK} STREQUAL "mpi") + set(CMK_BUILD_MPI 1) + set(CMK_BUILD_ON_MPI 1) + find_package(MPI REQUIRED) +endif() + # We need C++11 for (almost) all targets set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_STANDARD_REQUIRED ON) @@ -407,15 +416,6 @@ elseif(${NETWORK} MATCHES "mpi-cray") set(CHARM_PLATFORM "${NETWORK}") endif() -set(CMK_BUILD_MPI 0) -set(CMK_BUILD_ON_MPI 0) -set(CMK_CXX_MPI_BINDINGS 1) # Always true, this just checked for a conflict with old mpich versions. -if(${NETWORK} STREQUAL "mpi") - set(CMK_BUILD_MPI 1) - set(CMK_BUILD_ON_MPI 1) - find_package(MPI REQUIRED) -endif() - set(CMK_BUILD_ON_UCX 0) if(${NETWORK} STREQUAL "ucx") set(CMK_BUILD_ON_UCX 1) From 2ce2550cc2cf7d45511dbfd29e52838c4a199eba Mon Sep 17 00:00:00 2001 From: Matthias Diener Date: Thu, 20 Apr 2023 15:16:03 -0500 Subject: [PATCH 044/155] build: fix option printing unset variable --- buildcmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/buildcmake b/buildcmake index e0ba85f762..2b8435b475 100755 --- a/buildcmake +++ b/buildcmake @@ -575,7 +575,7 @@ if [[ $VERBOSE -eq 1 ]]; then # Print selected options for option in ${!opt*}; do - echo " $option = ${!option}" + echo " $option = ${!option[*]:-}" done fi @@ -657,7 +657,7 @@ CC=$opt_CC CXX=$opt_CXX FC=$opt_FC cmake "$my_srcdir" \ [[ $VERBOSE -eq 1 ]] && export VERBOSE make "$opt_parallel" -# Only Install if the user provides an install prefix with the +# Only Install if the user provides an install prefix with the # `--install-prefix` option. Without this option, `make install` would be a # no-op. if [[ -n "$opt_install_prefix" ]] From 6f7f105b63acaa80af13e0ee2aa9018b59dbb90d Mon Sep 17 00:00:00 2001 From: Sam White Date: Thu, 20 Apr 2023 13:44:04 -0500 Subject: [PATCH 045/155] Cleanup: progress towards compiling with -Wall --- src/arch/netlrts/machine-eth.C | 6 +-- src/arch/netlrts/machine.C | 6 +-- src/arch/util/machine-broadcast.C | 18 +++---- src/arch/util/machine-common-core.C | 16 +++--- src/arch/util/machine-smp.C | 2 +- src/arch/util/mempool.C | 2 +- src/ck-core/ck.C | 17 ++----- src/ck-core/ckarray.C | 3 +- src/ck-core/ckcheckpoint.C | 2 - src/ck-core/ckfutures.C | 2 +- src/ck-core/cklocation.C | 10 ++-- src/ck-core/ckmemcheckpoint.C | 13 ++--- src/ck-core/ckmulticast.C | 2 - src/ck-core/ckrdma.C | 16 +----- src/ck-core/ckrdma.h | 2 +- src/ck-cp/pathHistory.C | 9 ++-- src/ck-ldb/CentralLB.C | 4 -- src/ck-ldb/HybridBaseLB.C | 3 -- src/ck-ldb/RefinerTemp.C | 6 --- src/ck-ldb/TreeLevel.h | 11 ++-- src/ck-ldb/ckgraph.C | 2 +- src/ck-ldb/ckgraph.h | 5 +- src/ck-ldb/weakTest.C | 1 - src/ck-perf/trace-common.C | 1 - src/ck-perf/trace-projections.h | 50 +++++++++---------- src/conv-ccs/conv-ccs.C | 1 - src/conv-core/conv-rdma.C | 2 - src/conv-core/convcore.C | 6 +-- src/conv-core/cpthreads.C | 1 - src/conv-core/cputopology.C | 1 - src/conv-core/debug-conv.C | 8 +-- src/conv-core/isomalloc.C | 9 ++-- src/conv-core/queueing.C | 23 +++------ src/conv-core/taskqueue.h | 1 - src/conv-ldb/cldb.C | 3 +- src/conv-ldb/cldb.neighbor.C | 13 ++--- src/conv-ldb/cldb.none.C | 6 +-- src/conv-ldb/cldb.rand.C | 6 +-- src/conv-ldb/cldb.test.C | 2 +- src/conv-ldb/cldb.workstealing.C | 12 ++--- src/conv-ldb/topology.C | 4 +- src/conv-perf/traceCore.C | 2 +- .../ck-libs/NDMeshStreamer/NDMeshStreamer.h | 2 +- src/libs/ck-libs/pose/event.C | 9 ++-- src/libs/ck-libs/pose/event.h | 2 +- src/libs/ck-libs/pose/memory_temporal.h | 4 +- src/libs/ck-libs/pose/opt.h | 6 +-- src/libs/ck-libs/pose/srtable.C | 2 +- src/libs/ck-libs/pose/stats.C | 2 +- src/libs/ck-libs/pose/stats.h | 5 +- src/libs/ck-libs/search/idastar.C | 9 ++-- src/libs/ck-libs/search/problem.C | 8 +-- src/libs/ck-libs/search/serialtree.C | 2 +- src/util/crc32.C | 1 - src/util/partitioning_strategies.C | 2 - src/util/sockRoutines.C | 4 +- 56 files changed, 134 insertions(+), 233 deletions(-) diff --git a/src/arch/netlrts/machine-eth.C b/src/arch/netlrts/machine-eth.C index be93c84771..ca42e48e33 100644 --- a/src/arch/netlrts/machine-eth.C +++ b/src/arch/netlrts/machine-eth.C @@ -304,9 +304,8 @@ int TransmitDatagram(void) void EnqueueOutgoingDgram (OutgoingMsg ogm, char *ptr, int len, OtherNode node, int rank, int broot) { - int seqno, dst, src; ImplicitDgram dg; + int seqno, src; ImplicitDgram dg; src = ogm->src; - dst = ogm->dst; seqno = node->send_next; node->send_next = ((seqno+1)&DGRAM_SEQNO_MASK); MallocImplicitDgram(dg); @@ -377,7 +376,6 @@ void DeliverViaNetwork(OutgoingMsg ogm, OtherNode node, int rank, unsigned int b ***********************************************************************/ void AssembleDatagram(OtherNode node, ExplicitDgram dg) { - int i; unsigned int size; char *msg; OtherNode myNode = nodes+CmiMyNodeGlobal(); @@ -552,7 +550,6 @@ void IntegrateAckDatagram(ExplicitDgram dg) OtherNode node; DgramAck *ack; ImplicitDgram idg; int i; unsigned int slot, rxing, dgseqno, seqno, ackseqno; int diff; - unsigned int tmp; node = nodes_by_pe[dg->srcpe]; ack = ((DgramAck*)(dg->data)); @@ -564,7 +561,6 @@ void IntegrateAckDatagram(ExplicitDgram dg) node->stat_recv_ack++; LOG(Cmi_clock, Cmi_nodestartGlobal, 'R', node->nodestart, dg->seqno); - tmp = node->recv_ack_seqno; /* check that the ack being received is actually appropriate */ if ( !((node->recv_ack_seqno >= ((DGRAM_SEQNO_MASK >> 1) + (DGRAM_SEQNO_MASK >> 2))) && diff --git a/src/arch/netlrts/machine.C b/src/arch/netlrts/machine.C index 7f7ae543ff..d16573a1fa 100644 --- a/src/arch/netlrts/machine.C +++ b/src/arch/netlrts/machine.C @@ -1617,7 +1617,7 @@ static void node_addresses_obtain(char **argv) ***********************************************************************/ int DeliverOutgoingMessage(OutgoingMsg ogm) { - int i, rank, dst; OtherNode node; + int rank, dst; OtherNode node; int network = 1; @@ -1630,7 +1630,6 @@ int DeliverOutgoingMessage(OutgoingMsg ogm) #endif node = nodes_by_pe[dst]; rank = dst - node->nodestart; - int acqLock = 0; if (node->nodestart != Cmi_nodestartGlobal) { DeliverViaNetwork(ogm, node, rank, DGRAM_ROOTPE_MASK, 0); } @@ -1789,9 +1788,7 @@ void LrtsBarrier(void) int CmiBarrierZero(void) { - int i; int numnodes = CmiNumNodesGlobal(); - ChMessage msg; if (Cmi_charmrun_fd == -1) return 0; // standalone if (numnodes == 1) { @@ -2135,7 +2132,6 @@ static int net_default_skt_abort(SOCKET skt,int code,const char *msg) void LrtsInit(int *argc, char ***argv, int *numNodes, int *myNodeID) { - int i; Cmi_netpoll = 0; #if CMK_NETPOLL Cmi_netpoll = 1; diff --git a/src/arch/util/machine-broadcast.C b/src/arch/util/machine-broadcast.C index 84f814fc06..bcca7da608 100644 --- a/src/arch/util/machine-broadcast.C +++ b/src/arch/util/machine-broadcast.C @@ -135,7 +135,7 @@ static void SendSpanningChildren(int size, char *msg, int rankToAssign, int star #if CMK_BROADCAST_SPANNING_TREE // copying is deferred via _copyMsgOrRef in case no sends are generated char* copy = nullptr; - int i, oldRank; + int i; /* first send msgs to other nodes */ CmiAssert(startNode >=0 && startNode= _Cmi_numpes){ - for(i=0; i<_Cmi_numpes; i++) + for(int i=0; i<_Cmi_numpes; i++) CmiSyncSendFn(i, size, msg); return; } @@ -302,8 +301,6 @@ void CmiSyncBroadcastFn1(int size, char *msg) { for ( i=0; i0) { CmiNodesDim++; @@ -1619,7 +1616,6 @@ static void ConverseRunPE(int everReturn) { /* ##### Beginning of Functions Related with Machine Running ##### */ static INLINE_KEYWORD void AdvanceCommunication(int whenidle) { - int doProcessBcast = 1; #if CMK_USE_PXSHM CommunicationServerPxshm(); @@ -1638,6 +1634,7 @@ static INLINE_KEYWORD void AdvanceCommunication(int whenidle) { LrtsAdvanceCommunication(whenidle); #if CMK_OFFLOAD_BCAST_PROCESS + int doProcessBcast = 1; #if CMK_SMP_NO_COMMTHD /*FIXME: only asks rank 0 to process bcast msgs, so perf may suffer*/ if (CmiMyRank()) doProcessBcast = 0; @@ -1688,7 +1685,6 @@ void CommunicationServerThread(int sleepTime) { } void ConverseExit(int exitcode) { - int i; if (quietModeRequested) quietMode = 1; #if !CMK_SMP || CMK_SMP_NO_COMMTHD LrtsDrainResources(); @@ -1703,7 +1699,7 @@ void ConverseExit(int exitcode) { #if CMK_WITH_STATS if (MSG_STATISTIC) { - for(i=0; i<22; i++) + for(int i=0; i<22; i++) { CmiPrintf("[MSG PE:%d]", CmiMyPe()); if(msg_histogram[i] >0) diff --git a/src/arch/util/machine-smp.C b/src/arch/util/machine-smp.C index 9ffafecb23..b58ef13444 100644 --- a/src/arch/util/machine-smp.C +++ b/src/arch/util/machine-smp.C @@ -508,7 +508,7 @@ public: Barrier& operator=(const Barrier&) = delete; explicit Barrier(unsigned int count) - : curCount(count), barrierCount(count), curSense(true) + : curSense(true), curCount(count), barrierCount(count) { } diff --git a/src/arch/util/mempool.C b/src/arch/util/mempool.C index 47eeeae1f6..abff7ea2be 100644 --- a/src/arch/util/mempool.C +++ b/src/arch/util/mempool.C @@ -450,7 +450,7 @@ void mempool_free(mempool_type* mptr, void* ptr_free) if (to_free->status == -1) { - large_block_header* largeblockhead = (large_block_header*)to_free->block_ptr, *temp; + large_block_header* largeblockhead = (large_block_header*)to_free->block_ptr; if (mptr->large_blocks == ((char*)largeblockhead - (char*)mptr)) { mptr->large_blocks = largeblockhead->block_next; diff --git a/src/ck-core/ck.C b/src/ck-core/ck.C index 346c985211..33bfc82bcf 100644 --- a/src/ck-core/ck.C +++ b/src/ck-core/ck.C @@ -870,7 +870,6 @@ void _createGroup(CkGroupID groupID, envelope *env) _CHECK_USED(env); _SET_USED(env, 1); int epIdx = env->getEpIdx(); - int gIdx = _entryTable[epIdx]->chareIdx; env->setGroupNum(groupID); env->setSrcPe(CkMyPe()); env->setGroupEpoch(CkpvAccess(_charmEpoch)); @@ -1175,10 +1174,6 @@ IrrGroup *lookupGroupAndBufferIfNotThere(CkCoreState *ck,envelope *env,const CkG static inline void _deliverForBocMsg(CkCoreState *ck,int epIdx,envelope *env,IrrGroup *obj) { -#if CMK_SMP - unsigned short int msgType = CMI_ZC_MSGTYPE(env); // store msgType as msg could be freed -#endif - _invokeEntry(epIdx,env,obj); _STATS_RECORD_PROCESS_BRANCH_1(); @@ -1188,7 +1183,6 @@ static inline void _processForBocMsg(CkCoreState *ck,envelope *env) { if(isGroupDepUnsatisfied(ck, env)) return; - CkGroupID groupID = env->getGroupNum(); IrrGroup *obj = _lookupGroupAndBufferIfNotThere(ck,env,env->getGroupNum()); if(obj) { ck->process(); // ck->process() updates mProcessed count used in QD @@ -1279,7 +1273,6 @@ static void _processArrayEltMsg(CkCoreState *ck,envelope *env) { // First see if we already have a direct pointer to the object _SET_USED(env, 0); ck->process(); // ck->process() updates mProcessed count used in QD - int opts = 0; if (msg->array_hops()>1) { CProxy_ArrayBase(env->getArrayMgr()).ckLocMgr()->multiHop(msg); } @@ -1813,7 +1806,7 @@ static inline envelope *_prepareImmediateMsgBranch(int eIdx,void *msg,CkGroupID static inline void _sendMsgBranch(int eIdx, void *msg, CkGroupID gID, int pe=CLD_BROADCAST_ALL, int opts = 0) { - int numPes; + int numPes = 1; envelope *env; if (opts & CK_MSG_IMMEDIATE) { env = _prepareImmediateMsgBranch(eIdx,msg,gID,ForBocMsg); @@ -1879,7 +1872,7 @@ void CkSendMsgBranchImmediate(int eIdx, void *msg, int destPE, CkGroupID gID) } //Can't inline-- send the usual way envelope *env = UsrToEnv(msg); - int numPes; + int numPes = 1; _TRACE_ONLY(numPes = (destPE==CLD_BROADCAST_ALL?CkNumPes():1)); env = _prepareImmediateMsgBranch(eIdx,msg,gID,ForBocMsg); _TRACE_CREATION_N(env, numPes); @@ -2034,7 +2027,7 @@ void CkSendMsgNodeBranchImmediate(int eIdx, void *msg, int node, CkGroupID gID) } //Can't inline-- send the usual way envelope *env = UsrToEnv(msg); - int numPes; + int numPes = 1; _TRACE_ONLY(numPes = (node==CLD_BROADCAST_ALL?CkNumNodes():1)); env = _prepareImmediateMsgBranch(eIdx,msg,gID,ForNodeBocMsg); _TRACE_CREATION_N(env, numPes); @@ -2164,10 +2157,8 @@ void CkArrayManagerDeliver(int pe,void *msg, int opts) { } class ElementDestroyer : public CkLocIterator { -private: - CkLocMgr *locMgr; public: - ElementDestroyer(CkLocMgr* mgr_):locMgr(mgr_){}; + ElementDestroyer(CkLocMgr* mgr_){} void addLocation(CkLocation &loc) { loc.destroyAll(); } diff --git a/src/ck-core/ckarray.C b/src/ck-core/ckarray.C index cfe58b2c88..f669d7c7e4 100644 --- a/src/ck-core/ckarray.C +++ b/src/ck-core/ckarray.C @@ -801,8 +801,9 @@ void CProxySection_ArrayBase::pup(PUP::er& p) * ensures that up to the limit of available bits, array IDs can be represented * as part of a compound fixed-size ID for their elements. */ -struct CkCreateArrayAsyncMsg : public CMessage_CkCreateArrayAsyncMsg +class CkCreateArrayAsyncMsg : public CMessage_CkCreateArrayAsyncMsg { + public: int ctor; CkCallback cb; CkArrayOptions opts; diff --git a/src/ck-core/ckcheckpoint.C b/src/ck-core/ckcheckpoint.C index 3a656480ab..05e399d028 100644 --- a/src/ck-core/ckcheckpoint.C +++ b/src/ck-core/ckcheckpoint.C @@ -722,7 +722,6 @@ void CkPupProcessorData(PUP::er &p) // called only on pe 0 static bool checkpointOne(const char* dirname, CkCallback& cb, bool requestStatus){ CmiAssert(CkMyPe()==0); - char filename[1024]; // save readonlys, and callback BTW FILE* fRO = openCheckpointFile(dirname, "RO", "wb", -1); @@ -818,7 +817,6 @@ void CkStartCheckpoint(const char* dirname, const CkCallback& cb, bool requestSt CkCallback globalCb; void CkRestartMain(const char* dirname, CkArgMsg *args){ int i; - char filename[1024]; if (CmiMyRank() == 0) { _inrestart = true; diff --git a/src/ck-core/ckfutures.C b/src/ck-core/ckfutures.C index 2ecc751f9d..79dffccd97 100644 --- a/src/ck-core/ckfutures.C +++ b/src/ck-core/ckfutures.C @@ -50,7 +50,7 @@ class MultiToThread: public FutureRequest { public: std::vector values; - MultiToThread(CthThread th_, const std::vector& ids_) : ids(ids_), th(th_), nRecvd(0) { + MultiToThread(CthThread th_, const std::vector& ids_) : th(th_), ids(ids_), nRecvd(0) { values.resize(ids.size()); std::fill(values.begin(), values.end(), nullptr); diff --git a/src/ck-core/cklocation.C b/src/ck-core/cklocation.C index a9f55f6bee..0dd725eaec 100644 --- a/src/ck-core/cklocation.C +++ b/src/ck-core/cklocation.C @@ -920,7 +920,6 @@ public: { int flati = 0; int myInt; - int dest; if (amaps[arrayHdl]->_nelems.dimension == 0) { return RRMap::procNum(arrayHdl, i); @@ -1385,9 +1384,7 @@ public: void populateInitial(int arrayHdl, CkArrayOptions& options, void* ctorMsg, CkArray* mgr) { - CkArrayIndex start = options.getStart(); CkArrayIndex end = options.getEnd(); - CkArrayIndex step = options.getStep(); // Try to load the configuration from command line argument CkAssert(haveConfigurableRRMap()); ConfigurableRRMapLoader& loader = CkpvAccess(myConfigRRMapState); @@ -2400,10 +2397,10 @@ void CkLocCache::insert(CmiUInt8 id, int epoch) /*************************** LocMgr: CREATION *****************************/ CkLocMgr::CkLocMgr(CkArrayOptions opts) - : idCounter(1), + : bounds(opts.getBounds()), + idCounter(1), thisProxy(thisgroup), - thislocalproxy(thisgroup, CkMyPe()), - bounds(opts.getBounds()) + thislocalproxy(thisgroup, CkMyPe()) { DEBC((AA "Creating new location manager %d\n" AB, thisgroup)); @@ -3072,7 +3069,6 @@ void CkLocMgr::immigrate(CkArrayElementMigrateMessage* msg) CkLocRec* rec = createLocal(idx, true, msg->ignoreArrival, false /* home told on departure */, msg->epoch); - envelope* env = UsrToEnv(msg); CmiAssert(CpvAccess(newZCPupGets).empty()); // Ensure that vector is empty // Create the new elements as we unpack the message pupElementsFor(p, rec, CkElementCreation_migrate); diff --git a/src/ck-core/ckmemcheckpoint.C b/src/ck-core/ckmemcheckpoint.C index 8006de758b..b654e114d9 100644 --- a/src/ck-core/ckmemcheckpoint.C +++ b/src/ck-core/ckmemcheckpoint.C @@ -302,7 +302,6 @@ public: } inline void updateBuffer(CkArrayCheckPTMessage *data) { - double t = CmiWallTimer(); // unpack it envelope *env = UsrToEnv(data); CkUnpackMessage(&env); @@ -317,7 +316,6 @@ public: bud2 = data->bud2; len = data->len; delete data; - //DEBUGF("[%d] updateBuffer took %f seconds. \n", CkMyPe(), CmiWallTimer()-t); } inline CkArrayCheckPTMessage * getCopy() // get a copy of checkpoint { @@ -610,7 +608,6 @@ void CkMemCheckPT::startArrayCheckpoint(){ CkArrayCheckPTMessage * msg = new (packSize,0) CkArrayCheckPTMessage; msg->len = size; msg->cp_flag = true; - int budPEs[2]; msg->bud1=CkMyPe(); msg->bud2=ChkptOnPe(CkMyPe()); { @@ -981,8 +978,6 @@ void CkMemCheckPT::resetReductionMgr() // recover the lost buddies void CkMemCheckPT::recoverBuddies() { - int idx; - int len = ckTable.size(); // ready to flush reduction manager // cannot be CkMemCheckPT::restart because destroy will modify states double curTime = CmiWallTimer(); @@ -996,7 +991,8 @@ void CkMemCheckPT::recoverBuddies() // recover buddies expectCount = 0; #if !CMK_CHKP_ALL - for (idx=0; idxpNo == thisFailedPe) { #if CK_NO_PROC_POOL @@ -1074,7 +1070,6 @@ void CkMemCheckPT::updateLocations(int n, CkGroupID *g, CkArrayIndex *idx, CmiUI void CkMemCheckPT::recoverArrayElements() { double curTime = CmiWallTimer(); - int len = ckTable.size(); //DEBUGF("[%d] CkMemCheckPT ----- %s len: %d in %f seconds \n",CkMyPe(), stage, len, curTime-startTime); stage = (char *)"recoverArrayElements"; if (CkMyPe() == thisFailedPe) @@ -1090,6 +1085,7 @@ void CkMemCheckPT::recoverArrayElements() #endif #if !CMK_CHKP_ALL + int len = ckTable.size(); for (int idx=0; idx p|idx; p|id; CkLocMgr * mgr = (CkLocMgr *)CkpvAccess(_groupTable)->find(gID).getObj(); - int homePe = mgr->homePe(idx); #if !STREAMING_INFORMHOME && CK_NO_PROC_POOL mgr->resume(idx, id, p, true, true); #else mgr->resume(idx, id, p, false, true); #endif #if STREAMING_INFORMHOME && CK_NO_PROC_POOL - homePe = mgr->homePe(idx); + int homePe = mgr->homePe(idx); if (homePe != CkMyPe()) { gmap[homePe].push_back(gID); imap[homePe].push_back(idx); diff --git a/src/ck-core/ckmulticast.C b/src/ck-core/ckmulticast.C index 66fc62df44..446a878eb9 100644 --- a/src/ck-core/ckmulticast.C +++ b/src/ck-core/ckmulticast.C @@ -278,7 +278,6 @@ void _ckMulticastInit(void) mCastEntry::mCastEntry (mCastEntry *old): numChild(0), oldc(NULL), newc(NULL), flag(COOKIE_NOTREADY), grpSec(old->isGrpSec()) { - int i; aid = old->aid; parentGrp = old->parentGrp; allElem = old->allElem; @@ -1099,7 +1098,6 @@ void CkMulticastMgr::sendToLocal(multicastGrpMsg *msg) nLocal = entry->localGrpElem; if(nLocal){ DEBUGF(("[%d] send to local branch, GroupSection\n", CkMyPe())); - int mpe = CkMyPe(); CkAssert(nLocal == 1); CProxyElement_Group ap(aid, CkMyPe()); if (ap.ckIsDelegated()) { diff --git a/src/ck-core/ckrdma.C b/src/ck-core/ckrdma.C index 8effe578a0..3729ef4e7c 100644 --- a/src/ck-core/ckrdma.C +++ b/src/ck-core/ckrdma.C @@ -15,10 +15,11 @@ void CmiFreeBroadcastAllExceptMeFn(int size, char *msg); #if CMK_SMP /*readonly*/ extern CProxy_ckcallback_group _ckcallbackgroup; +static int zcpy_pup_complete_handler_idx; #endif // Integer used to store the ncpy ack handler idx -static int ncpy_handler_idx, zcpy_pup_complete_handler_idx; +static int ncpy_handler_idx; CkpvExtern(ReqTagPostMap, ncpyPostedReqMap); CkpvExtern(ReqTagBufferMap, ncpyPostedBufferMap); @@ -927,9 +928,6 @@ void CkRdmaIssueRgets(envelope *env, void **arrPtrs, int *arrSizes, int arrayInd layerInfoSize = CMK_COMMON_NOCOPY_DIRECT_BYTES + CMK_NOCOPY_DIRECT_BYTES; - std::vector *tagArray = ncpyEmInfo->tagArray; - NcpyBcastRecvPeerAckInfo *peerAckInfo = ncpyEmInfo->peerAckInfo; - PUP::toMem p((void *)(((CkMarshallMsg *)EnvToUsr(env))->msgBuf)); PUP::fromMem up((void *)((CkMarshallMsg *)EnvToUsr(env))->msgBuf); up|numops; @@ -1259,7 +1257,6 @@ void CkRdmaEMBcastAckHandler(void *ack) { envelope *myMsg = (envelope *)(bcastInterimAckInfo->msg); CkUnpackMessage(&myMsg); - CmiSpanningTreeInfo &t = *(getSpanningTreeInfo(getRootNode(myMsg))); CkPackMessage(&myMsg); if(bcastInterimAckInfo->isRecv) { // bcast post api @@ -1267,7 +1264,6 @@ void CkRdmaEMBcastAckHandler(void *ack) { #if CMK_REG_REQUIRED deregisterMemFromMsg(myMsg, true); #endif - CkArray *mgr = NULL; CMI_ZC_MSGTYPE(myMsg) = CMK_ZC_BCAST_RECV_DONE_MSG; CkUnpackMessage(&myMsg); // DO NOT REMOVE THIS @@ -1535,9 +1531,6 @@ void CkReplaceSourcePtrsInBcastMsg(envelope *prevEnv, envelope *env, void *bcast /****************************** Zerocopy BCAST EM POST API Functions ***********************/ void processBcastRecvEmApiCompletion(NcpyEmInfo *ncpyEmInfo, int destPe) { - - envelope *myEnv = (envelope *)(ncpyEmInfo->msg); - // Send message to all peer elements on this PE // Send a message to the worker thread #if CMK_SMP @@ -2184,7 +2177,6 @@ void setPostStruct(CkNcpyBufferPost *ncpyPost, int index, CkNcpyBuffer &buffObj, void updateTagArray(envelope *env, int localElems) { int numops = 0; - int bufsize = 0; int rootNode; PUP::fromMem up((void *)((CkMarshallMsg *)EnvToUsr(env))->msgBuf); up|numops; @@ -2219,7 +2211,6 @@ void setPosted(std::vector *tagArray, envelope *env, CmiUInt8 elemIndex, in int localIndex = -1; if(env->getMsgtype() == ArrayBcastFwdMsg) { CkArray *mgr = getArrayMgrFromMsg(env); - int arraySize = mgr->getNumLocalElems(); localIndex = mgr->getEltLocalIndex(elemIndex); tagArray[CmiMyRank()][localIndex * numops + opIndex] = 0; } else { @@ -2233,7 +2224,6 @@ bool isUnposted(std::vector *tagArray, envelope *env, CmiUInt8 elemIndex, i int localIndex = -1; if(env->getMsgtype() == ArrayBcastFwdMsg) { CkArray *mgr = getArrayMgrFromMsg(env); - int arraySize = mgr->getNumLocalElems(); localIndex = mgr->getEltLocalIndex(elemIndex); return (tagArray[CmiMyRank()][localIndex * numops + opIndex] == -1); } else { @@ -2250,7 +2240,6 @@ void *extractStoredBuffer(std::vector *tagArray, envelope *env, CmiUInt8 el // Retrieve tag if(env->getMsgtype() == ArrayBcastFwdMsg) { CkArray *mgr = getArrayMgrFromMsg(env); - int arraySize = mgr->getNumLocalElems(); localIndex = mgr->getEltLocalIndex(elemIndex); tag = tagArray[CmiMyRank()][localIndex * numops + opIndex]; @@ -2524,7 +2513,6 @@ int CkPerformRget(CkNcpyBufferPost &post, void *destBuffer, int destSize) { } } else if(env->getMsgtype() == ForBocMsg) { - int localIndex = CmiMyRank(); (post.ncpyEmInfo->tagArray)[CmiMyRank()][post.opIndex] = post.tag; if(post.ncpyEmInfo->counter == numops) { diff --git a/src/ck-core/ckrdma.h b/src/ck-core/ckrdma.h index c79424bdb6..c535f591ec 100644 --- a/src/ck-core/ckrdma.h +++ b/src/ck-core/ckrdma.h @@ -35,7 +35,7 @@ struct NcpyBcastRecvPeerAckInfo; // BCAST_RECV mode is used for EM BCAST Send API enum class ncpyEmApiMode : char { P2P_SEND, BCAST_SEND, P2P_RECV, BCAST_RECV }; -class CkNcpyBufferPost; +struct CkNcpyBufferPost; struct NcpyBcastRecvPeerAckInfo{ envelope *msg; diff --git a/src/ck-cp/pathHistory.C b/src/ck-cp/pathHistory.C index 67b977df21..93a3740dd4 100644 --- a/src/ck-cp/pathHistory.C +++ b/src/ck-cp/pathHistory.C @@ -119,7 +119,6 @@ void pathHistoryManager::traceCriticalPathBackStepByStep(pathInformationMsg *msg void pathHistoryManager::broadcastCriticalPathProjections(pathInformationMsg *msg){ CkPrintf("[%d] Received broadcast of critical path\n", CkMyPe()); - int me = CkMyPe(); int intersectsLocalPE = false; // Create user events for critical path @@ -208,9 +207,9 @@ void automaticallySetMessagePriority(envelope *env){ case ForBocMsg: case ArrayEltInitMsg: { - const int arr = env->getArrayMgrIdx(); const int count = criticalPathForPriorityCounts.count(ep); #if DEBUG + const int arr = env->getArrayMgrIdx(); CkPrintf("[%d] destination array,ep occurs %d times along stored critical path\n", CkMyPe(), count); #endif @@ -257,7 +256,6 @@ void pathHistoryManager::saveCriticalPathForPriorities(pathInformationMsg *msg){ PathHistoryTableEntry &e = msg->history[i]; -//#if 1 #if DEBUG if(CkMyPe() == 0){ char name[100]; @@ -276,6 +274,7 @@ void pathHistoryManager::saveCriticalPathForPriorities(pathInformationMsg *msg){ criticalPathForPriorityCounts[e.local_ep] = 1; } +#if DEBUG // print out the list just for debugging purposes if(CkMyPe() == 0){ std::map< int, int>::iterator iter; @@ -283,12 +282,10 @@ void pathHistoryManager::saveCriticalPathForPriorities(pathInformationMsg *msg){ int epidx = iter->first; const int c = iter->second; -#if DEBUG CkPrintf("[%d] On critical path EP %d occurs %d times\n", CkMyPe(), epidx, c); -#endif - } } +#endif } /// Add an entry for this path history into the table, and write the corresponding information into the outgoing envelope diff --git a/src/ck-ldb/CentralLB.C b/src/ck-ldb/CentralLB.C index 0fac4e8140..9a036ac9e9 100644 --- a/src/ck-ldb/CentralLB.C +++ b/src/ck-ldb/CentralLB.C @@ -285,7 +285,6 @@ void CentralLB::BuildStatsMsg() const int osz = lbmgr->GetObjDataSz(); const int csz = lbmgr->GetCommDataSz(); - int npes = CkNumPes(); CLBStatsMsg* msg = new CLBStatsMsg(osz, csz); _MEMCHECK(msg); msg->from_pe = CkMyPe(); @@ -415,7 +414,6 @@ void CentralLB::buildStats() // used when USE_REDUCTION = 1 void CentralLB::depositData(CLBStatsMsg *m) { - int i; if (m == NULL) return; const int n_objs = m->objData.size(); @@ -672,7 +670,6 @@ void CentralLB::ApplyDecision() { DEBUGF(("[%d]calling recv migration\n",CkMyPe())); - envelope *env = UsrToEnv(migrateMsg); #if CMK_SCATTER_LB_RESULTS InitiateScatter(migrateMsg); #else @@ -1652,7 +1649,6 @@ CLBStatsMsg::~CLBStatsMsg() { } void CLBStatsMsg::pup(PUP::er &p) { - int i; p|from_pe; p|pe_speed; p|total_walltime; diff --git a/src/ck-ldb/HybridBaseLB.C b/src/ck-ldb/HybridBaseLB.C index 6227ff46d3..05069d7a02 100644 --- a/src/ck-ldb/HybridBaseLB.C +++ b/src/ck-ldb/HybridBaseLB.C @@ -1040,7 +1040,6 @@ void HybridBaseLB::PropagateInfo(Location *loc, int n, int fromlevel) else { // leaf node // now start to migrate std::vector & outObjs = lData->outObjs; - int migs = outObjs.size() + newObjs.size(); for (i=0; iincStep(); diff --git a/src/ck-ldb/RefinerTemp.C b/src/ck-ldb/RefinerTemp.C index 0f78846800..d08397a58c 100644 --- a/src/ck-ldb/RefinerTemp.C +++ b/src/ck-ldb/RefinerTemp.C @@ -88,7 +88,6 @@ void RefinerTemp::deAssign(computeInfo *c, processorInfo *p) { c->processor = -1; p->computeSet->remove(c); -int oldPe=c->oldProcessor; p->computeLoad -= c->load*procFreq[p->Id]; p->load = p->computeLoad + p->backgroundLoad*procFreq[p->Id]; } @@ -298,15 +297,11 @@ int RefinerTemp::refine() int RefinerTemp::multirefine() { computeAverage(); - double avg = averageLoad; int maxPe=-1; - // double max = computeMax(); double max = computeMax(&maxPe); - //const double overloadStep = 0.01; const double overloadStep = 0.01; const double overloadStart = 1.001; -// double dCurOverload = max / avg; double dCurOverload = max /(totalInst*procFreqNew[maxPe]/sumFreqs); int minOverload = 0; @@ -315,7 +310,6 @@ int RefinerTemp::multirefine() double dMaxOverload = maxOverload * overloadStep + overloadStart; int curOverload; int refineDone = 0; -//CmiPrintf("maxPe=%d max=%f myAvg=%f dMinOverload: %f dMaxOverload: %f\n",maxPe,max,(totalInst*procFreqNew[maxPe]/sumFreqs), dMinOverload, dMaxOverload); if (_lb_args.debug()>=1) CmiPrintf("dMinOverload: %f dMaxOverload: %f\n", dMinOverload, dMaxOverload); diff --git a/src/ck-ldb/TreeLevel.h b/src/ck-ldb/TreeLevel.h index 6da14abdd7..db41872f74 100644 --- a/src/ck-ldb/TreeLevel.h +++ b/src/ck-ldb/TreeLevel.h @@ -192,8 +192,8 @@ class StrategyWrapper : public IStrategyWrapper : n_moves(nmoves), num_incoming(num_incoming), loc(loc), - foreign_obj_id_start(foreign_obj_id_start), - obj_local_ids(obj_local_ids) + obj_local_ids(obj_local_ids), + foreign_obj_id_start(foreign_obj_id_start) { } @@ -535,7 +535,9 @@ class RootLevel : public LevelLogic migMsg->n_moves = 0; std::fill(migMsg->num_incoming, migMsg->num_incoming + nPes, 0); +#if DEBUG__TREE_LB_L1 double t0 = CkWallTimer(); +#endif wrapper->prepStrategy(nObjs, nPes, stats_msgs, migMsg); wrapper->runStrategy(migMsg); if (current_strategy == wrappers.size() - 1) @@ -1012,7 +1014,9 @@ class NodeLevel : public LevelLogic migMsg->n_moves = 0; std::fill(migMsg->num_incoming, migMsg->num_incoming + total_npes, 0); +#if DEBUG__TREE_LB_L2 double t0 = CkWallTimer(); +#endif wrapper->prepStrategy(nObjs, nPes, stats_msgs, migMsg); wrapper->runStrategy(migMsg); #if DEBUG__TREE_LB_L2 @@ -1122,8 +1126,9 @@ class PELevel : public LevelLogic msg->order[i] = i; } - LBRealType t1, t2, t3, t4, bg_walltime; + LBRealType t1, t2, t3, bg_walltime; #if CMK_LB_CPUTIMER + LBRealType t4; lbmgr->GetTime(&t1, &t2, &t3, &bg_walltime, &t4); #else lbmgr->GetTime(&t1, &t2, &t3, &bg_walltime, &bg_walltime); diff --git a/src/ck-ldb/ckgraph.C b/src/ck-ldb/ckgraph.C index 3c53e653f6..fe84a23b5e 100644 --- a/src/ck-ldb/ckgraph.C +++ b/src/ck-ldb/ckgraph.C @@ -68,7 +68,7 @@ ObjGraph::ObjGraph(BaseLB::LDStats *stats) { else if((!commData.from_proc()) && (commData.recv_type() == LD_OBJLIST_MSG)) { int nobjs, offset; const LDObjKey *objs = commData.receiver.get_destObjs(nobjs); - McastSrc sender(nobjs, commData.messages, commData.bytes); + McastSrc sender(commData.messages, commData.bytes); from = stats->getHash(commData.sender); offset = vertices[from].mcastToList.size(); diff --git a/src/ck-ldb/ckgraph.h b/src/ck-ldb/ckgraph.h index 4cd35bcf8d..1d7b72c808 100644 --- a/src/ck-ldb/ckgraph.h +++ b/src/ck-ldb/ckgraph.h @@ -87,8 +87,8 @@ class McastSrc friend class ObjGraph; public: - McastSrc(int _numDest, int _msgs, int _bytes) - : numDest(_numDest), msgs(_msgs), bytes(_bytes) + McastSrc(int _msgs, int _bytes) + : msgs(_msgs), bytes(_bytes) { } @@ -99,7 +99,6 @@ class McastSrc std::vector destList; private: - int numDest; // number of destination for this multicast int msgs; // number of messages exchanged int bytes; // total number of bytes exchanged }; diff --git a/src/ck-ldb/weakTest.C b/src/ck-ldb/weakTest.C index ca9691b873..e7dfd28b92 100644 --- a/src/ck-ldb/weakTest.C +++ b/src/ck-ldb/weakTest.C @@ -38,7 +38,6 @@ double Model::weakTest(const DataMatrix& X) const { // X is NxD double final_yhat = 1.0; int N = X.num_rows; - int D = X.num_cols; #ifdef DEBUG_RF if (classifierID == 2.0) printf("\nTesting on weakmodel r1[%d], r2[%d], w[%lf,%lf,%lf]\n", r1, r2, w[0], w[1], diff --git a/src/ck-perf/trace-common.C b/src/ck-perf/trace-common.C index 735c35ae5d..5476dc95e2 100644 --- a/src/ck-perf/trace-common.C +++ b/src/ck-perf/trace-common.C @@ -867,7 +867,6 @@ struct TraceThreadListener { static void traceThreadListener_suspend(struct CthThreadListener *l) { - TraceThreadListener *a=(TraceThreadListener *)l; /* here, we activate the appropriate trace codes for the appropriate registered modules */ traceSuspend(); diff --git a/src/ck-perf/trace-projections.h b/src/ck-perf/trace-projections.h index 79d1e39e6b..add502f10c 100644 --- a/src/ck-perf/trace-projections.h +++ b/src/ck-perf/trace-projections.h @@ -84,15 +84,15 @@ class LogEntry { LogEntry(unsigned char type, double time, unsigned short mIdx, unsigned short eIdx, int event, int pe, int msgLen, CmiObjId* d, double recvTime, double cpuTime) - : type(type), - time(time), - mIdx(mIdx), - eIdx(eIdx), + : time(time), + cputime(cpuTime), + recvTime(recvTime), event(event), pe(pe), + mIdx(mIdx), + eIdx(eIdx), msglen(msgLen), - recvTime(recvTime), - cputime(cpuTime) + type(type) { if (d != nullptr) id = *d; @@ -111,7 +111,7 @@ class LogEntry { // Constructor for user supplied data or memory usage record // Shared constructor to avoid ambiguity issues (userSuppliedData is int, memUsage is // long) - LogEntry(unsigned char type, double time, long value) : type(type), time(time) + LogEntry(unsigned char type, double time, long value) : time(time), type(type) { CkAssert(type == USER_SUPPLIED || type == MEMORY_USAGE_CURRENT); switch (type) @@ -129,7 +129,7 @@ class LogEntry { // event and endTime are only used for the bracketed version LogEntry(unsigned char type, double time, char* note, int event = 0, double endTime = 0) - : type(type), time(time), event(event), endTime(endTime), userSuppliedNote() + : time(time), endTime(endTime), event(event), type(type), userSuppliedNote() { CkAssert(type == USER_SUPPLIED_NOTE || type == USER_SUPPLIED_BRACKETED_NOTE); if (note == nullptr) @@ -144,13 +144,13 @@ class LogEntry { // Constructor for multicast data LogEntry(unsigned char type, double time, unsigned short mIdx, unsigned short eIdx, int event, int pe, int msgLen, int numPe, const int* pelist) - : type(type), - time(time), - mIdx(mIdx), - eIdx(eIdx), + : time(time), event(event), pe(pe), + mIdx(mIdx), + eIdx(eIdx), msglen(msgLen), + type(type), pes(numPe) { CkAssert(type == CREATION_MULTICAST); @@ -163,13 +163,13 @@ class LogEntry { // change to a variable LogEntry(unsigned char type, double time, unsigned short mIdx, unsigned short eIdx, int event, int pe, int msgLen, int numPe) - : type(type), - time(time), - mIdx(mIdx), - eIdx(eIdx), + : time(time), event(event), pe(pe), + mIdx(mIdx), + eIdx(eIdx), msglen(msgLen), + type(type), pes(numPe) { CkAssert(type == CREATION_BCAST); @@ -178,7 +178,7 @@ class LogEntry { // Constructor for user event pairs LogEntry(unsigned char type, double time, unsigned short mIdx, int event, int nestedID) - : type(type), time(time), mIdx(mIdx), event(event), nestedID(nestedID) + : time(time), event(event), mIdx(mIdx), type(type), nestedID(nestedID) { CkAssert(type == USER_EVENT_PAIR || type == BEGIN_USER_EVENT_PAIR || type == END_USER_EVENT_PAIR); @@ -187,23 +187,23 @@ class LogEntry { // Constructor for user stats // TODO: Repurposes mIdx and cputime fields to store e and statTime, should clean up LogEntry(unsigned char type, double time, int pe, int e, double stat, double statTime) - : type(type), time(time), pe(pe), mIdx(e), stat(stat), cputime(statTime) + : time(time), cputime(statTime), pe(pe), mIdx(e), type(type), stat(stat) { CkAssert(type == USER_STAT); } // Copy constuctor LogEntry(const LogEntry& other) - : type(other.type), - time(other.time), - mIdx(other.mIdx), - eIdx(other.eIdx), + : time(other.time), + endTime(other.endTime), + cputime(other.cputime), + recvTime(other.recvTime), event(other.event), pe(other.pe), + mIdx(other.mIdx), + eIdx(other.eIdx), msglen(other.msglen), - recvTime(other.recvTime), - cputime(other.cputime), - endTime(other.endTime) + type(other.type) { switch (type) { diff --git a/src/conv-ccs/conv-ccs.C b/src/conv-ccs/conv-ccs.C index 9dc49cb9a0..e840dcd91f 100644 --- a/src/conv-ccs/conv-ccs.C +++ b/src/conv-ccs/conv-ccs.C @@ -228,7 +228,6 @@ CCS handler. */ void CcsHandleRequest(CcsImplHeader *hdr,const char *reqData) { - char *cmsg; int reqLen=ChMessageInt(hdr->len); /*Look up handler's converse ID*/ char *handlerStr=hdr->handler; diff --git a/src/conv-core/conv-rdma.C b/src/conv-core/conv-rdma.C index 575c041917..9608896e09 100644 --- a/src/conv-core/conv-rdma.C +++ b/src/conv-core/conv-rdma.C @@ -229,8 +229,6 @@ void CmiNcpyBuffer::cmaPut(CmiNcpyBuffer &destination) { void CmiNcpyBuffer::rdmaPut(CmiNcpyBuffer &destination, int ackSize, char *srcAck, char *destAck) { - int layerInfoSize = CMK_COMMON_NOCOPY_DIRECT_BYTES + CMK_NOCOPY_DIRECT_BYTES; - if(regMode == CMK_BUFFER_UNREG) { // register it because it is required for RPUT CmiSetRdmaBufferInfo(layerInfo + CmiGetRdmaCommonInfoSize(), ptr, cnt, regMode); diff --git a/src/conv-core/convcore.C b/src/conv-core/convcore.C index 66d045d5f1..c62b19b96a 100644 --- a/src/conv-core/convcore.C +++ b/src/conv-core/convcore.C @@ -1043,7 +1043,6 @@ double CmiInitTime(void) void CmiTimerInit(char **argv) { - struct rusage ru; CpvInitialize(double, inittime_virtual); int tmptime = CmiGetArgFlagDesc(argv,"+useAbsoluteTime", "Use system's absolute time as wallclock time."); @@ -1065,6 +1064,7 @@ if(CmiMyRank() == 0) /* initialize only once */ #ifndef RUSAGE_WHO CpvAccess(inittime_virtual) = inittime_wallclock; #else + struct rusage ru; getrusage(RUSAGE_WHO, &ru); CpvAccess(inittime_virtual) = (ru.ru_utime.tv_sec * 1.0)+(ru.ru_utime.tv_usec * 0.000001) + @@ -1098,8 +1098,6 @@ double CmiCpuTimer(void) #endif } -static double lastT = -1.0; - double CmiWallTimer(void) { double currenttime; @@ -1787,9 +1785,9 @@ void *CsdNextMessage(CsdSchedulerState_t *s) { void *CsdNextLocalNodeMessage(CsdSchedulerState_t *s) { - void *msg; #if CMK_NODE_QUEUE_AVAILABLE /*#warning "CsdNextMessage: CMK_NODE_QUEUE_AVAILABLE" */ + void *msg; /*if (NULL!=(msg=CmiGetNonLocalNodeQ())) return msg;*/ if (!CqsEmpty(s->nodeQ)) { diff --git a/src/conv-core/cpthreads.C b/src/conv-core/cpthreads.C index c9ec448e73..0f58ee9cb0 100644 --- a/src/conv-core/cpthreads.C +++ b/src/conv-core/cpthreads.C @@ -596,7 +596,6 @@ void Cpthread_start_main(CmiStartFn fn, int argc, char **argv) { Cpthread_t pt; Cpthread_attr_t attrib; - CmiIntPtr pargc = argc; if (CmiMyRank()==0) { CmiMainFnArg * arg = (CmiMainFnArg *)malloc(sizeof(CmiMainFnArg)); diff --git a/src/conv-core/cputopology.C b/src/conv-core/cputopology.C index c8da530878..f8552b5bd3 100644 --- a/src/conv-core/cputopology.C +++ b/src/conv-core/cputopology.C @@ -163,7 +163,6 @@ static int cpuTopoRecvHandlerIdx; static CpuTopology cpuTopo; static int done = 0; -static int topoDone = 0; static int _noip = 0; } diff --git a/src/conv-core/debug-conv.C b/src/conv-core/debug-conv.C index a39075ce8e..ff5f6dc7aa 100644 --- a/src/conv-core/debug-conv.C +++ b/src/conv-core/debug-conv.C @@ -18,8 +18,6 @@ Orion Sky Lawlor, olawlor@acm.org, 4/10/2001 #endif CpvCExtern(int, freezeModeFlag); -CpvStaticDeclare(int, continueFlag); -CpvStaticDeclare(int, stepFlag); CpvCExtern(void *, debugQueue); CpvDeclare(void*, conditionalQueue); int conditionalPipe[2] = {0, 0}; @@ -126,13 +124,12 @@ static void CpdDebugReturnAllocationTree(void *tree) { pup_er sizer = pup_new_sizer(); char *buf; pup_er packer; - int i; CpdDebug_pupAllocationPoint(sizer, tree); buf = (char *)malloc(pup_size(sizer)); packer = pup_new_toMem(buf); CpdDebug_pupAllocationPoint(packer, tree); /*CmiPrintf("size=%d tree:",pup_size(sizer)); - for (i=0;i<100;++i) CmiPrintf(" %02x",((unsigned char*)buf)[i]); + for (int i=0;i<100;++i) CmiPrintf(" %02x",((unsigned char*)buf)[i]); CmiPrintf("\n");*/ CcsSendDelayedReply(CpvAccess(allocationTreeDelayedReply), pup_size(sizer),buf); pup_destroy(sizer); @@ -180,14 +177,13 @@ static void CpdDebugReturnMemStat(void *stat) { char *buf; pup_er packerNet; pup_er packer; - int i; CpdDebug_pupMemStat(sizer, stat); buf = (char *)malloc(pup_size(sizer)); packerNet = pup_new_network_pack(buf); packer = pup_new_fmt(packerNet); CpdDebug_pupMemStat(packer, stat); /*CmiPrintf("size=%d tree:",pup_size(sizer)); - for (i=0;i<100;++i) CmiPrintf(" %02x",((unsigned char*)buf)[i]); + for (int i=0;i<100;++i) CmiPrintf(" %02x",((unsigned char*)buf)[i]); CmiPrintf("\n");*/ CcsSendDelayedReply(CpvAccess(memStatDelayedReply), pup_size(sizer),buf); pup_destroy(sizerNet); diff --git a/src/conv-core/isomalloc.C b/src/conv-core/isomalloc.C index 674bca40d8..e0100d6380 100644 --- a/src/conv-core/isomalloc.C +++ b/src/conv-core/isomalloc.C @@ -797,11 +797,10 @@ static void CmiIsomallocInitExtent(char ** argv) { memRange_t start = CMIALIGN((uintptr_t)freeRegion.start, division_size); memRange_t end = CMIALIGN((uintptr_t)freeRegion.start + freeRegion.len - (division_size-1), division_size); - memRange_t len = end - start; IsoRegion.s = start; IsoRegion.e = end; DEBUG_PRINT("[%d] Isomalloc memory region: 0x%zx - 0x%zx (%zu gigs)\n", CmiMyPe(), - start, end, len/gig); + start, end, (end - start)/gig); } } @@ -1135,7 +1134,7 @@ struct isommap #include "memory-gnu-internal.C" -struct isomalloc_dlmalloc : dlmalloc_impl +struct isomalloc_dlmalloc final : dlmalloc_impl { isomalloc_dlmalloc(uint8_t * s, uint8_t * e) : backend{s, e}, arena{} @@ -1951,12 +1950,12 @@ struct Isomempool static_assert(minimum_empty_region_size >= sizeof(RegionHeader), "regions must allow space for a header"); Isomempool(uint8_t * s, uint8_t * e) - : empty_tree{}, first_region{}, last_region{}, backend{s, e} + : backend{s, e}, empty_tree{}, first_region{}, last_region{} { IMP_DBG("[%d][%p] Isomempool::Isomempool(%p, %p)\n", CmiMyPe(), (void *)this, s, e); } Isomempool(PUP::reconstruct pr) - : empty_tree{pr}, backend{pr} + : backend{pr}, empty_tree{pr} { IMP_DBG("[%d][%p] Isomempool::Isomempool(PUP::reconstruct)\n", CmiMyPe(), (void *)this); } diff --git a/src/conv-core/queueing.C b/src/conv-core/queueing.C index d64d220f3d..0db271859c 100644 --- a/src/conv-core/queueing.C +++ b/src/conv-core/queueing.C @@ -243,15 +243,9 @@ _deq CqsPrioqGetDeq(_prioq pq, unsigned int priobits, unsigned int *priodata) unsigned int prioints = (priobits+CINTBITS-1)/CINTBITS; unsigned int hashval, i; int heappos; - _prioqelt *heap, pe, next, parent; + _prioqelt *heap, pe, next; _prio pri; - int mem_cmp_res; - unsigned int pri_bits_cmp; - static int cnt_nilesh=0; -#ifdef FASTQ - /* printf("Hi I'm here %d\n",cnt_nilesh++); */ -#endif /* Scan for priority in hash-table, and return it if present */ hashval = priobits; for (i=0; ipri.data, sizeof(int)*prioints)==0) return &(pe->data); #else - parent=NULL; + _prioqelt *parent=NULL; + int mem_cmp_res; + unsigned int pri_bits_cmp; for(pe=pq->hashtab[hashval]; pe; ) { parent=pe; @@ -344,10 +340,6 @@ _deq CqsPrioqGetDeq(_prioq pq, unsigned int priobits, unsigned int *priodata) } heap[heappos] = pe; -#ifdef FASTQ - /* printf("Hi I'm here222\n"); */ -#endif - return &(pe->data); } @@ -358,14 +350,12 @@ void *CqsPrioqDequeue(_prioq pq) _prioqelt pe, old; void *data; int heappos, heapnext; _prioqelt *heap = pq->heap; +#if FASTQ int left_child; _prioqelt temp1_ht_right, temp1_ht_left, temp1_ht_parent; _prioqelt *temp1_ht_handle; - static int cnt_nilesh1=0; - -#ifdef FASTQ - /* printf("Hi I'm here too!! %d\n",cnt_nilesh1++); */ #endif + if (pq->heapnext==1) return 0; pe = heap[1]; data = CqsDeqDequeue(&(pe->data)); @@ -944,7 +934,6 @@ int CqsRemoveSpecificDeq(_deq q, const void *msgPtr){ */ int CqsRemoveSpecificPrioq(_prioq q, const void *msgPtr){ void **head, **tail; - void **result; int i; _prioqelt pe; diff --git a/src/conv-core/taskqueue.h b/src/conv-core/taskqueue.h index 3ff6618150..11595e76b0 100644 --- a/src/conv-core/taskqueue.h +++ b/src/conv-core/taskqueue.h @@ -61,7 +61,6 @@ inline static void* TaskQueuePop(TaskQueue Q) { // Pop happens in the same worke inline static void* TaskQueueSteal(TaskQueue Q) { taskq_idx h, t; - void *task; while (1) { h = Q->head; t = Q->tail; diff --git a/src/conv-ldb/cldb.C b/src/conv-ldb/cldb.C index 5fc612a5bb..899c006433 100644 --- a/src/conv-ldb/cldb.C +++ b/src/conv-ldb/cldb.C @@ -507,7 +507,7 @@ void CldMultipleSendPrio(int pe, int numToSend, int rank, int immed) void CldSimpleMultipleSend(int pe, int numToSend, int rank) { char *msg; - int len, queueing, priobits, *msgSizes, i, numSent, done=0; + int len, queueing, priobits, i, done=0; unsigned int *prioptr; CldInfoFn ifn; CldPackFn pfn; @@ -515,7 +515,6 @@ void CldSimpleMultipleSend(int pe, int numToSend, int rank) if (numToSend == 0) return; - numSent = 0; while (!done) { for (i=0; i0) { @@ -260,7 +258,7 @@ int CldMinAvg(void) void CldBalance(void *dummy, double curT) { int i, j, overload, numToMove=0, avgLoad; - int totalUnderAvg=0, numUnderAvg=0, maxUnderAvg=0; + int numUnderAvg=0, maxUnderAvg=0; #if CMK_TRACE_ENABLED && TRACE_USEREVENTS double startT = curT; @@ -279,7 +277,6 @@ void CldBalance(void *dummy, double curT) int nNeighbors = CpvAccess(numNeighbors); for (i=0; i maxUnderAvg) maxUnderAvg = avgLoad - CpvAccess(neighbors)[i].load; numUnderAvg++; @@ -377,7 +374,7 @@ void CldHandler(void *msg) void CldEnqueueGroup(CmiGroup grp, void *msg, int infofn) { - int len, queueing, priobits,i; unsigned int *prioptr; + int len, queueing, priobits; unsigned int *prioptr; CldInfoFn ifn = (CldInfoFn)CmiHandlerToFunction(infofn); CldPackFn pfn; ifn(msg, &pfn, &len, &queueing, &priobits, &prioptr); @@ -413,7 +410,7 @@ void CldEnqueueWithinNode(void *msg, int infofn) void CldEnqueueMulti(int npes, const int *pes, void *msg, int infofn) { - int len, queueing, priobits,i; unsigned int *prioptr; + int len, queueing, priobits; unsigned int *prioptr; CldInfoFn ifn = (CldInfoFn)CmiHandlerToFunction(infofn); CldPackFn pfn; ifn(msg, &pfn, &len, &queueing, &priobits, &prioptr); @@ -424,7 +421,7 @@ void CldEnqueueMulti(int npes, const int *pes, void *msg, int infofn) CldSwitchHandler((char *)msg, CpvAccess(CldHandlerIndex)); CmiSetInfo(msg,infofn); /* - for(i=0;i 1)) { diff --git a/src/conv-ldb/topology.C b/src/conv-ldb/topology.C index ea65c462c2..097a746a72 100644 --- a/src/conv-ldb/topology.C +++ b/src/conv-ldb/topology.C @@ -770,11 +770,11 @@ public: nb = 0; int *nodePeList; int numpes; - int rank = CmiPhysicalRank(mype); int node = CmiPhysicalNodeID(mype); - int _ppn_ = CmiNumPesOnPhysicalNode(node); CmiGetPesOnPhysicalNode(node, &nodePeList, &numpes); #ifdef YHDEBUG + int rank = CmiPhysicalRank(mype); + int _ppn_ = CmiNumPesOnPhysicalNode(node); CmiPrintf(" PE[%d] ppn=%d, NumOfNodes=%d, rank=%d, node=%d, numpes=%d\n", mype, _ppn_, NumOfNodes, rank, node, numpes); #endif for(int i=0; i= poolSize) { - double writeTime = TraceCoreTimer(); + //double writeTime = TraceCoreTimer(); isWriting = true; if(binary) writeBinary(); else write(); diff --git a/src/libs/ck-libs/NDMeshStreamer/NDMeshStreamer.h b/src/libs/ck-libs/NDMeshStreamer/NDMeshStreamer.h index 4432fc9988..b975f3fe75 100644 --- a/src/libs/ck-libs/NDMeshStreamer/NDMeshStreamer.h +++ b/src/libs/ck-libs/NDMeshStreamer/NDMeshStreamer.h @@ -96,7 +96,7 @@ class MeshStreamerMessageV : public CMessage_MeshStreamerMessageV { std::uint16_t *offsets; CkArrayIndex *destObjects; - MeshStreamerMessageV(int t, bool isFixedSize): numDataItems(0), msgType(t), fixedSize(isFixedSize) { + MeshStreamerMessageV(int t, bool isFixedSize): msgType(t), numDataItems(0), fixedSize(isFixedSize) { finalMsgCount = -1; if (!isFixedSize) { offsets[0] = 0; diff --git a/src/libs/ck-libs/pose/event.C b/src/libs/ck-libs/pose/event.C index d934e06c59..16b9839c65 100644 --- a/src/libs/ck-libs/pose/event.C +++ b/src/libs/ck-libs/pose/event.C @@ -1,12 +1,9 @@ /// Data types for events and spawned events #include "pose.h" -/// Basic Constructor -Event::Event() : spawnedList(NULL),msg (NULL), cpData(NULL), - serialCPdataSz(0), serialCPdata(NULL), - next(NULL),prev(NULL), commitErr(0), - done (0), fnIdx(-1), timestamp(POSE_UnsetTS), - srt(0.0), svt (0) +Event::Event() : fnIdx(-1), timestamp(POSE_UnsetTS), done(0), svt(0.0), srt(0.0), + commitErr(0), msg(NULL), spawnedList(NULL), cpData(NULL), + serialCPdataSz(0), serialCPdata(NULL), next(NULL), prev(NULL) { } diff --git a/src/libs/ck-libs/pose/event.h b/src/libs/ck-libs/pose/event.h index f546df647a..1534c779aa 100644 --- a/src/libs/ck-libs/pose/event.h +++ b/src/libs/ck-libs/pose/event.h @@ -23,7 +23,7 @@ class SpawnedEvent { SpawnedEvent() : objIdx(-1), timestamp(POSE_UnsetTS),next(NULL){ } /// Initializing constructor SpawnedEvent(int idx, eventID e, POSE_TimeType ts, SpawnedEvent *n) - :objIdx (idx), evID(e), timestamp(ts), next(n) + :objIdx (idx), timestamp(ts), evID(e), next(n) { } /// Pack/unpack/sizing operator diff --git a/src/libs/ck-libs/pose/memory_temporal.h b/src/libs/ck-libs/pose/memory_temporal.h index 1e22381914..d2e1370ed8 100644 --- a/src/libs/ck-libs/pose/memory_temporal.h +++ b/src/libs/ck-libs/pose/memory_temporal.h @@ -229,8 +229,8 @@ class TimePool : public Group { void clean_up(); // Move old defunct SuperBlocks to not_in_use list public: - TimePool() : min_time(POSE_UnsetTS), last_in_use(NULL), first_in_use(NULL), - not_in_use(NULL), not_in_use_sz(0) {} + TimePool() : last_in_use(NULL), first_in_use(NULL), + not_in_use(NULL), not_in_use_sz(0), min_time(POSE_UnsetTS) {} TimePool(CkMigrateMessage *msg) : Group(msg) {} ~TimePool(); void pup(PUP::er &p) {} diff --git a/src/libs/ck-libs/pose/opt.h b/src/libs/ck-libs/pose/opt.h index 541e5c9452..0cf6ec74a3 100644 --- a/src/libs/ck-libs/pose/opt.h +++ b/src/libs/ck-libs/pose/opt.h @@ -37,9 +37,9 @@ class opt : public strat { POSE_TimeType avgRBoffset, avgTimeLeash, avgJump; unsigned short int rbFlag; /// Basic Constructor - opt() : specEventCount(0), - eventCount(0), stepCount(0), avgEventsPerStep(0), rbCount(0), jumpCount(0), - rbFlag(0), idle(0), avgTimeLeash(0), avgJump(0) + opt() : idle(0), specEventCount(0), + eventCount(0), stepCount(0), avgEventsPerStep(0), rbCount(0), + jumpCount(0), avgTimeLeash(0), avgJump(0), rbFlag(0) { STRAT_T=OPT_T; cpRate=pose_config.store_rate; diff --git a/src/libs/ck-libs/pose/srtable.C b/src/libs/ck-libs/pose/srtable.C index 8fd444f3f9..b443521c94 100644 --- a/src/libs/ck-libs/pose/srtable.C +++ b/src/libs/ck-libs/pose/srtable.C @@ -18,7 +18,7 @@ char *SRentry::dumpString() { } /// Basic constructor -SRtable::SRtable() : offset(0), b(0), size_b(0), numOverflow(0), overflow(NULL), end_overflow(NULL), ofSends(0), ofRecvs(0) +SRtable::SRtable() : offset(0), b(0), size_b(0), ofSends(0), ofRecvs(0), overflow(NULL), end_overflow(NULL), numOverflow(0) { int i; for (i=0; idepth() + issue->depthToSolution() ) { ChildFinished(0); @@ -196,11 +196,12 @@ idaStarGroup::idaStarGroup(problem *issue, int startdepth, int maxdepth, int stride, int window, int charesize, int serialdist, CkCallback finished) -: CharesExpanded(0), NodesExpanded(0), Running(0), Issue(issue), - ChareSize(charesize), SerialDist(serialdist), +: NodesExpanded(0), CharesExpanded(0), Issue(issue), Solution(NULL), + BestSolutionDepth(maxdepth), Finished(finished), StartDepth(startdepth), CurrentDepth(startdepth), MaxDepth(maxdepth), Stride(stride), - BestSolutionDepth(maxdepth), Solution(NULL), Finished(finished) { + Running(0), ChareSize(charesize), SerialDist(serialdist) +{ // Everyone in the group gets the stuff to do, but only the one on // processor zero is actually going to run it. Issue->Root = 1; diff --git a/src/libs/ck-libs/search/problem.C b/src/libs/ck-libs/search/problem.C index 25b298cbe0..a131d02c65 100644 --- a/src/libs/ck-libs/search/problem.C +++ b/src/libs/ck-libs/search/problem.C @@ -9,16 +9,16 @@ problem::problem() -: Priority(), +: PUP::able(), Root(1), - PUP::able() + Priority() { } problem::problem(const problem &p) -: Priority(p.Priority), +: PUP::able(p), Root(p.Root), - PUP::able(p) + Priority(p.Priority) { } diff --git a/src/libs/ck-libs/search/serialtree.C b/src/libs/ck-libs/search/serialtree.C index 76e4a11e5f..2ef3b564bf 100644 --- a/src/libs/ck-libs/search/serialtree.C +++ b/src/libs/ck-libs/search/serialtree.C @@ -10,7 +10,7 @@ SerialTree::SerialTree(problem *start, int height) -: Expanded(0), SolutionHeight(0), Solution(NULL) { +: Solution(NULL), SolutionHeight(0), Expanded(0) { // If this is a solution, then note that and you can cease if ( start->solution() ) { Solution = start; diff --git a/src/util/crc32.C b/src/util/crc32.C index 61941ef274..f258301481 100644 --- a/src/util/crc32.C +++ b/src/util/crc32.C @@ -110,7 +110,6 @@ unsigned int crc32_update(unsigned char *data, int len, unsigned int previous) { return ~result; } -static unsigned char checksum3[4] = {0, 0, 0, 0xFF}; static unsigned char checksum_array[7] = {0xFF, 0xFF, 0xFF, 0, 0, 0, 0}; unsigned int checksum_update(unsigned char *data, int len, unsigned int previous) { diff --git a/src/util/partitioning_strategies.C b/src/util/partitioning_strategies.C index adcdef3c2a..c562b67875 100644 --- a/src/util/partitioning_strategies.C +++ b/src/util/partitioning_strategies.C @@ -338,8 +338,6 @@ struct TopoManagerWrapper { if ( PARTITION_TOPOLOGY_VERBOSE && CmiMyNodeGlobal() == 0 ) printf("sorting %d(%d) %d(%d) %d(%d)\n", sortdims[0], tlens[4]>>3, sortdims[1], tlens[3]>>3, sortdims[2], tlens[2]>>3); std::sort(node_begin,node_end,node_sortop_topo(*this,sortdims)); - int *nodes = node_begin; - int nnodes = node_end - node_begin; } }; diff --git a/src/util/sockRoutines.C b/src/util/sockRoutines.C index ad98599d58..f800bde302 100644 --- a/src/util/sockRoutines.C +++ b/src/util/sockRoutines.C @@ -124,7 +124,7 @@ by, e.g., an alarm and should be retried. */ static int skt_should_retry(void) { - int isinterrupt=0,istransient=0,istimeout=0; + int isinterrupt=0,istransient=0; #if defined(_WIN32) /*Windows systems-- check Windows Sockets Error*/ int err=WSAGetLastError(); if (err==WSAEINTR) isinterrupt=1; @@ -133,7 +133,7 @@ static int skt_should_retry(void) #else /*UNIX systems-- check errno*/ int err=errno; if (err==EINTR) isinterrupt=1; - if (err==ETIMEDOUT) istimeout=1; + //int istimeout = (err==ETIMEDOUT) ? 1 : 0; if (err==EAGAIN||err==ECONNREFUSED ||err==EWOULDBLOCK||err==ENOBUFS ||err==ECONNRESET From 29fbf6adbbbcbef3233e6ab1966ea7b83cfa57ce Mon Sep 17 00:00:00 2001 From: Sam White Date: Fri, 21 Apr 2023 11:30:05 -0500 Subject: [PATCH 046/155] Cleanup warning from clang about unknown diagnostic --- src/QuickThreads/md/setjmp.c | 4 ++-- src/QuickThreads/md/setjmp64.c | 4 ++-- src/QuickThreads/md/setjmp64_.c | 4 ++-- src/QuickThreads/md/setjmp_m.c | 4 ++-- src/QuickThreads/md/sjalloca.c | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/QuickThreads/md/setjmp.c b/src/QuickThreads/md/setjmp.c index 0d43fbb890..ced2b500b3 100644 --- a/src/QuickThreads/md/setjmp.c +++ b/src/QuickThreads/md/setjmp.c @@ -29,7 +29,7 @@ struct helpdesc { qt_helper_t *hfn; qt_t *jb; void *oldptr; void *newptr; }; # endif #endif -#ifdef __GNUC__ +#if __GNUC__ && !__clang__ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wstringop-overflow" #endif @@ -89,6 +89,6 @@ void *qt_abort(qt_helper_t *hfn, void *oldptr, void *newptr, qt_t *sp) longjmp(*(jmp_buf *)&sp, (int)(intptr_t)&help); } -#ifdef __GNUC__ +#if __GNUC__ && !__clang__ #pragma GCC diagnostic pop #endif diff --git a/src/QuickThreads/md/setjmp64.c b/src/QuickThreads/md/setjmp64.c index 8474e6d1fd..ab501f9349 100644 --- a/src/QuickThreads/md/setjmp64.c +++ b/src/QuickThreads/md/setjmp64.c @@ -40,7 +40,7 @@ struct helpdesc { qt_helper_t *hfn; qt_t *jb; void *oldptr; void *newptr; }; static TLS_SPECIFIER void * pbuf[MAXTABLE] = {0}; static TLS_SPECIFIER int pcounter = 1; -#ifdef __GNUC__ +#if __GNUC__ && !__clang__ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wstringop-overflow" #endif @@ -116,6 +116,6 @@ void *qt_abort(qt_helper_t *hfn, void *oldptr, void *newptr, qt_t *sp) longjmp(*(jmp_buf *)&sp, push_buf((void *)&help)); } -#ifdef __GNUC__ +#if __GNUC__ && !__clang__ #pragma GCC diagnostic pop #endif diff --git a/src/QuickThreads/md/setjmp64_.c b/src/QuickThreads/md/setjmp64_.c index be208f6234..c12dc2bd62 100644 --- a/src/QuickThreads/md/setjmp64_.c +++ b/src/QuickThreads/md/setjmp64_.c @@ -46,7 +46,7 @@ struct helpdesc { qt_helper_t *hfn; qt_t *jb; void *oldptr; void *newptr; }; static TLS_SPECIFIER void * pbuf[MAXTABLE] = {0}; static TLS_SPECIFIER int pcounter = 1; -#ifdef __GNUC__ +#if __GNUC__ && !__clang__ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wstringop-overflow" #endif @@ -123,6 +123,6 @@ void *qt_abort(qt_helper_t *hfn, void *oldptr, void *newptr, qt_t *sp) _longjmp(*(jmp_buf *)&sp, push_buf((void *)&help)); } -#ifdef __GNUC__ +#if __GNUC__ && !__clang__ #pragma GCC diagnostic pop #endif diff --git a/src/QuickThreads/md/setjmp_m.c b/src/QuickThreads/md/setjmp_m.c index 19746ec193..51d2d5b225 100644 --- a/src/QuickThreads/md/setjmp_m.c +++ b/src/QuickThreads/md/setjmp_m.c @@ -34,7 +34,7 @@ struct helpdesc { qt_helper_t *hfn; qt_t *jb; void *oldptr; void *newptr; }; # endif #endif -#ifdef __GNUC__ +#if __GNUC__ && !__clang__ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wstringop-overflow" #endif @@ -94,6 +94,6 @@ void *qt_abort(qt_helper_t *hfn, void *oldptr, void *newptr, qt_t *sp) _longjmp(*(jmp_buf *)&sp, (int)(intptr_t)&help); } -#ifdef __GNUC__ +#if __GNUC__ && !__clang__ #pragma GCC diagnostic pop #endif diff --git a/src/QuickThreads/md/sjalloca.c b/src/QuickThreads/md/sjalloca.c index 36233de8e0..ff71969449 100644 --- a/src/QuickThreads/md/sjalloca.c +++ b/src/QuickThreads/md/sjalloca.c @@ -17,7 +17,7 @@ struct helpdesc { qt_helper_t *hfn; qt_t *jb; void *oldptr; void *newptr; }; #define SHIFTSP(pos) {char *osp = (char *)alloca(0); alloca((((char*)pos)-osp)+256); } #endif -#ifdef __GNUC__ +#if __GNUC__ && !__clang__ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wstringop-overflow" #endif @@ -77,6 +77,6 @@ void *qt_abort(qt_helper_t *hfn, void *oldptr, void *newptr, qt_t *sp) longjmp(*(jmp_buf *)&sp, (int)(intptr_t)&help); } -#ifdef __GNUC__ +#if __GNUC__ && !__clang__ #pragma GCC diagnostic pop #endif From bdd43fc1c3c9b14e389d4bf8995e1b69f05acde2 Mon Sep 17 00:00:00 2001 From: Sam White Date: Fri, 21 Apr 2023 08:41:34 -0500 Subject: [PATCH 047/155] Cleanup and unbreak some debug build options --- src/ck-core/ckcheckpoint.C | 3 --- src/ck-core/ckmulticast.C | 8 ++++---- src/ck-core/ckreduction.C | 18 +++++++++--------- src/ck-core/qd.C | 6 +++--- src/libs/ck-libs/ampi/ampi.C | 2 +- 5 files changed, 17 insertions(+), 20 deletions(-) diff --git a/src/ck-core/ckcheckpoint.C b/src/ck-core/ckcheckpoint.C index 05e399d028..659d0517b5 100644 --- a/src/ck-core/ckcheckpoint.C +++ b/src/ck-core/ckcheckpoint.C @@ -27,9 +27,6 @@ void noopit(const char*, ...) //#define DEBCHK CkPrintf #define DEBCHK noopit -#define DEBUGC(x) x -//#define DEBUGC(x) - #define SUBDIR_SIZE 256 CkGroupID _sysChkptWriteMgr; diff --git a/src/ck-core/ckmulticast.C b/src/ck-core/ckmulticast.C index 446a878eb9..ef1fe44319 100644 --- a/src/ck-core/ckmulticast.C +++ b/src/ck-core/ckmulticast.C @@ -574,7 +574,7 @@ void CkMulticastMgr::initGrpCookie(CkSectionInfo s) DEBUGF(("init: %d elems %p\n", n, s.get_val())); // Create and initialize a setup message multicastSetupMsg *msg = new (0, n, 0) multicastSetupMsg; - DEBUGF(("[%d] initGrpCookie: msg->arrIdx:%p, msg->lastKnown: %p \n", CkMyPe(), msg->arrIdx, msg->lastKnown)); + DEBUGF(("[%d] initGrpCookie: msg->arrIdx: %p\n", CkMyPe(), msg->arrIdx)); msg->nIdx = n; msg->parent = CkSectionInfo(entry->getAid()); msg->rootSid = s; @@ -787,7 +787,7 @@ void CkMulticastMgr::childrenReady(mCastEntry *entry) entry->setReady(); CProxy_CkMulticastMgr mCastGrp(thisgroup); - DEBUGF(("[%d] childrenReady entry %p groupsection?: %d, Arrayelems: %d, GroupElems: %d, redNo: %d\n", CkMyPe(), entry, entry->isGrpSec(), entry->allElem.size(), entry->allGrpElem.size(), entry->red.redNo)); + DEBUGF(("[%d] childrenReady entry %p groupsection?: %d, Arrayelems: %lu, GroupElems: %lu, redNo: %d\n", CkMyPe(), entry, entry->isGrpSec(), entry->allElem.size(), entry->allGrpElem.size(), entry->red.redNo)); if (entry->hasParent()) mCastGrp[entry->parentGrp.get_pe()].recvCookie(entry->parentGrp, CkSectionInfo(entry->getAid(), entry)); @@ -872,7 +872,7 @@ void CkMulticastMgr::resetCookie(CkSectionInfo s) void CkMulticastMgr::SimpleSend(int ep,void *m, CkArrayID a, CkSectionID &sid, int opts) { - DEBUGF(("[%d] SimpleSend: nElems:%d\n", CkMyPe(), sid._elems.size())); + DEBUGF(("[%d] SimpleSend: nElems: %lu\n", CkMyPe(), sid._elems.size())); // set an invalid cookie since we don't have it ((multicastGrpMsg *)m)->_cookie = CkSectionInfo(-1, NULL, 0, a); for (int i=0; i< sid._elems.size()-1; i++) { @@ -1528,7 +1528,7 @@ void CkMulticastMgr::recvRedMsg(CkReductionMsg *msg) reductionInfo &redInfo = entry->red; - DEBUGF(("[%d] RecvRedMsg, entry: %p, lcount: %d, cccount: %d, #localelems: %d, #children: %d \n", CkMyPe(), (void *)entry, redInfo.lcount[msg->fragNo], redInfo.ccount[msg->fragNo], entry->getNumLocalElems(), entry->children.size())); + DEBUGF(("[%d] RecvRedMsg, entry: %p, lcount: %d, cccount: %d, #localelems: %d, #children: %lu \n", CkMyPe(), (void *)entry, redInfo.lcount[msg->fragNo], redInfo.ccount[msg->fragNo], entry->getNumLocalElems(), entry->children.size())); //------------------------------------------------------------------------- /// If you've received a msg from a previous redn, something has gone horribly wrong somewhere! diff --git a/src/ck-core/ckreduction.C b/src/ck-core/ckreduction.C index f2c31d5ea8..c9ec5825bc 100644 --- a/src/ck-core/ckreduction.C +++ b/src/ck-core/ckreduction.C @@ -203,7 +203,7 @@ CkReductionMgr::CkReductionMgr() barrier_nSource=0; barrier_nContrib=barrier_nRemote=0; - DEBR((AA "In reductionMgr constructor at %d \n" AB,this)); + DEBR((AA "In reductionMgr constructor at %p \n" AB,this)); } CkReductionMgr::CkReductionMgr(CkMigrateMessage *m) :CkGroupInitCallback(m) @@ -219,7 +219,7 @@ CkReductionMgr::CkReductionMgr(CkMigrateMessage *m) :CkGroupInitCallback(m) nContrib=nRemote=0; is_inactive = false; maxStartRequest=0; - DEBR((AA "In reductionMgr migratable constructor at %d \n" AB,this)); + DEBR((AA "In reductionMgr migratable constructor at %p \n" AB,this)); barrier_gCount=0; barrier_nSource=0; @@ -600,7 +600,7 @@ void CkReductionMgr::addContribution(CkReductionMsg *m) DEBR((AA "Contributor gives early contribution-- for #%d\n" AB,m->redNo)); futureMsgs.enq(m); } else {// An ordinary contribution - DEBR((AA "Recv'd local contribution %d for #%d at %d\n" AB,nContrib,m->redNo,this)); + DEBR((AA "Recv'd local contribution %d for #%d at %p\n" AB,nContrib,m->redNo,this)); // CkPrintf("[%d] Local Contribution for %d in Mesg %d at %.6f\n",CkMyPe(),redNo,m->redNo,CmiWallTimer()); startReduction(m->redNo,CkMyPe()); msgs.enq(m); @@ -1616,7 +1616,7 @@ CkReductionMsg* CkReduction::tupleReduction_fn(int num_messages, CkReductionMsg* { CkReduction::tupleElement* reductions = (CkReduction::tupleElement*)(tuple_data[message_idx]); CkReduction::tupleElement& element = reductions[reduction_idx]; - DEB_TUPLE((" msg %d, sf=%d, length=%d : { dataSize=%d, data=%p, reducer=%d },\n", + DEB_TUPLE((" msg %d, sf=%d, length=%d : { dataSize=%lu, data=%p, reducer=%d },\n", message_idx, messages[message_idx]->sourceFlag, messages[message_idx]->getLength(), element.dataSize, element.data, element.reducer)); reducerType = element.reducer; @@ -1979,7 +1979,7 @@ void NodeGroup::pup(PUP::er &p) //CK_REDUCTION_CLIENT_DEF(CProxy_NodeGroup,(CkNodeReductionMgr *)CkLocalBranch(_ck_gid)); void CProxy_NodeGroup::ckSetReductionClient(CkCallback *cb) const { - DEBR(("in CksetReductionClient for CProxy_NodeGroup %d\n",CkLocalNodeBranch(_ck_gid))); + DEBR(("in CksetReductionClient for CProxy_NodeGroup %p\n",CkLocalNodeBranch(_ck_gid))); ((CkNodeReductionMgr *)CkLocalNodeBranch(_ck_gid))->ckSetReductionClient(cb); //ckLocalNodeBranch()->ckSetReductionClient(cb); } @@ -2018,7 +2018,7 @@ CkNodeReductionMgr::CkNodeReductionMgr()//Constructor creating=false; interrupt = false; - DEBR((AA "In NodereductionMgr constructor at %d \n" AB,this)); + DEBR((AA "In NodereductionMgr constructor at %p\n" AB,this)); } CkNodeReductionMgr::~CkNodeReductionMgr() @@ -2052,7 +2052,7 @@ void CkNodeReductionMgr::flushStates() //Add the given client function. Overwrites any previous client. void CkNodeReductionMgr::ckSetReductionClient(CkCallback *cb) { - DEBR((AA "Setting reductionClient in NodeReductionMgr %d at %d\n" AB,cb,this)); + DEBR((AA "Setting reductionClient in NodeReductionMgr %p at %p\n" AB,cb,this)); if(cb->isInvalid()){ DEBR((AA "Invalid Callback passed to setReductionClient in nodeReductionMgr\n" AB)); }else{ @@ -2162,7 +2162,7 @@ void CkNodeReductionMgr::doAddContribution(CkReductionMsg *m){ DEBR((AA "Contributor gives early node contribution-- for #%d\n" AB,m->redNo)); futureMsgs.enq(m); } else {// An ordinary contribution - DEBR((AA "Recv'd local node contribution %d for #%d at %d\n" AB,nContrib,m->redNo,this)); + DEBR((AA "Recv'd local node contribution %d for #%d at %p\n" AB,nContrib,m->redNo,this)); // CmiPrintf("[%d,%d] Redcv'd Local Contribution for redNo %d number %d at %0.6f \n",CkMyNode(),CkMyPe(),m->redNo,nContrib+1,CkWallTimer()); startReduction(m->redNo,CkMyNode()); msgs.enq(m); @@ -2189,7 +2189,7 @@ void CkNodeReductionMgr::LateMigrantMsg(CkReductionMsg *m){ // CkPrintf("[%d,%d] NodeGroup %d> Latemigrant gives early node contribution %d in redNo %d\n",CkMyNode(),CkMyPe(),thisgroup.idx,m->redNo,redNo); futureLateMigrantMsgs.enq(m); } else {// An ordinary contribution - DEBR((AA "Recv'd late migrant contribution %d for #%d at %d\n" AB,nContrib,m->redNo,this)); + DEBR((AA "Recv'd late migrant contribution %d for #%d at %p\n" AB,nContrib,m->redNo,this)); // CkPrintf("[%d,%d] NodeGroup %d> Latemigrant contribution %d in redNo %d\n",CkMyNode(),CkMyPe(),thisgroup.idx,m->redNo,redNo); msgs.enq(m); finishReduction(); diff --git a/src/ck-core/qd.C b/src/ck-core/qd.C index f940a967cc..39533f5ec3 100644 --- a/src/ck-core/qd.C +++ b/src/ck-core/qd.C @@ -59,7 +59,7 @@ static inline void _bcastQD1(QdState* state, QdMsg *msg) msg->setPhase(0); state->propagate(msg); msg->setPhase(1); - DEBUGP(("[%d] _bcastQD1: State: getCreated:%d getProcessed:%d\n", CmiMyPe(), state->getCreated(), state->getProcessed())); + DEBUGP(("[%d] _bcastQD1: State: getCreated:%lld getProcessed:%lld\n", CmiMyPe(), state->getCreated(), state->getProcessed())); #if !CMK_MULTICORE /* QdState *comm_state; @@ -129,14 +129,14 @@ static inline void _handlePhase1(QdState *state, QdMsg *msg) _bcastQD2(state, msg); break; case 1 : - DEBUGP(("[%d] msg: getCreated:%d getProcessed:%d\n", CmiMyPe(), msg->getCreated(), msg->getProcessed())); + DEBUGP(("[%d] msg: getCreated:%lld getProcessed:%lld\n", CmiMyPe(), msg->getCreated(), msg->getProcessed())); // add children's counters state->subtreeCreate(msg->getCreated()); state->subtreeProcess(msg->getProcessed()); state->reported(); if(state->allReported()) { if(CmiMyPe()==0) { - DEBUGP(("ALL: %p getCCreated:%d getCProcessed:%d\n", state, state->getCCreated(), state->getCProcessed())); + DEBUGP(("ALL: %p getCCreated:%lld getCProcessed:%lld\n", state, state->getCCreated(), state->getCProcessed())); if(state->getCCreated()==state->getCProcessed()) { if(state->oldCount == state->getCProcessed()) {// counts unchanged in second round _bcastQD2(state, msg); // almost reached, one pass to make sure diff --git a/src/libs/ck-libs/ampi/ampi.C b/src/libs/ck-libs/ampi/ampi.C index 582c42ee21..be675077e2 100644 --- a/src/libs/ck-libs/ampi/ampi.C +++ b/src/libs/ck-libs/ampi/ampi.C @@ -5997,7 +5997,7 @@ CMI_WARN_UNUSED_RESULT ampiParent* ampiParent::waitall(int count, MPI_Request re } } - MSG_ORDER_DEBUG(CkPrintf("[%d] MPI_Waitall called with count %d, blocking on completion of %d requests\n", ptr->thisIndex, count, numBlockedReqs)); + MSG_ORDER_DEBUG(CkPrintf("[%d] MPI_Waitall called with count %d, blocking on completion of %d requests\n", pptr->thisIndex, count, numBlockedReqs)); // If any requests are incomplete, block until all have been completed if (numBlockedReqs > 0) { From bc069cc5a2af21f08c16060551c23d1ca0969937 Mon Sep 17 00:00:00 2001 From: Sam White Date: Fri, 21 Apr 2023 12:51:17 -0500 Subject: [PATCH 048/155] Update from %lu to %zu format specifier for size_t --- src/ck-core/ckmulticast.C | 6 +++--- src/ck-core/ckreduction.C | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ck-core/ckmulticast.C b/src/ck-core/ckmulticast.C index ef1fe44319..540e989d49 100644 --- a/src/ck-core/ckmulticast.C +++ b/src/ck-core/ckmulticast.C @@ -787,7 +787,7 @@ void CkMulticastMgr::childrenReady(mCastEntry *entry) entry->setReady(); CProxy_CkMulticastMgr mCastGrp(thisgroup); - DEBUGF(("[%d] childrenReady entry %p groupsection?: %d, Arrayelems: %lu, GroupElems: %lu, redNo: %d\n", CkMyPe(), entry, entry->isGrpSec(), entry->allElem.size(), entry->allGrpElem.size(), entry->red.redNo)); + DEBUGF(("[%d] childrenReady entry %p groupsection?: %d, Arrayelems: %zu, GroupElems: %zu, redNo: %d\n", CkMyPe(), entry, entry->isGrpSec(), entry->allElem.size(), entry->allGrpElem.size(), entry->red.redNo)); if (entry->hasParent()) mCastGrp[entry->parentGrp.get_pe()].recvCookie(entry->parentGrp, CkSectionInfo(entry->getAid(), entry)); @@ -872,7 +872,7 @@ void CkMulticastMgr::resetCookie(CkSectionInfo s) void CkMulticastMgr::SimpleSend(int ep,void *m, CkArrayID a, CkSectionID &sid, int opts) { - DEBUGF(("[%d] SimpleSend: nElems: %lu\n", CkMyPe(), sid._elems.size())); + DEBUGF(("[%d] SimpleSend: nElems: %zu\n", CkMyPe(), sid._elems.size())); // set an invalid cookie since we don't have it ((multicastGrpMsg *)m)->_cookie = CkSectionInfo(-1, NULL, 0, a); for (int i=0; i< sid._elems.size()-1; i++) { @@ -1528,7 +1528,7 @@ void CkMulticastMgr::recvRedMsg(CkReductionMsg *msg) reductionInfo &redInfo = entry->red; - DEBUGF(("[%d] RecvRedMsg, entry: %p, lcount: %d, cccount: %d, #localelems: %d, #children: %lu \n", CkMyPe(), (void *)entry, redInfo.lcount[msg->fragNo], redInfo.ccount[msg->fragNo], entry->getNumLocalElems(), entry->children.size())); + DEBUGF(("[%d] RecvRedMsg, entry: %p, lcount: %d, cccount: %d, #localelems: %d, #children: %zu \n", CkMyPe(), (void *)entry, redInfo.lcount[msg->fragNo], redInfo.ccount[msg->fragNo], entry->getNumLocalElems(), entry->children.size())); //------------------------------------------------------------------------- /// If you've received a msg from a previous redn, something has gone horribly wrong somewhere! diff --git a/src/ck-core/ckreduction.C b/src/ck-core/ckreduction.C index c9ec5825bc..c4f6e33f56 100644 --- a/src/ck-core/ckreduction.C +++ b/src/ck-core/ckreduction.C @@ -1616,7 +1616,7 @@ CkReductionMsg* CkReduction::tupleReduction_fn(int num_messages, CkReductionMsg* { CkReduction::tupleElement* reductions = (CkReduction::tupleElement*)(tuple_data[message_idx]); CkReduction::tupleElement& element = reductions[reduction_idx]; - DEB_TUPLE((" msg %d, sf=%d, length=%d : { dataSize=%lu, data=%p, reducer=%d },\n", + DEB_TUPLE((" msg %d, sf=%d, length=%d : { dataSize=%zu, data=%p, reducer=%d },\n", message_idx, messages[message_idx]->sourceFlag, messages[message_idx]->getLength(), element.dataSize, element.data, element.reducer)); reducerType = element.reducer; From a6f06dbc84a3114116f32524403657f80ed6939b Mon Sep 17 00:00:00 2001 From: Evan Ramos Date: Tue, 25 Apr 2023 17:37:00 -0500 Subject: [PATCH 049/155] GitHub Workflows: Remove autobuild.yml --- .github/workflows/autobuild.yml | 23 ----------------------- 1 file changed, 23 deletions(-) delete mode 100644 .github/workflows/autobuild.yml diff --git a/.github/workflows/autobuild.yml b/.github/workflows/autobuild.yml deleted file mode 100644 index 93073eaf20..0000000000 --- a/.github/workflows/autobuild.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: Autobuild - -on: - schedule: - - cron: '01 05 * * *' # UTC, corresponds to 00:01 CDT - -jobs: - might: - timeout-minutes: 120 - - runs-on: might - name: netlrts-linux-x86_64 -pedantic - - steps: - - uses: actions/checkout@v2 - - name: build - run: ./build all-test netlrts-linux-x86_64 -g -j6 --with-production -pedantic - - name: test - run: make -C netlrts-linux-x86_64/tmp test TESTOPTS="++local" - - name: testp P=2 - run: make -C netlrts-linux-x86_64/tmp testp P=2 TESTOPTS="++local" - - name: testp P=3 - run: make -C netlrts-linux-x86_64/tmp testp P=3 TESTOPTS="++local" From a619eef5ccc25b0cc441680c0bc6849d10359a2a Mon Sep 17 00:00:00 2001 From: Sam White Date: Wed, 26 Apr 2023 10:05:20 -0500 Subject: [PATCH 050/155] Cleanup: simplify sdag refnum setting using C++11 std::enable_if --- src/ck-core/sdag.h | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/src/ck-core/sdag.h b/src/ck-core/sdag.h index d76c6c747f..7c725ee4f1 100644 --- a/src/ck-core/sdag.h +++ b/src/ck-core/sdag.h @@ -18,21 +18,16 @@ namespace SDAG { void packClosure(PUP::er& p) { p | continuations; p | hasRefnum; p | refnum; } void init() { continuations = 1; hasRefnum = false; refnum = 0; } virtual ~Closure() { } + // Handles refnum setting for generated code by allowing calls to setRefnum - // regardless of the type of the first parameter to an entry method - // TODO: With C++11 support, remove overloading in favor of enable_if - template - inline void setRefnum(T t) {} - inline void setRefnum(char c) { hasRefnum = true; refnum = c; } - inline void setRefnum(int i) { hasRefnum = true; refnum = i; } - inline void setRefnum(short s) { hasRefnum = true; refnum = s; } - inline void setRefnum(long l) { hasRefnum = true; refnum = l; } - inline void setRefnum(unsigned char c) { hasRefnum = true; refnum = c; } - inline void setRefnum(unsigned int i) { hasRefnum = true; refnum = i; } - inline void setRefnum(unsigned short s) { hasRefnum = true; refnum = s; } - inline void setRefnum(unsigned long l) { hasRefnum = true; refnum = l; } - inline void setRefnum(float f) { hasRefnum = true; refnum = f; } - inline void setRefnum(double d) { hasRefnum = true; refnum = d; } + // regardless of the type of the first parameter to an entry method. + // Refnums are arithmetic types only. + template< typename T, typename std::enable_if< std::is_arithmetic< T >::value, bool >::type = true > + void setRefnum(T t) { hasRefnum = true; refnum = t; } + + template< typename T, typename std::enable_if< !std::is_arithmetic< T >::value, bool >::type = true > + void setRefnum(T t) {} + void unsetRefnum() { hasRefnum = false; refnum = 0; } }; } From 1d37ae3f505ee7249c5b0e56fdeeaa1524ce483a Mon Sep 17 00:00:00 2001 From: Sam White Date: Wed, 26 Apr 2023 10:00:01 -0500 Subject: [PATCH 051/155] Cleanup: simplify CkSectionInfo based on C++11 union semantics --- src/ck-core/ckcallback.C | 4 +-- src/ck-core/ckcallback.h | 15 ++++----- src/ck-core/cksection.h | 72 ++++++++++++---------------------------- 3 files changed, 31 insertions(+), 60 deletions(-) diff --git a/src/ck-core/ckcallback.C b/src/ck-core/ckcallback.C index 053fe1c45b..fc5aea7758 100644 --- a/src/ck-core/ckcallback.C +++ b/src/ck-core/ckcallback.C @@ -186,7 +186,7 @@ CkCallback::CkCallback(int ep,CProxySection_ArrayBase §Elt,bool forceInline) type=bcastSection; // forceInline currently ignored d.section.ep=ep; CkSectionID secID=sectElt.ckGetSectionID(0); - d.section.sinfo = secID._cookie.info; + d.section.sinfo = secID._cookie; d.section._elems = secID._elems.data(); d.section._nElems = secID._elems.size(); d.section.pelist = secID.pelist.data(); @@ -201,7 +201,7 @@ CkCallback::CkCallback(int ep, CkSectionID &id) { #endif type=bcastSection; d.section.ep=ep; - d.section.sinfo = id._cookie.info; + d.section.sinfo = id._cookie; d.section._elems = id._elems.data(); d.section._nElems = id._elems.size(); d.section.pelist = id.pelist.data(); diff --git a/src/ck-core/ckcallback.h b/src/ck-core/ckcallback.h index 2f8e03d4ce..651cc7d70c 100644 --- a/src/ck-core/ckcallback.h +++ b/src/ck-core/ckcallback.h @@ -131,11 +131,11 @@ class CkCallback { } section; #else struct s_section { - CkArrayIndex *_elems; - int *pelist; - CkSectionInfo::CkSectionInfoStruct sinfo; - int _nElems; - int npes; + CkArrayIndex *_elems; + int *pelist; + CkSectionInfo sinfo; + int _nElems; + int npes; int ep; CMK_REFNUM_TYPE refnum; // Reference number to set on the message bool hasRefnum; @@ -145,9 +145,8 @@ class CkCallback { struct s_ccsReply { CcsDelayedReply reply; } ccsReply; - //callbackData(){memset(this,0,sizeof(callbackData));} - //callbackData()=default; - //constructor()=default; + + callbackData() { memset(this, 0, sizeof(callbackData)); } }; public: diff --git a/src/ck-core/cksection.h b/src/ck-core/cksection.h index dc27b9dae1..0f91c7d37c 100644 --- a/src/ck-core/cksection.h +++ b/src/ck-core/cksection.h @@ -26,61 +26,33 @@ class CkSectionInfo { public: - /** - * For now we still need to encapsulate CkSectionInfo's data - * in a separate CkSectionInfoStruct because it is used in ckcallback - * inside a union, and C++03 doesn't support placing objects with non-trivial - * constructors in unions. - * TODO When all our supported compilers have C++11 we might want to modify callbackData - * union to allow objects with non-trivial constructors. - */ - class CkSectionInfoStruct { - public: - /// Pointer to mCastEntry (used by CkMulticast) - void *val; - /// Array/group ID of the array/group that has been sectioned - CkGroupID aid; - /// The pe on which this object has been created - int pe; - /// Counter tracking the last reduction that has traversed this section (used by CkMulticast) - int redNo; - - bool operator==(CkSectionInfoStruct &other) { - return (val == other.val && aid == other.aid && pe == other.pe && redNo == other.redNo); - } - }; - - CkSectionInfoStruct info; - - CkSectionInfo() { - info.pe = -1; - info.redNo = 0; - info.val = NULL; - } + /// Pointer to mCastEntry (used by CkMulticast) + void *val; + /// Array/group ID of the array/group that has been sectioned + CkGroupID aid; + /// The pe on which this object has been created + int pe; + /// Counter tracking the last reduction that has traversed this section (used by CkMulticast) + int redNo; - CkSectionInfo(const CkSectionInfoStruct &i): info(i) {} + CkSectionInfo() : val(NULL), pe(-1), redNo(0) { } - CkSectionInfo(CkArrayID _aid, void *p = NULL) { - info.pe = CkMyPe(); - info.aid = _aid; - info.val = p; - info.redNo = 0; - } + CkSectionInfo(CkArrayID _aid, void *p = NULL) + : val(p), aid(_aid), pe(CkMyPe()), redNo(0) { } - CkSectionInfo(int e, void *p, int r, CkArrayID _aid) { - info.pe = e; - info.aid = _aid; - info.val = p; - info.redNo = r; - } + CkSectionInfo(int e, void *p, int r, CkArrayID _aid) + : val(p), aid(_aid), pe(e), redNo(r) { } - inline int &get_pe() { return info.pe; } - inline int &get_redNo() { return info.redNo; } - inline void set_redNo(int redNo) { info.redNo = redNo; } - inline void* &get_val() { return info.val; } - inline CkGroupID &get_aid() { return info.aid; } - inline CkGroupID get_aid() const { return info.aid; } + bool operator==(CkSectionInfo &other) const { + return (val == other.val && aid == other.aid && pe == other.pe && redNo == other.redNo); + } + inline int &get_pe() { return pe; } + inline int &get_redNo() { return redNo; } + inline void set_redNo(int _redNo) { redNo = _redNo; } + inline void* &get_val() { return val; } + inline CkGroupID &get_aid() { return aid; } + inline CkGroupID get_aid() const { return aid; } }; PUPbytes(CkSectionInfo) From 35e479a65dd6038576fb9b046531a6f936777a03 Mon Sep 17 00:00:00 2001 From: Evan Ramos Date: Wed, 19 Apr 2023 18:36:41 -0500 Subject: [PATCH 052/155] .gitignore: Add rules for: macOS, autoconf, charm4py --- .gitignore | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.gitignore b/.gitignore index 16d7aa12c2..88faa0e2b8 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,12 @@ # Ignore objects, archives etc. *.[oad] +autom4te.cache/ +configure~ + +# Ignore files commonly generated by operating systems +.DS_Store +._* # Ignore files generated from ci file parsing *.decl.h @@ -25,6 +31,7 @@ CMakeFiles /Makefile Charm++-prefix src/arch/win/createlink.exe +/empty.cpp # Ignore directories created from compilation /gni-* From 311238392d40b2db9d334abe9e593dea4c2f6700 Mon Sep 17 00:00:00 2001 From: Evan Ramos Date: Wed, 19 Apr 2023 18:54:44 -0500 Subject: [PATCH 053/155] CMake: Set value of policy CMP0075 to NEW Fixes: CMake Deprecation Warning at CMakeLists.txt:25 (cmake_policy): The OLD behavior for policy CMP0075 will be removed from a future version of CMake. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ad345fff83..6e63197b24 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,7 +22,7 @@ message("# You can run './buildold' to use the previous build system. #") message("##################################################################") if(CMAKE_VERSION VERSION_GREATER 3.12 OR CMAKE_VERSION VERSION_EQUAL 3.12) - cmake_policy(SET CMP0075 OLD) + cmake_policy(SET CMP0075 NEW) endif() # Fortran is optional, so don't include it in LANGUAGES here From 11a0b698f9fe05882587c43e147ac49e5abb97d0 Mon Sep 17 00:00:00 2001 From: Evan Ramos Date: Wed, 19 Apr 2023 18:44:50 -0500 Subject: [PATCH 054/155] Use size_t where appropriate in CkVec code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes: In member function ‘makeBlock’, inlined from ‘reserve’ at cklists.h:239:16, inlined from ‘resize’ at cklists.h:249:19, inlined from ‘pupbase’ at cklists.h:304:35, inlined from ‘pupCkVec’ at cklists.h:387:27, inlined from ‘operator|’ at cklists.h:394:58, inlined from ‘__xlater_roPup_groupProxy’ at startupTest.def.h:407:10: cklists.h:193:16: warning: argument 1 value ‘18446744073709551615’ exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=] 193 | block=new T[blklen_]; | ^ --- src/util/cklists.h | 40 +++++++++++++++++++--------------------- 1 file changed, 19 insertions(+), 21 deletions(-) diff --git a/src/util/cklists.h b/src/util/cklists.h index 2f0235c3d8..183fdecfa0 100644 --- a/src/util/cklists.h +++ b/src/util/cklists.h @@ -24,8 +24,8 @@ template class CkSTLHelper { protected: //Copy nEl elements from src into dest - void elementCopy(T *dest,const T *src,int nEl) { - for (int i=0;i { T *block; //Elements of vector size_t blklen; //Allocated size of block (STL capacity) size_t len; //Number of used elements in block (STL size; <= capacity) - void makeBlock(int blklen_,int len_) { + void makeBlock(size_t blklen_,size_t len_) { if (blklen_==0) block=NULL; //< saves 1-byte allocations else { block=new T[blklen_]; @@ -208,8 +208,8 @@ class CkVec : private CkSTLHelper { CkVec(): block(NULL), blklen(0), len(0) {} ~CkVec() { freeBlock(); } CkVec(const this_type &src) {copyFrom(src);} - CkVec(int size) { makeBlock(size,size); } - CkVec(int size, int used) { makeBlock(size,used); } + CkVec(size_t size) { makeBlock(size,size); } + CkVec(size_t size, size_t used) { makeBlock(size,used); } CkVec(const CkSkipInitialization &skip) {/* don't initialize */} this_type &operator=(const this_type &src) { freeBlock(); @@ -298,7 +298,7 @@ class CkVec : private CkSTLHelper { //PUP routine help: //Only pup the length of this vector, which is returned: - int pupbase(PUP::er &p) { + size_t pupbase(PUP::er &p) { size_t l=len; p(l); if (p.isUnpacking()) resize(l); @@ -313,24 +313,22 @@ class CkVec : private CkSTLHelper { } #endif - inline void quickSort(){ - q_sort(0, len - 1,128); - } - - inline void quickSort(int changeOverSize){ + inline void quickSort(size_t changeOverSize = 128){ + if (len <= 1) + return; q_sort(0,len-1,changeOverSize); } - inline void q_sort(int left, int right,int changeOverSize){ - int l_hold, r_hold; - int pivot; + inline void q_sort(size_t left, size_t right,size_t changeOverSize){ + size_t l_hold, r_hold; + size_t pivot; if(left >= right) return; //swap the center element with the left one - int mid = (left+right)/2; + size_t mid = (left+right)/2; T temp = block[mid]; block[mid] = block[left]; block[left] = temp; @@ -367,9 +365,9 @@ class CkVec : private CkSTLHelper { q_sort(pivot+1, right,changeOverSize); } - inline void bubbleSort(int left,int right){ - for(int i=left;i<=right;i++){ - for(int j=i+1;j<=right;j++){ + inline void bubbleSort(size_t left,size_t right){ + for(size_t i=left;i<=right;i++){ + for(size_t j=i+1;j<=right;j++){ if(block[i] >= block[j]){ T val = block[i]; block[i] = block[j]; @@ -687,8 +685,8 @@ class CkCompactVec : private CkSTLHelper { CkCompactVec(): block(NULL), blklen(0), len(0), offset(0), lastnull(sentinel) {} ~CkCompactVec() { freeBlock(); } CkCompactVec(const this_type &src) {copyFrom(src);} - CkCompactVec(int size) { makeBlock(size,size); } - CkCompactVec(int size, int used) { makeBlock(size,used); } + CkCompactVec(size_t size) { makeBlock(size,size); } + CkCompactVec(size_t size, size_t used) { makeBlock(size,used); } CkCompactVec(const CkSkipInitialization &skip) {/* don't initialize */} this_type &operator=(const this_type &src) { freeBlock(); @@ -805,7 +803,7 @@ class CkCompactVec : private CkSTLHelper { //PUP routine help: //Only pup the length of this vector, which is returned: - int pupbase(PUP::er &p) { + size_t pupbase(PUP::er &p) { size_t l=len; p(l); if (p.isUnpacking()) resize(l); From d95ab7084f7ddfedd17cdcdb5bcfb167cae8333f Mon Sep 17 00:00:00 2001 From: Evan Ramos Date: Wed, 19 Apr 2023 19:01:13 -0500 Subject: [PATCH 055/155] Charmrun: Avoid buffer overread in pparam_find MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes: In function ‘pparam_find’, inlined from ‘pparam_parseopt’ at src/util/charmrun-src/charmrun.C:604:28, inlined from ‘pparam_parsecmd’ at src/util/charmrun-src/charmrun.C:660:29, inlined from ‘arg_init’ at src/util/charmrun-src/charmrun.C:950:22, inlined from ‘main’ at src/util/charmrun-src/charmrun.C:4126:11: src/util/charmrun-src/charmrun.C:407:17: warning: ‘strcmp’ reading 1 or more bytes from a region of size 0 [-Wstringop-overread] 407 | if (strcmp(def->lname, lname + (sizeof(no_prefix)-1)) == 0) | ^ src/util/charmrun-src/charmrun.C: In function ‘main’: src/util/charmrun-src/charmrun.C:600:10: note: at offset 3 into source object ‘name’ of size 2 600 | char name[2]; | ^ --- src/util/charmrun-src/charmrun.C | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/util/charmrun-src/charmrun.C b/src/util/charmrun-src/charmrun.C index 313ac05e98..0818249bea 100644 --- a/src/util/charmrun-src/charmrun.C +++ b/src/util/charmrun-src/charmrun.C @@ -402,9 +402,10 @@ static ppdeffind pparam_find(const char *lname) return {def, 1}; static const char no_prefix[] = "no-"; - if (strncmp(no_prefix, lname, sizeof(no_prefix)-1) == 0) + static constexpr size_t no_prefix_len = sizeof(no_prefix)-1; + if (strlen(lname) > no_prefix_len && strncmp(no_prefix, lname, no_prefix_len) == 0) { - if (strcmp(def->lname, lname + (sizeof(no_prefix)-1)) == 0) + if (strcmp(def->lname, lname + no_prefix_len) == 0) return {def, 0}; } } From 26ebb28a6978d993413473f3a4299a3463c97cc8 Mon Sep 17 00:00:00 2001 From: Evan Ramos Date: Wed, 19 Apr 2023 19:10:39 -0500 Subject: [PATCH 056/155] Fix violations of the C++ One Definition Rule [-Wodr] --- src/ck-core/ckmulticast.C | 14 +-- src/ck-core/ckmulticast.h | 6 +- src/ck-ldb/MetisLB.C | 4 +- src/ck-ldb/RecBipartLB.C | 110 ++++++++++++------------ src/ck-ldb/ckgraph.C | 4 +- src/ck-ldb/ckgraph.h | 16 ++-- src/conv-ldb/cldb.neighbor.C | 16 ++-- src/conv-ldb/cldb.prioritycentralized.C | 14 +-- src/conv-ldb/cldb.prioritycentralized.h | 4 +- src/conv-ldb/cldb.workstealing.C | 10 +-- src/conv-ldb/edgelist.C | 4 +- src/conv-ldb/generate.C | 18 ++-- src/conv-ldb/graphdefs.h | 8 +- 13 files changed, 114 insertions(+), 114 deletions(-) diff --git a/src/ck-core/ckmulticast.C b/src/ck-core/ckmulticast.C index 540e989d49..f93f3d3485 100644 --- a/src/ck-core/ckmulticast.C +++ b/src/ck-core/ckmulticast.C @@ -28,7 +28,7 @@ #define SPLIT_MULTICAST 1 // maximum number of fragments into which a message can be broken -// NOTE: CkReductionMsg::{nFrags,fragNo} and reductionInfo::npProcessed are int8_t, +// NOTE: CkReductionMsg::{nFrags,fragNo} and sectionRedInfo::npProcessed are int8_t, // which has a maximum value of 127. #define MAXFRAGS 100 @@ -46,7 +46,7 @@ typedef unsigned char byte; * An instance of this class is stored in every mCastEntry object making it possible * to track redn operations on a per section basis all along the spanning tree. */ -class reductionInfo { +class sectionRedInfo { public: /// Number of local array elements which have contributed a given fragment int lcount [MAXFRAGS]; @@ -70,7 +70,7 @@ class reductionInfo { reductionMsgs futureMsgs; public: - reductionInfo(): npProcessed(0), + sectionRedInfo(): npProcessed(0), storedCallback(NULL), storedClientParam(NULL), redNo(0) { @@ -156,7 +156,7 @@ class mCastEntry /// Old spanning tree SectionLocation oldtree; // for reduction - reductionInfo red; + sectionRedInfo red; // char needRebuild; private: @@ -1322,7 +1322,7 @@ void CkMulticastMgr::contribute(int dataSize,void *data,CkReduction::reducerType CkReductionMsg* CkMulticastMgr::combineFrags (CkSectionInfo& id, mCastEntry* entry, - reductionInfo& redInfo) { + sectionRedInfo& redInfo) { int8_t i; int dataSize = 0; int8_t nFrags = redInfo.msgs[0][0]->nFrags; @@ -1372,7 +1372,7 @@ CkReductionMsg* CkMulticastMgr::combineFrags (CkSectionInfo& id, void CkMulticastMgr::reduceFragment (int index, CkSectionInfo& id, - mCastEntry* entry, reductionInfo& redInfo, + mCastEntry* entry, sectionRedInfo& redInfo, int currentTreeUp) { CProxy_CkMulticastMgr mCastGrp(thisgroup); @@ -1525,7 +1525,7 @@ void CkMulticastMgr::recvRedMsg(CkReductionMsg *msg) } /// Grab the locally stored redn info - reductionInfo &redInfo = entry->red; + sectionRedInfo &redInfo = entry->red; DEBUGF(("[%d] RecvRedMsg, entry: %p, lcount: %d, cccount: %d, #localelems: %d, #children: %zu \n", CkMyPe(), (void *)entry, redInfo.lcount[msg->fragNo], redInfo.ccount[msg->fragNo], entry->getNumLocalElems(), entry->children.size())); diff --git a/src/ck-core/ckmulticast.h b/src/ck-core/ckmulticast.h index 4c9e86afd9..5c0b96dce8 100644 --- a/src/ck-core/ckmulticast.h +++ b/src/ck-core/ckmulticast.h @@ -8,7 +8,7 @@ class multicastSetupMsg; class multicastGrpMsg; class cookieMsg; class CkMcastBaseMsg; -class reductionInfo; +class sectionRedInfo; typedef mCastEntry * mCastEntryPtr; PUPbytes(mCastEntryPtr) @@ -143,9 +143,9 @@ class CkMulticastMgr: public CkDelegateMgr /// inline CkReductionMsg *buildContributeMsg(int dataSize,void *data,CkReduction::reducerType type, CkSectionInfo &id, CkCallback &cb, int userFlag=-1); /// Reduce one fragment of a reduction msg and handle appropriately (transmit up the tree, buffer, combine etc) - void reduceFragment (int index, CkSectionInfo& id, mCastEntry* entry, reductionInfo& redInfo, int currentTreeUp); + void reduceFragment (int index, CkSectionInfo& id, mCastEntry* entry, sectionRedInfo& redInfo, int currentTreeUp); /// At the tree root: Combine all msg fragments for final delivery to the client - CkReductionMsg* combineFrags (CkSectionInfo& id, mCastEntry* entry, reductionInfo& redInfo); + CkReductionMsg* combineFrags (CkSectionInfo& id, mCastEntry* entry, sectionRedInfo& redInfo); // ------------------------- Group Section Functions ------------------------ /// Implement the CkDelegateMgr interface to accept the delegation of a section proxy diff --git a/src/ck-ldb/MetisLB.C b/src/ck-ldb/MetisLB.C index 2892946ddf..e1fc0fabf1 100644 --- a/src/ck-ldb/MetisLB.C +++ b/src/ck-ldb/MetisLB.C @@ -56,12 +56,12 @@ void MetisLB::work(LDStats* stats) auto& inList = vertex.recvFromList; // Partition the incoming edges into {not from vertex nId}, {from vertex nId} - const auto it = std::partition(inList.begin(), inList.end(), [nId](const Edge& e) { + const auto it = std::partition(inList.begin(), inList.end(), [nId](const CkEdge& e) { return e.getNeighborId() != nId; }); // Add the bytes received from vertex nId to the outgoing edge to nId, and then // remove those incoming edges - std::for_each(it, inList.end(), [&outEdge](const Edge& e) { + std::for_each(it, inList.end(), [&outEdge](const CkEdge& e) { outEdge.setNumBytes(outEdge.getNumBytes() + e.getNumBytes()); }); inList.erase(it, inList.end()); diff --git a/src/ck-ldb/RecBipartLB.C b/src/ck-ldb/RecBipartLB.C index 856241d610..c801da1838 100644 --- a/src/ck-ldb/RecBipartLB.C +++ b/src/ck-ldb/RecBipartLB.C @@ -82,9 +82,9 @@ public: inline int getSwapid() const { return swapid; } inline void setSwapid(int v) { swapid = v; } inline short getBoundary() const { return forboundary; } - void push(Vertex*); - bool removeComplete(Vertex*); - bool removeToSwap(Vertex*); + void push(CkVertex*); + bool removeComplete(CkVertex*); + bool removeToSwap(CkVertex*); private: int mingain{}; @@ -93,17 +93,17 @@ private: short forboundary; }; -void RecursiveBiPart(ObjGraph*, vector&, int, int); -void adjustqueues(ObjGraph*, BQueue*, BQueue*, vector&, vector&, int*, +void RecursiveBiPart(ObjGraph*, vector&, int, int); +void adjustqueues(ObjGraph*, BQueue*, BQueue*, vector&, vector&, int*, int); -void adjustgain(ObjGraph*, vector&, BQueue*); -void RefineBoundary(ObjGraph*, vector&, vector&, BQueue*, BQueue*, int, +void adjustgain(ObjGraph*, vector&, BQueue*); +void RefineBoundary(ObjGraph*, vector&, vector&, BQueue*, BQueue*, int, int, int, double, double, double); -int modifypartitions(ObjGraph*, vector&, vector&, BQueue*, BQueue*, int, +int modifypartitions(ObjGraph*, vector&, vector&, BQueue*, BQueue*, int, int); void swapQ1toQ2(ObjGraph*, BQueue*, BQueue*, int); -Vertex* removeinSwap(ObjGraph*, BQueue*, BQueue*, int); -Vertex* removePtr(vector&, int); +CkVertex* removeinSwap(ObjGraph*, BQueue*, BQueue*, int); +CkVertex* removePtr(vector&, int); int level; double TOTALLOAD; @@ -120,7 +120,7 @@ static void lbinit() } // removes from BQueue but not from boundaryline -bool BQueue::removeToSwap(Vertex* vert) +bool BQueue::removeToSwap(CkVertex* vert) { const int id = vert->getVertexId(); const auto v = std::find(q.begin(), q.end(), id); @@ -137,7 +137,7 @@ bool BQueue::removeToSwap(Vertex* vert) } // completely removes from the BQueue as well as from both boundarylines -bool BQueue::removeComplete(Vertex* vert) +bool BQueue::removeComplete(CkVertex* vert) { if (removeToSwap(vert)) { @@ -151,7 +151,7 @@ bool BQueue::removeComplete(Vertex* vert) return false; } -void BQueue::push(Vertex* vert) +void BQueue::push(CkVertex* vert) { const int id = vert->getVertexId(); q.push_back(id); @@ -171,7 +171,7 @@ bool RecBipartLB::QueryBalanceNow(int _step) { return true; } void RecBipartLB::work(LDStats* stats) { - vector ptrvector; + vector ptrvector; /** ========================== INITIALIZATION ============================= */ ProcArray* parr = new ProcArray(stats); // Processor Array ObjGraph* ogr = new ObjGraph(stats); // Object Graph @@ -185,7 +185,7 @@ void RecBipartLB::work(LDStats* stats) parr->resetTotalLoad(); - for (Vertex& vertex : ogr->vertices) + for (CkVertex& vertex : ogr->vertices) { Vertex_helper* helper = new Vertex_helper(); vhelpers.push_back(helper); @@ -199,14 +199,14 @@ void RecBipartLB::work(LDStats* stats) } /* Function that performs Recursive bipartitioning of the object graph.*/ -void RecursiveBiPart(ObjGraph* ogr, vector& pvertices, int parent, int nump) +void RecursiveBiPart(ObjGraph* ogr, vector& pvertices, int parent, int nump) { // if the number of processors that this call has to deal with is 1, dont recurse any // further if (nump == 1) { double totalLoad = 0; - for (Vertex* vertex : pvertices) + for (CkVertex* vertex : pvertices) { vertex->setNewPe(peno); totalLoad += vertex->getVertexLoad(); @@ -233,8 +233,8 @@ void RecursiveBiPart(ObjGraph* ogr, vector& pvertices, int parent, int } // child partitions - vector partition1; - vector partition2; + vector partition1; + vector partition2; vector taken(vhelpers.size(), false); int start = pvertices[0]->getVertexId(); @@ -275,7 +275,7 @@ void RecursiveBiPart(ObjGraph* ogr, vector& pvertices, int parent, int que2.pop(); count++; - Vertex* v = (Vertex*)&(ogr->vertices[n]); + CkVertex* v = (CkVertex*)&(ogr->vertices[n]); loadseen += v->getVertexLoad(); vhelpers[v->getVertexId()]->setPartition( @@ -344,7 +344,7 @@ void RecursiveBiPart(ObjGraph* ogr, vector& pvertices, int parent, int { for (int i = lastforced; i < pvertices.size(); i++) { - Vertex* w = pvertices[i]; + CkVertex* w = pvertices[i]; if (!taken[w->getVertexId()]) { que2.push(w->getVertexId()); @@ -357,7 +357,7 @@ void RecursiveBiPart(ObjGraph* ogr, vector& pvertices, int parent, int } } // end of while loop - for (Vertex* v : pvertices) + for (CkVertex* v : pvertices) { if (!taken[v->getVertexId()]) { @@ -375,7 +375,7 @@ void RecursiveBiPart(ObjGraph* ogr, vector& pvertices, int parent, int for (i = 0; i < tempsize; i++) { - q2->push((Vertex*)&( + q2->push((CkVertex*)&( ogr->vertices[que2.front()])); // also sets boundaryline=true for each vertex que2.pop(); } @@ -399,13 +399,13 @@ void RecursiveBiPart(ObjGraph* ogr, vector& pvertices, int parent, int } // Fills in que1, que2 and adjusts their gains, calculates initial edgecut before KLFM -void adjustqueues(ObjGraph* ogr, BQueue* que1, BQueue* que2, vector& partition1, - vector& partition2, int* initialedgecut, int parent) +void adjustqueues(ObjGraph* ogr, BQueue* que1, BQueue* que2, vector& partition1, + vector& partition2, int* initialedgecut, int parent) { int i = 0, uid = 0, wid = 0; bool swap = true; int ei = -1; - Edge* edge = nullptr; + CkEdge* edge = nullptr; int edgecut = 0; que2->setMingain(std::numeric_limits::max()); que2->setVertextoswap(-1); @@ -415,7 +415,7 @@ void adjustqueues(ObjGraph* ogr, BQueue* que1, BQueue* que2, vector& pa for (i = 0; i < que2->q.size(); i++) // for each vertex v in que2 { int vid = que2->q[i]; - Vertex* v = ((Vertex*)&(ogr->vertices[vid])); + CkVertex* v = ((CkVertex*)&(ogr->vertices[vid])); while (true) { @@ -436,15 +436,15 @@ void adjustqueues(ObjGraph* ogr, BQueue* que1, BQueue* que2, vector& pa if (swap) { uid = v->sendToList[ei].getNeighborId(); - edge = (Edge*)&(v->sendToList[ei]); + edge = (CkEdge*)&(v->sendToList[ei]); } else { uid = v->recvFromList[ei].getNeighborId(); - edge = (Edge*)&(v->recvFromList[ei]); + edge = (CkEdge*)&(v->recvFromList[ei]); } - Vertex* u = (Vertex*)&(ogr->vertices[uid]); + CkVertex* u = (CkVertex*)&(ogr->vertices[uid]); if ((vhelpers[uid]->getPartition()) == (2 * parent - 1) && (vhelpers[uid]->getLevel()) == level) // since v is on boundaryline2, its every @@ -470,7 +470,7 @@ void adjustqueues(ObjGraph* ogr, BQueue* que1, BQueue* que2, vector& pa } } // end of while(1) loop - // Edge counts are initialized while performing BFS + // CkEdge counts are initialized while performing BFS vhelpers[vid]->setGain(vhelpers[vid]->getEdgestopart2() - vhelpers[vid]->getEdgestopart1()); if (vhelpers[vid]->getGain() < que2->getMingain()) // we want most negative gain @@ -486,7 +486,7 @@ void adjustqueues(ObjGraph* ogr, BQueue* que1, BQueue* que2, vector& pa int uid = que1->q[i]; swap = true; ei = -1; - Vertex* u = (Vertex*)&(ogr->vertices[uid]); + CkVertex* u = (CkVertex*)&(ogr->vertices[uid]); while (true) { @@ -505,12 +505,12 @@ void adjustqueues(ObjGraph* ogr, BQueue* que1, BQueue* que2, vector& pa if (swap) { wid = u->sendToList[ei].getNeighborId(); - edge = (Edge*)&(u->sendToList[ei]); + edge = (CkEdge*)&(u->sendToList[ei]); } else { wid = u->recvFromList[ei].getNeighborId(); - edge = (Edge*)&(u->recvFromList[ei]); + edge = (CkEdge*)&(u->recvFromList[ei]); } if (vhelpers[wid]->getLevel() == level && @@ -527,7 +527,7 @@ void adjustqueues(ObjGraph* ogr, BQueue* que1, BQueue* que2, vector& pa } // precondition - edgestopart1 and edgestopart2 must be known for every vertex in queue -void adjustgain(ObjGraph* ogr, vector& partition, BQueue* que) +void adjustgain(ObjGraph* ogr, vector& partition, BQueue* que) { int i = 0; int bdry = que->getBoundary(); @@ -538,7 +538,7 @@ void adjustgain(ObjGraph* ogr, vector& partition, BQueue* que) for (i = 0; i < que->q.size(); i++) // for each vertex u in que { int uid = que->q[i]; - Vertex* u = (Vertex*)&(ogr->vertices[uid]); + CkVertex* u = (CkVertex*)&(ogr->vertices[uid]); if (bdry == 1) { @@ -560,8 +560,8 @@ void adjustgain(ObjGraph* ogr, vector& partition, BQueue* que) } // Fiduccia Mattheyses boundary refinement algorithm -void RefineBoundary(ObjGraph* ogr, vector& partition1, - vector& partition2, BQueue* que1, BQueue* que2, int runs, +void RefineBoundary(ObjGraph* ogr, vector& partition1, + vector& partition2, BQueue* que1, BQueue* que2, int runs, int initialedgecut, int parent, double part1load, double part2load, double ratio) { @@ -604,8 +604,8 @@ void RefineBoundary(ObjGraph* ogr, vector& partition1, } } -int modifypartitions(ObjGraph* ogr, vector& partition1, - vector& partition2, BQueue* q1, BQueue* q2, int ec, +int modifypartitions(ObjGraph* ogr, vector& partition1, + vector& partition2, BQueue* q1, BQueue* q2, int ec, int parent) { int newedgecut = 0; @@ -615,7 +615,7 @@ int modifypartitions(ObjGraph* ogr, vector& partition1, int e1 = vhelpers[q1->getVertextoswap()]->getEdgestopart1(); newedgecut = ec - (e2) + (e1); vhelpers[q1->getVertextoswap()]->setPartition(2 * parent); - Vertex* ptr = removePtr(partition1, q1->getVertextoswap()); + CkVertex* ptr = removePtr(partition1, q1->getVertextoswap()); partition2.push_back(ptr); } else if (q1->getBoundary() == 2) // we are swapping vertex out of boundaryline2 @@ -624,7 +624,7 @@ int modifypartitions(ObjGraph* ogr, vector& partition1, int e2 = vhelpers[q1->getVertextoswap()]->getEdgestopart2(); newedgecut = ec - (e1) + (e2); vhelpers[q1->getVertextoswap()]->setPartition(2 * parent - 1); - Vertex* ptr = removePtr(partition2, q1->getVertextoswap()); + CkVertex* ptr = removePtr(partition2, q1->getVertextoswap()); partition1.push_back(ptr); } @@ -637,18 +637,18 @@ int modifypartitions(ObjGraph* ogr, vector& partition1, void swapQ1toQ2(ObjGraph* ogr, BQueue* q1, BQueue* q2, int parent) { - Vertex* vert = removeinSwap(ogr, q1, q2, parent); // remove vertex from q1 + CkVertex* vert = removeinSwap(ogr, q1, q2, parent); // remove vertex from q1 // removevert also removes or brings in new vertices in the queues, so the edgestopart1 // and edgestopart2 are calculated for new vertices inside removevert q2->push(vert); } -Vertex* removeinSwap(ObjGraph* ogr, BQueue* q1, BQueue* q2, int parent) +CkVertex* removeinSwap(ObjGraph* ogr, BQueue* q1, BQueue* q2, int parent) { int ei = -1, uid = 0, wid = 0, einested = -1; - Edge *edge = nullptr, *edgenested = nullptr; + CkEdge *edge = nullptr, *edgenested = nullptr; bool swap = true, swapnested = true; - Vertex* v = (Vertex*)&(ogr->vertices[q1->getVertextoswap()]); + CkVertex* v = (CkVertex*)&(ogr->vertices[q1->getVertextoswap()]); // edge counts of v do not change // Adjust edgecounts of neighbours, verify whether any additions or deletions happen to // the boundarylines @@ -668,15 +668,15 @@ Vertex* removeinSwap(ObjGraph* ogr, BQueue* q1, BQueue* q2, int parent) if (swap) { uid = v->sendToList[ei].getNeighborId(); - edge = (Edge*)&(v->sendToList[ei]); + edge = (CkEdge*)&(v->sendToList[ei]); } else { uid = v->recvFromList[ei].getNeighborId(); - edge = (Edge*)&(v->recvFromList[ei]); + edge = (CkEdge*)&(v->recvFromList[ei]); } - Vertex* u = (Vertex*)&(ogr->vertices[uid]); + CkVertex* u = (CkVertex*)&(ogr->vertices[uid]); if (q1->getBoundary() == 1) // vertex being removed out of boundaryline1 { @@ -712,12 +712,12 @@ Vertex* removeinSwap(ObjGraph* ogr, BQueue* q1, BQueue* q2, int parent) if (swapnested) { wid = u->sendToList[einested].getNeighborId(); - edgenested = (Edge*)&(u->sendToList[einested]); + edgenested = (CkEdge*)&(u->sendToList[einested]); } else { wid = u->recvFromList[einested].getNeighborId(); - edgenested = (Edge*)&(u->recvFromList[einested]); + edgenested = (CkEdge*)&(u->recvFromList[einested]); } if (vhelpers[wid]->getLevel() == level && vhelpers[wid]->getPartition() == (2 * parent - 1)) @@ -769,12 +769,12 @@ Vertex* removeinSwap(ObjGraph* ogr, BQueue* q1, BQueue* q2, int parent) if (swapnested) { wid = u->sendToList[einested].getNeighborId(); - edgenested = (Edge*)&(u->sendToList[einested]); + edgenested = (CkEdge*)&(u->sendToList[einested]); } else { wid = u->recvFromList[einested].getNeighborId(); - edgenested = (Edge*)&(u->recvFromList[einested]); + edgenested = (CkEdge*)&(u->recvFromList[einested]); } if (vhelpers[wid]->getLevel() == level && @@ -802,13 +802,13 @@ Vertex* removeinSwap(ObjGraph* ogr, BQueue* q1, BQueue* q2, int parent) return v; } -Vertex* removePtr(vector& vec, const int id) +CkVertex* removePtr(vector& vec, const int id) { for (auto& ptr : vec) { if (ptr->getVertexId() == id) { - Vertex* value = ptr; + CkVertex* value = ptr; ptr = vec.back(); vec.pop_back(); return value; diff --git a/src/ck-ldb/ckgraph.C b/src/ck-ldb/ckgraph.C index fe84a23b5e..326e6eb39c 100644 --- a/src/ck-ldb/ckgraph.C +++ b/src/ck-ldb/ckgraph.C @@ -62,8 +62,8 @@ ObjGraph::ObjGraph(BaseLB::LDStats *stats) { from = stats->getHash(commData.sender); to = stats->getHash(commData.receiver.get_destObj()); - vertices[from].sendToList.push_back(Edge(to, commData.messages, commData.bytes)); - vertices[to].recvFromList.push_back(Edge(from, commData.messages, commData.bytes)); + vertices[from].sendToList.emplace_back(to, commData.messages, commData.bytes); + vertices[to].recvFromList.emplace_back(from, commData.messages, commData.bytes); } //else if a multicast list else if((!commData.from_proc()) && (commData.recv_type() == LD_OBJLIST_MSG)) { int nobjs, offset; diff --git a/src/ck-ldb/ckgraph.h b/src/ck-ldb/ckgraph.h index 1d7b72c808..8b02e478f1 100644 --- a/src/ck-ldb/ckgraph.h +++ b/src/ck-ldb/ckgraph.h @@ -64,12 +64,12 @@ class ProcArray double avgLoad; }; -class Edge +class CkEdge { friend class ObjGraph; public: - Edge(int _id, int _msgs, int _bytes) : id(_id), msgs(_msgs), bytes(_bytes) {} + CkEdge(int _id, int _msgs, int _bytes) : id(_id), msgs(_msgs), bytes(_bytes) {} int getNeighborId() const { return id; } int getNumMsgs() const { return msgs; } int getNumBytes() const { return bytes; } @@ -126,13 +126,13 @@ class McastDest int bytes; // total number of bytes exchanged }; -class Vertex +class CkVertex { friend class ObjGraph; public: - Vertex() = default; - Vertex(int i, double cl, bool mig, int curpe, int newpe = -1, size_t pupsize = 0) + CkVertex() = default; + CkVertex(int i, double cl, bool mig, int curpe, int newpe = -1, size_t pupsize = 0) : id(i), compLoad(cl), migratable(mig), @@ -150,8 +150,8 @@ class Vertex bool isMigratable() const { return migratable; } // list of vertices this vertex sends messages to and receives from - std::vector sendToList; - std::vector recvFromList; + std::vector sendToList; + std::vector recvFromList; std::vector mcastToList; std::vector mcastFromList; double getCompLoad() const { return compLoad; } @@ -175,7 +175,7 @@ class ObjGraph void convertDecisions(BaseLB::LDStats* stats); // all vertices in the graph. Each vertex corresponds to a chare - std::vector vertices; + std::vector vertices; }; #endif // _CKGRAPH_H_ diff --git a/src/conv-ldb/cldb.neighbor.C b/src/conv-ldb/cldb.neighbor.C index 4272cb843b..447ddb9ab7 100644 --- a/src/conv-ldb/cldb.neighbor.C +++ b/src/conv-ldb/cldb.neighbor.C @@ -16,21 +16,21 @@ static int LBPeriod = PERIOD; /* time to call load balancing */ static int overload_threshold = MAXOVERLOAD; -typedef struct CldProcInfo_s { +typedef struct CldDataInfo_s { double lastCheck; int sent; /* flag to disable idle work request */ int balanceEvt; /* user event for balancing */ int updateLoadEvt; int idleEvt; /* user event for idle balancing */ int idleprocEvt; /* user event for processing idle req */ -} *CldProcInfo; +} *CldDataInfo; extern char *_lbtopo; /* topology name string */ int _lbsteal = 0; /* work stealing flag */ extern "C" void gengraph(int, int, int, int *, int *); -CpvStaticDeclare(CldProcInfo, CldData); +CpvStaticDeclare(CldDataInfo, CldData); CpvStaticDeclare(int, CldLoadResponseHandlerIndex); CpvStaticDeclare(int, CldAskLoadHandlerIndex); CpvStaticDeclare(int, MinLoad); @@ -72,7 +72,7 @@ void putPool(loadmsg *msg) void LoadNotifyFn(int l) { - CldProcInfo cldData = CpvAccess(CldData); + CldDataInfo cldData = CpvAccess(CldData); cldData->sent = 0; } @@ -97,7 +97,7 @@ static void CldStillIdle(void *dummy) int i; requestmsg msg; int myload; - CldProcInfo cldData = CpvAccess(CldData); + CldDataInfo cldData = CpvAccess(CldData); double now = CmiWallTimer(); double lt = cldData->lastCheck; @@ -162,7 +162,7 @@ static void CldAskLoadHandler(requestmsg *msg) #if CMK_TRACE_ENABLED && TRACE_USEREVENTS /* this is dangerous since projections logging is not thread safe */ { - CldProcInfo cldData = CpvAccessOther(CldData, rank); + CldDataInfo cldData = CpvAccessOther(CldData, rank); traceUserBracketEvent(cldData->idleprocEvt, now, CmiWallTimer()); } #endif @@ -628,7 +628,7 @@ static void topo_callback(void) void CldGraphModuleInit(char **argv) { - CpvInitialize(CldProcInfo, CldData); + CpvInitialize(CldDataInfo, CldData); CpvInitialize(int, numNeighbors); CpvInitialize(int, MinLoad); CpvInitialize(int, Mindex); @@ -641,7 +641,7 @@ void CldGraphModuleInit(char **argv) CpvInitialize(int, CldAskLoadHandlerIndex); CpvAccess(start) = -1; - CpvAccess(CldData) = (CldProcInfo)CmiAlloc(sizeof(struct CldProcInfo_s)); + CpvAccess(CldData) = (CldDataInfo)CmiAlloc(sizeof(struct CldDataInfo_s)); CpvAccess(CldData)->lastCheck = -1; CpvAccess(CldData)->sent = 0; #if CMK_TRACE_ENABLED diff --git a/src/conv-ldb/cldb.prioritycentralized.C b/src/conv-ldb/cldb.prioritycentralized.C index 4591507e58..bbc6b4aeee 100644 --- a/src/conv-ldb/cldb.prioritycentralized.C +++ b/src/conv-ldb/cldb.prioritycentralized.C @@ -18,7 +18,7 @@ #define LOAD_WEIGHT 0.1 #define PRIOR_WEIGHT 0.1 -CpvDeclare(CldProcInfo, CldData); +CpvDeclare(CldDataInfo, CldData); extern char *_lbtopo; /* topology name string */ int _lbsteal = 0; /* work stealing flag */ @@ -33,7 +33,7 @@ CpvDeclare(void*, CldRequestQueue); void LoadNotifyFn(int l) { - CldProcInfo cldData = CpvAccess(CldData); + CldDataInfo cldData = CpvAccess(CldData); cldData->sent = 0; } @@ -223,7 +223,7 @@ static void CldStillIdle(void *dummy) int i; double startT; requestmsg msg; - CldProcInfo cldData = CpvAccess(CldData); + CldDataInfo cldData = CpvAccess(CldData); double now = CmiWallTimer(); double lt = cldData->lastCheck; @@ -247,7 +247,7 @@ static void CldStillIdle(void *dummy) void CldReadytoExec(void *msg) { - CldProcInfo cldData = CpvAccess(CldData); + CldDataInfo cldData = CpvAccess(CldData); CldRestoreHandler((char *)msg); CmiHandleMessage(msg); cldData->load = cldData->load - 1; @@ -271,7 +271,7 @@ void HigherPriorityWork(void *msg) CldPackFn pfn; int len, queueing, priobits; unsigned int *prioptr; - CldProcInfo cldData = CpvAccess(CldData); + CldDataInfo cldData = CpvAccess(CldData); ifn = (CldInfoFn)CmiHandlerToFunction(CmiGetInfo(msg)); ifn(msg, &pfn, &len, &queueing, &priobits, &prioptr); CldRestoreHandler((char *)msg); @@ -365,8 +365,8 @@ void CldEnqueueGroup(CmiGroup grp, void *msg, int infofn) void CldOtherInit() { - CpvInitialize(CldProcInfo, CldData); - CpvAccess(CldData) = (CldProcInfo)CmiAlloc(sizeof(struct CldProcInfo_s)); + CpvInitialize(CldDataInfo, CldData); + CpvAccess(CldData) = (CldDataInfo)CmiAlloc(sizeof(struct CldDataInfo_s)); CpvAccess(CldData)->lastCheck = -1; CpvAccess(CldData)->sent = 0; CpvAccess(CldData)->load = 0; diff --git a/src/conv-ldb/cldb.prioritycentralized.h b/src/conv-ldb/cldb.prioritycentralized.h index d3af38b0a5..ed705c7f10 100644 --- a/src/conv-ldb/cldb.prioritycentralized.h +++ b/src/conv-ldb/cldb.prioritycentralized.h @@ -28,14 +28,14 @@ typedef struct readytoexectoken_s{ } readytoexectoken; /******************* Yanhua seed load balancer */ -typedef struct CldProcInfo_s { +typedef struct CldDataInfo_s { double lastCheck; int sent; /* flag to disable idle work request */ int balanceEvt; /* user event for balancing */ int idleEvt; /* user event for idle balancing */ int idleprocEvt; /* user event for processing idle req */ int load; -} *CldProcInfo; +} *CldDataInfo; /* this is used by master to store the highest priority for each processor */ typedef struct CldProcPriorInfo_s { diff --git a/src/conv-ldb/cldb.workstealing.C b/src/conv-ldb/cldb.workstealing.C index 2bc68e5b57..6fde833257 100644 --- a/src/conv-ldb/cldb.workstealing.C +++ b/src/conv-ldb/cldb.workstealing.C @@ -10,18 +10,18 @@ void CldMultipleSendPrio(int pe, int numToSend, int rank, int immed); -typedef struct CldProcInfo_s { +typedef struct CldDataInfo_s { int askEvt; /* user event for askLoad */ int askNoEvt; /* user event for askNoLoad */ int idleEvt; /* user event for idle balancing */ -} *CldProcInfo; +} *CldDataInfo; static int WS_Threshold = -1; static int _steal_prio = 0; static int _stealonly1 = 0; static int _steal_immediate = 0; -CpvStaticDeclare(CldProcInfo, CldData); +CpvStaticDeclare(CldDataInfo, CldData); CpvStaticDeclare(int, CldAskLoadHandlerIndex); CpvStaticDeclare(int, CldAckNoTaskHandlerIndex); CpvStaticDeclare(int, isStealing); @@ -319,12 +319,12 @@ void CldNodeEnqueue(int node, void *msg, int infofn) void CldGraphModuleInit(char **argv) { - CpvInitialize(CldProcInfo, CldData); + CpvInitialize(CldDataInfo, CldData); CpvInitialize(int, CldAskLoadHandlerIndex); CpvInitialize(int, CldAckNoTaskHandlerIndex); CpvInitialize(int, CldBalanceHandlerIndex); - CpvAccess(CldData) = (CldProcInfo)CmiAlloc(sizeof(struct CldProcInfo_s)); + CpvAccess(CldData) = (CldDataInfo)CmiAlloc(sizeof(struct CldDataInfo_s)); #if CMK_TRACE_ENABLED CpvAccess(CldData)->askEvt = traceRegisterUserEvent("CldAskLoad", -1); CpvAccess(CldData)->idleEvt = traceRegisterUserEvent("StealLoad", -1); diff --git a/src/conv-ldb/edgelist.C b/src/conv-ldb/edgelist.C index 5f9cb29434..325539a11d 100644 --- a/src/conv-ldb/edgelist.C +++ b/src/conv-ldb/edgelist.C @@ -12,7 +12,7 @@ EdgeListType * InitEdgeList(int E) edgesRec = (EdgeListType *) malloc(sizeof(EdgeListType)); _MEMCHECK(edgesRec); edgesRec->next = 0; - edgesRec->edges = (Edge *) malloc(E*sizeof(Edge)); + edgesRec->edges = (ConvEdge *) malloc(E*sizeof(ConvEdge)); _MEMCHECK(edgesRec->edges); return(edgesRec); } @@ -38,7 +38,7 @@ void addEdge(VerticesListType *graph, EdgeListType * EdgeList, int v, int w) void printEdges(EdgeListType *EdgeList) { int i; - Edge * edges; + ConvEdge * edges; edges = EdgeList->edges; for (i=0; i< (EdgeList->next ); i++) {printf("%d\t%d\n", edges[i].node1, edges[i].node2); diff --git a/src/conv-ldb/generate.C b/src/conv-ldb/generate.C index 0a94791b41..aa2d66e6a7 100644 --- a/src/conv-ldb/generate.C +++ b/src/conv-ldb/generate.C @@ -286,10 +286,10 @@ static void AddEdges(VerticesListType *graph, EdgeListType *EdgeList, int numVer } -void fillAdjArray(Edge *edges, VerticesListType *vlist, int numVertices, int numEdges); +void fillAdjArray(ConvEdge *edges, VerticesListType *vlist, int numVertices, int numEdges); void sortAdjArrays(VerticesListType *vlist); static void sort(int *adj, int fromIndex, int toIndex); -void countDegrees(Edge *edges, Vertex *vertRecs, int numVertices, int numEdges); +void countDegrees(ConvEdge *edges, ConvVertex *vertRecs, int numVertices, int numEdges); VerticesListType * InitVertices(EdgeListType * EdgeList, int numVertices, int numEdges) @@ -305,7 +305,7 @@ InitVertices(EdgeListType * EdgeList, int numVertices, int numEdges) vlist = (VerticesListType *) malloc(sizeof(VerticesListType)); _MEMCHECK(vlist); vlist->numVertices = numVertices; - vlist->vertexArray = (Vertex *) malloc(numVertices*sizeof(Vertex)); + vlist->vertexArray = (ConvVertex *) malloc(numVertices*sizeof(ConvVertex)); _MEMCHECK(vlist->vertexArray); vlist->adjArray = (int *) malloc(2*numEdges*sizeof(int)); /* as each edge is entered twice */ @@ -316,7 +316,7 @@ InitVertices(EdgeListType * EdgeList, int numVertices, int numEdges) return(vlist); } -void countDegrees(Edge *edges, Vertex *vertRecs, int numVertices, int numEdges) +void countDegrees(ConvEdge *edges, ConvVertex *vertRecs, int numVertices, int numEdges) { /* initialize the degrees of all vertices to 0. Traverse the edge list, incrementing the degree of the 2 nodes for each edge. */ @@ -338,11 +338,11 @@ void countDegrees(Edge *edges, Vertex *vertRecs, int numVertices, int numEdges) } } -void fillAdjArray(Edge *edges, VerticesListType *vlist, int numVertices, int numEdges) +void fillAdjArray(ConvEdge *edges, VerticesListType *vlist, int numVertices, int numEdges) { /* Insert each edge as an entry y in x's adj list, and vice versa. */ int i, x,y; int * adj; - Vertex * vertexRecs; + ConvVertex * vertexRecs; adj = vlist->adjArray; vertexRecs = vlist->vertexArray; @@ -418,7 +418,7 @@ static void copyOut(VerticesListType *vertices, int *npe, int *pes) { int i; int * adj; - Vertex * vertexRecs; + ConvVertex * vertexRecs; adj = vertices->adjArray; vertexRecs = vertices->vertexArray; @@ -437,7 +437,7 @@ static void copyOut(VerticesListType *vertices, int *npe, int *pes) static void printOut(VerticesListType *vertices) {int i,j; int * adj; - Vertex * vertexRecs; + ConvVertex * vertexRecs; FILE *fp; char filename[40]; @@ -460,7 +460,7 @@ static void printOut(VerticesListType *vertices) static void initGraph(VerticesListType *graph) { int i; graph->numVertices = globalNumVertices; - graph->vertexArray = (Vertex *) malloc(globalNumVertices*sizeof(Vertex)); + graph->vertexArray = (ConvVertex *) malloc(globalNumVertices*sizeof(ConvVertex)); _MEMCHECK(graph->vertexArray); graph->adjArray = (int *) malloc(2*globalNumEdges*sizeof(int)); _MEMCHECK(graph->adjArray); diff --git a/src/conv-ldb/graphdefs.h b/src/conv-ldb/graphdefs.h index aba463f39e..fdc8691a5b 100644 --- a/src/conv-ldb/graphdefs.h +++ b/src/conv-ldb/graphdefs.h @@ -1,20 +1,20 @@ #include "converse.h" -typedef struct {int node1, node2;} Edge; +typedef struct {int node1, node2;} ConvEdge; typedef struct {int next; - Edge * edges;} EdgeListType; + ConvEdge * edges;} EdgeListType; typedef struct { int degree; int next; /* temporary count needed to tell where to insert the next entry */ int adjListInd; /* where in the big array does its adj list begin */ /* int available;*/ /* number of connections still available. 12/2/97 */ -} Vertex; +} ConvVertex; typedef struct { int numVertices; - Vertex * vertexArray; /* ptr to an array of records, one for each vertex */ + ConvVertex * vertexArray; /* ptr to an array of records, one for each vertex */ int * adjArray; /* ptr to an array in which adjacency sub-arrays for each vertex are stored contiguosly */ } VerticesListType; From 7277cdf66b8ebc5e56ed5f12485ffd99d802b295 Mon Sep 17 00:00:00 2001 From: Evan Ramos Date: Wed, 19 Apr 2023 19:33:22 -0500 Subject: [PATCH 057/155] AMPI: Fix type of string length parameter of C function called from Fortran MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit test.f90:89:62: warning: type of ‘print_test_fortran’ does not match original declaration [-Wlto-type-mismatch] 89 | call print_test_fortran(test, rank, 'module variable') | ^ framework.C:23:6: note: type mismatch in parameter 4 23 | void print_test_fortran(int & test, int & rank, const char * name, int name_len) | ^ framework.C:23:6: note: type ‘int’ should match type ‘long int’ framework.C:23:6: note: ‘print_test_fortran_’ was previously declared here framework.C:23:6: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used --- tests/ampi/privatization/framework.C | 4 ++-- tests/ampi/privatization/framework.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/ampi/privatization/framework.C b/tests/ampi/privatization/framework.C index 135434b488..b91329f22f 100644 --- a/tests/ampi/privatization/framework.C +++ b/tests/ampi/privatization/framework.C @@ -20,10 +20,10 @@ void print_test(int & test, int & rank, const char * name) printf("Test " test_format ": %s\n", test, name); } -void print_test_fortran(int & test, int & rank, const char * name, int name_len) +void print_test_fortran(int & test, int & rank, const char * name, long int name_len) { if (rank == 0) - printf("Test " test_format ": %.*s\n", test, name_len, name); + printf("Test " test_format ": %.*s\n", test, (int)name_len, name); } diff --git a/tests/ampi/privatization/framework.h b/tests/ampi/privatization/framework.h index d39da56105..6614aeca4d 100644 --- a/tests/ampi/privatization/framework.h +++ b/tests/ampi/privatization/framework.h @@ -12,7 +12,7 @@ CLINKAGE void print_test(int & test, int & rank, const char * name); #define print_test_fortran FTN_NAME(PRINT_TEST_FORTRAN, print_test_fortran) -FLINKAGE void print_test_fortran(int & test, int & rank, const char * name, int name_len); +FLINKAGE void print_test_fortran(int & test, int & rank, const char * name, long int name_len); #define test_privatization FTN_NAME(TEST_PRIVATIZATION, test_privatization) FLINKAGE void test_privatization(int & failed, int & test, int & rank, int & my_wth, int & operation, int & global); From 8d5013c0c4e925b24a9ab55ecf78b3c38fdb05cf Mon Sep 17 00:00:00 2001 From: Evan Ramos Date: Wed, 19 Apr 2023 20:26:27 -0500 Subject: [PATCH 058/155] AMPI: Eliminate ampifimpl.f90 C-string/Fortran interop wrappers Modern compilers pass in lengths of strings as extra parameters, so we no longer need to get their lengths manually. Fixes -Wlto-type-mismatch warnings for these functions --- src/libs/ck-libs/ampi/CMakeLists.txt | 17 +---- src/libs/ck-libs/ampi/Makefile | 8 +-- src/libs/ck-libs/ampi/ampiCC | 4 +- src/libs/ck-libs/ampi/ampif.C | 88 ++++++++++++------------- src/libs/ck-libs/ampi/ampifimpl.f90 | 98 ---------------------------- src/libs/ck-libs/ampi/ampimod.f90 | 2 +- 6 files changed, 46 insertions(+), 171 deletions(-) delete mode 100644 src/libs/ck-libs/ampi/ampifimpl.f90 diff --git a/src/libs/ck-libs/ampi/CMakeLists.txt b/src/libs/ck-libs/ampi/CMakeLists.txt index 4569e5ecb2..ab17893e32 100644 --- a/src/libs/ck-libs/ampi/CMakeLists.txt +++ b/src/libs/ck-libs/ampi/CMakeLists.txt @@ -1,6 +1,6 @@ set(ampi-cxx-sources ampi.C ampiMisc.C ampiOneSided.C ampif.C ddt.C mpich-alltoall.C ampi_mpix.C ampi_noimpl.C) -set(ampi-f90-sources ampifimpl.f90 ampimod.f90) +set(ampi-f90-sources ampimod.f90) set(ampi-h-sources ampi.h ampi-interoperate.h ampif.h ampiimpl.h ddt.h ampi_functions.h ampi_funcptr.h ampi_funcptr_loader.h romio-stub/mpio_functions.h romio-stub/mpio.h romio-stub/mpio_globals.h romio-stub/mpiof.h) @@ -58,15 +58,6 @@ if(CMK_CAN_LINK_FORTRAN) VERBATIM ) - add_library(ampi_funcptr_shim_fortran_impl ampifimpl.f90) - target_compile_options(ampi_funcptr_shim_fortran_impl PRIVATE -language ampi -fPIE -shared) - add_dependencies(ampi_funcptr_shim_fortran_impl moduleampi moduleampif) - add_custom_command(TARGET ampi_funcptr_shim_fortran_impl - POST_BUILD - COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/ampi_funcptr_shim_fortran_impl.dir/ampifimpl.f90.o ${CMAKE_BINARY_DIR}/lib/ampi_funcptr_shim_fortran_impl.o - VERBATIM - ) - add_library(ampi_funcptr_shim_fortran_mod ampimod.f90) target_compile_options(ampi_funcptr_shim_fortran_mod PRIVATE -language ampi -fPIE -shared) add_dependencies(ampi_funcptr_shim_fortran_mod moduleampi moduleampif) @@ -469,18 +460,14 @@ if(CMK_CAN_LINK_FORTRAN) add_library(ampif OBJECT ampif.C) target_compile_options(ampif PRIVATE -I${CMAKE_BINARY_DIR}/include/ampi/) - add_library(ampifimpl OBJECT ampifimpl.f90) - target_compile_options(ampifimpl PRIVATE -I${CMAKE_BINARY_DIR}/include/ampi/) add_library(ampimod OBJECT ampimod.f90) target_compile_options(ampimod PRIVATE -I${CMAKE_BINARY_DIR}/include/ampi/) add_dependencies(ampif ck) - add_dependencies(ampifimpl ck) add_dependencies(ampimod ck) - add_dependencies(moduleampif ampif ampifimpl ampimod) + add_dependencies(moduleampif ampif ampimod) add_custom_command(TARGET moduleampif POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/ampif.dir/ampif.C.o ${CMAKE_BINARY_DIR}/lib/ampif.o - COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/ampifimpl.dir/ampifimpl.f90.o ${CMAKE_BINARY_DIR}/lib/ampifimpl.o COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/ampimod.dir/ampimod.f90.o ${CMAKE_BINARY_DIR}/lib/ampimod.o COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/mpi.mod ${CMAKE_BINARY_DIR}/include/ VERBATIM diff --git a/src/libs/ck-libs/ampi/Makefile b/src/libs/ck-libs/ampi/Makefile index 3b58fc0808..d3f1378ac2 100644 --- a/src/libs/ck-libs/ampi/Makefile +++ b/src/libs/ck-libs/ampi/Makefile @@ -19,13 +19,11 @@ DESTF=$(AMPI_LIBDIR)/$(AMPI_LIB)f.a COMPATLIB=$(AMPI_LIBDIR)/libampi-compat.a AMPIF_OBJ=$(AMPI_LIBDIR)/ampif.o -AMPIFIMPL_OBJ=$(AMPI_LIBDIR)/ampifimpl.o AMPIMOD_OBJ=$(AMPI_LIBDIR)/ampimod.o FUNCPTR_SHIM_OBJ=$(AMPI_LIBDIR)/ampi_funcptr_shim.o FUNCPTR_SHIM_MAIN_OBJ=$(AMPI_LIBDIR)/ampi_funcptr_shim_main.o FUNCPTR_SHIM_FORTRAN_OBJ=$(AMPI_LIBDIR)/ampi_funcptr_shim_fortran.o -FUNCPTR_SHIM_FORTRAN_IMPL_OBJ=$(AMPI_LIBDIR)/ampi_funcptr_shim_fortran_impl.o FUNCPTR_SHIM_FORTRAN_MOD_OBJ=$(AMPI_LIBDIR)/ampi_funcptr_shim_fortran_mod.o FUNCPTR_SHIM_FORTRAN_ROMIO_OBJ=$(AMPI_LIBDIR)/ampi_funcptr_shim_fortran_romio.o FUNCPTR_SHIM_FMPIMAIN_OBJ=$(AMPI_LIBDIR)/ampi_funcptr_shim_fmpimain.o @@ -162,10 +160,9 @@ $(DEST): $(OBJS) headers $(ROMIO) cp $(AMPI_LIB).dep $(AMPI_LIBDIR)/$(AMPI_LIB).dep $(DESTF): $(OBJS) headers $(ROMIO) - $(CHARMC) -c ampifimpl.f90 -o $(AMPIFIMPL_OBJ) $(CHARMC) -c ampimod.f90 -o $(AMPIMOD_OBJ) $(CHARMC) -cpmod ../../../../include mpi.M - $(CHARMC) $(OBJS) $(ROMIO_OBJS) $(ROMIO_FORTRAN_OBJS) $(AMPIFIMPL_OBJ) $(AMPIMOD_OBJ) -o $@ + $(CHARMC) $(OBJS) $(ROMIO_OBJS) $(ROMIO_FORTRAN_OBJS) $(AMPIMOD_OBJ) -o $@ cp $(AMPI_LIB)f.dep $(AMPI_LIBDIR)/$(AMPI_LIB)f.dep $(COMPATLIB): $(COMPAT) @@ -260,9 +257,6 @@ $(FUNCPTR_SHIM_FMPIMAIN_OBJ): ampi_funcptr_shim_fmpimain.C | $(ROMIO) $(FUNCPTR_SHIM_FORTRAN_OBJ): ampif.C $(HEADDEP) headers | $(ROMIO) $(CHARMC) -language ampi -DAMPI_USE_FUNCPTR -fPIE -shared -c $< -o $@ -$(FUNCPTR_SHIM_FORTRAN_IMPL_OBJ): ampifimpl.f90 $(HEADDEP) headers | $(ROMIO) - $(CHARMC) -language ampi -fPIE -shared -c $< -o $@ - $(FUNCPTR_SHIM_FORTRAN_MOD_OBJ): ampimod.f90 $(HEADDEP) headers | $(ROMIO) $(CHARMC) -language ampi -fPIE -shared -c $< -o $@ diff --git a/src/libs/ck-libs/ampi/ampiCC b/src/libs/ck-libs/ampi/ampiCC index 8cb2ca3684..87e564b8f2 100755 --- a/src/libs/ck-libs/ampi/ampiCC +++ b/src/libs/ck-libs/ampi/ampiCC @@ -185,14 +185,14 @@ then then SHIM_OPTS+=(-standalone -DAMPI_USE_FUNCPTR) SHIM_OBJS=("$CHARMLIB/ampi_funcptr_shim.o" "${SHIM_MAIN_OBJS[@]}") - [[ "$AMPICC_MODE" = 'ampif' ]] && SHIM_OBJS+=("$CHARMLIB/ampi_funcptr_shim_fortran.o" "$CHARMLIB/ampi_funcptr_shim_fortran_impl.o" "$CHARMLIB/ampi_funcptr_shim_fortran_mod.o") + [[ "$AMPICC_MODE" = 'ampif' ]] && SHIM_OBJS+=("$CHARMLIB/ampi_funcptr_shim_fortran.o" "$CHARMLIB/ampi_funcptr_shim_fortran_mod.o") [[ "$AMPICC_MODE" = 'ampif' && "$CMK_AMPI_WITH_ROMIO" = '1' ]] && SHIM_OBJS+=("$CHARMLIB/ampi_funcptr_shim_fortran_romio.o") LOADER_OBJS=("$CHARMLIB/ampi_funcptr_loader.o" "${ROMIO[@]}") ROMIO=() else SHIM_OBJS=() LOADER_OBJS=("$CHARMLIB/ampi_funcptr_loader_stub.o") - [[ "$AMPICC_MODE" = 'ampif' ]] && LOADER_OBJS+=("$CHARMLIB/ampif.o" "$CHARMLIB/ampifimpl.o" "$CHARMLIB/ampimod.o") + [[ "$AMPICC_MODE" = 'ampif' ]] && LOADER_OBJS+=("$CHARMLIB/ampif.o" "$CHARMLIB/ampimod.o") fi [[ "$AMPICC_MODE" = 'ampif' ]] && SHIM_OBJS+=("$CHARMLIB/ampi_funcptr_shim_fmpimain.o") diff --git a/src/libs/ck-libs/ampi/ampif.C b/src/libs/ck-libs/ampi/ampif.C index 216001596a..4553928924 100644 --- a/src/libs/ck-libs/ampi/ampif.C +++ b/src/libs/ck-libs/ampi/ampif.C @@ -3,8 +3,8 @@ #include #include #include +#include -FLINKAGE { #define mpi_send FTN_NAME( MPI_SEND , mpi_send ) #define mpi_recv FTN_NAME( MPI_RECV , mpi_recv ) #define mpi_mrecv FTN_NAME( MPI_MRECV , mpi_mrecv ) @@ -72,7 +72,7 @@ FLINKAGE { #define mpi_type_size_x FTN_NAME( MPI_TYPE_SIZE_X , mpi_type_size_x ) #define mpi_type_lb FTN_NAME( MPI_TYPE_LB , mpi_type_lb ) #define mpi_type_ub FTN_NAME( MPI_TYPE_UB , mpi_type_ub ) -/* mpi_type_set_name is defined in ampifimpl.f90, see ampif_type_set_name defined below */ +#define mpi_type_set_name FTN_NAME ( MPI_TYPE_SET_NAME , mpi_type_set_name ) #define mpi_type_get_name FTN_NAME( MPI_TYPE_GET_NAME , mpi_type_get_name ) #define mpi_type_create_resized FTN_NAME( MPI_TYPE_CREATE_RESIZED, mpi_type_create_resized ) #define mpi_type_dup FTN_NAME( MPI_TYPE_DUP, mpi_type_dup ) @@ -173,7 +173,7 @@ FLINKAGE { #define mpi_comm_test_inter FTN_NAME( MPI_COMM_TEST_INTER , mpi_comm_test_inter ) #define mpi_comm_remote_size FTN_NAME ( MPI_COMM_REMOTE_SIZE , mpi_comm_remote_size ) #define mpi_comm_remote_group FTN_NAME ( MPI_COMM_REMOTE_GROUP , mpi_comm_remote_group ) -/* mpi_comm_set_name is defined in ampifimpl.f90, see ampif_comm_set_name defined below */ +#define mpi_comm_set_name FTN_NAME ( MPI_COMM_SET_NAME , mpi_comm_set_name ) #define mpi_comm_get_name FTN_NAME ( MPI_COMM_GET_NAME , mpi_comm_get_name ) #define mpi_comm_set_info FTN_NAME ( MPI_COMM_SET_INFO , mpi_comm_set_info ) #define mpi_comm_get_info FTN_NAME ( MPI_COMM_GET_INFO , mpi_comm_get_info ) @@ -224,7 +224,7 @@ FLINKAGE { #define mpi_errhandler_free FTN_NAME( MPI_ERRHANDLER_FREE , mpi_errhandler_free ) #define mpi_add_error_code FTN_NAME( MPI_ADD_ERROR_CODE , mpi_add_error_code ) #define mpi_add_error_class FTN_NAME( MPI_ADD_ERROR_CLASS , mpi_add_error_class ) -/* mpi_add_error_string is defined in ampifimpl.f90, see ampif_add_error_string defined below */ +#define mpi_add_error_string FTN_NAME ( MPI_ADD_ERROR_STRING , mpi_add_error_string ) #define mpi_error_class FTN_NAME( MPI_ERROR_CLASS , mpi_error_class ) #define mpi_error_string FTN_NAME( MPI_ERROR_STRING , mpi_error_string ) #define mpi_wtime FTN_NAME( MPI_WTIME , mpi_wtime ) @@ -259,7 +259,7 @@ FLINKAGE { #define mpi_win_get_attr FTN_NAME ( MPI_WIN_GET_ATTR , mpi_win_get_attr ) #define mpi_win_set_attr FTN_NAME ( MPI_WIN_SET_ATTR , mpi_win_set_attr ) #define mpi_win_get_group FTN_NAME ( MPI_WIN_GET_GROUP , mpi_win_get_group ) -/* mpi_win_set_name is defined in ampifimpl.f90, see ampif_win_set_name defined below */ +#define mpi_win_set_name FTN_NAME ( MPI_WIN_SET_NAME , mpi_win_set_name ) #define mpi_win_get_name FTN_NAME ( MPI_WIN_GET_NAME , mpi_win_get_name ) #define mpi_win_set_info FTN_NAME ( MPI_WIN_SET_INFO , mpi_win_set_info ) #define mpi_win_get_info FTN_NAME ( MPI_WIN_GET_INFO , mpi_win_get_info ) @@ -287,10 +287,10 @@ FLINKAGE { #define mpi_compare_and_swap FTN_NAME ( MPI_COMPARE_AND_SWAP , mpi_compare_and_swap ) #define mpi_info_create FTN_NAME ( MPI_INFO_CREATE , mpi_info_create ) -/* mpi_info_set is defined in ampifimpl.f90, see ampif_info_set defined below */ -/* mpi_info_delete is defined in ampifimpl.f90, see ampif_info_delete defined below */ -/* mpi_info_get is defined in ampifimpl.f90, see ampif_info_get defined below */ -/* mpi_info_get_valuelen is defined in ampifimpl.f90, see ampif_info_get_valuelen defined below */ +#define mpi_info_set FTN_NAME ( MPI_INFO_SET , mpi_info_set ) +#define mpi_info_delete FTN_NAME ( MPI_INFO_DELETE , mpi_info_delete ) +#define mpi_info_get FTN_NAME ( MPI_INFO_GET , mpi_info_get ) +#define mpi_info_get_valuelen FTN_NAME ( MPI_INFO_GET_VALUELEN , mpi_info_get_valuelen ) #define mpi_info_get_nkeys FTN_NAME ( MPI_INFO_GET_NKEYS , mpi_info_get_nkeys ) #define mpi_info_get_nthkey FTN_NAME ( MPI_INFO_GET_NTHKEYS , mpi_info_get_nthkey ) #define mpi_info_dup FTN_NAME ( MPI_INFO_DUP , mpi_info_dup ) @@ -298,18 +298,6 @@ FLINKAGE { #define mpi_pcontrol FTN_NAME ( MPI_PCONTROL , mpi_pcontrol ) -/* Functions that take 'const char*' arguments are wrapped by Fortran subroutines - * defined in ampifimpl.f90. These functions should be prefixed with 'ampif_' here: */ -#define ampif_comm_set_name FTN_NAME ( AMPIF_COMM_SET_NAME , ampif_comm_set_name ) -#define ampif_type_set_name FTN_NAME ( AMPIF_TYPE_SET_NAME , ampif_type_set_name ) -#define ampif_win_set_name FTN_NAME ( AMPIF_WIN_SET_NAME , ampif_win_set_name ) -#define ampif_info_set FTN_NAME ( AMPIF_INFO_SET , ampif_info_set ) -#define ampif_info_delete FTN_NAME ( AMPIF_INFO_DELETE , ampif_info_delete ) -#define ampif_info_get FTN_NAME ( AMPIF_INFO_GET , ampif_info_get ) -#define ampif_info_get_valuelen FTN_NAME ( AMPIF_INFO_GET_VALUELEN , ampif_info_get_valuelen ) -#define ampif_add_error_string FTN_NAME ( AMPIF_ADD_ERROR_STRING , ampif_add_error_string ) -#define ampif_print FTN_NAME( AMPIF_PRINT , ampif_print ) - /* Extensions needed by ROMIO */ #define mpir_status_set_bytes FTN_NAME ( MPIR_STATUS_SET_BYTES, mpir_status_set_bytes ) @@ -335,7 +323,7 @@ FLINKAGE { #define ampi_yield FTN_NAME ( AMPI_YIELD , ampi_yield ) #define ampi_suspend FTN_NAME ( AMPI_SUSPEND , ampi_suspend ) #define ampi_resume FTN_NAME ( AMPI_RESUME, ampi_resume ) -/* ampi_print is defined in ampifimpl.f90, see ampif_print defined below */ +#define ampi_print FTN_NAME( AMPI_PRINT , ampi_print ) #define ampi_install_idle_timer FTN_NAME( AMPI_INSTALL_IDLE_TIMER , ampi_install_idle_timer ) #define ampi_uninstall_idle_timer FTN_NAME( AMPI_UNINSTALL_IDLE_TIMER , ampi_uninstall_idle_timer ) #define ampi_trace_begin FTN_NAME( AMPI_TRACE_BEGIN , ampi_trace_begin ) @@ -358,7 +346,9 @@ void FTN_NAME(caps, nocaps)(void *iv, void *iov, int *len, MPI_Datatype *dt){ \ /* Strings passed from Fortran must be explicitly NULL terminated * before they are passed into AMPI. */ -static void ampif_str_f2c(char* dst, const char* src, int len) noexcept { +template +static inline void ampif_str_f2c(char (&dst)[N], const char* src, size_t src_len) noexcept { + size_t len = std::min(src_len, N-1); memcpy(dst, src, len); dst[len] = '\0'; } @@ -393,6 +383,8 @@ static void handle_MPI_IN_PLACE_f(void *& inbuf, void *& outbuf) noexcept { if (outbuf == NULL) outbuf = MPI_IN_PLACE; } +FLINKAGE { + void mpi_is_thread_main(int *flag, int *ierr) noexcept { *ierr = MPI_Is_thread_main(flag); @@ -863,10 +855,10 @@ void mpi_type_ub(int* datatype, MPI_Aint* displacement, int* ierr) noexcept *ierr = MPI_Type_ub(*datatype, displacement); } -void ampif_type_set_name(int* datatype, const char* name, int *nlen, int* ierr) noexcept +void mpi_type_set_name(int* datatype, const char* name, int* ierr, long int nlen) noexcept { char tmpName[MPI_MAX_OBJECT_NAME]; - ampif_str_f2c(tmpName, name, *nlen); + ampif_str_f2c(tmpName, name, nlen); *ierr = MPI_Type_set_name(*datatype, tmpName); } @@ -1601,10 +1593,10 @@ void mpi_add_error_class(int *errorclass, int *ierr) noexcept *ierr = MPI_Add_error_class(errorclass); } -void ampif_add_error_string(int *errorcode, const char *errorstring, int* elen, int *ierr) noexcept +void mpi_add_error_string(int *errorcode, const char *errorstring, int *ierr, long int elen) noexcept { char tmpErrorstring[MPI_MAX_ERROR_STRING]; - ampif_str_f2c(tmpErrorstring, errorstring, *elen); + ampif_str_f2c(tmpErrorstring, errorstring, elen); *ierr = MPI_Add_error_string(*errorcode, tmpErrorstring); } @@ -1732,10 +1724,10 @@ void mpi_intercomm_merge(int *intercomm, int *high, int *newintracomm, int *ierr *ierr = MPI_Intercomm_merge(*intercomm, *high, newintracomm); } -void ampif_comm_set_name(int *comm, const char *comm_name, int* nlen, int *ierr) noexcept +void mpi_comm_set_name(int *comm, const char *comm_name, int *ierr, long int nlen) noexcept { char tmpName[MPI_MAX_OBJECT_NAME]; - ampif_str_f2c(tmpName, comm_name, *nlen); + ampif_str_f2c(tmpName, comm_name, nlen); *ierr = MPI_Comm_set_name(*comm, tmpName); } @@ -1904,10 +1896,10 @@ void mpi_win_get_group(int *win, int *group, int *ierr) noexcept *ierr = MPI_Win_get_group(*win, group); } -void ampif_win_set_name(int *win, const char *name, int* nlen, int *ierr) noexcept +void mpi_win_set_name(int *win, const char *name, int *ierr, long int nlen) noexcept { char tmpName[MPI_MAX_OBJECT_NAME]; - ampif_str_f2c(tmpName, name, *nlen); + ampif_str_f2c(tmpName, name, nlen); *ierr = MPI_Win_set_name(*win, tmpName); } @@ -2071,45 +2063,45 @@ void mpi_info_create(int* info, int* ierr) noexcept *ierr = MPI_Info_create(info); } -void ampif_info_set(int* info, const char *key, const char *value, - int *klen, int *vlen, int *ierr) noexcept +void mpi_info_set(int* info, const char *key, const char *value, + int *ierr, long int klen, long int vlen) noexcept { char tmpKey[MPI_MAX_INFO_KEY]; - ampif_str_f2c(tmpKey, key, *klen); + ampif_str_f2c(tmpKey, key, klen); char tmpValue[MPI_MAX_INFO_VAL]; - ampif_str_f2c(tmpValue, value, *vlen); + ampif_str_f2c(tmpValue, value, vlen); *ierr = MPI_Info_set(*info, tmpKey, tmpValue); } -void ampif_info_delete(int* info, const char* key, int* klen, int* ierr) noexcept +void mpi_info_delete(int* info, const char* key, int* ierr, long int klen) noexcept { char tmpKey[MPI_MAX_INFO_KEY]; - ampif_str_f2c(tmpKey, key, *klen); + ampif_str_f2c(tmpKey, key, klen); *ierr = MPI_Info_delete(*info, tmpKey); } -void ampif_info_get(int* info, const char *key, int* valuelen, char *value, int *flag, - int* klen, int* ierr) noexcept +void mpi_info_get(int* info, const char *key, char *value, int *flag, + int* ierr, long int klen, long int valuelen) noexcept { char tmpKey[MPI_MAX_INFO_KEY]; - ampif_str_f2c(tmpKey, key, *klen); + ampif_str_f2c(tmpKey, key, klen); - std::vector tmpValue(*valuelen); + std::vector tmpValue(valuelen); - *ierr = MPI_Info_get(*info, tmpKey, *valuelen, tmpValue.data(), flag); + *ierr = MPI_Info_get(*info, tmpKey, valuelen, tmpValue.data(), flag); if (*ierr == MPI_SUCCESS) - ampif_str_c2f(value, tmpValue.data(), *valuelen); + ampif_str_c2f(value, tmpValue.data(), valuelen); } -void ampif_info_get_valuelen(int* info, const char *key, int *valuelen, int *flag, - int *klen, int* ierr) noexcept +void mpi_info_get_valuelen(int* info, const char *key, int *valuelen, int *flag, + int* ierr, long int klen) noexcept { char tmpKey[MPI_MAX_INFO_KEY]; - ampif_str_f2c(tmpKey, key, *klen); + ampif_str_f2c(tmpKey, key, klen); *ierr = MPI_Info_get_valuelen(*info, tmpKey, valuelen, flag); } @@ -2266,10 +2258,10 @@ void ampi_resume(int *dest, int *comm, int *ierr) noexcept *ierr = AMPI_Resume(*dest, *comm); } -void ampif_print(const char *str, int *len, int *ierr) noexcept +void ampi_print(const char *str, int *ierr, long int len) noexcept { char tmpStr[MPI_MAX_ERROR_STRING]; - ampif_str_f2c(tmpStr, str, *len); + ampif_str_f2c(tmpStr, str, len); *ierr = AMPI_Print(tmpStr); } diff --git a/src/libs/ck-libs/ampi/ampifimpl.f90 b/src/libs/ck-libs/ampi/ampifimpl.f90 deleted file mode 100644 index 4897ee9c7d..0000000000 --- a/src/libs/ck-libs/ampi/ampifimpl.f90 +++ /dev/null @@ -1,98 +0,0 @@ -! This file contains ONLY the definitions of routines that take -! a string argument whose length AMPI needs to know. - -! Please modify ampif.h and ampif.C to make any other changes. - -subroutine MPI_Comm_set_name(comm, comm_name, ierr) - implicit none - integer, intent(in) :: comm - character(len=*), intent(in) :: comm_name - integer, intent(out) :: ierr - - call ampif_comm_set_name(comm, comm_name, len(comm_name), ierr) - -end subroutine MPI_Comm_set_name - -subroutine MPI_Type_set_name(datatype, datatype_name, ierr) - implicit none - integer, intent(in) :: datatype - character(len=*), intent(in) :: datatype_name - integer, intent(out) :: ierr - - call ampif_type_set_name(datatype, datatype_name, len(datatype_name), ierr) - -end subroutine MPI_Type_set_name - -subroutine MPI_Win_set_name(win, win_name, ierr) - implicit none - integer, intent(in) :: win - character(len=*), intent(in) :: win_name - integer, intent(out) :: ierr - - call ampif_win_set_name(win, win_name, len(win_name), ierr) - -end subroutine MPI_Win_set_name - -subroutine MPI_Info_set(info, key, val, ierr) - implicit none - integer, intent(in) :: info - character(len=*), intent(in) :: key, val - integer, intent(out) :: ierr - - call ampif_info_set(info, key, val, len(key), len(val), ierr) - -end subroutine MPI_Info_set - -subroutine MPI_Info_delete(info, key, ierr) - implicit none - integer, intent(in) :: info - character(len=*), intent(in) :: key - integer, intent(out) :: ierr - - call ampif_info_delete(info, key, len(key), ierr) - -end subroutine MPI_Info_delete - -subroutine MPI_Info_get(info, key, vlen, val, flag, ierr) - implicit none - integer, intent(in) :: info - character(len=*), intent(in) :: key - integer, intent(in) :: vlen - character(len=vlen), intent(out) :: val - logical, intent(out) :: flag - integer, intent(out) :: ierr - - call ampif_info_get(info, key, vlen, val, flag, len(key), ierr) - -end subroutine MPI_Info_get - -subroutine MPI_Info_get_valuelen(info, key, vlen, flag, ierr) - implicit none - integer, intent(in) :: info - character(len=*), intent(in) :: key - integer, intent(out) :: vlen - logical, intent(out) :: flag - integer, intent(out) :: ierr - - call ampif_info_get_valuelen(info, key, vlen, flag, len(key), ierr) - -end subroutine MPI_Info_get_valuelen - -subroutine MPI_Add_error_string(errorcode, string, ierr) - implicit none - integer, intent(in) :: errorcode - character(len=*), intent(in) :: string - integer, intent(out) :: ierr - - call ampif_add_error_string(errorcode, string, len(string), ierr) - -end subroutine MPI_Add_error_string - -subroutine AMPI_Print(string, ierr) - implicit none - character(len=*), intent(in) :: string - integer, intent(out) :: ierr - - call ampif_print(string, len(string), ierr) - -end subroutine AMPI_Print diff --git a/src/libs/ck-libs/ampi/ampimod.f90 b/src/libs/ck-libs/ampi/ampimod.f90 index a4268a554b..e5fd51bae3 100644 --- a/src/libs/ck-libs/ampi/ampimod.f90 +++ b/src/libs/ck-libs/ampi/ampimod.f90 @@ -1,5 +1,5 @@ ! This file create an "mpi" module for use in Fortran90+ AMPI programs. -! Please modify ampif.h, ampif.C, and ampifimpl.f90 to make any changes. +! Please modify ampif.h and ampif.C to make any changes. module mpi implicit none From b885ca568adb577c24f830b0fe43162508cb4664 Mon Sep 17 00:00:00 2001 From: Evan Ramos Date: Sat, 22 Apr 2023 00:38:37 -0500 Subject: [PATCH 059/155] AMPI: Fix bug where partial rebuilds would not see ROMIO's headers --- src/libs/ck-libs/ampi/CMakeLists.txt | 11 ++++++++++- src/libs/ck-libs/ampi/Makefile | 29 ++++++++++++++++------------ 2 files changed, 27 insertions(+), 13 deletions(-) diff --git a/src/libs/ck-libs/ampi/CMakeLists.txt b/src/libs/ck-libs/ampi/CMakeLists.txt index ab17893e32..f75120d012 100644 --- a/src/libs/ck-libs/ampi/CMakeLists.txt +++ b/src/libs/ck-libs/ampi/CMakeLists.txt @@ -3,7 +3,11 @@ set(ampi-cxx-sources ampi.C ampiMisc.C ampiOneSided.C ampif.C ddt.C mpich-alltoa set(ampi-f90-sources ampimod.f90) set(ampi-h-sources ampi.h ampi-interoperate.h ampif.h ampiimpl.h ddt.h ampi_functions.h ampi_funcptr.h ampi_funcptr_loader.h - romio-stub/mpio_functions.h romio-stub/mpio.h romio-stub/mpio_globals.h romio-stub/mpiof.h) + romio-stub/mpio_globals.h) + +if(NOT CMK_AMPI_WITH_ROMIO) + set(ampi-h-sources ${ampi-h-sources} romio-stub/mpio_functions.h romio-stub/mpio.h romio-stub/mpiof.h) +endif() add_library(ampi-compat compat_ampim.C compat_ampifm.C @@ -368,6 +372,9 @@ if(CMK_AMPI_WITH_ROMIO) include(ExternalProject) ExternalProject_Add(romio URL ${CMAKE_CURRENT_SOURCE_DIR}/romio + CONFIGURE_COMMAND cp -f ${CMAKE_CURRENT_SOURCE_DIR}/romio-stub/mpio.h ${CMAKE_BINARY_DIR}/include/ && + CONFIGURE_COMMAND cp -f ${CMAKE_CURRENT_SOURCE_DIR}/romio-stub/mpiof.h ${CMAKE_BINARY_DIR}/include/ && + CONFIGURE_COMMAND cp -f ${CMAKE_CURRENT_SOURCE_DIR}/romio-stub/mpio_functions.h ${CMAKE_BINARY_DIR}/include/ && CONFIGURE_COMMAND cd ${romio_dir} && ./configure --disable-aio @@ -478,6 +485,8 @@ endif() if(CMK_AMPI_WITH_ROMIO) add_dependencies(moduleampi romio) if(CMK_CAN_LINK_FORTRAN) + add_dependencies(ampif romio) + add_dependencies(ampimod romio) add_dependencies(moduleampif romio) endif() endif() diff --git a/src/libs/ck-libs/ampi/Makefile b/src/libs/ck-libs/ampi/Makefile index d3f1378ac2..aa7525b041 100644 --- a/src/libs/ck-libs/ampi/Makefile +++ b/src/libs/ck-libs/ampi/Makefile @@ -4,7 +4,12 @@ CHARMC=$(CDIR)/bin/charmc $(OPTS) HEADERS=ampi.h ampif.h ampi_functions.h \ ampi-interoperate.h ampiimpl.h ampi.decl.h ddt.h \ - $(addprefix romio-stub/,mpio.h mpiof.h mpio_functions.h mpio_globals.h) + $(addprefix romio-stub/,mpio_globals.h) +ROMIO_HEADERS:=$(addprefix romio/include/,mpio.h mpiof.h mpio_functions.h) +ROMIO_STUB_HEADERS:=$(addprefix romio-stub/,mpio.h mpiof.h mpio_functions.h) +ifneq ($(CMK_AMPI_WITH_ROMIO),1) + HEADERS+= $(ROMIO_STUB_HEADERS) +endif HEADDEP=$(HEADERS) \ ../tcharm/tcharm.h ../tcharm/tcharm_impl.h COMPAT=compat_ampim.o compat_ampifm.o \ @@ -113,6 +118,7 @@ all: $(MAJOR_TARGETS) $(COMPATLIB) $(ROMIO) $(ROMIO): headers @echo "Building ROMIO" + cp $(ROMIO_STUB_HEADERS) $(CDIR)/include/ cd romio && \ ./configure \ --disable-aio \ @@ -141,8 +147,7 @@ $(ROMIO): headers USER_CFLAGS="$(OPTS) $(ROMIO_FLAGS)" \ USER_FFLAGS="$(OPTS) $(ROMIO_FLAGS)" \ || ( cat config.log ; exit 1 ) - - cp romio/include/mpio.h romio/include/mpiof.h romio/include/mpio_functions.h $(CDIR)/include + cp $(ROMIO_HEADERS) $(CDIR)/include/ $(MAKE) -C romio AUTOCONF=: AUTOHEADER=: AUTOMAKE=: ACLOCAL=: ifeq (1,$(CMK_CAN_LINK_FORTRAN)) cp romio/mpi-io/fortran/romio_fortran$(obj_suf) $(FUNCPTR_SHIM_FORTRAN_ROMIO_OBJ) @@ -217,33 +222,33 @@ compat_ampins.o: compat_ampins.C compat_ampirs.o: compat_ampirs.C $(CHARMC) -c $< -ampi_mpix.o: ampi_mpix.C $(HEADDEP) headers +ampi_mpix.o: ampi_mpix.C $(HEADDEP) headers | $(ROMIO) -ampi_noimpl.o: ampi_noimpl.C $(HEADDEP) headers +ampi_noimpl.o: ampi_noimpl.C $(HEADDEP) headers | $(ROMIO) $(CHARMC) -c $< -DAMPI_NO_UNIMPLEMENTED_WARNINGS compat_ampicpp.o: compat_ampicpp.C $(CHARMC) -c compat_ampicpp.C -ampi.o: ampi.C $(HEADDEP) headers +ampi.o: ampi.C $(HEADDEP) headers | $(ROMIO) $(CHARMC) -c ampi.C -$(AMPIF_OBJ): ampif.C $(HEADDEP) headers +$(AMPIF_OBJ): ampif.C $(HEADDEP) headers | $(ROMIO) $(CHARMC) -c $< -o $@ -ampiOneSided.o: ampiOneSided.C ampiimpl.h $(HEADDEP) headers +ampiOneSided.o: ampiOneSided.C ampiimpl.h $(HEADDEP) headers | $(ROMIO) $(CHARMC) -c ampiOneSided.C -ampiMisc.o: ampiMisc.C ampiimpl.h $(HEADDEP) headers +ampiMisc.o: ampiMisc.C ampiimpl.h $(HEADDEP) headers | $(ROMIO) $(CHARMC) -c ampiMisc.C -mpich-alltoall.o: mpich-alltoall.C $(HEADDEP) headers +mpich-alltoall.o: mpich-alltoall.C $(HEADDEP) headers | $(ROMIO) $(CHARMC) -c mpich-alltoall.C -ampi.decl.h ampi.def.h: ampi.ci +ampi.decl.h ampi.def.h: ampi.ci | $(ROMIO) $(CHARMC) ampi.ci -ddt.o: ddt.C ddt.h $(HEADDEP) headers +ddt.o: ddt.C ddt.h $(HEADDEP) headers | $(ROMIO) $(FUNCPTR_SHIM_OBJ): ampi_funcptr_shim.C $(HEADDEP) headers | $(ROMIO) $(CHARMC) -language ampi -DAMPI_USE_FUNCPTR -DAMPI_NO_UNIMPLEMENTED_WARNINGS -fPIE -shared -c $< -o $@ From efb930928c7680a713143435288d7973b97fafac Mon Sep 17 00:00:00 2001 From: Evan Ramos Date: Sat, 22 Apr 2023 03:13:46 -0500 Subject: [PATCH 060/155] AMPI: Allow ROMIO to configure and build in parallel with the runtime --- src/libs/ck-libs/ampi/CMakeLists.txt | 9 +--- src/libs/ck-libs/ampi/Makefile | 81 +++++++++++++++------------- src/scripts/Makefile | 15 ++++-- 3 files changed, 57 insertions(+), 48 deletions(-) diff --git a/src/libs/ck-libs/ampi/CMakeLists.txt b/src/libs/ck-libs/ampi/CMakeLists.txt index f75120d012..332a021a5f 100644 --- a/src/libs/ck-libs/ampi/CMakeLists.txt +++ b/src/libs/ck-libs/ampi/CMakeLists.txt @@ -367,7 +367,7 @@ if(CMK_AMPI_WITH_ROMIO) # Compile ROMIO with the same flags as AMPI get_target_property(CK_CFLAGS ck COMPILE_OPTIONS) string(REPLACE ";" " " CK_CFLAGS "${CK_CFLAGS}") - set(ROMIO_FLAGS "${CK_CFLAGS} -DAMPI_NO_UNIMPLEMENTED_WARNINGS -standalone -fPIC") + set(ROMIO_FLAGS "${CK_CFLAGS} -DAMPI_NO_UNIMPLEMENTED_WARNINGS -seq -fPIC") include(ExternalProject) ExternalProject_Add(romio @@ -418,13 +418,6 @@ if(CMK_AMPI_WITH_ROMIO) ) endif() - # Since we link a program with charmc as part of ROMIO's configure, - # we need all libraries built at this point. - add_dependencies(romio ck modulecompletion - converse conv-static ldb-rand - memory-os-isomalloc memory-default threads-default ckmain - ckqt moduleNDMeshStreamer ckhello) - add_dependencies(ampi_funcptr_shim romio) add_dependencies(ampi_funcptr_shim_main romio) add_dependencies(ampi_funcptr_loader romio) diff --git a/src/libs/ck-libs/ampi/Makefile b/src/libs/ck-libs/ampi/Makefile index aa7525b041..2e5c3db3c5 100644 --- a/src/libs/ck-libs/ampi/Makefile +++ b/src/libs/ck-libs/ampi/Makefile @@ -2,9 +2,8 @@ CDIR := $(shell cd ../../../.. && pwd) -include $(CDIR)/include/conv-mach-opt.mak CHARMC=$(CDIR)/bin/charmc $(OPTS) -HEADERS=ampi.h ampif.h ampi_functions.h \ - ampi-interoperate.h ampiimpl.h ampi.decl.h ddt.h \ - $(addprefix romio-stub/,mpio_globals.h) +PRE_HEADERS=ampi.h ampif.h ampi_functions.h $(addprefix romio-stub/,mpio_globals.h) +HEADERS=$(PRE_HEADERS) ampi-interoperate.h ampiimpl.h ampi.decl.h ddt.h ROMIO_HEADERS:=$(addprefix romio/include/,mpio.h mpiof.h mpio_functions.h) ROMIO_STUB_HEADERS:=$(addprefix romio-stub/,mpio.h mpiof.h mpio_functions.h) ifneq ($(CMK_AMPI_WITH_ROMIO),1) @@ -64,6 +63,7 @@ endif ifeq ($(CMK_AMPI_WITH_ROMIO),1) ROMIO = romio/.libs/libromio.a + ROMIO_MAKEFILE = romio/Makefile ROMIO_OBJ_DIRS := \ romio/adio/ad_ufs \ @@ -92,7 +92,7 @@ ifeq ($(CMK_AMPI_WITH_ROMIO),1) ) endif -ROMIO_FLAGS = -DAMPI_NO_UNIMPLEMENTED_WARNINGS -standalone -fPIC +ROMIO_FLAGS = -DAMPI_NO_UNIMPLEMENTED_WARNINGS -seq -fPIC ifneq ($(CMK_WINDOWS),1) obj_suf := .o @@ -116,7 +116,7 @@ endif all: $(MAJOR_TARGETS) $(COMPATLIB) $(ROMIO) -$(ROMIO): headers +$(ROMIO_MAKEFILE): pre-headers @echo "Building ROMIO" cp $(ROMIO_STUB_HEADERS) $(CDIR)/include/ cd romio && \ @@ -148,12 +148,17 @@ $(ROMIO): headers USER_FFLAGS="$(OPTS) $(ROMIO_FLAGS)" \ || ( cat config.log ; exit 1 ) cp $(ROMIO_HEADERS) $(CDIR)/include/ + +$(ROMIO): $(ROMIO_MAKEFILE) $(MAKE) -C romio AUTOCONF=: AUTOHEADER=: AUTOMAKE=: ACLOCAL=: ifeq (1,$(CMK_CAN_LINK_FORTRAN)) cp romio/mpi-io/fortran/romio_fortran$(obj_suf) $(FUNCPTR_SHIM_FORTRAN_ROMIO_OBJ) endif @echo "ROMIO built successfully" +romio-target: $(ROMIO) + touch $@ + AMPI: $(AMPI_TARGET) @echo "AMPI built successfully" @@ -173,14 +178,12 @@ $(DESTF): $(OBJS) headers $(ROMIO) $(COMPATLIB): $(COMPAT) $(CHARMC) $(COMPAT) -o $@ -headers: $(HEADERS) - cp $(HEADERS) $(CDIR)/include/ - +pre-headers: $(PRE_HEADERS) ampiCC ampif77 ampif90 ampirun pathstub.sh nm_globals.sh # Put AMPI's mpi.h in a separate directory to support the MPI machine layer and MPI interop mkdir -p $(CDIR)/include/ampi/ cp ampi.h $(CDIR)/include/ampi/mpi.h cp ampif.h $(CDIR)/include/mpif.h - + cp $(PRE_HEADERS) $(CDIR)/include/ cp ampiCC $(CDIR)/bin/ampicc cp ampiCC $(CDIR)/bin/ampiCC cp ampiCC $(CDIR)/bin/ampicxx @@ -210,7 +213,11 @@ headers: $(HEADERS) cp pathstub.sh $(CDIR)/bin/ampi/mpirun cp pathstub.sh $(CDIR)/bin/ampi/mpiexec cp nm_globals.sh $(CDIR)/bin/nm_globals.sh - touch headers + touch $@ + +headers: pre-headers $(HEADERS) + cp $(HEADERS) $(CDIR)/include/ + touch $@ compat_ampim.o: compat_ampim.C @@ -222,64 +229,66 @@ compat_ampins.o: compat_ampins.C compat_ampirs.o: compat_ampirs.C $(CHARMC) -c $< -ampi_mpix.o: ampi_mpix.C $(HEADDEP) headers | $(ROMIO) +ampi_mpix.o: ampi_mpix.C $(HEADDEP) headers | $(ROMIO_MAKEFILE) + $(CHARMC) -language ampi -c $< -o $@ -ampi_noimpl.o: ampi_noimpl.C $(HEADDEP) headers | $(ROMIO) - $(CHARMC) -c $< -DAMPI_NO_UNIMPLEMENTED_WARNINGS +ampi_noimpl.o: ampi_noimpl.C $(HEADDEP) headers | $(ROMIO_MAKEFILE) + $(CHARMC) -language ampi -c $< -o $@ -DAMPI_NO_UNIMPLEMENTED_WARNINGS compat_ampicpp.o: compat_ampicpp.C $(CHARMC) -c compat_ampicpp.C -ampi.o: ampi.C $(HEADDEP) headers | $(ROMIO) - $(CHARMC) -c ampi.C +ampi.o: ampi.C $(HEADDEP) headers | $(ROMIO_MAKEFILE) + $(CHARMC) -language ampi -c $< -o $@ -$(AMPIF_OBJ): ampif.C $(HEADDEP) headers | $(ROMIO) - $(CHARMC) -c $< -o $@ +$(AMPIF_OBJ): ampif.C $(HEADDEP) headers | $(ROMIO_MAKEFILE) + $(CHARMC) -language ampi -c $< -o $@ -ampiOneSided.o: ampiOneSided.C ampiimpl.h $(HEADDEP) headers | $(ROMIO) - $(CHARMC) -c ampiOneSided.C +ampiOneSided.o: ampiOneSided.C ampiimpl.h $(HEADDEP) headers | $(ROMIO_MAKEFILE) + $(CHARMC) -language ampi -c $< -o $@ -ampiMisc.o: ampiMisc.C ampiimpl.h $(HEADDEP) headers | $(ROMIO) - $(CHARMC) -c ampiMisc.C +ampiMisc.o: ampiMisc.C ampiimpl.h $(HEADDEP) headers | $(ROMIO_MAKEFILE) + $(CHARMC) -language ampi -c $< -o $@ -mpich-alltoall.o: mpich-alltoall.C $(HEADDEP) headers | $(ROMIO) - $(CHARMC) -c mpich-alltoall.C +mpich-alltoall.o: mpich-alltoall.C $(HEADDEP) headers | $(ROMIO_MAKEFILE) + $(CHARMC) -language ampi -c $< -o $@ -ampi.decl.h ampi.def.h: ampi.ci | $(ROMIO) +ampi.decl.h ampi.def.h: ampi.ci | $(ROMIO_MAKEFILE) $(CHARMC) ampi.ci -ddt.o: ddt.C ddt.h $(HEADDEP) headers | $(ROMIO) +ddt.o: ddt.C ddt.h $(HEADDEP) headers | $(ROMIO_MAKEFILE) + $(CHARMC) -language ampi -c $< -o $@ -$(FUNCPTR_SHIM_OBJ): ampi_funcptr_shim.C $(HEADDEP) headers | $(ROMIO) +$(FUNCPTR_SHIM_OBJ): ampi_funcptr_shim.C $(HEADDEP) headers | $(ROMIO_MAKEFILE) $(CHARMC) -language ampi -DAMPI_USE_FUNCPTR -DAMPI_NO_UNIMPLEMENTED_WARNINGS -fPIE -shared -c $< -o $@ -$(FUNCPTR_SHIM_MAIN_OBJ): ampi_funcptr_shim_main.C | $(ROMIO) +$(FUNCPTR_SHIM_MAIN_OBJ): ampi_funcptr_shim_main.C | $(ROMIO_MAKEFILE) $(CHARMC) -language ampi -fPIE -c $< -o $@ -$(FUNCPTR_SHIM_FMPIMAIN_OBJ): ampi_funcptr_shim_fmpimain.C | $(ROMIO) +$(FUNCPTR_SHIM_FMPIMAIN_OBJ): ampi_funcptr_shim_fmpimain.C | $(ROMIO_MAKEFILE) $(CHARMC) -language ampi -fPIE -c $< -o $@ -$(FUNCPTR_SHIM_FORTRAN_OBJ): ampif.C $(HEADDEP) headers | $(ROMIO) +$(FUNCPTR_SHIM_FORTRAN_OBJ): ampif.C $(HEADDEP) headers | $(ROMIO_MAKEFILE) $(CHARMC) -language ampi -DAMPI_USE_FUNCPTR -fPIE -shared -c $< -o $@ -$(FUNCPTR_SHIM_FORTRAN_MOD_OBJ): ampimod.f90 $(HEADDEP) headers | $(ROMIO) +$(FUNCPTR_SHIM_FORTRAN_MOD_OBJ): ampimod.f90 $(HEADDEP) headers | $(ROMIO_MAKEFILE) $(CHARMC) -language ampi -fPIE -shared -c $< -o $@ -$(FUNCPTR_LOADER_OBJ): ampi_funcptr_loader.C $(HEADDEP) headers | $(ROMIO) +$(FUNCPTR_LOADER_OBJ): ampi_funcptr_loader.C $(HEADDEP) headers | $(ROMIO_MAKEFILE) $(CHARMC) -language ampi -DAMPI_NO_UNIMPLEMENTED_WARNINGS -c $< -o $@ -$(FUNCPTR_LOADER_STUB_OBJ): ampi_funcptr_loader_stub.C $(HEADDEP) headers | $(ROMIO) +$(FUNCPTR_LOADER_STUB_OBJ): ampi_funcptr_loader_stub.C $(HEADDEP) headers | $(ROMIO_MAKEFILE) $(CHARMC) -language ampi -c $< -o $@ -$(GLOBALS_FS_OBJ): ampi_globals_fs.C $(HEADDEP) headers | $(ROMIO) +$(GLOBALS_FS_OBJ): ampi_globals_fs.C $(HEADDEP) headers | $(ROMIO_MAKEFILE) $(CHARMC) -language ampi -c $< -o $@ -$(GLOBALS_PIP_OBJ): ampi_globals_pip.C $(HEADDEP) headers | $(ROMIO) +$(GLOBALS_PIP_OBJ): ampi_globals_pip.C $(HEADDEP) headers | $(ROMIO_MAKEFILE) $(CHARMC) -language ampi -c $< -o $@ -$(GLOBALS_PIE_OBJ): ampi_globals_pie.C $(HEADDEP) headers | $(ROMIO) +$(GLOBALS_PIE_OBJ): ampi_globals_pie.C $(HEADDEP) headers | $(ROMIO_MAKEFILE) $(CHARMC) -language ampi -c $< -o $@ clean: - rm -fr *.o *~ *.decl.h *.def.h gmon.out $(DEST) $(DESTF) $(COMPATLIB) conv-host charmrun headers *.mod + rm -fr *.o *~ *.decl.h *.def.h gmon.out $(DEST) $(DESTF) $(COMPATLIB) conv-host charmrun *.mod headers pre-headers romio-target -$(MAKE) -C romio clean diff --git a/src/scripts/Makefile b/src/scripts/Makefile index 69ca8804a8..ca1754429c 100644 --- a/src/scripts/Makefile +++ b/src/scripts/Makefile @@ -42,6 +42,8 @@ else HWLOC_SHARED := no endif +HWLOC_MAKEFILE=hwloc/Makefile + all: charm++ LIBS AMPI TSM SM PVM everylb @@ -69,7 +71,10 @@ MBLOCKC: charm++ LIBS MBLOCKF: MBLOCKC -AMPI: charm++ +romio-target: conv-autoconfig.h + $(MAKE) -C libs/ck-libs/ampi/ romio-target + +AMPI: charm++ | romio-target $(MAKE) -C libs/ck-libs/ ampi AMPIC AMPIF: AMPI @@ -481,12 +486,12 @@ endif converse: $(CONVERSE_DEPS) cpuaffinity.o $(INC)/hwloc.h $(INC)/hwloc/autogen/config.h $(INC)/hwloc/rename.h $(INC)/hwloc/bitmap.h \ -$(INC)/hwloc/helper.h $(INC)/hwloc/inlines.h $(INC)/hwloc/diff.h $(INC)/hwloc/deprecated.h $(INC)/hwloc/export.h $(INC)/hwloc/distances.h : hwloc-target +$(INC)/hwloc/helper.h $(INC)/hwloc/inlines.h $(INC)/hwloc/diff.h $(INC)/hwloc/deprecated.h $(INC)/hwloc/export.h $(INC)/hwloc/distances.h : $(HWLOC_MAKEFILE) topomanager_config.h: @echo "// empty" > topomanager_config.h -hwloc-target: conv-autoconfig.h +$(HWLOC_MAKEFILE): conv-autoconfig.h @( cd hwloc && \ ./configure \ --disable-cairo \ @@ -515,9 +520,11 @@ hwloc-target: conv-autoconfig.h LDFLAGS= \ LIBS= \ > /dev/null || ( cat config.log ; exit 1 ) ) - ( $(MAKE) -C hwloc AUTOCONF=: AUTOHEADER=: AUTOMAKE=: ACLOCAL=: ) ( cp -f hwloc/include/hwloc.h $(INC) ) ( cp -LRf hwloc/include/hwloc $(INC) ) + +hwloc-target: $(HWLOC_MAKEFILE) + ( $(MAKE) -C hwloc AUTOCONF=: AUTOHEADER=: AUTOMAKE=: ACLOCAL=: ) touch $@ charmrun-target: charmrun sockRoutines.C sockRoutines.h ccs-server.C ccs-server.h sockRoutines-seq.o $(L)/libck.a $(CVLIBS) conv-static.o From e3576295d9bb69c51aad1b7bda99f8714c960a6e Mon Sep 17 00:00:00 2001 From: Evan Ramos Date: Thu, 20 Apr 2023 18:07:00 -0500 Subject: [PATCH 061/155] AMPI: Move ROMIO's Fortran symbols directly to ampif.C Fixes error: variable redeclared as function when linking globals method shared objects. --- src/libs/ck-libs/ampi/CMakeLists.txt | 15 - src/libs/ck-libs/ampi/Makefile | 16 +- src/libs/ck-libs/ampi/ampiCC | 1 - src/libs/ck-libs/ampi/ampif.C | 686 +++++++++++++++++- src/libs/ck-libs/ampi/romio/Makefile.in | 369 +++++----- .../ampi/romio/mpi-io/fortran/Makefile.mk | 2 +- 6 files changed, 854 insertions(+), 235 deletions(-) diff --git a/src/libs/ck-libs/ampi/CMakeLists.txt b/src/libs/ck-libs/ampi/CMakeLists.txt index 332a021a5f..e94f59dbfc 100644 --- a/src/libs/ck-libs/ampi/CMakeLists.txt +++ b/src/libs/ck-libs/ampi/CMakeLists.txt @@ -165,7 +165,6 @@ configure_file(libmoduleampif.dep ${CMAKE_BINARY_DIR}/lib COPYONLY) # ROMIO set(romio-objects) -set(romio-fortran-objects) if(CMK_AMPI_WITH_ROMIO) set(romio_dir ${CMAKE_BINARY_DIR}/src/libs/ck-libs/ampi/romio-prefix/src/romio) @@ -348,17 +347,12 @@ if(CMK_AMPI_WITH_ROMIO) if(CMK_CAN_LINK_FORTRAN) set(romio_f77 yes) - - set(romio-fortran-objects - ${romio_dir}/mpi-io/fortran/romio_fortran${obj_suf} - ) else() set(romio_f77 no) endif() set_source_files_properties( ${romio-objects} - ${romio-fortran-objects} PROPERTIES EXTERNAL_OBJECT true GENERATED true @@ -410,14 +404,6 @@ if(CMK_AMPI_WITH_ROMIO) LIST_SEPARATOR ^^ ) - if(CMK_CAN_LINK_FORTRAN) - add_custom_command(TARGET romio - POST_BUILD - COMMAND ${CMAKE_COMMAND} -E copy ${romio_dir}/mpi-io/fortran/romio_fortran${obj_suf} ${CMAKE_BINARY_DIR}/lib/ampi_funcptr_shim_fortran_romio.o - VERBATIM - ) - endif() - add_dependencies(ampi_funcptr_shim romio) add_dependencies(ampi_funcptr_shim_main romio) add_dependencies(ampi_funcptr_loader romio) @@ -453,7 +439,6 @@ if(CMK_CAN_LINK_FORTRAN) ${ampi-cxx-sources} ${ampi-h-sources} ${romio-objects} - ${romio-fortran-objects} ) target_compile_options(moduleampif PRIVATE -DAMPI_NO_UNIMPLEMENTED_WARNINGS -I${CMAKE_BINARY_DIR}/include/ampi/) add_dependencies(moduleampif moduletcharm ck) diff --git a/src/libs/ck-libs/ampi/Makefile b/src/libs/ck-libs/ampi/Makefile index 2e5c3db3c5..f75ffb6173 100644 --- a/src/libs/ck-libs/ampi/Makefile +++ b/src/libs/ck-libs/ampi/Makefile @@ -29,7 +29,6 @@ FUNCPTR_SHIM_OBJ=$(AMPI_LIBDIR)/ampi_funcptr_shim.o FUNCPTR_SHIM_MAIN_OBJ=$(AMPI_LIBDIR)/ampi_funcptr_shim_main.o FUNCPTR_SHIM_FORTRAN_OBJ=$(AMPI_LIBDIR)/ampi_funcptr_shim_fortran.o FUNCPTR_SHIM_FORTRAN_MOD_OBJ=$(AMPI_LIBDIR)/ampi_funcptr_shim_fortran_mod.o -FUNCPTR_SHIM_FORTRAN_ROMIO_OBJ=$(AMPI_LIBDIR)/ampi_funcptr_shim_fortran_romio.o FUNCPTR_SHIM_FMPIMAIN_OBJ=$(AMPI_LIBDIR)/ampi_funcptr_shim_fmpimain.o FUNCPTR_LOADER_OBJ=$(AMPI_LIBDIR)/ampi_funcptr_loader.o FUNCPTR_LOADER_STUB_OBJ=$(AMPI_LIBDIR)/ampi_funcptr_loader_stub.o @@ -74,22 +73,12 @@ ifeq ($(CMK_AMPI_WITH_ROMIO),1) romio/mpi-io/glue/default \ romio/mpi-io/glue \ - ROMIO_FORTRAN_OBJ_DIRS := \ - romio/mpi-io/fortran \ - ROMIO_OBJS = \ $(foreach o,o obj, \ $(foreach d,$(ROMIO_OBJ_DIRS), \ $(wildcard $d/*.$o) \ ) \ ) - - ROMIO_FORTRAN_OBJS = \ - $(foreach o,o obj, \ - $(foreach d,$(ROMIO_FORTRAN_OBJ_DIRS), \ - $(wildcard $d/*.$o) \ - ) \ - ) endif ROMIO_FLAGS = -DAMPI_NO_UNIMPLEMENTED_WARNINGS -seq -fPIC @@ -151,9 +140,6 @@ $(ROMIO_MAKEFILE): pre-headers $(ROMIO): $(ROMIO_MAKEFILE) $(MAKE) -C romio AUTOCONF=: AUTOHEADER=: AUTOMAKE=: ACLOCAL=: -ifeq (1,$(CMK_CAN_LINK_FORTRAN)) - cp romio/mpi-io/fortran/romio_fortran$(obj_suf) $(FUNCPTR_SHIM_FORTRAN_ROMIO_OBJ) -endif @echo "ROMIO built successfully" romio-target: $(ROMIO) @@ -172,7 +158,7 @@ $(DEST): $(OBJS) headers $(ROMIO) $(DESTF): $(OBJS) headers $(ROMIO) $(CHARMC) -c ampimod.f90 -o $(AMPIMOD_OBJ) $(CHARMC) -cpmod ../../../../include mpi.M - $(CHARMC) $(OBJS) $(ROMIO_OBJS) $(ROMIO_FORTRAN_OBJS) $(AMPIMOD_OBJ) -o $@ + $(CHARMC) $(OBJS) $(ROMIO_OBJS) $(AMPIMOD_OBJ) -o $@ cp $(AMPI_LIB)f.dep $(AMPI_LIBDIR)/$(AMPI_LIB)f.dep $(COMPATLIB): $(COMPAT) diff --git a/src/libs/ck-libs/ampi/ampiCC b/src/libs/ck-libs/ampi/ampiCC index 87e564b8f2..371794f0c2 100755 --- a/src/libs/ck-libs/ampi/ampiCC +++ b/src/libs/ck-libs/ampi/ampiCC @@ -186,7 +186,6 @@ then SHIM_OPTS+=(-standalone -DAMPI_USE_FUNCPTR) SHIM_OBJS=("$CHARMLIB/ampi_funcptr_shim.o" "${SHIM_MAIN_OBJS[@]}") [[ "$AMPICC_MODE" = 'ampif' ]] && SHIM_OBJS+=("$CHARMLIB/ampi_funcptr_shim_fortran.o" "$CHARMLIB/ampi_funcptr_shim_fortran_mod.o") - [[ "$AMPICC_MODE" = 'ampif' && "$CMK_AMPI_WITH_ROMIO" = '1' ]] && SHIM_OBJS+=("$CHARMLIB/ampi_funcptr_shim_fortran_romio.o") LOADER_OBJS=("$CHARMLIB/ampi_funcptr_loader.o" "${ROMIO[@]}") ROMIO=() else diff --git a/src/libs/ck-libs/ampi/ampif.C b/src/libs/ck-libs/ampi/ampif.C index 4553928924..916936fd54 100644 --- a/src/libs/ck-libs/ampi/ampif.C +++ b/src/libs/ck-libs/ampi/ampif.C @@ -239,8 +239,10 @@ #define mpi_abort FTN_NAME( MPI_ABORT , mpi_abort ) #define mpi_file_call_errhandler FTN_NAME( MPI_FILE_CALL_ERRHANDLER , mpi_file_call_errhandler ) #define mpi_file_create_errhandler FTN_NAME( MPI_FILE_CREATE_ERRHANDLER , mpi_file_create_errhandler ) +#if !CMK_AMPI_WITH_ROMIO #define mpi_file_set_errhandler FTN_NAME( MPI_FILE_SET_ERRHANDLER , mpi_file_set_errhandler ) #define mpi_file_get_errhandler FTN_NAME( MPI_FILE_GET_ERRHANDLER , mpi_file_get_errhandler ) +#endif /* MPI-2 */ #define mpi_type_get_envelope FTN_NAME ( MPI_TYPE_GET_ENVELOPE , mpi_type_get_envelope ) @@ -333,12 +335,70 @@ #define ampi_command_argument_count FTN_NAME( AMPI_COMMAND_ARGUMENT_COUNT , ampi_command_argument_count ) #define ampi_get_command_argument FTN_NAME( AMPI_GET_COMMAND_ARGUMENT , ampi_get_command_argument ) - #if CMK_CUDA #define ampi_gpu_invoke_wr FTN_NAME ( AMPI_GPU_INVOKE_WR , ampi_gpu_invoke_wr ) #define ampi_gpu_iinvoke_wr FTN_NAME ( AMPI_GPU_IINVOKE_WR , ampi_gpu_iinvoke_wr ) #endif +#if CMK_AMPI_WITH_ROMIO +#define mpi_file_close FTN_NAME( MPI_FILE_CLOSE , mpi_file_close ) +#define mpi_file_delete FTN_NAME( MPI_FILE_DELETE , mpi_file_delete ) +#define mpi_file_sync FTN_NAME( MPI_FILE_SYNC , mpi_file_sync ) +#define mpi_file_get_amode FTN_NAME( MPI_FILE_GET_AMODE , mpi_file_get_amode ) +#define mpi_file_get_atomicity FTN_NAME( MPI_FILE_GET_ATOMICITY , mpi_file_get_atomicity ) +#define mpi_file_get_byte_offset FTN_NAME( MPI_FILE_GET_BYTE_OFFSET , mpi_file_get_byte_offset ) +#define mpi_file_get_errhandler FTN_NAME( MPI_FILE_GET_ERRHANDLER , mpi_file_get_errhandler ) +#define mpi_file_get_type_extent FTN_NAME( MPI_FILE_GET_TYPE_EXTENT , mpi_file_get_type_extent ) +#define mpi_file_get_group FTN_NAME( MPI_FILE_GET_GROUP , mpi_file_get_group ) +#define mpi_file_get_info FTN_NAME( MPI_FILE_GET_INFO , mpi_file_get_info ) +#define mpi_file_get_position_shared FTN_NAME( MPI_FILE_GET_POSITION_SHARED , mpi_file_get_position_shared ) +#define mpi_file_get_position FTN_NAME( MPI_FILE_GET_POSITION , mpi_file_get_position ) +#define mpi_file_get_size FTN_NAME( MPI_FILE_GET_SIZE , mpi_file_get_size ) +#define mpi_file_get_view FTN_NAME( MPI_FILE_GET_VIEW , mpi_file_get_view ) +#define mpio_test FTN_NAME( MPIO_TEST , mpio_test ) +#define mpio_wait FTN_NAME( MPIO_WAIT , mpio_wait ) +#define mpi_file_iread_at FTN_NAME( MPI_FILE_IREAD_AT , mpi_file_iread_at ) +#define mpi_file_iread_shared FTN_NAME( MPI_FILE_IREAD_SHARED , mpi_file_iread_shared ) +#define mpi_file_iread FTN_NAME( MPI_FILE_IREAD , mpi_file_iread ) +#define mpi_file_iwrite_at FTN_NAME( MPI_FILE_IWRITE_AT , mpi_file_iwrite_at ) +#define mpi_file_iwrite_shared FTN_NAME( MPI_FILE_IWRITE_SHARED , mpi_file_iwrite_shared ) +#define mpi_file_iwrite FTN_NAME( MPI_FILE_IWRITE , mpi_file_iwrite ) +#define mpi_file_open FTN_NAME( MPI_FILE_OPEN , mpi_file_open ) +#define mpi_file_preallocate FTN_NAME( MPI_FILE_PREALLOCATE , mpi_file_preallocate ) +#define mpi_file_read_at_all_begin FTN_NAME( MPI_FILE_READ_AT_ALL_BEGIN , mpi_file_read_at_all_begin ) +#define mpi_file_read_at_all_end FTN_NAME( MPI_FILE_READ_AT_ALL_END , mpi_file_read_at_all_end ) +#define mpi_file_read_all_begin FTN_NAME( MPI_FILE_READ_ALL_BEGIN , mpi_file_read_all_begin ) +#define mpi_file_read_all_end FTN_NAME( MPI_FILE_READ_ALL_END , mpi_file_read_all_end ) +#define mpi_file_read_all FTN_NAME( MPI_FILE_READ_ALL , mpi_file_read_all ) +#define mpi_file_read_at_all FTN_NAME( MPI_FILE_READ_AT_ALL , mpi_file_read_at_all ) +#define mpi_file_read_at FTN_NAME( MPI_FILE_READ_AT , mpi_file_read_at ) +#define mpi_file_read_ordered_begin FTN_NAME( MPI_FILE_READ_ORDERED_BEGIN , mpi_file_read_ordered_begin ) +#define mpi_file_read_ordered_end FTN_NAME( MPI_FILE_READ_ORDERED_END , mpi_file_read_ordered_end ) +#define mpi_file_read_ordered FTN_NAME( MPI_FILE_READ_ORDERED , mpi_file_read_ordered ) +#define mpi_file_read_shared FTN_NAME( MPI_FILE_READ_SHARED , mpi_file_read_shared ) +#define mpi_file_read FTN_NAME( MPI_FILE_READ , mpi_file_read ) +#define mpi_file_seek_shared FTN_NAME( MPI_FILE_SEEK_SHARED , mpi_file_seek_shared ) +#define mpi_file_seek FTN_NAME( MPI_FILE_SEEK , mpi_file_seek ) +#define mpi_file_set_atomicity FTN_NAME( MPI_FILE_SET_ATOMICITY , mpi_file_set_atomicity ) +#define mpi_file_set_errhandler FTN_NAME( MPI_FILE_SET_ERRHANDLER , mpi_file_set_errhandler ) +#define mpi_file_set_info FTN_NAME( MPI_FILE_SET_INFO , mpi_file_set_info ) +#define mpi_file_set_size FTN_NAME( MPI_FILE_SET_SIZE , mpi_file_set_size ) +#define mpi_file_set_view FTN_NAME( MPI_FILE_SET_VIEW , mpi_file_set_view ) +#define mpi_file_write_at_all_begin FTN_NAME( MPI_FILE_WRITE_AT_ALL_BEGIN , mpi_file_write_at_all_begin ) +#define mpi_file_write_at_all_end FTN_NAME( MPI_FILE_WRITE_AT_ALL_END , mpi_file_write_at_all_end ) +#define mpi_file_write_all_begin FTN_NAME( MPI_FILE_WRITE_ALL_BEGIN , mpi_file_write_all_begin ) +#define mpi_file_write_all_end FTN_NAME( MPI_FILE_WRITE_ALL_END , mpi_file_write_all_end ) +#define mpi_file_write_all FTN_NAME( MPI_FILE_WRITE_ALL , mpi_file_write_all ) +#define mpi_file_write_at_all FTN_NAME( MPI_FILE_WRITE_AT_ALL , mpi_file_write_at_all ) +#define mpi_file_write_at FTN_NAME( MPI_FILE_WRITE_AT , mpi_file_write_at ) +#define mpi_file_write_ordered_begin FTN_NAME( MPI_FILE_WRITE_ORDERED_BEGIN , mpi_file_write_ordered_begin ) +#define mpi_file_write_ordered_end FTN_NAME( MPI_FILE_WRITE_ORDERED_END , mpi_file_write_ordered_end ) +#define mpi_file_write_ordered FTN_NAME( MPI_FILE_WRITE_ORDERED , mpi_file_write_ordered ) +#define mpi_file_write_shared FTN_NAME( MPI_FILE_WRITE_SHARED , mpi_file_write_shared ) +#define mpi_file_write FTN_NAME( MPI_FILE_WRITE , mpi_file_write ) +#endif + + #define REDUCERF(caps, nocaps) \ void FTN_NAME(caps, nocaps)(void *iv, void *iov, int *len, MPI_Datatype *dt){ \ caps(iv, iov, len, dt); \ @@ -1551,7 +1611,7 @@ void mpi_file_create_errhandler(void (*function)(MPI_File*,int*,...), int *errha } #if !CMK_AMPI_WITH_ROMIO -// Disable ROMIO's get_errhf.c and set_errhf.c if enabling these. +// Disable the versions from ROMIO's get_errhf.c and set_errhf.c if enabling these. void mpi_file_set_errhandler(MPI_File* file, int* errhandler, int *ierr) noexcept { *ierr = MPI_File_set_errhandler(*file, *errhandler); @@ -2319,9 +2379,627 @@ void ampi_get_command_argument(int *c, char *str, int *len, int *ierr) noexcept } } -} // FLINKAGE +} /* FLINKAGE */ -CLINKAGE void romio_fortran_error_print(const char * str) +#if CMK_AMPI_WITH_ROMIO +static inline void romio_fortran_error_print(const char * str) noexcept { fputs(str, stderr); } + +#define MPIO_Request MPI_Request +#define MPIO_Wait MPI_Wait +#define MPIO_Test MPI_Test +#define ADIOI_Malloc malloc +#define ADIOI_Free free +#define ADIOI_Strncpy strncpy + +FLINKAGE { + +void mpi_file_close(MPI_Fint *fh, MPI_Fint *ierr) noexcept +{ + MPI_File fh_c; + + fh_c = MPI_File_f2c(*fh); + *ierr = MPI_File_close(&fh_c); + *fh = MPI_File_c2f(fh_c); +} + +void mpi_file_delete(char *filename, MPI_Fint *info, MPI_Fint *ierr, long int str_len) noexcept +{ + char *newfname; + long int real_len, i; + MPI_Info info_c; + + info_c = MPI_Info_f2c(*info); + + /* strip trailing blanks */ + if (filename == nullptr) { + romio_fortran_error_print("MPI_File_delete: filename is an invalid address\n"); + MPI_Abort(MPI_COMM_WORLD, 1); + } + for (i=str_len-1; i>=0; i--) if (filename[i] != ' ') break; + if (i < 0) { + romio_fortran_error_print("MPI_File_delete: filename is a blank string\n"); + MPI_Abort(MPI_COMM_WORLD, 1); + } + real_len = i + 1; + + newfname = (char *) ADIOI_Malloc((real_len+1)*sizeof(char)); + ADIOI_Strncpy(newfname, filename, real_len); + newfname[real_len] = '\0'; + + *ierr = MPI_File_delete(newfname, info_c); + + ADIOI_Free(newfname); +} + +void mpi_file_sync(MPI_Fint *fh, MPI_Fint *ierr) noexcept +{ + MPI_File fh_c; + + fh_c = MPI_File_f2c(*fh); + *ierr = MPI_File_sync(fh_c); +} + +void mpi_file_get_amode(MPI_Fint *fh, MPI_Fint *amode, MPI_Fint *ierr) noexcept +{ + MPI_File fh_c; + + fh_c = MPI_File_f2c(*fh); + *ierr = MPI_File_get_amode(fh_c, amode); +} + +void mpi_file_get_atomicity(MPI_Fint *fh, MPI_Fint *flag, MPI_Fint *ierr) noexcept +{ + MPI_File fh_c; + + fh_c = MPI_File_f2c(*fh); + *ierr = MPI_File_get_atomicity(fh_c, flag); +} + +void mpi_file_get_byte_offset(MPI_Fint *fh,MPI_Offset *offset, MPI_Offset *disp, MPI_Fint *ierr) noexcept +{ + MPI_File fh_c; + + fh_c = MPI_File_f2c(*fh); + *ierr = MPI_File_get_byte_offset(fh_c,*offset,disp); +} + +void mpi_file_get_errhandler(MPI_Fint *fh, MPI_Fint *err_handler, MPI_Fint *ierr) noexcept +{ + MPI_File fh_c; + MPI_Errhandler err_handler_c; + + fh_c = MPI_File_f2c(*fh); + *ierr = MPI_File_get_errhandler(fh_c, &err_handler_c); + *err_handler = MPI_Errhandler_c2f(err_handler_c); +} + +void mpi_file_get_type_extent(MPI_Fint *fh,MPI_Datatype *datatype, + MPI_Fint *extent, MPI_Fint *ierr) noexcept +{ + MPI_File fh_c; + MPI_Aint extent_c; + + fh_c = MPI_File_f2c(*fh); + *ierr = MPI_File_get_type_extent(fh_c,*datatype, &extent_c); + *(MPI_Aint*)extent = extent_c; /* Have to assume it's really an MPI_Aint? */ +} + +void mpi_file_get_group(MPI_Fint *fh,MPI_Group *group, MPI_Fint *ierr) noexcept +{ + MPI_File fh_c; + + fh_c = MPI_File_f2c(*fh); + *ierr = MPI_File_get_group(fh_c, group); +} + +void mpi_file_get_info(MPI_Fint *fh, MPI_Fint *info_used, MPI_Fint *ierr) noexcept +{ + MPI_File fh_c; + MPI_Info info_used_c; + + fh_c = MPI_File_f2c(*fh); + + *ierr = MPI_File_get_info(fh_c, &info_used_c); + *info_used = MPI_Info_c2f(info_used_c); +} + +void mpi_file_get_position_shared(MPI_Fint *fh, MPI_Offset *offset, MPI_Fint *ierr) noexcept +{ + MPI_File fh_c; + + fh_c = MPI_File_f2c(*fh); + *ierr = MPI_File_get_position_shared(fh_c, offset); +} + +void mpi_file_get_position(MPI_Fint *fh, MPI_Offset *offset, MPI_Fint *ierr) noexcept +{ + MPI_File fh_c; + + fh_c = MPI_File_f2c(*fh); + *ierr = MPI_File_get_position(fh_c, offset); +} + +void mpi_file_get_size(MPI_Fint *fh, MPI_Offset *size, MPI_Fint *ierr) noexcept +{ + MPI_File fh_c; + + fh_c = MPI_File_f2c(*fh); + *ierr = MPI_File_get_size(fh_c, size); +} + +void mpi_file_get_view(MPI_Fint *fh, MPI_Offset *disp, MPI_Fint *etype, MPI_Fint *filetype, + char *datarep, MPI_Fint *ierr, long int str_len) noexcept +{ + MPI_File fh_c; + long int i, tmpreplen; + MPI_Datatype etype_c, filetype_c; + + char *tmprep; + + /* Initialize the string to all blanks */ + if (datarep == nullptr) { + romio_fortran_error_print("MPI_File_get_view: datarep is an invalid address\n"); + MPI_Abort(MPI_COMM_WORLD, 1); + } + + tmprep = (char *) ADIOI_Malloc((MPI_MAX_DATAREP_STRING+1) * sizeof(char)); + fh_c = MPI_File_f2c(*fh); + etype_c = MPI_Type_f2c(*etype); + filetype_c = MPI_Type_f2c(*filetype); + *ierr = MPI_File_get_view(fh_c, disp, &etype_c, &filetype_c, tmprep); + + tmpreplen = strlen(tmprep); + if (tmpreplen <= str_len) { + ADIOI_Strncpy(datarep, tmprep, tmpreplen); + + /* blank pad the remaining space */ + for (i=tmpreplen; i=0; i--) if (filename[i] != ' ') break; + if (i < 0) { + romio_fortran_error_print("MPI_File_open: filename is a blank string\n"); + MPI_Abort(MPI_COMM_WORLD, 1); + } + real_len = i + 1; + + newfname = (char *) ADIOI_Malloc((real_len+1)*sizeof(char)); + ADIOI_Strncpy(newfname, filename, real_len); + newfname[real_len] = '\0'; + + *ierr = MPI_File_open((MPI_Comm)(*comm), newfname, *amode, info_c, &fh_c); + + *fh = MPI_File_c2f(fh_c); + ADIOI_Free(newfname); +} + +void mpi_file_preallocate(MPI_Fint *fh,MPI_Offset *size, MPI_Fint *ierr) noexcept +{ + MPI_File fh_c; + + fh_c = MPI_File_f2c(*fh); + *ierr = MPI_File_preallocate(fh_c,*size); +} + +void mpi_file_read_at_all_begin(MPI_Fint *fh,MPI_Offset *offset,void *buf, + MPI_Fint *count,MPI_Fint *datatype, MPI_Fint *ierr) noexcept +{ + MPI_File fh_c; + + fh_c = MPI_File_f2c(*fh); + *ierr = MPI_File_read_at_all_begin(fh_c,*offset,buf,*count,(MPI_Datatype) *datatype); +} + +void mpi_file_read_at_all_end(MPI_Fint *fh,void *buf,MPI_Status *status, MPI_Fint *ierr) noexcept +{ + MPI_File fh_c; + + fh_c = MPI_File_f2c(*fh); + *ierr = MPI_File_read_at_all_end(fh_c,buf,status); +} + +void mpi_file_read_all_begin(MPI_Fint *fh,void *buf,MPI_Fint *count, + MPI_Fint *datatype, MPI_Fint *ierr) noexcept +{ + MPI_File fh_c; + + fh_c = MPI_File_f2c(*fh); + *ierr = MPI_File_read_all_begin(fh_c,buf,*count,(MPI_Datatype) *datatype); +} + +void mpi_file_read_all_end(MPI_Fint *fh,void *buf,MPI_Status *status, MPI_Fint *ierr) noexcept +{ + MPI_File fh_c; + + fh_c = MPI_File_f2c(*fh); + + *ierr = MPI_File_read_all_end(fh_c,buf,status); +} + +void mpi_file_read_all(MPI_Fint *fh,void *buf,MPI_Fint *count, + MPI_Fint *datatype,MPI_Status *status, MPI_Fint *ierr) noexcept +{ + MPI_File fh_c; + + fh_c = MPI_File_f2c(*fh); + *ierr = MPI_File_read_all(fh_c,buf,*count,(MPI_Datatype)*datatype,status); +} + +void mpi_file_read_at_all(MPI_Fint *fh,MPI_Offset *offset,void *buf, + MPI_Fint *count,MPI_Fint *datatype, + MPI_Status *status, MPI_Fint *ierr) noexcept +{ + MPI_File fh_c; + + fh_c = MPI_File_f2c(*fh); + *ierr = MPI_File_read_at_all(fh_c,*offset,buf,*count,(MPI_Datatype)*datatype,status); +} + +void mpi_file_read_at(MPI_Fint *fh,MPI_Offset *offset,void *buf, + MPI_Fint *count,MPI_Fint *datatype,MPI_Status *status, MPI_Fint *ierr) noexcept +{ + MPI_File fh_c; + + fh_c = MPI_File_f2c(*fh); + *ierr = MPI_File_read_at(fh_c,*offset,buf,*count,(MPI_Datatype)*datatype,status); +} + +void mpi_file_read_ordered_begin(MPI_Fint *fh,void *buf,MPI_Fint *count, + MPI_Fint *datatype,MPI_Fint *ierr) noexcept +{ + MPI_File fh_c; + + fh_c = MPI_File_f2c(*fh); + *ierr = MPI_File_read_ordered_begin(fh_c,buf,*count,(MPI_Datatype)*datatype); +} + +void mpi_file_read_ordered_end(MPI_Fint *fh,void *buf,MPI_Status *status, MPI_Fint *ierr) noexcept +{ + MPI_File fh_c; + + fh_c = MPI_File_f2c(*fh); + + *ierr = MPI_File_read_ordered_end(fh_c,buf,status); +} + +void mpi_file_read_ordered(MPI_Fint *fh,void *buf,MPI_Fint *count, + MPI_Fint *datatype,MPI_Status *status, MPI_Fint *ierr) noexcept +{ + MPI_File fh_c; + + fh_c = MPI_File_f2c(*fh); + *ierr = MPI_File_read_ordered(fh_c,buf,*count,(MPI_Datatype)*datatype,status); +} + +void mpi_file_read_shared(MPI_Fint *fh,void *buf,MPI_Fint *count, + MPI_Fint *datatype,MPI_Status *status, MPI_Fint *ierr) noexcept +{ + MPI_File fh_c; + + fh_c = MPI_File_f2c(*fh); + *ierr = MPI_File_read_shared(fh_c,buf,*count,(MPI_Datatype)*datatype,status); +} + +void mpi_file_read(MPI_Fint *fh,void *buf,MPI_Fint *count, + MPI_Fint *datatype,MPI_Status *status, MPI_Fint *ierr) noexcept +{ + MPI_File fh_c; + + fh_c = MPI_File_f2c(*fh); + *ierr = MPI_File_read(fh_c,buf,*count,(MPI_Datatype)*datatype,status); +} + +void mpi_file_seek_shared(MPI_Fint *fh,MPI_Offset *offset,MPI_Fint *whence, MPI_Fint *ierr) noexcept +{ + MPI_File fh_c; + + fh_c = MPI_File_f2c(*fh); + *ierr = MPI_File_seek_shared(fh_c,*offset,*whence); +} + +void mpi_file_seek(MPI_Fint *fh,MPI_Offset *offset,MPI_Fint *whence, MPI_Fint *ierr) noexcept +{ + MPI_File fh_c; + + fh_c = MPI_File_f2c(*fh); + *ierr = MPI_File_seek(fh_c,*offset,*whence); +} + +void mpi_file_set_atomicity(MPI_Fint *fh,MPI_Fint *flag, MPI_Fint *ierr) noexcept +{ + MPI_File fh_c; + + fh_c = MPI_File_f2c(*fh); + *ierr = MPI_File_set_atomicity(fh_c,*flag); +} + +void mpi_file_set_errhandler(MPI_Fint *fh, MPI_Fint *err_handler, MPI_Fint *ierr) noexcept +{ + MPI_File fh_c; + MPI_Errhandler err_handler_c; + + fh_c = MPI_File_f2c(*fh); + err_handler_c = MPI_Errhandler_f2c(*err_handler); + + *ierr = MPI_File_set_errhandler(fh_c,err_handler_c); +} + +void mpi_file_set_info(MPI_Fint *fh, MPI_Fint *info, MPI_Fint *ierr) noexcept +{ + MPI_File fh_c; + MPI_Info info_c; + + fh_c = MPI_File_f2c(*fh); + info_c = MPI_Info_f2c(*info); + + *ierr = MPI_File_set_info(fh_c, info_c); +} + +void mpi_file_set_size(MPI_Fint *fh,MPI_Offset *size, MPI_Fint *ierr) noexcept +{ + MPI_File fh_c; + + fh_c = MPI_File_f2c(*fh); + *ierr = MPI_File_set_size(fh_c,*size); +} + +void mpi_file_set_view(MPI_Fint *fh, MPI_Offset *disp, MPI_Fint *etype, MPI_Fint *filetype, + char *datarep, MPI_Fint *info, MPI_Fint *ierr, long int str_len) noexcept +{ + char *newstr; + MPI_File fh_c; + long int i, real_len; + MPI_Info info_c; + + info_c = MPI_Info_f2c(*info); + + /* strip trailing blanks in datarep */ + if (datarep == nullptr) { + romio_fortran_error_print("MPI_File_set_view: datarep is an invalid address\n"); + MPI_Abort(MPI_COMM_WORLD, 1); + } + for (i=str_len-1; i>=0; i--) if (datarep[i] != ' ') break; + if (i < 0) { + romio_fortran_error_print("MPI_File_set_view: datarep is a blank string\n"); + MPI_Abort(MPI_COMM_WORLD, 1); + } + real_len = i + 1; + + newstr = (char *) ADIOI_Malloc((real_len+1)*sizeof(char)); + ADIOI_Strncpy(newstr, datarep, real_len); + newstr[real_len] = '\0'; + + fh_c = MPI_File_f2c(*fh); + + *ierr = MPI_File_set_view(fh_c,*disp,*etype,*filetype,newstr,info_c); + + ADIOI_Free(newstr); +} + +void mpi_file_write_at_all_begin(MPI_Fint *fh,MPI_Offset *offset,void *buf, + MPI_Fint *count,MPI_Fint *datatype, MPI_Fint *ierr) noexcept +{ + MPI_File fh_c; + + fh_c = MPI_File_f2c(*fh); + *ierr = MPI_File_write_at_all_begin(fh_c,*offset,buf,*count,(MPI_Datatype)*datatype); +} + +void mpi_file_write_at_all_end(MPI_Fint *fh,void *buf,MPI_Status *status, MPI_Fint *ierr) noexcept +{ + MPI_File fh_c; + + fh_c = MPI_File_f2c(*fh); + + *ierr = MPI_File_write_at_all_end(fh_c,buf,status); +} + +void mpi_file_write_all_begin(MPI_Fint *fh,void *buf,MPI_Fint *count, + MPI_Fint *datatype, MPI_Fint *ierr) noexcept +{ + MPI_File fh_c; + + fh_c = MPI_File_f2c(*fh); + *ierr = MPI_File_write_all_begin(fh_c,buf,*count,(MPI_Datatype)*datatype); +} + +void mpi_file_write_all_end(MPI_Fint *fh,void *buf,MPI_Status *status, MPI_Fint *ierr) noexcept +{ + MPI_File fh_c; + + fh_c = MPI_File_f2c(*fh); + + *ierr = MPI_File_write_all_end(fh_c,buf,status); +} + +void mpi_file_write_all(MPI_Fint *fh,void *buf,MPI_Fint *count, + MPI_Fint *datatype,MPI_Status *status, MPI_Fint *ierr) noexcept +{ + MPI_File fh_c; + + fh_c = MPI_File_f2c(*fh); + *ierr = MPI_File_write_all(fh_c,buf,*count,*datatype,status); +} + +void mpi_file_write_at_all(MPI_Fint *fh,MPI_Offset *offset,void *buf, + MPI_Fint *count,MPI_Fint *datatype, + MPI_Status *status, MPI_Fint *ierr) noexcept +{ + MPI_File fh_c; + + fh_c = MPI_File_f2c(*fh); + *ierr = MPI_File_write_at_all(fh_c,*offset,buf,*count,*datatype,status); +} + +void mpi_file_write_at(MPI_Fint *fh,MPI_Offset *offset,void *buf, + MPI_Fint *count,MPI_Fint *datatype, + MPI_Status *status, MPI_Fint *ierr) noexcept +{ + MPI_File fh_c; + + fh_c = MPI_File_f2c(*fh); + *ierr = MPI_File_write_at(fh_c,*offset,buf,*count,*datatype,status); +} + +void mpi_file_write_ordered_begin(MPI_Fint *fh,void *buf,MPI_Fint *count, + MPI_Fint *datatype, MPI_Fint *ierr) noexcept +{ + MPI_File fh_c; + + fh_c = MPI_File_f2c(*fh); + *ierr = MPI_File_write_ordered_begin(fh_c,buf,*count,*datatype); +} + +void mpi_file_write_ordered_end(MPI_Fint *fh,void *buf,MPI_Status *status, MPI_Fint *ierr) noexcept +{ + MPI_File fh_c; + + fh_c = MPI_File_f2c(*fh); + + *ierr = MPI_File_write_ordered_end(fh_c,buf,status); +} + +void mpi_file_write_ordered(MPI_Fint *fh,void *buf,MPI_Fint *count, + MPI_Fint *datatype,MPI_Status *status, MPI_Fint *ierr) noexcept +{ + MPI_File fh_c; + + fh_c = MPI_File_f2c(*fh); + *ierr = MPI_File_write_ordered(fh_c,buf,*count,*datatype,status); +} + +void mpi_file_write_shared(MPI_Fint *fh,void *buf,MPI_Fint *count, + MPI_Fint *datatype,MPI_Status *status, MPI_Fint *ierr) noexcept +{ + MPI_File fh_c; + + fh_c = MPI_File_f2c(*fh); + *ierr = MPI_File_write_shared(fh_c, buf,*count,*datatype,status); +} + +void mpi_file_write(MPI_Fint *fh,void *buf,MPI_Fint *count, + MPI_Fint *datatype,MPI_Status *status, MPI_Fint *ierr) noexcept +{ + MPI_File fh_c; + + fh_c = MPI_File_f2c(*fh); + *ierr = MPI_File_write(fh_c, buf,*count,*datatype,status); +} + +} /* FLINKAGE */ +#endif diff --git a/src/libs/ck-libs/ampi/romio/Makefile.in b/src/libs/ck-libs/ampi/romio/Makefile.in index 5aa6b4fbce..0e7ed90d7e 100644 --- a/src/libs/ck-libs/ampi/romio/Makefile.in +++ b/src/libs/ck-libs/ampi/romio/Makefile.in @@ -105,19 +105,18 @@ host_triplet = @host@ @BUILD_ROMIO_EMBEDDED_FALSE@am__append_3 = \ @BUILD_ROMIO_EMBEDDED_FALSE@ mpi-io/glue/large_count.c -@BUILD_F77_BINDINGS_TRUE@am__append_4 = mpi-io/fortran/romio_fortran.c # not used in MPICH, we use generalized requests instead -@BUILD_MPIO_REQUEST_TRUE@am__append_5 = $(mpio_request_sources) +@BUILD_MPIO_REQUEST_TRUE@am__append_4 = $(mpio_request_sources) # not used in MPICH -@BUILD_MPIO_ERRHAN_TRUE@am__append_6 = $(mpio_request_sources) -@BUILD_AD_GPFS_TRUE@am__append_7 = \ +@BUILD_MPIO_ERRHAN_TRUE@am__append_5 = $(mpio_request_sources) +@BUILD_AD_GPFS_TRUE@am__append_6 = \ @BUILD_AD_GPFS_TRUE@ adio/ad_gpfs/ad_gpfs_aggrs.h \ @BUILD_AD_GPFS_TRUE@ adio/ad_gpfs/ad_gpfs.h \ @BUILD_AD_GPFS_TRUE@ adio/ad_gpfs/ad_gpfs_tuning.h -@BUILD_AD_GPFS_TRUE@am__append_8 = \ +@BUILD_AD_GPFS_TRUE@am__append_7 = \ @BUILD_AD_GPFS_TRUE@ adio/ad_gpfs/ad_gpfs_aggrs.c \ @BUILD_AD_GPFS_TRUE@ adio/ad_gpfs/ad_gpfs_close.c \ @BUILD_AD_GPFS_TRUE@ adio/ad_gpfs/ad_gpfs_flush.c \ @@ -128,22 +127,22 @@ host_triplet = @host@ @BUILD_AD_GPFS_TRUE@ adio/ad_gpfs/ad_gpfs_rdcoll.c \ @BUILD_AD_GPFS_TRUE@ adio/ad_gpfs/ad_gpfs_wrcoll.c -@BUILD_AD_BG_TRUE@am__append_9 = \ +@BUILD_AD_BG_TRUE@am__append_8 = \ @BUILD_AD_BG_TRUE@ adio/ad_gpfs/bg/ad_bg_aggrs.h \ @BUILD_AD_BG_TRUE@ adio/ad_gpfs/bg/ad_bg_pset.h -@BUILD_AD_BG_TRUE@am__append_10 = \ +@BUILD_AD_BG_TRUE@am__append_9 = \ @BUILD_AD_BG_TRUE@ adio/ad_gpfs/bg/ad_bg_aggrs.c \ @BUILD_AD_BG_TRUE@ adio/ad_gpfs/bg/ad_bg_pset.c -@BUILD_AD_PE_TRUE@am__append_11 = \ +@BUILD_AD_PE_TRUE@am__append_10 = \ @BUILD_AD_PE_TRUE@ adio/ad_gpfs/pe/ad_pe_aggrs.h -@BUILD_AD_PE_TRUE@am__append_12 = \ +@BUILD_AD_PE_TRUE@am__append_11 = \ @BUILD_AD_PE_TRUE@ adio/ad_gpfs/pe/ad_pe_aggrs.c -@BUILD_AD_GRIDFTP_TRUE@am__append_13 = adio/ad_gridftp/ad_gridftp.h -@BUILD_AD_GRIDFTP_TRUE@am__append_14 = \ +@BUILD_AD_GRIDFTP_TRUE@am__append_12 = adio/ad_gridftp/ad_gridftp.h +@BUILD_AD_GRIDFTP_TRUE@am__append_13 = \ @BUILD_AD_GRIDFTP_TRUE@ adio/ad_gridftp/ad_gridftp_close.c \ @BUILD_AD_GRIDFTP_TRUE@ adio/ad_gridftp/ad_gridftp_open.c \ @BUILD_AD_GRIDFTP_TRUE@ adio/ad_gridftp/ad_gridftp_read.c \ @@ -157,8 +156,8 @@ host_triplet = @host@ @BUILD_AD_GRIDFTP_TRUE@ adio/ad_gridftp/globus_routines.c \ @BUILD_AD_GRIDFTP_TRUE@ adio/ad_gridftp/ad_gridftp_features.c -@BUILD_AD_HFS_TRUE@am__append_15 = adio/ad_hfs/ad_hfs.h -@BUILD_AD_HFS_TRUE@am__append_16 = \ +@BUILD_AD_HFS_TRUE@am__append_14 = adio/ad_hfs/ad_hfs.h +@BUILD_AD_HFS_TRUE@am__append_15 = \ @BUILD_AD_HFS_TRUE@ adio/ad_hfs/ad_hfs_read.c \ @BUILD_AD_HFS_TRUE@ adio/ad_hfs/ad_hfs_open.c \ @BUILD_AD_HFS_TRUE@ adio/ad_hfs/ad_hfs_write.c \ @@ -166,8 +165,8 @@ host_triplet = @host@ @BUILD_AD_HFS_TRUE@ adio/ad_hfs/ad_hfs_resize.c \ @BUILD_AD_HFS_TRUE@ adio/ad_hfs/ad_hfs.c -@BUILD_AD_LUSTRE_TRUE@am__append_17 = adio/ad_lustre/ad_lustre.h -@BUILD_AD_LUSTRE_TRUE@am__append_18 = \ +@BUILD_AD_LUSTRE_TRUE@am__append_16 = adio/ad_lustre/ad_lustre.h +@BUILD_AD_LUSTRE_TRUE@am__append_17 = \ @BUILD_AD_LUSTRE_TRUE@ adio/ad_lustre/ad_lustre.c \ @BUILD_AD_LUSTRE_TRUE@ adio/ad_lustre/ad_lustre_open.c \ @BUILD_AD_LUSTRE_TRUE@ adio/ad_lustre/ad_lustre_rwcontig.c \ @@ -176,8 +175,8 @@ host_triplet = @host@ @BUILD_AD_LUSTRE_TRUE@ adio/ad_lustre/ad_lustre_hints.c \ @BUILD_AD_LUSTRE_TRUE@ adio/ad_lustre/ad_lustre_aggregate.c -@BUILD_AD_NFS_TRUE@am__append_19 = adio/ad_nfs/ad_nfs.h -@BUILD_AD_NFS_TRUE@am__append_20 = \ +@BUILD_AD_NFS_TRUE@am__append_18 = adio/ad_nfs/ad_nfs.h +@BUILD_AD_NFS_TRUE@am__append_19 = \ @BUILD_AD_NFS_TRUE@ adio/ad_nfs/ad_nfs_read.c \ @BUILD_AD_NFS_TRUE@ adio/ad_nfs/ad_nfs_open.c \ @BUILD_AD_NFS_TRUE@ adio/ad_nfs/ad_nfs_write.c \ @@ -192,8 +191,8 @@ host_triplet = @host@ @BUILD_AD_NFS_TRUE@ adio/ad_nfs/ad_nfs_resize.c \ @BUILD_AD_NFS_TRUE@ adio/ad_nfs/ad_nfs_features.c -@BUILD_AD_PANFS_TRUE@am__append_21 = adio/ad_panfs/ad_panfs.h -@BUILD_AD_PANFS_TRUE@am__append_22 = \ +@BUILD_AD_PANFS_TRUE@am__append_20 = adio/ad_panfs/ad_panfs.h +@BUILD_AD_PANFS_TRUE@am__append_21 = \ @BUILD_AD_PANFS_TRUE@ adio/ad_panfs/ad_panfs.c \ @BUILD_AD_PANFS_TRUE@ $(panfs_open) \ @BUILD_AD_PANFS_TRUE@ adio/ad_panfs/ad_panfs_hints.c \ @@ -201,8 +200,8 @@ host_triplet = @host@ @BUILD_AD_PANFS_TRUE@ adio/ad_panfs/ad_panfs_resize.c \ @BUILD_AD_PANFS_TRUE@ adio/ad_panfs/ad_panfs_write.c -@BUILD_AD_PFS_TRUE@am__append_23 = adio/ad_pfs/ad_pfs.h -@BUILD_AD_PFS_TRUE@am__append_24 = \ +@BUILD_AD_PFS_TRUE@am__append_22 = adio/ad_pfs/ad_pfs.h +@BUILD_AD_PFS_TRUE@am__append_23 = \ @BUILD_AD_PFS_TRUE@ adio/ad_pfs/ad_pfs_read.c \ @BUILD_AD_PFS_TRUE@ adio/ad_pfs/ad_pfs_open.c \ @BUILD_AD_PFS_TRUE@ adio/ad_pfs/ad_pfs_write.c \ @@ -215,8 +214,8 @@ host_triplet = @host@ @BUILD_AD_PFS_TRUE@ adio/ad_pfs/ad_pfs_hints.c \ @BUILD_AD_PFS_TRUE@ adio/ad_pfs/ad_pfs.c -@BUILD_AD_PIOFS_TRUE@am__append_25 = adio/ad_piofs/ad_piofs.h -@BUILD_AD_PIOFS_TRUE@am__append_26 = \ +@BUILD_AD_PIOFS_TRUE@am__append_24 = adio/ad_piofs/ad_piofs.h +@BUILD_AD_PIOFS_TRUE@am__append_25 = \ @BUILD_AD_PIOFS_TRUE@ adio/ad_piofs/ad_piofs_read.c \ @BUILD_AD_PIOFS_TRUE@ adio/ad_piofs/ad_piofs_open.c \ @BUILD_AD_PIOFS_TRUE@ adio/ad_piofs/ad_piofs_write.c \ @@ -224,8 +223,8 @@ host_triplet = @host@ @BUILD_AD_PIOFS_TRUE@ adio/ad_piofs/ad_piofs_hints.c \ @BUILD_AD_PIOFS_TRUE@ adio/ad_piofs/ad_piofs.c -@BUILD_AD_PVFS_TRUE@am__append_27 = adio/ad_pvfs/ad_pvfs.h -@BUILD_AD_PVFS_TRUE@am__append_28 = \ +@BUILD_AD_PVFS_TRUE@am__append_26 = adio/ad_pvfs/ad_pvfs.h +@BUILD_AD_PVFS_TRUE@am__append_27 = \ @BUILD_AD_PVFS_TRUE@ adio/ad_pvfs/ad_pvfs_close.c \ @BUILD_AD_PVFS_TRUE@ adio/ad_pvfs/ad_pvfs_read.c \ @BUILD_AD_PVFS_TRUE@ adio/ad_pvfs/ad_pvfs_open.c \ @@ -237,11 +236,11 @@ host_triplet = @host@ @BUILD_AD_PVFS_TRUE@ adio/ad_pvfs/ad_pvfs_delete.c \ @BUILD_AD_PVFS_TRUE@ adio/ad_pvfs/ad_pvfs.c -@BUILD_AD_PVFS2_TRUE@am__append_29 = adio/ad_pvfs2/ad_pvfs2.h \ +@BUILD_AD_PVFS2_TRUE@am__append_28 = adio/ad_pvfs2/ad_pvfs2.h \ @BUILD_AD_PVFS2_TRUE@ adio/ad_pvfs2/ad_pvfs2_io.h \ @BUILD_AD_PVFS2_TRUE@ adio/ad_pvfs2/ad_pvfs2_common.h -@BUILD_AD_PVFS2_TRUE@am__append_30 = \ +@BUILD_AD_PVFS2_TRUE@am__append_29 = \ @BUILD_AD_PVFS2_TRUE@ adio/ad_pvfs2/ad_pvfs2_close.c \ @BUILD_AD_PVFS2_TRUE@ adio/ad_pvfs2/ad_pvfs2_read.c \ @BUILD_AD_PVFS2_TRUE@ adio/ad_pvfs2/ad_pvfs2_open.c \ @@ -260,15 +259,15 @@ host_triplet = @host@ @BUILD_AD_PVFS2_TRUE@ adio/ad_pvfs2/ad_pvfs2_write_list_classic.c \ @BUILD_AD_PVFS2_TRUE@ adio/ad_pvfs2/ad_pvfs2_features.c -@BUILD_AD_SFS_TRUE@am__append_31 = adio/ad_sfs/ad_sfs.h -@BUILD_AD_SFS_TRUE@am__append_32 = \ +@BUILD_AD_SFS_TRUE@am__append_30 = adio/ad_sfs/ad_sfs.h +@BUILD_AD_SFS_TRUE@am__append_31 = \ @BUILD_AD_SFS_TRUE@ adio/ad_sfs/ad_sfs_open.c \ @BUILD_AD_SFS_TRUE@ adio/ad_sfs/ad_sfs_fcntl.c \ @BUILD_AD_SFS_TRUE@ adio/ad_sfs/ad_sfs_flush.c \ @BUILD_AD_SFS_TRUE@ adio/ad_sfs/ad_sfs.c -@BUILD_AD_TESTFS_TRUE@am__append_33 = adio/ad_testfs/ad_testfs.h -@BUILD_AD_TESTFS_TRUE@am__append_34 = \ +@BUILD_AD_TESTFS_TRUE@am__append_32 = adio/ad_testfs/ad_testfs.h +@BUILD_AD_TESTFS_TRUE@am__append_33 = \ @BUILD_AD_TESTFS_TRUE@ adio/ad_testfs/ad_testfs_close.c \ @BUILD_AD_TESTFS_TRUE@ adio/ad_testfs/ad_testfs_read.c \ @BUILD_AD_TESTFS_TRUE@ adio/ad_testfs/ad_testfs_rdcoll.c \ @@ -287,13 +286,13 @@ host_triplet = @host@ @BUILD_AD_TESTFS_TRUE@ adio/ad_testfs/ad_testfs_delete.c \ @BUILD_AD_TESTFS_TRUE@ adio/ad_testfs/ad_testfs.c -@BUILD_AD_UFS_TRUE@am__append_35 = adio/ad_ufs/ad_ufs.h -@BUILD_AD_UFS_TRUE@am__append_36 = \ +@BUILD_AD_UFS_TRUE@am__append_34 = adio/ad_ufs/ad_ufs.h +@BUILD_AD_UFS_TRUE@am__append_35 = \ @BUILD_AD_UFS_TRUE@ adio/ad_ufs/ad_ufs.c \ @BUILD_AD_UFS_TRUE@ adio/ad_ufs/ad_ufs_open.c -@BUILD_AD_XFS_TRUE@am__append_37 = adio/ad_xfs/ad_xfs.h -@BUILD_AD_XFS_TRUE@am__append_38 = \ +@BUILD_AD_XFS_TRUE@am__append_36 = adio/ad_xfs/ad_xfs.h +@BUILD_AD_XFS_TRUE@am__append_37 = \ @BUILD_AD_XFS_TRUE@ adio/ad_xfs/ad_xfs.c \ @BUILD_AD_XFS_TRUE@ adio/ad_xfs/ad_xfs_fcntl.c \ @BUILD_AD_XFS_TRUE@ adio/ad_xfs/ad_xfs_hints.c \ @@ -302,8 +301,8 @@ host_triplet = @host@ @BUILD_AD_XFS_TRUE@ adio/ad_xfs/ad_xfs_resize.c \ @BUILD_AD_XFS_TRUE@ adio/ad_xfs/ad_xfs_write.c -@BUILD_AD_ZOIDFS_TRUE@am__append_39 = adio/ad_zoidfs/ad_zoidfs.h adio/ad_zoidfs/ad_zoidfs_common.h -@BUILD_AD_ZOIDFS_TRUE@am__append_40 = \ +@BUILD_AD_ZOIDFS_TRUE@am__append_38 = adio/ad_zoidfs/ad_zoidfs.h adio/ad_zoidfs/ad_zoidfs_common.h +@BUILD_AD_ZOIDFS_TRUE@am__append_39 = \ @BUILD_AD_ZOIDFS_TRUE@ adio/ad_zoidfs/ad_zoidfs.c \ @BUILD_AD_ZOIDFS_TRUE@ adio/ad_zoidfs/ad_zoidfs_close.c \ @BUILD_AD_ZOIDFS_TRUE@ adio/ad_zoidfs/ad_zoidfs_common.c \ @@ -322,7 +321,7 @@ host_triplet = @host@ # convenience lib to permit adding the special "-D..." argument for all objects. # MPICH will then link in both convenience library into libmpi, since it # won't work very well the other way around. -@BUILD_PROFILING_LIB_TRUE@@BUILD_ROMIO_EMBEDDED_TRUE@am__append_41 = libpromio.la +@BUILD_PROFILING_LIB_TRUE@@BUILD_ROMIO_EMBEDDED_TRUE@am__append_40 = libpromio.la subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/confdb/aclocal_cc.m4 \ @@ -384,31 +383,29 @@ am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)" \ "$(DESTDIR)$(includedir)" LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES) libpromio_la_LIBADD = -am__libpromio_la_SOURCES_DIST = mpi-io/fortran/romio_fortran.c \ - mpi-io/close.c mpi-io/delete.c mpi-io/file_c2f.c \ - mpi-io/file_f2c.c mpi-io/fsync.c mpi-io/get_amode.c \ - mpi-io/get_atom.c mpi-io/get_bytoff.c mpi-io/get_errh.c \ - mpi-io/get_extent.c mpi-io/get_group.c mpi-io/get_info.c \ - mpi-io/get_posn.c mpi-io/get_posn_sh.c mpi-io/get_size.c \ - mpi-io/get_view.c mpi-io/ioreq_c2f.c mpi-io/ioreq_f2c.c \ - mpi-io/iread.c mpi-io/iread_all.c mpi-io/iread_at.c \ - mpi-io/iread_atall.c mpi-io/iread_sh.c mpi-io/iwrite.c \ - mpi-io/iwrite_all.c mpi-io/iwrite_at.c mpi-io/iwrite_atall.c \ - mpi-io/iwrite_sh.c mpi-io/open.c mpi-io/prealloc.c \ - mpi-io/rd_atallb.c mpi-io/rd_atalle.c mpi-io/read.c \ - mpi-io/read_all.c mpi-io/read_allb.c mpi-io/read_alle.c \ - mpi-io/read_at.c mpi-io/read_atall.c mpi-io/read_ord.c \ - mpi-io/read_ordb.c mpi-io/read_orde.c mpi-io/read_sh.c \ - mpi-io/register_datarep.c mpi-io/seek.c mpi-io/seek_sh.c \ - mpi-io/set_atom.c mpi-io/set_errh.c mpi-io/set_info.c \ - mpi-io/set_size.c mpi-io/set_view.c mpi-io/wr_atallb.c \ - mpi-io/wr_atalle.c mpi-io/write.c mpi-io/write_all.c \ - mpi-io/write_allb.c mpi-io/write_alle.c mpi-io/write_at.c \ - mpi-io/write_atall.c mpi-io/write_ord.c mpi-io/write_ordb.c \ - mpi-io/write_orde.c mpi-io/write_sh.c +am__libpromio_la_SOURCES_DIST = mpi-io/close.c mpi-io/delete.c \ + mpi-io/file_c2f.c mpi-io/file_f2c.c mpi-io/fsync.c \ + mpi-io/get_amode.c mpi-io/get_atom.c mpi-io/get_bytoff.c \ + mpi-io/get_errh.c mpi-io/get_extent.c mpi-io/get_group.c \ + mpi-io/get_info.c mpi-io/get_posn.c mpi-io/get_posn_sh.c \ + mpi-io/get_size.c mpi-io/get_view.c mpi-io/ioreq_c2f.c \ + mpi-io/ioreq_f2c.c mpi-io/iread.c mpi-io/iread_all.c \ + mpi-io/iread_at.c mpi-io/iread_atall.c mpi-io/iread_sh.c \ + mpi-io/iwrite.c mpi-io/iwrite_all.c mpi-io/iwrite_at.c \ + mpi-io/iwrite_atall.c mpi-io/iwrite_sh.c mpi-io/open.c \ + mpi-io/prealloc.c mpi-io/rd_atallb.c mpi-io/rd_atalle.c \ + mpi-io/read.c mpi-io/read_all.c mpi-io/read_allb.c \ + mpi-io/read_alle.c mpi-io/read_at.c mpi-io/read_atall.c \ + mpi-io/read_ord.c mpi-io/read_ordb.c mpi-io/read_orde.c \ + mpi-io/read_sh.c mpi-io/register_datarep.c mpi-io/seek.c \ + mpi-io/seek_sh.c mpi-io/set_atom.c mpi-io/set_errh.c \ + mpi-io/set_info.c mpi-io/set_size.c mpi-io/set_view.c \ + mpi-io/wr_atallb.c mpi-io/wr_atalle.c mpi-io/write.c \ + mpi-io/write_all.c mpi-io/write_allb.c mpi-io/write_alle.c \ + mpi-io/write_at.c mpi-io/write_atall.c mpi-io/write_ord.c \ + mpi-io/write_ordb.c mpi-io/write_orde.c mpi-io/write_sh.c am__dirstamp = $(am__leading_dot)dirstamp -@BUILD_F77_BINDINGS_TRUE@am__objects_1 = mpi-io/fortran/libpromio_la-romio_fortran.lo -am__objects_2 = $(am__objects_1) mpi-io/libpromio_la-close.lo \ +am__objects_1 = mpi-io/libpromio_la-close.lo \ mpi-io/libpromio_la-delete.lo mpi-io/libpromio_la-file_c2f.lo \ mpi-io/libpromio_la-file_f2c.lo mpi-io/libpromio_la-fsync.lo \ mpi-io/libpromio_la-get_amode.lo \ @@ -462,8 +459,8 @@ am__objects_2 = $(am__objects_1) mpi-io/libpromio_la-close.lo \ mpi-io/libpromio_la-write_ordb.lo \ mpi-io/libpromio_la-write_orde.lo \ mpi-io/libpromio_la-write_sh.lo -@BUILD_PROFILING_LIB_TRUE@@BUILD_ROMIO_EMBEDDED_FALSE@am_libpromio_la_OBJECTS = $(am__objects_2) -@BUILD_PROFILING_LIB_TRUE@@BUILD_ROMIO_EMBEDDED_TRUE@am_libpromio_la_OBJECTS = $(am__objects_2) +@BUILD_PROFILING_LIB_TRUE@@BUILD_ROMIO_EMBEDDED_FALSE@am_libpromio_la_OBJECTS = $(am__objects_1) +@BUILD_PROFILING_LIB_TRUE@@BUILD_ROMIO_EMBEDDED_TRUE@am_libpromio_la_OBJECTS = $(am__objects_1) libpromio_la_OBJECTS = $(am_libpromio_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) @@ -471,28 +468,27 @@ am__v_lt_0 = --silent am__v_lt_1 = @BUILD_PROFILING_LIB_TRUE@@BUILD_ROMIO_EMBEDDED_TRUE@am_libpromio_la_rpath = libromio_la_LIBADD = -am__libromio_la_SOURCES_DIST = mpi-io/fortran/romio_fortran.c \ - mpi-io/close.c mpi-io/delete.c mpi-io/file_c2f.c \ - mpi-io/file_f2c.c mpi-io/fsync.c mpi-io/get_amode.c \ - mpi-io/get_atom.c mpi-io/get_bytoff.c mpi-io/get_errh.c \ - mpi-io/get_extent.c mpi-io/get_group.c mpi-io/get_info.c \ - mpi-io/get_posn.c mpi-io/get_posn_sh.c mpi-io/get_size.c \ - mpi-io/get_view.c mpi-io/ioreq_c2f.c mpi-io/ioreq_f2c.c \ - mpi-io/iread.c mpi-io/iread_all.c mpi-io/iread_at.c \ - mpi-io/iread_atall.c mpi-io/iread_sh.c mpi-io/iwrite.c \ - mpi-io/iwrite_all.c mpi-io/iwrite_at.c mpi-io/iwrite_atall.c \ - mpi-io/iwrite_sh.c mpi-io/open.c mpi-io/prealloc.c \ - mpi-io/rd_atallb.c mpi-io/rd_atalle.c mpi-io/read.c \ - mpi-io/read_all.c mpi-io/read_allb.c mpi-io/read_alle.c \ - mpi-io/read_at.c mpi-io/read_atall.c mpi-io/read_ord.c \ - mpi-io/read_ordb.c mpi-io/read_orde.c mpi-io/read_sh.c \ - mpi-io/register_datarep.c mpi-io/seek.c mpi-io/seek_sh.c \ - mpi-io/set_atom.c mpi-io/set_errh.c mpi-io/set_info.c \ - mpi-io/set_size.c mpi-io/set_view.c mpi-io/wr_atallb.c \ - mpi-io/wr_atalle.c mpi-io/write.c mpi-io/write_all.c \ - mpi-io/write_allb.c mpi-io/write_alle.c mpi-io/write_at.c \ - mpi-io/write_atall.c mpi-io/write_ord.c mpi-io/write_ordb.c \ - mpi-io/write_orde.c mpi-io/write_sh.c \ +am__libromio_la_SOURCES_DIST = mpi-io/close.c mpi-io/delete.c \ + mpi-io/file_c2f.c mpi-io/file_f2c.c mpi-io/fsync.c \ + mpi-io/get_amode.c mpi-io/get_atom.c mpi-io/get_bytoff.c \ + mpi-io/get_errh.c mpi-io/get_extent.c mpi-io/get_group.c \ + mpi-io/get_info.c mpi-io/get_posn.c mpi-io/get_posn_sh.c \ + mpi-io/get_size.c mpi-io/get_view.c mpi-io/ioreq_c2f.c \ + mpi-io/ioreq_f2c.c mpi-io/iread.c mpi-io/iread_all.c \ + mpi-io/iread_at.c mpi-io/iread_atall.c mpi-io/iread_sh.c \ + mpi-io/iwrite.c mpi-io/iwrite_all.c mpi-io/iwrite_at.c \ + mpi-io/iwrite_atall.c mpi-io/iwrite_sh.c mpi-io/open.c \ + mpi-io/prealloc.c mpi-io/rd_atallb.c mpi-io/rd_atalle.c \ + mpi-io/read.c mpi-io/read_all.c mpi-io/read_allb.c \ + mpi-io/read_alle.c mpi-io/read_at.c mpi-io/read_atall.c \ + mpi-io/read_ord.c mpi-io/read_ordb.c mpi-io/read_orde.c \ + mpi-io/read_sh.c mpi-io/register_datarep.c mpi-io/seek.c \ + mpi-io/seek_sh.c mpi-io/set_atom.c mpi-io/set_errh.c \ + mpi-io/set_info.c mpi-io/set_size.c mpi-io/set_view.c \ + mpi-io/wr_atallb.c mpi-io/wr_atalle.c mpi-io/write.c \ + mpi-io/write_all.c mpi-io/write_allb.c mpi-io/write_alle.c \ + mpi-io/write_at.c mpi-io/write_atall.c mpi-io/write_ord.c \ + mpi-io/write_ordb.c mpi-io/write_orde.c mpi-io/write_sh.c \ mpi-io/glue/default/mpio_file.c mpi-io/glue/default/mpio_err.c \ mpi-io/glue/mpich/mpio_file.c mpi-io/glue/mpich/mpio_err.c \ mpi-io/glue/large_count.c mpi-io/mpich_fileutil.c \ @@ -626,17 +622,15 @@ am__libromio_la_SOURCES_DIST = mpi-io/fortran/romio_fortran.c \ adio/common/hint_fns.c adio/common/ad_threaded_io.c \ adio/common/p2p_aggregation.c \ adio/common/onesided_aggregation.c adio/common/utils.c -@BUILD_F77_BINDINGS_TRUE@am__objects_3 = \ -@BUILD_F77_BINDINGS_TRUE@ mpi-io/fortran/romio_fortran.lo -am__objects_4 = $(am__objects_3) mpi-io/close.lo mpi-io/delete.lo \ - mpi-io/file_c2f.lo mpi-io/file_f2c.lo mpi-io/fsync.lo \ - mpi-io/get_amode.lo mpi-io/get_atom.lo mpi-io/get_bytoff.lo \ - mpi-io/get_errh.lo mpi-io/get_extent.lo mpi-io/get_group.lo \ - mpi-io/get_info.lo mpi-io/get_posn.lo mpi-io/get_posn_sh.lo \ - mpi-io/get_size.lo mpi-io/get_view.lo mpi-io/ioreq_c2f.lo \ - mpi-io/ioreq_f2c.lo mpi-io/iread.lo mpi-io/iread_all.lo \ - mpi-io/iread_at.lo mpi-io/iread_atall.lo mpi-io/iread_sh.lo \ - mpi-io/iwrite.lo mpi-io/iwrite_all.lo mpi-io/iwrite_at.lo \ +am__objects_2 = mpi-io/close.lo mpi-io/delete.lo mpi-io/file_c2f.lo \ + mpi-io/file_f2c.lo mpi-io/fsync.lo mpi-io/get_amode.lo \ + mpi-io/get_atom.lo mpi-io/get_bytoff.lo mpi-io/get_errh.lo \ + mpi-io/get_extent.lo mpi-io/get_group.lo mpi-io/get_info.lo \ + mpi-io/get_posn.lo mpi-io/get_posn_sh.lo mpi-io/get_size.lo \ + mpi-io/get_view.lo mpi-io/ioreq_c2f.lo mpi-io/ioreq_f2c.lo \ + mpi-io/iread.lo mpi-io/iread_all.lo mpi-io/iread_at.lo \ + mpi-io/iread_atall.lo mpi-io/iread_sh.lo mpi-io/iwrite.lo \ + mpi-io/iwrite_all.lo mpi-io/iwrite_at.lo \ mpi-io/iwrite_atall.lo mpi-io/iwrite_sh.lo mpi-io/open.lo \ mpi-io/prealloc.lo mpi-io/rd_atallb.lo mpi-io/rd_atalle.lo \ mpi-io/read.lo mpi-io/read_all.lo mpi-io/read_allb.lo \ @@ -649,19 +643,19 @@ am__objects_4 = $(am__objects_3) mpi-io/close.lo mpi-io/delete.lo \ mpi-io/write_all.lo mpi-io/write_allb.lo mpi-io/write_alle.lo \ mpi-io/write_at.lo mpi-io/write_atall.lo mpi-io/write_ord.lo \ mpi-io/write_ordb.lo mpi-io/write_orde.lo mpi-io/write_sh.lo -@MPIO_GLUE_DEFAULT_TRUE@am__objects_5 = \ +@MPIO_GLUE_DEFAULT_TRUE@am__objects_3 = \ @MPIO_GLUE_DEFAULT_TRUE@ mpi-io/glue/default/mpio_file.lo \ @MPIO_GLUE_DEFAULT_TRUE@ mpi-io/glue/default/mpio_err.lo -@MPIO_GLUE_MPICH_TRUE@am__objects_6 = mpi-io/glue/mpich/mpio_file.lo \ +@MPIO_GLUE_MPICH_TRUE@am__objects_4 = mpi-io/glue/mpich/mpio_file.lo \ @MPIO_GLUE_MPICH_TRUE@ mpi-io/glue/mpich/mpio_err.lo -@BUILD_ROMIO_EMBEDDED_FALSE@am__objects_7 = \ +@BUILD_ROMIO_EMBEDDED_FALSE@am__objects_5 = \ @BUILD_ROMIO_EMBEDDED_FALSE@ mpi-io/glue/large_count.lo -am__objects_8 = mpi-io/iotest.lo mpi-io/iotestall.lo \ +am__objects_6 = mpi-io/iotest.lo mpi-io/iotestall.lo \ mpi-io/iotestany.lo mpi-io/iotestsome.lo mpi-io/iowait.lo \ mpi-io/iowaitall.lo mpi-io/iowaitany.lo mpi-io/iowaitsome.lo -@BUILD_MPIO_REQUEST_TRUE@am__objects_9 = $(am__objects_8) -@BUILD_MPIO_ERRHAN_TRUE@am__objects_10 = $(am__objects_8) -@BUILD_AD_GPFS_TRUE@am__objects_11 = adio/ad_gpfs/ad_gpfs_aggrs.lo \ +@BUILD_MPIO_REQUEST_TRUE@am__objects_7 = $(am__objects_6) +@BUILD_MPIO_ERRHAN_TRUE@am__objects_8 = $(am__objects_6) +@BUILD_AD_GPFS_TRUE@am__objects_9 = adio/ad_gpfs/ad_gpfs_aggrs.lo \ @BUILD_AD_GPFS_TRUE@ adio/ad_gpfs/ad_gpfs_close.lo \ @BUILD_AD_GPFS_TRUE@ adio/ad_gpfs/ad_gpfs_flush.lo \ @BUILD_AD_GPFS_TRUE@ adio/ad_gpfs/ad_gpfs_tuning.lo \ @@ -670,10 +664,10 @@ am__objects_8 = mpi-io/iotest.lo mpi-io/iotestall.lo \ @BUILD_AD_GPFS_TRUE@ adio/ad_gpfs/ad_gpfs_hints.lo \ @BUILD_AD_GPFS_TRUE@ adio/ad_gpfs/ad_gpfs_rdcoll.lo \ @BUILD_AD_GPFS_TRUE@ adio/ad_gpfs/ad_gpfs_wrcoll.lo -@BUILD_AD_BG_TRUE@am__objects_12 = adio/ad_gpfs/bg/ad_bg_aggrs.lo \ +@BUILD_AD_BG_TRUE@am__objects_10 = adio/ad_gpfs/bg/ad_bg_aggrs.lo \ @BUILD_AD_BG_TRUE@ adio/ad_gpfs/bg/ad_bg_pset.lo -@BUILD_AD_PE_TRUE@am__objects_13 = adio/ad_gpfs/pe/ad_pe_aggrs.lo -@BUILD_AD_GRIDFTP_TRUE@am__objects_14 = \ +@BUILD_AD_PE_TRUE@am__objects_11 = adio/ad_gpfs/pe/ad_pe_aggrs.lo +@BUILD_AD_GRIDFTP_TRUE@am__objects_12 = \ @BUILD_AD_GRIDFTP_TRUE@ adio/ad_gridftp/ad_gridftp_close.lo \ @BUILD_AD_GRIDFTP_TRUE@ adio/ad_gridftp/ad_gridftp_open.lo \ @BUILD_AD_GRIDFTP_TRUE@ adio/ad_gridftp/ad_gridftp_read.lo \ @@ -686,20 +680,20 @@ am__objects_8 = mpi-io/iotest.lo mpi-io/iotestall.lo \ @BUILD_AD_GRIDFTP_TRUE@ adio/ad_gridftp/ad_gridftp.lo \ @BUILD_AD_GRIDFTP_TRUE@ adio/ad_gridftp/globus_routines.lo \ @BUILD_AD_GRIDFTP_TRUE@ adio/ad_gridftp/ad_gridftp_features.lo -@BUILD_AD_HFS_TRUE@am__objects_15 = adio/ad_hfs/ad_hfs_read.lo \ +@BUILD_AD_HFS_TRUE@am__objects_13 = adio/ad_hfs/ad_hfs_read.lo \ @BUILD_AD_HFS_TRUE@ adio/ad_hfs/ad_hfs_open.lo \ @BUILD_AD_HFS_TRUE@ adio/ad_hfs/ad_hfs_write.lo \ @BUILD_AD_HFS_TRUE@ adio/ad_hfs/ad_hfs_fcntl.lo \ @BUILD_AD_HFS_TRUE@ adio/ad_hfs/ad_hfs_resize.lo \ @BUILD_AD_HFS_TRUE@ adio/ad_hfs/ad_hfs.lo -@BUILD_AD_LUSTRE_TRUE@am__objects_16 = adio/ad_lustre/ad_lustre.lo \ +@BUILD_AD_LUSTRE_TRUE@am__objects_14 = adio/ad_lustre/ad_lustre.lo \ @BUILD_AD_LUSTRE_TRUE@ adio/ad_lustre/ad_lustre_open.lo \ @BUILD_AD_LUSTRE_TRUE@ adio/ad_lustre/ad_lustre_rwcontig.lo \ @BUILD_AD_LUSTRE_TRUE@ adio/ad_lustre/ad_lustre_wrcoll.lo \ @BUILD_AD_LUSTRE_TRUE@ adio/ad_lustre/ad_lustre_wrstr.lo \ @BUILD_AD_LUSTRE_TRUE@ adio/ad_lustre/ad_lustre_hints.lo \ @BUILD_AD_LUSTRE_TRUE@ adio/ad_lustre/ad_lustre_aggregate.lo -@BUILD_AD_NFS_TRUE@am__objects_17 = adio/ad_nfs/ad_nfs_read.lo \ +@BUILD_AD_NFS_TRUE@am__objects_15 = adio/ad_nfs/ad_nfs_read.lo \ @BUILD_AD_NFS_TRUE@ adio/ad_nfs/ad_nfs_open.lo \ @BUILD_AD_NFS_TRUE@ adio/ad_nfs/ad_nfs_write.lo \ @BUILD_AD_NFS_TRUE@ adio/ad_nfs/ad_nfs_done.lo \ @@ -712,17 +706,17 @@ am__objects_8 = mpi-io/iotest.lo mpi-io/iotestall.lo \ @BUILD_AD_NFS_TRUE@ adio/ad_nfs/ad_nfs.lo \ @BUILD_AD_NFS_TRUE@ adio/ad_nfs/ad_nfs_resize.lo \ @BUILD_AD_NFS_TRUE@ adio/ad_nfs/ad_nfs_features.lo -@BUILD_PANFS_OPEN6_FALSE@am__objects_18 = \ +@BUILD_PANFS_OPEN6_FALSE@am__objects_16 = \ @BUILD_PANFS_OPEN6_FALSE@ adio/ad_panfs/ad_panfs_open.lo -@BUILD_PANFS_OPEN6_TRUE@am__objects_18 = \ +@BUILD_PANFS_OPEN6_TRUE@am__objects_16 = \ @BUILD_PANFS_OPEN6_TRUE@ adio/ad_panfs/ad_panfs_open6.lo -@BUILD_AD_PANFS_TRUE@am__objects_19 = adio/ad_panfs/ad_panfs.lo \ -@BUILD_AD_PANFS_TRUE@ $(am__objects_18) \ +@BUILD_AD_PANFS_TRUE@am__objects_17 = adio/ad_panfs/ad_panfs.lo \ +@BUILD_AD_PANFS_TRUE@ $(am__objects_16) \ @BUILD_AD_PANFS_TRUE@ adio/ad_panfs/ad_panfs_hints.lo \ @BUILD_AD_PANFS_TRUE@ adio/ad_panfs/ad_panfs_read.lo \ @BUILD_AD_PANFS_TRUE@ adio/ad_panfs/ad_panfs_resize.lo \ @BUILD_AD_PANFS_TRUE@ adio/ad_panfs/ad_panfs_write.lo -@BUILD_AD_PFS_TRUE@am__objects_20 = adio/ad_pfs/ad_pfs_read.lo \ +@BUILD_AD_PFS_TRUE@am__objects_18 = adio/ad_pfs/ad_pfs_read.lo \ @BUILD_AD_PFS_TRUE@ adio/ad_pfs/ad_pfs_open.lo \ @BUILD_AD_PFS_TRUE@ adio/ad_pfs/ad_pfs_write.lo \ @BUILD_AD_PFS_TRUE@ adio/ad_pfs/ad_pfs_done.lo \ @@ -733,13 +727,13 @@ am__objects_8 = mpi-io/iotest.lo mpi-io/iotestall.lo \ @BUILD_AD_PFS_TRUE@ adio/ad_pfs/ad_pfs_flush.lo \ @BUILD_AD_PFS_TRUE@ adio/ad_pfs/ad_pfs_hints.lo \ @BUILD_AD_PFS_TRUE@ adio/ad_pfs/ad_pfs.lo -@BUILD_AD_PIOFS_TRUE@am__objects_21 = adio/ad_piofs/ad_piofs_read.lo \ +@BUILD_AD_PIOFS_TRUE@am__objects_19 = adio/ad_piofs/ad_piofs_read.lo \ @BUILD_AD_PIOFS_TRUE@ adio/ad_piofs/ad_piofs_open.lo \ @BUILD_AD_PIOFS_TRUE@ adio/ad_piofs/ad_piofs_write.lo \ @BUILD_AD_PIOFS_TRUE@ adio/ad_piofs/ad_piofs_fcntl.lo \ @BUILD_AD_PIOFS_TRUE@ adio/ad_piofs/ad_piofs_hints.lo \ @BUILD_AD_PIOFS_TRUE@ adio/ad_piofs/ad_piofs.lo -@BUILD_AD_PVFS_TRUE@am__objects_22 = adio/ad_pvfs/ad_pvfs_close.lo \ +@BUILD_AD_PVFS_TRUE@am__objects_20 = adio/ad_pvfs/ad_pvfs_close.lo \ @BUILD_AD_PVFS_TRUE@ adio/ad_pvfs/ad_pvfs_read.lo \ @BUILD_AD_PVFS_TRUE@ adio/ad_pvfs/ad_pvfs_open.lo \ @BUILD_AD_PVFS_TRUE@ adio/ad_pvfs/ad_pvfs_write.lo \ @@ -749,7 +743,7 @@ am__objects_8 = mpi-io/iotest.lo mpi-io/iotestall.lo \ @BUILD_AD_PVFS_TRUE@ adio/ad_pvfs/ad_pvfs_hints.lo \ @BUILD_AD_PVFS_TRUE@ adio/ad_pvfs/ad_pvfs_delete.lo \ @BUILD_AD_PVFS_TRUE@ adio/ad_pvfs/ad_pvfs.lo -@BUILD_AD_PVFS2_TRUE@am__objects_23 = adio/ad_pvfs2/ad_pvfs2_close.lo \ +@BUILD_AD_PVFS2_TRUE@am__objects_21 = adio/ad_pvfs2/ad_pvfs2_close.lo \ @BUILD_AD_PVFS2_TRUE@ adio/ad_pvfs2/ad_pvfs2_read.lo \ @BUILD_AD_PVFS2_TRUE@ adio/ad_pvfs2/ad_pvfs2_open.lo \ @BUILD_AD_PVFS2_TRUE@ adio/ad_pvfs2/ad_pvfs2_write.lo \ @@ -766,11 +760,11 @@ am__objects_8 = mpi-io/iotest.lo mpi-io/iotestall.lo \ @BUILD_AD_PVFS2_TRUE@ adio/ad_pvfs2/ad_pvfs2_io_dtype.lo \ @BUILD_AD_PVFS2_TRUE@ adio/ad_pvfs2/ad_pvfs2_write_list_classic.lo \ @BUILD_AD_PVFS2_TRUE@ adio/ad_pvfs2/ad_pvfs2_features.lo -@BUILD_AD_SFS_TRUE@am__objects_24 = adio/ad_sfs/ad_sfs_open.lo \ +@BUILD_AD_SFS_TRUE@am__objects_22 = adio/ad_sfs/ad_sfs_open.lo \ @BUILD_AD_SFS_TRUE@ adio/ad_sfs/ad_sfs_fcntl.lo \ @BUILD_AD_SFS_TRUE@ adio/ad_sfs/ad_sfs_flush.lo \ @BUILD_AD_SFS_TRUE@ adio/ad_sfs/ad_sfs.lo -@BUILD_AD_TESTFS_TRUE@am__objects_25 = \ +@BUILD_AD_TESTFS_TRUE@am__objects_23 = \ @BUILD_AD_TESTFS_TRUE@ adio/ad_testfs/ad_testfs_close.lo \ @BUILD_AD_TESTFS_TRUE@ adio/ad_testfs/ad_testfs_read.lo \ @BUILD_AD_TESTFS_TRUE@ adio/ad_testfs/ad_testfs_rdcoll.lo \ @@ -788,16 +782,16 @@ am__objects_8 = mpi-io/iotest.lo mpi-io/iotestall.lo \ @BUILD_AD_TESTFS_TRUE@ adio/ad_testfs/ad_testfs_hints.lo \ @BUILD_AD_TESTFS_TRUE@ adio/ad_testfs/ad_testfs_delete.lo \ @BUILD_AD_TESTFS_TRUE@ adio/ad_testfs/ad_testfs.lo -@BUILD_AD_UFS_TRUE@am__objects_26 = adio/ad_ufs/ad_ufs.lo \ +@BUILD_AD_UFS_TRUE@am__objects_24 = adio/ad_ufs/ad_ufs.lo \ @BUILD_AD_UFS_TRUE@ adio/ad_ufs/ad_ufs_open.lo -@BUILD_AD_XFS_TRUE@am__objects_27 = adio/ad_xfs/ad_xfs.lo \ +@BUILD_AD_XFS_TRUE@am__objects_25 = adio/ad_xfs/ad_xfs.lo \ @BUILD_AD_XFS_TRUE@ adio/ad_xfs/ad_xfs_fcntl.lo \ @BUILD_AD_XFS_TRUE@ adio/ad_xfs/ad_xfs_hints.lo \ @BUILD_AD_XFS_TRUE@ adio/ad_xfs/ad_xfs_open.lo \ @BUILD_AD_XFS_TRUE@ adio/ad_xfs/ad_xfs_read.lo \ @BUILD_AD_XFS_TRUE@ adio/ad_xfs/ad_xfs_resize.lo \ @BUILD_AD_XFS_TRUE@ adio/ad_xfs/ad_xfs_write.lo -@BUILD_AD_ZOIDFS_TRUE@am__objects_28 = adio/ad_zoidfs/ad_zoidfs.lo \ +@BUILD_AD_ZOIDFS_TRUE@am__objects_26 = adio/ad_zoidfs/ad_zoidfs.lo \ @BUILD_AD_ZOIDFS_TRUE@ adio/ad_zoidfs/ad_zoidfs_close.lo \ @BUILD_AD_ZOIDFS_TRUE@ adio/ad_zoidfs/ad_zoidfs_common.lo \ @BUILD_AD_ZOIDFS_TRUE@ adio/ad_zoidfs/ad_zoidfs_delete.lo \ @@ -809,15 +803,15 @@ am__objects_8 = mpi-io/iotest.lo mpi-io/iotestall.lo \ @BUILD_AD_ZOIDFS_TRUE@ adio/ad_zoidfs/ad_zoidfs_features.lo \ @BUILD_AD_ZOIDFS_TRUE@ adio/ad_zoidfs/ad_zoidfs_read_list.lo \ @BUILD_AD_ZOIDFS_TRUE@ adio/ad_zoidfs/ad_zoidfs_write_list.lo -am__objects_29 = $(am__objects_5) $(am__objects_6) $(am__objects_7) \ +am__objects_27 = $(am__objects_3) $(am__objects_4) $(am__objects_5) \ mpi-io/mpich_fileutil.lo mpi-io/mpir-mpioinit.lo \ - mpi-io/mpiu_greq.lo mpi-io/mpiu_external32.lo $(am__objects_9) \ - $(am__objects_10) $(am__objects_11) $(am__objects_12) \ - $(am__objects_13) $(am__objects_14) $(am__objects_15) \ - $(am__objects_16) $(am__objects_17) $(am__objects_19) \ - $(am__objects_20) $(am__objects_21) $(am__objects_22) \ - $(am__objects_23) $(am__objects_24) $(am__objects_25) \ - $(am__objects_26) $(am__objects_27) $(am__objects_28) \ + mpi-io/mpiu_greq.lo mpi-io/mpiu_external32.lo $(am__objects_7) \ + $(am__objects_8) $(am__objects_9) $(am__objects_10) \ + $(am__objects_11) $(am__objects_12) $(am__objects_13) \ + $(am__objects_14) $(am__objects_15) $(am__objects_17) \ + $(am__objects_18) $(am__objects_19) $(am__objects_20) \ + $(am__objects_21) $(am__objects_22) $(am__objects_23) \ + $(am__objects_24) $(am__objects_25) $(am__objects_26) \ adio/common/ad_aggregate.lo adio/common/ad_aggregate_new.lo \ adio/common/ad_close.lo adio/common/ad_coll_build_req_new.lo \ adio/common/ad_coll_exch_new.lo adio/common/ad_darray.lo \ @@ -852,12 +846,12 @@ am__objects_29 = $(am__objects_5) $(am__objects_6) $(am__objects_7) \ adio/common/hint_fns.lo adio/common/ad_threaded_io.lo \ adio/common/p2p_aggregation.lo \ adio/common/onesided_aggregation.lo adio/common/utils.lo -am__objects_30 = -@BUILD_ROMIO_EMBEDDED_FALSE@am_libromio_la_OBJECTS = $(am__objects_4) \ -@BUILD_ROMIO_EMBEDDED_FALSE@ $(am__objects_29) \ -@BUILD_ROMIO_EMBEDDED_FALSE@ $(am__objects_30) -@BUILD_ROMIO_EMBEDDED_TRUE@am_libromio_la_OBJECTS = $(am__objects_4) \ -@BUILD_ROMIO_EMBEDDED_TRUE@ $(am__objects_29) $(am__objects_30) +am__objects_28 = +@BUILD_ROMIO_EMBEDDED_FALSE@am_libromio_la_OBJECTS = $(am__objects_2) \ +@BUILD_ROMIO_EMBEDDED_FALSE@ $(am__objects_27) \ +@BUILD_ROMIO_EMBEDDED_FALSE@ $(am__objects_28) +@BUILD_ROMIO_EMBEDDED_TRUE@am_libromio_la_OBJECTS = $(am__objects_2) \ +@BUILD_ROMIO_EMBEDDED_TRUE@ $(am__objects_27) $(am__objects_28) libromio_la_OBJECTS = $(am_libromio_la_OBJECTS) @BUILD_ROMIO_EMBEDDED_FALSE@am_libromio_la_rpath = -rpath $(libdir) @BUILD_ROMIO_EMBEDDED_TRUE@am_libromio_la_rpath = @@ -1257,12 +1251,12 @@ noinst_HEADERS = mpi-io/mpioimpl.h mpi-io/mpioprof.h \ adio/include/mpio_error.h adio/include/mpipr.h \ adio/include/mpiu_greq.h adio/include/nopackage.h \ adio/include/mpiu_external32.h adio/include/hint_fns.h \ - $(am__append_7) $(am__append_9) $(am__append_11) \ - $(am__append_13) $(am__append_15) $(am__append_17) \ - $(am__append_19) $(am__append_21) $(am__append_23) \ - $(am__append_25) $(am__append_27) $(am__append_29) \ - $(am__append_31) $(am__append_33) $(am__append_35) \ - $(am__append_37) $(am__append_39) + $(am__append_6) $(am__append_8) $(am__append_10) \ + $(am__append_12) $(am__append_14) $(am__append_16) \ + $(am__append_18) $(am__append_20) $(am__append_22) \ + $(am__append_24) $(am__append_26) $(am__append_28) \ + $(am__append_30) $(am__append_32) $(am__append_34) \ + $(am__append_36) $(am__append_38) # ------------------------------------------------------------------------ # when building under MPICH we must be able to find mpi.h @@ -1287,40 +1281,40 @@ doc1_src_txt = # In MPICH these will have an MPI_ and a PMPI_ version. Other implementations # (like OMPI) only want these to be MPI_ routines, possibly with some # name-shifting prefix. -romio_mpi_sources = $(am__append_4) mpi-io/close.c mpi-io/delete.c \ - mpi-io/file_c2f.c mpi-io/file_f2c.c mpi-io/fsync.c \ - mpi-io/get_amode.c mpi-io/get_atom.c mpi-io/get_bytoff.c \ - mpi-io/get_errh.c mpi-io/get_extent.c mpi-io/get_group.c \ - mpi-io/get_info.c mpi-io/get_posn.c mpi-io/get_posn_sh.c \ - mpi-io/get_size.c mpi-io/get_view.c mpi-io/ioreq_c2f.c \ - mpi-io/ioreq_f2c.c mpi-io/iread.c mpi-io/iread_all.c \ - mpi-io/iread_at.c mpi-io/iread_atall.c mpi-io/iread_sh.c \ - mpi-io/iwrite.c mpi-io/iwrite_all.c mpi-io/iwrite_at.c \ - mpi-io/iwrite_atall.c mpi-io/iwrite_sh.c mpi-io/open.c \ - mpi-io/prealloc.c mpi-io/rd_atallb.c mpi-io/rd_atalle.c \ - mpi-io/read.c mpi-io/read_all.c mpi-io/read_allb.c \ - mpi-io/read_alle.c mpi-io/read_at.c mpi-io/read_atall.c \ - mpi-io/read_ord.c mpi-io/read_ordb.c mpi-io/read_orde.c \ - mpi-io/read_sh.c mpi-io/register_datarep.c mpi-io/seek.c \ - mpi-io/seek_sh.c mpi-io/set_atom.c mpi-io/set_errh.c \ - mpi-io/set_info.c mpi-io/set_size.c mpi-io/set_view.c \ - mpi-io/wr_atallb.c mpi-io/wr_atalle.c mpi-io/write.c \ - mpi-io/write_all.c mpi-io/write_allb.c mpi-io/write_alle.c \ - mpi-io/write_at.c mpi-io/write_atall.c mpi-io/write_ord.c \ - mpi-io/write_ordb.c mpi-io/write_orde.c mpi-io/write_sh.c +romio_mpi_sources = mpi-io/close.c mpi-io/delete.c mpi-io/file_c2f.c \ + mpi-io/file_f2c.c mpi-io/fsync.c mpi-io/get_amode.c \ + mpi-io/get_atom.c mpi-io/get_bytoff.c mpi-io/get_errh.c \ + mpi-io/get_extent.c mpi-io/get_group.c mpi-io/get_info.c \ + mpi-io/get_posn.c mpi-io/get_posn_sh.c mpi-io/get_size.c \ + mpi-io/get_view.c mpi-io/ioreq_c2f.c mpi-io/ioreq_f2c.c \ + mpi-io/iread.c mpi-io/iread_all.c mpi-io/iread_at.c \ + mpi-io/iread_atall.c mpi-io/iread_sh.c mpi-io/iwrite.c \ + mpi-io/iwrite_all.c mpi-io/iwrite_at.c mpi-io/iwrite_atall.c \ + mpi-io/iwrite_sh.c mpi-io/open.c mpi-io/prealloc.c \ + mpi-io/rd_atallb.c mpi-io/rd_atalle.c mpi-io/read.c \ + mpi-io/read_all.c mpi-io/read_allb.c mpi-io/read_alle.c \ + mpi-io/read_at.c mpi-io/read_atall.c mpi-io/read_ord.c \ + mpi-io/read_ordb.c mpi-io/read_orde.c mpi-io/read_sh.c \ + mpi-io/register_datarep.c mpi-io/seek.c mpi-io/seek_sh.c \ + mpi-io/set_atom.c mpi-io/set_errh.c mpi-io/set_info.c \ + mpi-io/set_size.c mpi-io/set_view.c mpi-io/wr_atallb.c \ + mpi-io/wr_atalle.c mpi-io/write.c mpi-io/write_all.c \ + mpi-io/write_allb.c mpi-io/write_alle.c mpi-io/write_at.c \ + mpi-io/write_atall.c mpi-io/write_ord.c mpi-io/write_ordb.c \ + mpi-io/write_orde.c mpi-io/write_sh.c # regular old source files that implement ROMIO, such as ADIO code # non-MPI/PMPI sources that will be included in libromio romio_other_sources = $(am__append_1) $(am__append_2) $(am__append_3) \ mpi-io/mpich_fileutil.c mpi-io/mpir-mpioinit.c \ - mpi-io/mpiu_greq.c mpi-io/mpiu_external32.c $(am__append_5) \ - $(am__append_6) $(am__append_8) $(am__append_10) \ - $(am__append_12) $(am__append_14) $(am__append_16) \ - $(am__append_18) $(am__append_20) $(am__append_22) \ - $(am__append_24) $(am__append_26) $(am__append_28) \ - $(am__append_30) $(am__append_32) $(am__append_34) \ - $(am__append_36) $(am__append_38) $(am__append_40) \ + mpi-io/mpiu_greq.c mpi-io/mpiu_external32.c $(am__append_4) \ + $(am__append_5) $(am__append_7) $(am__append_9) \ + $(am__append_11) $(am__append_13) $(am__append_15) \ + $(am__append_17) $(am__append_19) $(am__append_21) \ + $(am__append_23) $(am__append_25) $(am__append_27) \ + $(am__append_29) $(am__append_31) $(am__append_33) \ + $(am__append_35) $(am__append_37) $(am__append_39) \ adio/common/ad_aggregate.c adio/common/ad_aggregate_new.c \ adio/common/ad_close.c adio/common/ad_coll_build_req_new.c \ adio/common/ad_coll_exch_new.c adio/common/ad_darray.c \ @@ -1363,6 +1357,8 @@ glue_sources = # ------------------------------------------------------------------------ SUBDIRS = DIST_SUBDIRS = test test-internal + +# romio_mpi_sources += mpi-io/fortran/romio_fortran.c @BUILD_F77_BINDINGS_TRUE@disabled_romio_mpi_sources = \ @BUILD_F77_BINDINGS_TRUE@ mpi-io/fortran/closef.c \ @BUILD_F77_BINDINGS_TRUE@ mpi-io/fortran/deletef.c \ @@ -1440,7 +1436,7 @@ mpio_request_sources = \ # Build a libtool convenience library that the enclosing MPI implementation can # use by adding it to the right _LIBADD variable. @BUILD_ROMIO_EMBEDDED_TRUE@noinst_LTLIBRARIES = libromio.la \ -@BUILD_ROMIO_EMBEDDED_TRUE@ $(am__append_41) +@BUILD_ROMIO_EMBEDDED_TRUE@ $(am__append_40) @BUILD_ROMIO_EMBEDDED_FALSE@libromio_la_SOURCES = $(romio_mpi_sources) $(romio_other_sources) $(glue_sources) @BUILD_ROMIO_EMBEDDED_TRUE@libromio_la_SOURCES = $(romio_mpi_sources) $(romio_other_sources) $(glue_sources) @BUILD_PROFILING_LIB_TRUE@@BUILD_ROMIO_EMBEDDED_FALSE@libpromio_la_SOURCES = $(romio_mpi_sources) @@ -1585,15 +1581,6 @@ clean-noinstLTLIBRARIES: echo rm -f $${locs}; \ rm -f $${locs}; \ } -mpi-io/fortran/$(am__dirstamp): - @$(MKDIR_P) mpi-io/fortran - @: > mpi-io/fortran/$(am__dirstamp) -mpi-io/fortran/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) mpi-io/fortran/$(DEPDIR) - @: > mpi-io/fortran/$(DEPDIR)/$(am__dirstamp) -mpi-io/fortran/libpromio_la-romio_fortran.lo: \ - mpi-io/fortran/$(am__dirstamp) \ - mpi-io/fortran/$(DEPDIR)/$(am__dirstamp) mpi-io/$(am__dirstamp): @$(MKDIR_P) mpi-io @: > mpi-io/$(am__dirstamp) @@ -1727,8 +1714,6 @@ mpi-io/libpromio_la-write_sh.lo: mpi-io/$(am__dirstamp) \ libpromio.la: $(libpromio_la_OBJECTS) $(libpromio_la_DEPENDENCIES) $(EXTRA_libpromio_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(am_libpromio_la_rpath) $(libpromio_la_OBJECTS) $(libpromio_la_LIBADD) $(LIBS) -mpi-io/fortran/romio_fortran.lo: mpi-io/fortran/$(am__dirstamp) \ - mpi-io/fortran/$(DEPDIR)/$(am__dirstamp) mpi-io/close.lo: mpi-io/$(am__dirstamp) \ mpi-io/$(DEPDIR)/$(am__dirstamp) mpi-io/delete.lo: mpi-io/$(am__dirstamp) \ @@ -2481,8 +2466,6 @@ mostlyclean-compile: -rm -f adio/common/*.lo -rm -f mpi-io/*.$(OBJEXT) -rm -f mpi-io/*.lo - -rm -f mpi-io/fortran/*.$(OBJEXT) - -rm -f mpi-io/fortran/*.lo -rm -f mpi-io/glue/*.$(OBJEXT) -rm -f mpi-io/glue/*.lo -rm -f mpi-io/glue/default/*.$(OBJEXT) @@ -2839,8 +2822,6 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@mpi-io/$(DEPDIR)/write_ordb.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@mpi-io/$(DEPDIR)/write_orde.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@mpi-io/$(DEPDIR)/write_sh.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@mpi-io/fortran/$(DEPDIR)/libpromio_la-romio_fortran.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@mpi-io/fortran/$(DEPDIR)/romio_fortran.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@mpi-io/glue/$(DEPDIR)/large_count.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@mpi-io/glue/default/$(DEPDIR)/mpio_err.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@mpi-io/glue/default/$(DEPDIR)/mpio_file.Plo@am__quote@ @@ -2871,13 +2852,6 @@ distclean-compile: @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< -mpi-io/fortran/libpromio_la-romio_fortran.lo: mpi-io/fortran/romio_fortran.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpromio_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mpi-io/fortran/libpromio_la-romio_fortran.lo -MD -MP -MF mpi-io/fortran/$(DEPDIR)/libpromio_la-romio_fortran.Tpo -c -o mpi-io/fortran/libpromio_la-romio_fortran.lo `test -f 'mpi-io/fortran/romio_fortran.c' || echo '$(srcdir)/'`mpi-io/fortran/romio_fortran.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) mpi-io/fortran/$(DEPDIR)/libpromio_la-romio_fortran.Tpo mpi-io/fortran/$(DEPDIR)/libpromio_la-romio_fortran.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='mpi-io/fortran/romio_fortran.c' object='mpi-io/fortran/libpromio_la-romio_fortran.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpromio_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mpi-io/fortran/libpromio_la-romio_fortran.lo `test -f 'mpi-io/fortran/romio_fortran.c' || echo '$(srcdir)/'`mpi-io/fortran/romio_fortran.c - mpi-io/libpromio_la-close.lo: mpi-io/close.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpromio_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mpi-io/libpromio_la-close.lo -MD -MP -MF mpi-io/$(DEPDIR)/libpromio_la-close.Tpo -c -o mpi-io/libpromio_la-close.lo `test -f 'mpi-io/close.c' || echo '$(srcdir)/'`mpi-io/close.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) mpi-io/$(DEPDIR)/libpromio_la-close.Tpo mpi-io/$(DEPDIR)/libpromio_la-close.Plo @@ -3336,7 +3310,6 @@ clean-libtool: -rm -rf adio/ad_zoidfs/.libs adio/ad_zoidfs/_libs -rm -rf adio/common/.libs adio/common/_libs -rm -rf mpi-io/.libs mpi-io/_libs - -rm -rf mpi-io/fortran/.libs mpi-io/fortran/_libs -rm -rf mpi-io/glue/.libs mpi-io/glue/_libs -rm -rf mpi-io/glue/default/.libs mpi-io/glue/default/_libs -rm -rf mpi-io/glue/mpich/.libs mpi-io/glue/mpich/_libs @@ -3752,8 +3725,6 @@ distclean-generic: -rm -f adio/common/$(am__dirstamp) -rm -f mpi-io/$(DEPDIR)/$(am__dirstamp) -rm -f mpi-io/$(am__dirstamp) - -rm -f mpi-io/fortran/$(DEPDIR)/$(am__dirstamp) - -rm -f mpi-io/fortran/$(am__dirstamp) -rm -f mpi-io/glue/$(DEPDIR)/$(am__dirstamp) -rm -f mpi-io/glue/$(am__dirstamp) -rm -f mpi-io/glue/default/$(DEPDIR)/$(am__dirstamp) @@ -3771,7 +3742,7 @@ clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -rf adio/ad_gpfs/$(DEPDIR) adio/ad_gpfs/bg/$(DEPDIR) adio/ad_gpfs/pe/$(DEPDIR) adio/ad_gridftp/$(DEPDIR) adio/ad_hfs/$(DEPDIR) adio/ad_lustre/$(DEPDIR) adio/ad_nfs/$(DEPDIR) adio/ad_panfs/$(DEPDIR) adio/ad_pfs/$(DEPDIR) adio/ad_piofs/$(DEPDIR) adio/ad_pvfs/$(DEPDIR) adio/ad_pvfs2/$(DEPDIR) adio/ad_sfs/$(DEPDIR) adio/ad_testfs/$(DEPDIR) adio/ad_ufs/$(DEPDIR) adio/ad_xfs/$(DEPDIR) adio/ad_zoidfs/$(DEPDIR) adio/common/$(DEPDIR) mpi-io/$(DEPDIR) mpi-io/fortran/$(DEPDIR) mpi-io/glue/$(DEPDIR) mpi-io/glue/default/$(DEPDIR) mpi-io/glue/mpich/$(DEPDIR) + -rm -rf adio/ad_gpfs/$(DEPDIR) adio/ad_gpfs/bg/$(DEPDIR) adio/ad_gpfs/pe/$(DEPDIR) adio/ad_gridftp/$(DEPDIR) adio/ad_hfs/$(DEPDIR) adio/ad_lustre/$(DEPDIR) adio/ad_nfs/$(DEPDIR) adio/ad_panfs/$(DEPDIR) adio/ad_pfs/$(DEPDIR) adio/ad_piofs/$(DEPDIR) adio/ad_pvfs/$(DEPDIR) adio/ad_pvfs2/$(DEPDIR) adio/ad_sfs/$(DEPDIR) adio/ad_testfs/$(DEPDIR) adio/ad_ufs/$(DEPDIR) adio/ad_xfs/$(DEPDIR) adio/ad_zoidfs/$(DEPDIR) adio/common/$(DEPDIR) mpi-io/$(DEPDIR) mpi-io/glue/$(DEPDIR) mpi-io/glue/default/$(DEPDIR) mpi-io/glue/mpich/$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-hdr distclean-libtool distclean-tags @@ -3819,7 +3790,7 @@ installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache - -rm -rf adio/ad_gpfs/$(DEPDIR) adio/ad_gpfs/bg/$(DEPDIR) adio/ad_gpfs/pe/$(DEPDIR) adio/ad_gridftp/$(DEPDIR) adio/ad_hfs/$(DEPDIR) adio/ad_lustre/$(DEPDIR) adio/ad_nfs/$(DEPDIR) adio/ad_panfs/$(DEPDIR) adio/ad_pfs/$(DEPDIR) adio/ad_piofs/$(DEPDIR) adio/ad_pvfs/$(DEPDIR) adio/ad_pvfs2/$(DEPDIR) adio/ad_sfs/$(DEPDIR) adio/ad_testfs/$(DEPDIR) adio/ad_ufs/$(DEPDIR) adio/ad_xfs/$(DEPDIR) adio/ad_zoidfs/$(DEPDIR) adio/common/$(DEPDIR) mpi-io/$(DEPDIR) mpi-io/fortran/$(DEPDIR) mpi-io/glue/$(DEPDIR) mpi-io/glue/default/$(DEPDIR) mpi-io/glue/mpich/$(DEPDIR) + -rm -rf adio/ad_gpfs/$(DEPDIR) adio/ad_gpfs/bg/$(DEPDIR) adio/ad_gpfs/pe/$(DEPDIR) adio/ad_gridftp/$(DEPDIR) adio/ad_hfs/$(DEPDIR) adio/ad_lustre/$(DEPDIR) adio/ad_nfs/$(DEPDIR) adio/ad_panfs/$(DEPDIR) adio/ad_pfs/$(DEPDIR) adio/ad_piofs/$(DEPDIR) adio/ad_pvfs/$(DEPDIR) adio/ad_pvfs2/$(DEPDIR) adio/ad_sfs/$(DEPDIR) adio/ad_testfs/$(DEPDIR) adio/ad_ufs/$(DEPDIR) adio/ad_xfs/$(DEPDIR) adio/ad_zoidfs/$(DEPDIR) adio/common/$(DEPDIR) mpi-io/$(DEPDIR) mpi-io/glue/$(DEPDIR) mpi-io/glue/default/$(DEPDIR) mpi-io/glue/mpich/$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic diff --git a/src/libs/ck-libs/ampi/romio/mpi-io/fortran/Makefile.mk b/src/libs/ck-libs/ampi/romio/mpi-io/fortran/Makefile.mk index 08d9075a71..68761630aa 100644 --- a/src/libs/ck-libs/ampi/romio/mpi-io/fortran/Makefile.mk +++ b/src/libs/ck-libs/ampi/romio/mpi-io/fortran/Makefile.mk @@ -7,7 +7,7 @@ if BUILD_F77_BINDINGS -romio_mpi_sources += mpi-io/fortran/romio_fortran.c +# romio_mpi_sources += mpi-io/fortran/romio_fortran.c disabled_romio_mpi_sources = \ mpi-io/fortran/closef.c \ From 96af736fbcd3c559a6a347dec1b0e8330953f99f Mon Sep 17 00:00:00 2001 From: Evan Ramos Date: Sat, 22 Apr 2023 04:36:38 -0500 Subject: [PATCH 062/155] UCX: Fix warnings --- src/arch/ucx/machine-onesided.C | 10 +++++----- src/arch/ucx/machine.C | 4 ++-- src/arch/util/proc_management/simple_pmi/mpl.h | 4 ++-- src/arch/util/proc_management/simple_pmi/simple_pmi.C | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/arch/ucx/machine-onesided.C b/src/arch/ucx/machine-onesided.C index 480064dbd5..3dc8301088 100644 --- a/src/arch/ucx/machine-onesided.C +++ b/src/arch/ucx/machine-onesided.C @@ -29,7 +29,7 @@ inline void UcxMemMap(UcxRdmaInfo *info, void *ptr, int size) memcpy(info->packedRkey, rbuf, rkeySize); ucp_rkey_buffer_release(rbuf); - UCX_LOG(4, " key packed, size %ld, buf %p memh %d", + UCX_LOG(4, " key packed, size %ld, buf %p memh %p", rkeySize, info->packedRkey, info->memh); } @@ -79,7 +79,7 @@ void LrtsDeregisterMem(const void *ptr, void *info, int pe, unsigned short int m ucs_status_t status; UcxRdmaInfo *ucxInfo = (UcxRdmaInfo*)info; - UCX_LOG(4, " %p, PE %d, info %p, memh %d", ptr, pe, ucxInfo, ucxInfo->memh); + UCX_LOG(4, " %p, PE %d, info %p, memh %p", ptr, pe, ucxInfo, ucxInfo->memh); if ((mode != CMK_BUFFER_NOREG) && (ucxInfo->memh)) { status = ucp_mem_unmap(ucxCtx.context, ucxInfo->memh); @@ -96,7 +96,7 @@ void UcxRmaOp(NcpyOperationInfo *ncpyOpInfo, int op) ucp_rkey_h rkey; ucp_ep_h ep; - UCX_LOG(4, "RmaOp: op %d, (srcPE %d destPE %d) (srcSize %d destSize %d) dest rbuf %p, Smemh %d Dmemh %d", + UCX_LOG(4, "RmaOp: op %d, (srcPE %d destPE %d) (srcSize %zu destSize %zu) dest rbuf %p, Smemh %p Dmemh %p", op, ncpyOpInfo->srcPe, ncpyOpInfo->destPe, ncpyOpInfo->srcSize, ncpyOpInfo->destSize, dstInfo->packedRkey, srcInfo->memh, dstInfo->memh); @@ -163,7 +163,7 @@ void LrtsIssueRget(NcpyOperationInfo *ncpyOpInfo) ncpyOpInfo->ncpyOpInfoSize, (char*)ncpyOpInfo, UCX_RMA_TAG_REG_AND_SEND_BACK, UcxRmaSendCompleted); - UCX_LOG(4, "Sending PUT REQ to %d, mem size %d", ncpyOpInfo->srcPe,ncpyOpInfo->srcSize); + UCX_LOG(4, "Sending PUT REQ to %d, mem size %zu", ncpyOpInfo->srcPe,ncpyOpInfo->srcSize); } } @@ -177,7 +177,7 @@ void LrtsIssueRput(NcpyOperationInfo *ncpyOpInfo) UcxSendMsg(CmiNodeOf(ncpyOpInfo->destPe), ncpyOpInfo->destPe, ncpyOpInfo->ncpyOpInfoSize, (char*)ncpyOpInfo, UCX_RMA_TAG_GET, UcxRmaSendCompleted); - UCX_LOG(4, "Sending Get REQ to %d, mem size %d", ncpyOpInfo->destPe,ncpyOpInfo->srcSize); + UCX_LOG(4, "Sending Get REQ to %d, mem size %zu", ncpyOpInfo->destPe,ncpyOpInfo->srcSize); } void LrtsInvokeRemoteDeregAckHandler(int pe, NcpyOperationInfo *ncpyOpInfo) diff --git a/src/arch/ucx/machine.C b/src/arch/ucx/machine.C index a8da09cca7..c8bc798a34 100644 --- a/src/arch/ucx/machine.C +++ b/src/arch/ucx/machine.C @@ -442,7 +442,7 @@ static void UcxRxReqCompleted(void *request, ucs_status_t status, // Register the source buffer and send back to destination to perform GET NcpyOperationInfo *ncpyOpInfo = (NcpyOperationInfo *)(req->msgBuf); - UCX_LOG(4, "Got ncpy size %d (meta size %d)", ncpyOpInfo->srcSize, ncpyOpInfo->ncpyOpInfoSize); + UCX_LOG(4, "Got ncpy size %zu (meta size %d)", ncpyOpInfo->srcSize, ncpyOpInfo->ncpyOpInfoSize); resetNcpyOpInfoPointers(ncpyOpInfo); UcxRdmaInfo *info = (UcxRdmaInfo *)(ncpyOpInfo->srcLayerInfo + CmiGetRdmaCommonInfoSize()); @@ -454,7 +454,7 @@ static void UcxRxReqCompleted(void *request, ucs_status_t status, ncpyOpInfo->isSrcRegistered = 1; ncpyOpInfo->freeMe = CMK_FREE_NCPYOPINFO; // It's a message, not a realy ncpy Obj - UCX_LOG(4, "Reset ncpy size %d (meta size %d)", ncpyOpInfo->destSize, ncpyOpInfo->ncpyOpInfoSize); + UCX_LOG(4, "Reset ncpy size %zu (meta size %d)", ncpyOpInfo->destSize, ncpyOpInfo->ncpyOpInfoSize); // send back to destination process to perform GET UcxSendMsg(CmiNodeOf(ncpyOpInfo->destPe), ncpyOpInfo->destPe, diff --git a/src/arch/util/proc_management/simple_pmi/mpl.h b/src/arch/util/proc_management/simple_pmi/mpl.h index e6d220633d..bafd733370 100644 --- a/src/arch/util/proc_management/simple_pmi/mpl.h +++ b/src/arch/util/proc_management/simple_pmi/mpl.h @@ -72,7 +72,7 @@ static inline int MPL_strncpy(char *dest, const char *src, size_t n) { char *d_ptr = dest; const char *s_ptr = src; - register int i; + int i; if (n == 0) return 0; @@ -126,7 +126,7 @@ static inline int MPL_strnapp(char *dest, const char *src, size_t n) { char *d_ptr = dest; const char *s_ptr = src; - register int i; + int i; /* Get to the end of dest */ i = (int) n; diff --git a/src/arch/util/proc_management/simple_pmi/simple_pmi.C b/src/arch/util/proc_management/simple_pmi/simple_pmi.C index adcd9964a3..ab3187e621 100644 --- a/src/arch/util/proc_management/simple_pmi/simple_pmi.C +++ b/src/arch/util/proc_management/simple_pmi/simple_pmi.C @@ -786,7 +786,7 @@ static int PMII_getmaxes( int *kvsname_max, int *keylen_max, int *vallen_max ) PMIU_getval( "pmi_version", buf, PMIU_MAXLINE ); PMIU_getval( "pmi_subversion", buf1, PMIU_MAXLINE ); MPL_snprintf(errmsg, PMIU_MAXLINE, - "pmi_version mismatch; client=%d.%d mgr=%s.%s", + "pmi_version mismatch; client=%d.%d mgr=%s.%.960s", PMI_VERSION, PMI_SUBVERSION, buf, buf1 ); PMI_Abort( -1, errmsg ); } From 2dcaca47e731bc54fc5b18f3773e6b09b2815e1f Mon Sep 17 00:00:00 2001 From: Evan Ramos Date: Sat, 22 Apr 2023 05:35:48 -0500 Subject: [PATCH 063/155] charmxi: Avoid -Wnonnull warning in ZC Post API generated code --- src/xlat-i/xi-Parameter.C | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/xlat-i/xi-Parameter.C b/src/xlat-i/xi-Parameter.C index 74169d5c23..8611486859 100644 --- a/src/xlat-i/xi-Parameter.C +++ b/src/xlat-i/xi-Parameter.C @@ -765,6 +765,9 @@ void Parameter::copyFromPostedPtrs(XStr& str, bool isSDAGGen, bool device, int & str << " sizeof(" << dt << ") * "<< arrLen << ".t)\n"; str << " CkAbort(\"Size of the posted buffer > Size of the source buffer \");\n"; + str << " if(ncpyBuffer_" << name << "_ptr == nullptr)\n"; + str << " CkAbort(\"Post Entry Method either doesn't call CkMatchBuffer or doesn't post the buffer by initializing the reference to the pointer for " << name << "\");\n"; + str << " memcpy(" << "ncpyBuffer_" << name << "_ptr,"; if(isSDAGGen) str << "genClosure->"; @@ -797,7 +800,7 @@ void Parameter::storePostedRdmaPtrs(XStr& str, bool isSDAGGen, bool device, int if (hostPath) { str << " if(ncpyBuffer_" << name << "_ptr == nullptr)\n"; - str << " CkAbort(\"Post Entry Method either doesn't call CkMatchBuffer or doesn't post the buffer by initializing the reference to the pointer for " << name << " \");\n"; + str << " CkAbort(\"Post Entry Method either doesn't call CkMatchBuffer or doesn't post the buffer by initializing the reference to the pointer for " << name << "\");\n"; str << " buffPtrs[" << count << "] = (void *)" << "ncpyBuffer_"; str << name << "_ptr;\n"; if(isSDAGGen) From 1eba105ee07f5c0656b61c80a909df2bdf80542c Mon Sep 17 00:00:00 2001 From: Evan Ramos Date: Sat, 22 Apr 2023 05:38:17 -0500 Subject: [PATCH 064/155] ZC Post API Tests: Ensure buffer pointer is used in host receive methods --- .../bcast_subset_async/bcast_subset_async.C | 8 +++---- .../bcast_subset_async/zc_post_async.C | 8 +++---- .../post_and_match/post_and_match.C | 8 +++---- .../zc_post_modify_size/zc_post_modify_size.C | 24 +++++++++---------- 4 files changed, 24 insertions(+), 24 deletions(-) diff --git a/tests/charm++/zerocopy/zc_post_async/bcast_subset_async/bcast_subset_async.C b/tests/charm++/zerocopy/zc_post_async/bcast_subset_async/bcast_subset_async.C index ae984014a4..9477f4f60c 100644 --- a/tests/charm++/zerocopy/zc_post_async/bcast_subset_async/bcast_subset_async.C +++ b/tests/charm++/zerocopy/zc_post_async/bcast_subset_async/bcast_subset_async.C @@ -119,7 +119,7 @@ class arr : public CBase_arr { void recv_zerocopy(int *buffer, size_t size) { CkAssert(size == SIZE); - verifyValuesWithConstant(destBuffer, SIZE, CONSTANT); + verifyValuesWithConstant(buffer, SIZE, CONSTANT); CkCallback doneCb = CkCallback(CkReductionTarget(tester, bcastDone), chareProxy); contribute(doneCb); @@ -172,9 +172,9 @@ class grp : public CBase_grp { void recv_zerocopy(int *buffer1, size_t size1, int *buffer2, size_t size2) { CkAssert(size1 == SIZE); - verifyValuesWithConstant(destBuffer1, SIZE, CONSTANT); + verifyValuesWithConstant(buffer1, SIZE, CONSTANT); CkAssert(size2 == SIZE); - verifyValuesWithConstant(destBuffer2, SIZE, CONSTANT); + verifyValuesWithConstant(buffer2, SIZE, CONSTANT); CkCallback doneCb = CkCallback(CkReductionTarget(tester, bcastDone), chareProxy); contribute(doneCb); @@ -219,7 +219,7 @@ class nodegrp : public CBase_nodegrp { void recv_zerocopy(int *buffer, size_t size) { CkAssert(size == SIZE); - verifyValuesWithConstant(destBuffer, SIZE, CONSTANT); + verifyValuesWithConstant(buffer, SIZE, CONSTANT); CkCallback doneCb = CkCallback(CkReductionTarget(tester, bcastDone), chareProxy); contribute(doneCb); diff --git a/tests/charm++/zerocopy/zc_post_async/bcast_subset_async/zc_post_async.C b/tests/charm++/zerocopy/zc_post_async/bcast_subset_async/zc_post_async.C index 060982e512..9888e0f92d 100644 --- a/tests/charm++/zerocopy/zc_post_async/bcast_subset_async/zc_post_async.C +++ b/tests/charm++/zerocopy/zc_post_async/bcast_subset_async/zc_post_async.C @@ -118,7 +118,7 @@ class arr : public CBase_arr { } void recv_zerocopy(int *buffer, size_t size) { - verifyValuesWithConstant(destBuffer, SIZE, CONSTANT); + verifyValuesWithConstant(buffer, SIZE, CONSTANT); CkCallback doneCb = CkCallback(CkReductionTarget(tester, bcastDone), chareProxy); contribute(doneCb); @@ -170,8 +170,8 @@ class grp : public CBase_grp { } void recv_zerocopy(int *buffer1, size_t size1, int *buffer2, size_t size2) { - verifyValuesWithConstant(destBuffer1, SIZE, CONSTANT); - verifyValuesWithConstant(destBuffer2, SIZE, CONSTANT); + verifyValuesWithConstant(buffer1, SIZE, CONSTANT); + verifyValuesWithConstant(buffer2, SIZE, CONSTANT); CkCallback doneCb = CkCallback(CkReductionTarget(tester, bcastDone), chareProxy); contribute(doneCb); @@ -215,7 +215,7 @@ class nodegrp : public CBase_nodegrp { } void recv_zerocopy(int *buffer, size_t size) { - verifyValuesWithConstant(destBuffer, SIZE, CONSTANT); + verifyValuesWithConstant(buffer, SIZE, CONSTANT); CkCallback doneCb = CkCallback(CkReductionTarget(tester, bcastDone), chareProxy); contribute(doneCb); diff --git a/tests/charm++/zerocopy/zc_post_async/post_and_match/post_and_match.C b/tests/charm++/zerocopy/zc_post_async/post_and_match/post_and_match.C index 24acef5e50..c917bf7fff 100644 --- a/tests/charm++/zerocopy/zc_post_async/post_and_match/post_and_match.C +++ b/tests/charm++/zerocopy/zc_post_async/post_and_match/post_and_match.C @@ -135,7 +135,7 @@ class arr : public CBase_arr { void recv_zerocopy(int *buffer, size_t size, bool isBcast) { CkAssert(size == SIZE); - verifyValuesWithConstant(destBuffer, SIZE, CONSTANT); + verifyValuesWithConstant(buffer, SIZE, CONSTANT); if(isBcast) { CkCallback doneCb = CkCallback(CkReductionTarget(tester, bcastDone), chareProxy); @@ -193,9 +193,9 @@ class grp : public CBase_grp { void recv_zerocopy(int *buffer1, size_t size1, int *buffer2, size_t size2, bool isBcast ) { CkAssert(size1 == SIZE); - verifyValuesWithConstant(destBuffer1, SIZE, CONSTANT); + verifyValuesWithConstant(buffer1, SIZE, CONSTANT); CkAssert(size2 == SIZE); - verifyValuesWithConstant(destBuffer2, SIZE, CONSTANT); + verifyValuesWithConstant(buffer2, SIZE, CONSTANT); if(isBcast) { CkCallback doneCb = CkCallback(CkReductionTarget(tester, bcastDone), chareProxy); @@ -248,7 +248,7 @@ class nodegrp : public CBase_nodegrp { void recv_zerocopy(int *buffer, size_t size, bool isBcast) { CkAssert(size == SIZE); - verifyValuesWithConstant(destBuffer, SIZE, CONSTANT); + verifyValuesWithConstant(buffer, SIZE, CONSTANT); if(isBcast) { CkCallback doneCb = CkCallback(CkReductionTarget(tester, bcastDone), chareProxy); diff --git a/tests/charm++/zerocopy/zc_post_modify_size/zc_post_modify_size.C b/tests/charm++/zerocopy/zc_post_modify_size/zc_post_modify_size.C index ac7bbecc4a..ac70ffa1f5 100644 --- a/tests/charm++/zerocopy/zc_post_modify_size/zc_post_modify_size.C +++ b/tests/charm++/zerocopy/zc_post_modify_size/zc_post_modify_size.C @@ -92,16 +92,16 @@ class arr : public CBase_arr { void recv_zerocopy(int *buffer, size_t size, bool isBcast) { if(isBcast) { - verifyValuesWithConstant(destBuffer, SIZE/2, CONSTANT); - verifyValuesWithIndex(destBuffer, SIZE, SIZE/2); + verifyValuesWithConstant(buffer, SIZE/2, CONSTANT); + verifyValuesWithIndex(buffer, SIZE, SIZE/2); CkCallback doneCb = CkCallback(CkReductionTarget(tester, bcastDone), chareProxy); contribute(doneCb); delete [] destBuffer; } else { - verifyValuesWithConstant(destBuffer, SIZE/4, CONSTANT); - verifyValuesWithIndex(destBuffer, SIZE, SIZE/4); + verifyValuesWithConstant(buffer, SIZE/4, CONSTANT); + verifyValuesWithIndex(buffer, SIZE, SIZE/4); chareProxy.p2pDone(); } @@ -128,16 +128,16 @@ class grp : public CBase_grp { void recv_zerocopy(int *buffer, size_t size, bool isBcast) { if(isBcast) { - verifyValuesWithConstant(destBuffer, SIZE/2, CONSTANT); - verifyValuesWithIndex(destBuffer, SIZE, SIZE/2); + verifyValuesWithConstant(buffer, SIZE/2, CONSTANT); + verifyValuesWithIndex(buffer, SIZE, SIZE/2); CkCallback doneCb = CkCallback(CkReductionTarget(tester, bcastDone), chareProxy); contribute(doneCb); delete [] destBuffer; } else { - verifyValuesWithConstant(destBuffer, SIZE/4, CONSTANT); - verifyValuesWithIndex(destBuffer, SIZE, SIZE/4); + verifyValuesWithConstant(buffer, SIZE/4, CONSTANT); + verifyValuesWithIndex(buffer, SIZE, SIZE/4); chareProxy.p2pDone(); } @@ -152,7 +152,7 @@ class nodegrp : public CBase_nodegrp { assignValuesToIndex(destBuffer, SIZE/2); } - void recv_zerocopy(int *buffer, size_t &size, bool isBcast, CkNcpyBufferPost *ncpyPost) { + void recv_zerocopy(int *buffer, size_t size, bool isBcast, CkNcpyBufferPost *ncpyPost) { CkMatchBuffer(ncpyPost, 0, arrSize + CkNumPes() + thisIndex); if(isBcast) { @@ -164,15 +164,15 @@ class nodegrp : public CBase_nodegrp { void recv_zerocopy(int *buffer, size_t size, bool isBcast) { if(isBcast) { - verifyValuesWithConstant(destBuffer, SIZE/2, CONSTANT); + verifyValuesWithConstant(buffer, SIZE/2, CONSTANT); CkCallback doneCb = CkCallback(CkReductionTarget(tester, bcastDone), chareProxy); contribute(doneCb); delete [] destBuffer; } else { - verifyValuesWithConstant(destBuffer, SIZE/4, CONSTANT); - verifyValuesWithIndex(destBuffer, SIZE/2, SIZE/4); + verifyValuesWithConstant(buffer, SIZE/4, CONSTANT); + verifyValuesWithIndex(buffer, SIZE/2, SIZE/4); chareProxy.p2pDone(); } From acb4d9f18c3ee804e24318cd15948f6ac9070949 Mon Sep 17 00:00:00 2001 From: Evan Ramos Date: Sat, 22 Apr 2023 05:39:25 -0500 Subject: [PATCH 065/155] periodic_lb_broadcast_test: Reduce from ckJustMigrated(), not pup() --- .../load_balancing/periodic_lb_broadcast_test/ping.C | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tests/charm++/load_balancing/periodic_lb_broadcast_test/ping.C b/tests/charm++/load_balancing/periodic_lb_broadcast_test/ping.C index 49fd56141f..db57e8d8dd 100644 --- a/tests/charm++/load_balancing/periodic_lb_broadcast_test/ping.C +++ b/tests/charm++/load_balancing/periodic_lb_broadcast_test/ping.C @@ -159,11 +159,12 @@ public: p | pings; p | migrations; p | initialProc; - if (p.isUnpacking()) - { - ++migrations; - contribute(CkCallback(CkReductionTarget(Main, migrated), mainProxy)); - } + } + + void ckJustMigrated() + { + ++migrations; + contribute(CkCallback(CkReductionTarget(Main, migrated), mainProxy)); } }; From eec3eeec756e2b500c88a81c035fd70a09177e62 Mon Sep 17 00:00:00 2001 From: Evan Ramos Date: Sat, 22 Apr 2023 06:37:54 -0500 Subject: [PATCH 066/155] AMPI/fsglobals: Prefer using posix_spawn to copy files instead of fork Avoids the following error on OFI: A process has executed an operation involving a call to the fork() system call to create a child process. As a result, the libfabric EFA provider is operating in a condition that could result in memory corruption or other system errors. For the libfabric EFA provider to work safely when fork() is called, you will need to set the following environment variable: RDMAV_FORK_SAFE However, setting this environment variable can result in signficant performance impact to your application due to increased cost of memory registration. You may want to check with your application vendor to see if an application-level alternative (of not using fork) exists. Your job will now abort. --- src/libs/ck-libs/ampi/ampi_globals_fs.C | 34 +++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/src/libs/ck-libs/ampi/ampi_globals_fs.C b/src/libs/ck-libs/ampi/ampi_globals_fs.C index 909e0a4971..ce7a2aaeca 100644 --- a/src/libs/ck-libs/ampi/ampi_globals_fs.C +++ b/src/libs/ck-libs/ampi/ampi_globals_fs.C @@ -23,6 +23,13 @@ # include # include # include +# if CMK_HAS_POSIX_SPAWN +# ifndef _GNU_SOURCE +# define _GNU_SOURCE +# endif +# include +extern char **environ; +# endif #endif #include @@ -47,12 +54,34 @@ static void fs_copy(const char * src, const char * dst) CkError("ERROR> copyfile(): %d %s\n", ret, strerror(errno)); CkAbort(abortmsg); } +#else + const char * const params[] = { "/bin/cp", src, dst, nullptr }; +#if CMK_HAS_POSIX_SPAWN + posix_spawnattr_t attr; + short flags; + posix_spawnattr_init(&attr); + posix_spawnattr_getflags(&attr, &flags); +#ifdef POSIX_SPAWN_USEVFORK + flags |= POSIX_SPAWN_USEVFORK; +#endif + posix_spawnattr_setflags(&attr, flags); + + pid_t pid; + int ret = posix_spawn(&pid, params[0], nullptr, &attr, const_cast(params), environ); + + posix_spawnattr_destroy(&attr); + + if (ret != 0) + { + CkError("ERROR> posix_spawn(): %s\n", strerror(ret)); + CkAbort(abortmsg); + } #else pid_t pid = fork(); if (pid == 0) { - execl("/bin/cp", "/bin/cp", src, dst, nullptr); - CkError("ERROR> execl(): %s\n", strerror(errno)); + execv(params[0], const_cast(params)); + CkError("ERROR> execv(): %s\n", strerror(errno)); CkAbort(abortmsg); } else if (pid < 0) @@ -60,6 +89,7 @@ static void fs_copy(const char * src, const char * dst) CkError("ERROR> fork(): %s\n", strerror(errno)); CkAbort(abortmsg); } +#endif else { int status; From d213c90ef9f6ede095326ae35e70b61764e1c546 Mon Sep 17 00:00:00 2001 From: Evan Ramos Date: Sat, 22 Apr 2023 06:49:16 -0500 Subject: [PATCH 067/155] CUDA: Fix minor issues with build --- benchmarks/charm++/cuda/Makefile | 2 +- src/ck-core/ckmemcheckpoint.C | 2 +- src/libs/ck-libs/ampi/ampi.C | 4 ++++ src/util/charmrun-src/charmrun.C | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/benchmarks/charm++/cuda/Makefile b/benchmarks/charm++/cuda/Makefile index 4ff07b8eec..2d7664eacc 100644 --- a/benchmarks/charm++/cuda/Makefile +++ b/benchmarks/charm++/cuda/Makefile @@ -1,5 +1,5 @@ DIRS = \ - direct \ + gpudirect \ TESTDIRS = $(DIRS) diff --git a/src/ck-core/ckmemcheckpoint.C b/src/ck-core/ckmemcheckpoint.C index b654e114d9..b691fca2e3 100644 --- a/src/ck-core/ckmemcheckpoint.C +++ b/src/ck-core/ckmemcheckpoint.C @@ -109,7 +109,7 @@ static bool checkpointed = false; // name of the kill file that contains processes to be killed char *killFile; // flag for the kill file -int killFlag=0; +bool killFlag; // variable for storing the killing time double killTime=0.0; #endif diff --git a/src/libs/ck-libs/ampi/ampi.C b/src/libs/ck-libs/ampi/ampi.C index be675077e2..9b05672871 100644 --- a/src/libs/ck-libs/ampi/ampi.C +++ b/src/libs/ck-libs/ampi/ampi.C @@ -11709,6 +11709,8 @@ int AMPI_GPU_Iinvoke_wr(hapiWorkRequest *to_call, MPI_Request *request) CkCallback cb(&I_GPU_complete, newreq); hapiWorkRequestSetCallback(to_call, &cb); hapiEnqueue(to_call); + + return MPI_SUCCESS; } /* Submit GPU request that will be notified of completion once the previous @@ -11725,6 +11727,8 @@ int AMPI_GPU_Iinvoke(cudaStream_t stream, MPI_Request *request) // A callback that completes the corresponding request CkCallback cb(&I_GPU_complete, newreq); hapiAddCallback(stream, &cb, nullptr); + + return MPI_SUCCESS; } CLINKAGE diff --git a/src/util/charmrun-src/charmrun.C b/src/util/charmrun-src/charmrun.C index 0818249bea..d6c621b946 100644 --- a/src/util/charmrun-src/charmrun.C +++ b/src/util/charmrun-src/charmrun.C @@ -5631,7 +5631,7 @@ struct local_nodestart { if (arg_verbose) printf("Charmrun> start %d node program on localhost.\n", p.nodeno); - snprintf(envp[envc], envLen, "NETSTART=%s", create_netstart(p.nodeno)); + snprintf(envp[envc], envLen, "NETSTART=%.240s", create_netstart(p.nodeno)); snprintf(envp[envc + 1], envLen, "CmiNumNodes=%d", 0); #if CMK_HAS_POSIX_SPAWN From 18b6b91be943b29439dd6fd4b7a717e3adc8647b Mon Sep 17 00:00:00 2001 From: Evan Ramos Date: Sat, 22 Apr 2023 08:10:51 -0500 Subject: [PATCH 068/155] ZC Post API: Fix data races in CkPostNodeBufferInternal --- src/ck-core/ckrdma.C | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ck-core/ckrdma.C b/src/ck-core/ckrdma.C index 3729ef4e7c..e1159b496d 100644 --- a/src/ck-core/ckrdma.C +++ b/src/ck-core/ckrdma.C @@ -2064,11 +2064,15 @@ void CkPostBufferInternal(void *destBuffer, size_t destSize, int tag) { void CkPostNodeBufferInternal(void *destBuffer, size_t destSize, int tag) { // check if tag exists in posted req node table + CmiLock(CksvAccess(_nodeZCPostReqLock)); auto iter = CksvAccess(ncpyPostedReqNodeMap).find(tag); + CmiUnlock(CksvAccess(_nodeZCPostReqLock)); if(iter == CksvAccess(ncpyPostedReqNodeMap).end()) { + CmiLock(CksvAccess(_nodeZCBufferReqLock)); auto iter2 = CksvAccess(ncpyPostedBufferNodeMap).find(tag); + CmiUnlock(CksvAccess(_nodeZCBufferReqLock)); if(iter2 == CksvAccess(ncpyPostedBufferNodeMap).end()) { // not found, insert into ncpyPostedBufferNodeMap CkPostedBuffer postedBuff; From efbd774b7a543581374937283cbf59586bb47f66 Mon Sep 17 00:00:00 2001 From: Evan Ramos Date: Sun, 23 Apr 2023 01:58:33 -0500 Subject: [PATCH 069/155] AMPI/swapglobals: Fix macro used to check for 64-bit build types Fixes warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] --- src/conv-core/global-elfgot.C | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/conv-core/global-elfgot.C b/src/conv-core/global-elfgot.C index 9a55422913..823a555c12 100644 --- a/src/conv-core/global-elfgot.C +++ b/src/conv-core/global-elfgot.C @@ -80,7 +80,7 @@ A more readable summary is at: CpvDeclare(int, CmiPICMethod); -#if CMK_AMD64 +#if CMK_64BIT typedef Elf64_Addr ELFXX_TYPE_Addr; typedef Elf64_Dyn ELFXX_TYPE_Dyn; typedef Elf64_Rela ELFXX_TYPE_Rel; From 88bc27ad767e04b4aa37e964e8373bde28abd150 Mon Sep 17 00:00:00 2001 From: Evan Ramos Date: Sun, 23 Apr 2023 16:47:40 -0500 Subject: [PATCH 070/155] examples: Remove non-working #pragma unroll statements These give the following message: warning: loop not unrolled: the optimizer was unable to perform the requested transformation; the transformation might be disabled or specified as part of an unsupported transformation ordering [-Wpass-failed=transform-warning] --- examples/charm++/load_balancing/stencil3d/stencil3d.C | 3 --- .../zerocopy/entry_method_api/prereg/stencil3d/stencil3d.C | 3 --- .../zerocopy/entry_method_api/reg/stencil3d/stencil3d.C | 3 --- .../zerocopy/entry_method_api/unreg/stencil3d/stencil3d.C | 3 --- 4 files changed, 12 deletions(-) diff --git a/examples/charm++/load_balancing/stencil3d/stencil3d.C b/examples/charm++/load_balancing/stencil3d/stencil3d.C index 8dbe8e8347..590a5028d9 100644 --- a/examples/charm++/load_balancing/stencil3d/stencil3d.C +++ b/examples/charm++/load_balancing/stencil3d/stencil3d.C @@ -323,9 +323,6 @@ class Stencil: public CBase_Stencil { } else work = 10.0; -#ifndef _MSC_VER -#pragma unroll -#endif for(int w=0; w Date: Sun, 23 Apr 2023 17:59:15 -0500 Subject: [PATCH 071/155] CMake: Avoid unconditional rebuilds during partial rebuilds --- benchmarks/ampi/pingpong/Makefile | 22 ++++++++++++---------- cmake/ci-files.cmake | 13 +++++++++++++ 2 files changed, 25 insertions(+), 10 deletions(-) mode change 100644 => 100755 benchmarks/ampi/pingpong/Makefile diff --git a/benchmarks/ampi/pingpong/Makefile b/benchmarks/ampi/pingpong/Makefile old mode 100644 new mode 100755 index 53dfd10c95..9e6b7f805e --- a/benchmarks/ampi/pingpong/Makefile +++ b/benchmarks/ampi/pingpong/Makefile @@ -5,17 +5,19 @@ MPIOPTS=-O3 CHARMC=../../../bin/ampicxx $(OPTS) MPICC=mpicc $(MPIOPTS) # Should use 'cc' instead of 'mpicc' on Cray systems -#all : pingpong-2way.c -# $(CHARMC) pingpong-2way.c -o pingpong -# $(MPICC) pingpong-2way.c -o pingpong-mpi +all: pingpong -all : pingpong-1way.c - $(CHARMC) pingpong-1way.c -o pingpong -# $(MPICC) pingpong-1way.c -o pingpong-mpi +pingpong: pingpong-1way.c + $(CHARMC) $^ -o $@ +# $(MPICC) $^ -o $@-mpi -pipe: pingpong-pipeline.c - $(CHARMC) pingpong-pipeline.c -o pingpong-pipe - $(MPICC) pingpong-pipeline.c -o pingpong-pipe-mpi +pongpong-2way: pingpong-2way.c + $(CHARMC) $^ -o $@ +# $(MPICC) $^ -o $@-mpi + +pingpong-pipeline: pingpong-pipeline.c + $(CHARMC) $^ -o $@ +# $(MPICC) $^ -o $@-mpi test: all $(call run, +p1 ./pingpong 16 1048576 100 10 1 +vp2) @@ -34,5 +36,5 @@ ifeq ($(CMK_USE_CMA),1) endif clean: - rm -rf charmrun conv-host moduleinit* *.o pingpong pingpong pingpong-mpi pingpong-pipe pingpong-pipe-mpi *~ *.sts core ampirun + rm -rf charmrun conv-host moduleinit* *.o pingpong pingpong-mpi pingpong-2way pingpong-2way-mpi pingpong-pipeline pingpong-pipeline-mpi *~ *.sts core ampirun diff --git a/cmake/ci-files.cmake b/cmake/ci-files.cmake index 72237a8319..054023edd0 100644 --- a/cmake/ci-files.cmake +++ b/cmake/ci-files.cmake @@ -44,6 +44,10 @@ foreach(in_f ${ci-files}) set(ci-output ControlPointsNoTrace.decl.h) elseif(${in_f} MATCHES src/ck-core/mpi-mainmodule.ci) set(ci-output mpi_main.decl.h) + elseif(${in_f} MATCHES src/libs/ck-libs/sparseContiguousReducer/cksparsecontiguousreducer.ci) + set(ci-output CkSparseContiguousReducer.decl.h) + elseif(${in_f} MATCHES src/libs/ck-libs/sparseReducer/cksparsereducer.ci) + set(ci-output CkSparseReducer.decl.h) elseif(${in_f} MATCHES src/libs/ck-libs/multiphaseSharedArrays/msa-DistPageMgr.ci) set(ci-output msa.decl.h) elseif(${in_f} MATCHES src/libs/ck-libs/pythonCCS/charmdebug-python.ci) @@ -70,6 +74,9 @@ foreach(in_f ${ci-files}) set(ci-output TMR_Interface.decl.h) elseif(${in_f} MATCHES src/libs/ck-libs/pmaf/chunk.ci) set(ci-output PMAF.decl.h) + elseif(${in_f} MATCHES src/libs/ck-libs/pmaf/pgm.ci) + # set(ci-output Pgm.decl.h) # disabled ; should be renamed ; not needed during LIBS build + continue() elseif(${in_f} MATCHES src/ck-perf/trace-Tau.ci) set(ci-output TraceTau.decl.h) elseif(${in_f} MATCHES src/ck-perf/trace-summary.ci) @@ -84,6 +91,12 @@ foreach(in_f ${ci-files}) else() # ci filename equal to module name get_filename_component(ci-output ${in_f} NAME_WE) + + # avoid ._* files on macOS: + if(ci-output STREQUAL "") + continue() + endif() + string(APPEND ci-output ".decl.h") endif() From 850300aaf5a04bc7d3b851afaf9c50b8f18b1f1e Mon Sep 17 00:00:00 2001 From: Evan Ramos Date: Sun, 23 Apr 2023 23:44:58 -0500 Subject: [PATCH 072/155] AMPI/ROMIO: Disable spurious warnings during configure step --- src/libs/ck-libs/ampi/romio/README.AMPI | 3 ++ .../ck-libs/ampi/romio/confdb/aclocal_make.m4 | 50 ------------------- src/libs/ck-libs/ampi/romio/configure | 46 +---------------- src/libs/ck-libs/ampi/romio/configure.ac | 4 +- 4 files changed, 7 insertions(+), 96 deletions(-) diff --git a/src/libs/ck-libs/ampi/romio/README.AMPI b/src/libs/ck-libs/ampi/romio/README.AMPI index bbe5ec626b..8222dae666 100644 --- a/src/libs/ck-libs/ampi/romio/README.AMPI +++ b/src/libs/ck-libs/ampi/romio/README.AMPI @@ -10,6 +10,9 @@ ROMIO integrated into AMPI: * Configure tests that build MPI executables have been changed to only compile object files, breaking a circular dependency between ROMIO and the rest of AMPI. See confdb/aclocal_romio.m4. +* The "Your make does not allow comments in target code" and "File locks may + not work with NFS" warnings generated during the configure step have been + disabled as being spurious. * Used MPI_Info_* calls from AMPI, and darray calls from ROMIO. * Set -DHAVE_STATUS_SET_BYTES in configure and configure.in, and add status setting call in adio/common/status_setb.c diff --git a/src/libs/ck-libs/ampi/romio/confdb/aclocal_make.m4 b/src/libs/ck-libs/ampi/romio/confdb/aclocal_make.m4 index 147e92e9c2..bce9d1987e 100644 --- a/src/libs/ck-libs/ampi/romio/confdb/aclocal_make.m4 +++ b/src/libs/ck-libs/ampi/romio/confdb/aclocal_make.m4 @@ -71,55 +71,6 @@ else fi ])dnl -dnl/*D -dnl PAC_PROG_MAKE_ALLOWS_COMMENTS - Check whether comments are allowed in -dnl shell commands in a makefile -dnl -dnl Synopsis: -dnl PAC_PROG_MAKE_ALLOWS_COMMENTS([false text]) -dnl -dnl Output Effect: -dnl Issues a warning message if comments are not allowed in a makefile. -dnl Executes the argument if one is given. -dnl -dnl Notes: -dnl Some versions of OSF V3 make do not all comments in action commands. -dnl -dnl See Also: -dnl PAC_PROG_MAKE -dnl D*/ -dnl -AC_DEFUN([PAC_PROG_MAKE_ALLOWS_COMMENTS],[ -AC_CACHE_CHECK([whether make allows comments in actions], -pac_cv_prog_make_allows_comments,[ -AC_REQUIRE([PAC_PROG_MAKE_PROGRAM]) -# This is needed for Mac OSX 10.5 -rm -rf conftest.dSYM -rm -f conftest -cat > conftest <<. -SHELL=/bin/sh -ALL: - @# This is a valid comment! - @echo "success" -. -pac_str=`$MAKE -f conftest 2>&1` -# This is needed for Mac OSX 10.5 -rm -rf conftest.dSYM -rm -f conftest -if test "$pac_str" != "success" ; then - pac_cv_prog_make_allows_comments="no" -else - pac_cv_prog_make_allows_comments="yes" -fi -]) -if test "$pac_cv_prog_make_allows_comments" = "no" ; then - AC_MSG_WARN([Your make does not allow comments in target code. -Using this make may cause problems when building programs. -You should consider using gnumake instead.]) - ifelse([$1],,[$1]) -fi -])dnl - dnl/*D dnl PAC_PROG_MAKE_VPATH - Check whether make supports source-code paths. dnl @@ -302,7 +253,6 @@ AC_DEFUN([PAC_PROG_MAKE],[ PAC_PROG_MAKE_PROGRAM PAC_PROG_MAKE_CLOCK_SKEW PAC_PROG_MAKE_INCLUDE -PAC_PROG_MAKE_ALLOWS_COMMENTS PAC_PROG_MAKE_VPATH AC_SUBST(SET_CFLAGS) dnl AM_IGNORE(SET_CFLAGS) diff --git a/src/libs/ck-libs/ampi/romio/configure b/src/libs/ck-libs/ampi/romio/configure index b8f0ae39cc..6c2f5136c6 100755 --- a/src/libs/ck-libs/ampi/romio/configure +++ b/src/libs/ck-libs/ampi/romio/configure @@ -13028,46 +13028,6 @@ else fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether make allows comments in actions" >&5 -$as_echo_n "checking whether make allows comments in actions... " >&6; } -if ${pac_cv_prog_make_allows_comments+:} false; then : - $as_echo_n "(cached) " >&6 -else - - -# This is needed for Mac OSX 10.5 -rm -rf conftest.dSYM -rm -f conftest -cat > conftest <<. -SHELL=/bin/sh -ALL: - @# This is a valid comment! - @echo "success" -. -pac_str=`$MAKE -f conftest 2>&1` -# This is needed for Mac OSX 10.5 -rm -rf conftest.dSYM -rm -f conftest -if test "$pac_str" != "success" ; then - pac_cv_prog_make_allows_comments="no" -else - pac_cv_prog_make_allows_comments="yes" -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_cv_prog_make_allows_comments" >&5 -$as_echo "$pac_cv_prog_make_allows_comments" >&6; } -if test "$pac_cv_prog_make_allows_comments" = "no" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your make does not allow comments in target code. -Using this make may cause problems when building programs. -You should consider using gnumake instead." >&5 -$as_echo "$as_me: WARNING: Your make does not allow comments in target code. -Using this make may cause problems when building programs. -You should consider using gnumake instead." >&2;} - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for virtual path format" >&5 $as_echo_n "checking for virtual path format... " >&6; } @@ -22049,10 +22009,8 @@ if test -n "$file_system_nfs" ; then $as_echo "#define ROMIO_NFS 1" >>confdefs.h - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: File locks may not work with NFS. See the Installation and -users manual for instructions on testing and if necessary fixing this" >&5 -$as_echo "$as_me: WARNING: File locks may not work with NFS. See the Installation and -users manual for instructions on testing and if necessary fixing this" >&2;} +# AC_MSG_WARN([File locks may not work with NFS. See the Installation and +# users manual for instructions on testing and if necessary fixing this]) fi if test -n "$file_system_panfs"; then diff --git a/src/libs/ck-libs/ampi/romio/configure.ac b/src/libs/ck-libs/ampi/romio/configure.ac index 08cce532cb..1747e5b7a5 100644 --- a/src/libs/ck-libs/ampi/romio/configure.ac +++ b/src/libs/ck-libs/ampi/romio/configure.ac @@ -781,8 +781,8 @@ AC_MSG_RESULT([$FILE_SYSTEM]) if test -n "$file_system_nfs" ; then AC_DEFINE(ROMIO_NFS,1,[Define for ROMIO with NFS]) - AC_MSG_WARN([File locks may not work with NFS. See the Installation and -users manual for instructions on testing and if necessary fixing this]) +# AC_MSG_WARN([File locks may not work with NFS. See the Installation and +# users manual for instructions on testing and if necessary fixing this]) fi if test -n "$file_system_panfs"; then From 9b6d01348f94ad0a6d97f5b4e9ad0f3b2ca05ccf Mon Sep 17 00:00:00 2001 From: Sam White Date: Tue, 25 Apr 2023 13:37:16 -0500 Subject: [PATCH 073/155] CcdCallbacks: track timer-based cond callbacks properly --- src/conv-core/conv-conds.C | 57 +++++++++++------ src/conv-core/converse.h | 61 +++++++++++-------- tests/charm++/Makefile | 1 + tests/charm++/periodic/Makefile | 25 ++++++++ tests/charm++/periodic/periodic.C | 98 ++++++++++++++++++++++++++++++ tests/charm++/periodic/periodic.ci | 15 +++++ 6 files changed, 212 insertions(+), 45 deletions(-) create mode 100644 tests/charm++/periodic/Makefile create mode 100644 tests/charm++/periodic/periodic.C create mode 100644 tests/charm++/periodic/periodic.ci diff --git a/src/conv-core/conv-conds.C b/src/conv-core/conv-conds.C index d30af38bc7..c52c72474d 100644 --- a/src/conv-core/conv-conds.C +++ b/src/conv-core/conv-conds.C @@ -53,6 +53,16 @@ typedef struct _ccd_cblist { } ccd_cblist; +/*Make sure this matches the CcdPERIODIC_* list in converse.h*/ +#define CCD_PERIODIC_MAX (CcdPERIODIC_LAST - CcdPERIODIC_FIRST) +const static double periodicCallInterval[CCD_PERIODIC_MAX]= +{0.001, 0.010, 0.100, 1.0, 5.0, 10.0, 60.0, 2*60.0, 5*60.0, 10*60.0, 3600.0, 12*3600.0, 24*3600.0}; + +/* Cond callbacks that use the above time intervals for their condition are considered "timed" */ +static bool isTimed(int condnum) { + return (condnum >= CcdPERIODIC_FIRST && condnum < CcdPERIODIC_LAST); +} + /** Initialize a list of callbacks. Alloc memory, set counters etc. */ static void init_cblist(ccd_cblist *l, unsigned int ml) @@ -97,7 +107,7 @@ static void expand_cblist(ccd_cblist *l, unsigned int ml) /** Remove element referred to by given list index idx. */ -static void remove_elem(ccd_cblist *l, int idx) +static void remove_elem(ccd_cblist *l, int condnum, int idx) { ccd_cblist_elem *e = l->elems; /* remove lidx from the busy list */ @@ -116,25 +126,26 @@ static void remove_elem(ccd_cblist *l, int idx) e[e[idx].next].prev = idx; l->first_free = idx; l->len--; + if (isTimed(condnum)) CpvAccess(_ccd_num_timed_cond_cbs)--; } /** Remove n elements from the beginning of the list. */ -static void remove_n_elems(ccd_cblist *l, int n) +static void remove_n_elems(ccd_cblist *l, int condnum, int n) { int i; if(n==0 || (l->len < n)) return; for(i=0;ifirst); + remove_elem(l, condnum, l->first); } } /** Append callback to the given cblist, and return the index. */ -static int append_elem(ccd_cblist *l, CcdCondFn fn, void *arg, int pe) +static int append_elem(ccd_cblist *l, int condnum, CcdCondFn fn, void *arg, int pe) { int idx; ccd_cblist_elem *e; @@ -154,6 +165,7 @@ static int append_elem(ccd_cblist *l, CcdCondFn fn, void *arg, int pe) e[idx].cb.arg = arg; e[idx].cb.pe = pe; l->len++; + if (isTimed(condnum)) CpvAccess(_ccd_num_timed_cond_cbs)++; return idx; } @@ -187,7 +199,7 @@ static void call_cblist_keep(ccd_cblist *l) * registered from other callbacks) are ignored. * @note: It is illegal to cancel callbacks from within ccd callbacks. */ -static void call_cblist_remove(ccd_cblist *l) +static void call_cblist_remove(ccd_cblist *l, int condnum) { int len = l->len; /* reentrant */ @@ -199,7 +211,7 @@ static void call_cblist_remove(ccd_cblist *l) int unused = CmiSwitchToPE(old); idx = l->elems[idx].next; } - remove_n_elems(l,len); + remove_n_elems(l,condnum,len); l->flag = false; } @@ -223,11 +235,6 @@ CpvStaticDeclare(ccd_cond_callbacks, conds); // Default resolution of .005 seconds aka 5 milliseconds #define CCD_DEFAULT_RESOLUTION 5.0e-3 -/*Make sure this matches the CcdPERIODIC_* list in converse.h*/ -#define CCD_PERIODIC_MAX 13 -const static double periodicCallInterval[CCD_PERIODIC_MAX]= -{0.001, 0.010, 0.100, 1.0, 5.0, 10.0, 60.0, 2*60.0, 5*60.0, 10*60.0, 3600.0, 12*3600.0, 24*3600.0}; - /** * List of periodic callbacks maintained by the scheduler */ @@ -263,10 +270,20 @@ typedef struct { CpvStaticDeclare(ccd_heap_elem*, ccd_heap); /** The length of the callback heap */ CpvDeclare(int, _ccd_heaplen); +/** The number of timer-based condition callbacks */ +CpvDeclare(int, _ccd_num_timed_cond_cbs); /** The max allowed length of the callback heap */ CpvStaticDeclare(int, ccd_heapmaxlen); +/** + * How many CBs are timer-based? The scheduler can call this to check + * if it needs to call CcdCallBacks or not. + */ +int CcdNumTimerCBs(void) { + return (CpvAccess(_ccd_heaplen) + CpvAccess(_ccd_num_timed_cond_cbs)); +} + /** Swap two elements on the heap */ static void ccd_heap_swap(int index1, int index2) @@ -421,10 +438,12 @@ void CcdModuleInit(char **ignored) CpvInitialize(ccd_cond_callbacks, conds); CpvInitialize(ccd_periodic_callbacks, pcb); CpvInitialize(int, _ccd_heaplen); + CpvInitialize(int, _ccd_num_timed_cond_cbs); CpvInitialize(int, ccd_heapmaxlen); CpvInitialize(int, _ccd_numchecks); CpvAccess(_ccd_heaplen) = 0; + CpvAccess(_ccd_num_timed_cond_cbs) = 0; CpvAccess(ccd_heapmaxlen) = MAXTIMERHEAPENTRIES; CpvAccess(ccd_heap) = (ccd_heap_elem*) malloc(sizeof(ccd_heap_elem)*2*(MAXTIMERHEAPENTRIES + 1)); @@ -457,7 +476,7 @@ void CcdModuleInit(char **ignored) int CcdCallOnCondition(int condnum, CcdCondFn fnp, void *arg) { CmiAssert(condnum < MAXNUMCONDS); - return append_elem(&(CpvAccess(conds).condcb[condnum]), fnp, arg, CcdIGNOREPE); + return append_elem(&(CpvAccess(conds).condcb[condnum]), condnum, fnp, arg, CcdIGNOREPE); } /** @@ -467,7 +486,7 @@ int CcdCallOnCondition(int condnum, CcdCondFn fnp, void *arg) int CcdCallOnConditionOnPE(int condnum, CcdCondFn fnp, void *arg, int pe) { CmiAssert(condnum < MAXNUMCONDS); - return append_elem(&(CpvAccess(conds).condcb[condnum]), fnp, arg, pe); + return append_elem(&(CpvAccess(conds).condcb[condnum]), condnum, fnp, arg, pe); } /** @@ -477,7 +496,7 @@ int CcdCallOnConditionOnPE(int condnum, CcdCondFn fnp, void *arg, int pe) int CcdCallOnConditionKeep(int condnum, CcdCondFn fnp, void *arg) { CmiAssert(condnum < MAXNUMCONDS); - return append_elem(&(CpvAccess(conds).condcb_keep[condnum]), fnp, arg, CcdIGNOREPE); + return append_elem(&(CpvAccess(conds).condcb_keep[condnum]), condnum, fnp, arg, CcdIGNOREPE); } /** @@ -487,7 +506,7 @@ int CcdCallOnConditionKeep(int condnum, CcdCondFn fnp, void *arg) int CcdCallOnConditionKeepOnPE(int condnum, CcdCondFn fnp, void *arg, int pe) { CmiAssert(condnum < MAXNUMCONDS); - return append_elem(&(CpvAccess(conds).condcb_keep[condnum]), fnp, arg, pe); + return append_elem(&(CpvAccess(conds).condcb_keep[condnum]), condnum, fnp, arg, pe); } @@ -497,7 +516,7 @@ int CcdCallOnConditionKeepOnPE(int condnum, CcdCondFn fnp, void *arg, int pe) void CcdCancelCallOnCondition(int condnum, int idx) { CmiAssert(condnum < MAXNUMCONDS); - remove_elem(&(CpvAccess(conds).condcb[condnum]), idx); + remove_elem(&(CpvAccess(conds).condcb[condnum]), condnum, idx); } @@ -507,7 +526,7 @@ void CcdCancelCallOnCondition(int condnum, int idx) void CcdCancelCallOnConditionKeep(int condnum, int idx) { CmiAssert(condnum < MAXNUMCONDS); - remove_elem(&(CpvAccess(conds).condcb_keep[condnum]), idx); + remove_elem(&(CpvAccess(conds).condcb_keep[condnum]), condnum, idx); } @@ -539,7 +558,7 @@ void CcdCallFnAfter(CcdVoidFn fnp, void *arg, double deltaT) void CcdRaiseCondition(int condnum) { CmiAssert(condnum < MAXNUMCONDS); - call_cblist_remove(&CpvAccess(conds).condcb[condnum]); + call_cblist_remove(&CpvAccess(conds).condcb[condnum],condnum); call_cblist_keep(&CpvAccess(conds).condcb_keep[condnum]); } @@ -630,7 +649,7 @@ void CcdCallBacks(void) for (i=0;inextCall[i]<=curWallTime) { - CcdRaiseCondition(CcdPERIODIC+i); + CcdRaiseCondition(CcdPERIODIC_FIRST+i); o->nextCall[i]=curWallTime+periodicCallInterval[i]; } else diff --git a/src/conv-core/converse.h b/src/conv-core/converse.h index daccf93412..bc3dbfae44 100644 --- a/src/conv-core/converse.h +++ b/src/conv-core/converse.h @@ -1096,14 +1096,21 @@ typedef void (*CmiStartFn)(int argc, char **argv); @addtogroup ConverseScheduler @{ */ -extern void CcdCallBacks(void); #if CSD_NO_PERIODIC #define CsdPeriodic() #define CsdResetPeriodic() #else +extern void CcdCallBacks(void); +extern int CcdNumTimerCBs(void); CpvExtern(int, _ccd_numchecks); CpvExtern(int, _ccd_heaplen); -#define CsdPeriodic() do{ if (CpvAccess(_ccd_heaplen) > 0 && CpvAccess(_ccd_numchecks)-- <= 0) CcdCallBacks(); } while(0) +CpvExtern(int, _ccd_num_timed_cond_cbs); +#define CsdPeriodic() \ + do{ \ + if ((CcdNumTimerCBs() > 0) && (CpvAccess(_ccd_numchecks)-- <= 0)) { \ + CcdCallBacks(); \ + } \ + } while(0); #define CsdResetPeriodic() CpvAccess(_ccd_numchecks) = 0 #endif @@ -1785,34 +1792,36 @@ typedef void (*CcdCondFn)(void *userParam); typedef void (*CcdVoidFn)(void *userParam,double curWallTime); /*CPU conditions*/ -#define CcdPROCESSOR_BEGIN_BUSY 0 -#define CcdPROCESSOR_END_IDLE 0 /*Synonym*/ -#define CcdPROCESSOR_BEGIN_IDLE 1 -#define CcdPROCESSOR_END_BUSY 1 /*Synonym*/ -#define CcdPROCESSOR_STILL_IDLE 2 -#define CcdPROCESSOR_LONG_IDLE 3 +#define CcdSCHEDLOOP 0 +#define CcdPROCESSOR_BEGIN_BUSY 1 +#define CcdPROCESSOR_END_IDLE 1 /*Synonym*/ +#define CcdPROCESSOR_BEGIN_IDLE 2 +#define CcdPROCESSOR_END_BUSY 2 /*Synonym*/ +#define CcdPROCESSOR_STILL_IDLE 3 +#define CcdPROCESSOR_LONG_IDLE 4 /*Periodic calls*/ -#define CcdPERIODIC 4 /*every few ms*/ -#define CcdPERIODIC_10ms 5 /*every 10ms (100Hz)*/ -#define CcdPERIODIC_100ms 6 /*every 100ms (10Hz)*/ -#define CcdPERIODIC_1second 7 /*every second*/ -#define CcdPERIODIC_1s 7 /*every second*/ -#define CcdPERIODIC_5s 8 /*every second*/ -#define CcdPERIODIC_5seconds 8 /*every second*/ -#define CcdPERIODIC_10second 9 /*every 10 seconds*/ -#define CcdPERIODIC_10seconds 9 /*every 10 seconds*/ -#define CcdPERIODIC_10s 9 /*every 10 seconds*/ -#define CcdPERIODIC_1minute 10 /*every minute*/ -#define CcdPERIODIC_2minute 11 /*every 2 minute*/ -#define CcdPERIODIC_5minute 12 /*every 5 minute*/ -#define CcdPERIODIC_10minute 13 /*every 10 minutes*/ -#define CcdPERIODIC_1hour 14 /*every hour*/ -#define CcdPERIODIC_12hour 15 /*every 12 hours*/ -#define CcdPERIODIC_1day 16 /*every day*/ +#define CcdPERIODIC_FIRST 5 /*first periodic value*/ +#define CcdPERIODIC 5 /*every few ms*/ +#define CcdPERIODIC_10ms 6 /*every 10ms (100Hz)*/ +#define CcdPERIODIC_100ms 7 /*every 100ms (10Hz)*/ +#define CcdPERIODIC_1second 8 /*every second*/ +#define CcdPERIODIC_1s 8 /*every second*/ +#define CcdPERIODIC_5s 9 /*every second*/ +#define CcdPERIODIC_5seconds 9 /*every second*/ +#define CcdPERIODIC_10second 10 /*every 10 seconds*/ +#define CcdPERIODIC_10seconds 10 /*every 10 seconds*/ +#define CcdPERIODIC_10s 10 /*every 10 seconds*/ +#define CcdPERIODIC_1minute 11 /*every minute*/ +#define CcdPERIODIC_2minute 12 /*every 2 minute*/ +#define CcdPERIODIC_5minute 13 /*every 5 minute*/ +#define CcdPERIODIC_10minute 14 /*every 10 minutes*/ +#define CcdPERIODIC_1hour 15 /*every hour*/ +#define CcdPERIODIC_12hour 16 /*every 12 hours*/ +#define CcdPERIODIC_1day 17 /*every day*/ +#define CcdPERIODIC_LAST 18 /*last periodic value +1*/ /*Other conditions*/ -#define CcdSCHEDLOOP 17 #define CcdQUIESCENCE 18 #define CcdTOPOLOGY_AVAIL 19 #define CcdSIGUSR1 20 diff --git a/tests/charm++/Makefile b/tests/charm++/Makefile index 09712da410..7aee7ef022 100644 --- a/tests/charm++/Makefile +++ b/tests/charm++/Makefile @@ -25,6 +25,7 @@ DIRS = \ zerocopy \ within_node_bcast \ longIdle \ + periodic \ bombard \ varTRAM \ diff --git a/tests/charm++/periodic/Makefile b/tests/charm++/periodic/Makefile new file mode 100644 index 0000000000..5597cd5ac4 --- /dev/null +++ b/tests/charm++/periodic/Makefile @@ -0,0 +1,25 @@ +-include ../../common.mk +-include ../../../include/conv-mach-opt.mak +CHARMC=../../../bin/charmc $(OPTS) + +all: periodic + +periodic: periodic.decl.h periodic.def.h periodic.C + $(CHARMC) -language charm++ periodic.C -o periodic + +periodic.decl.h periodic.def.h: periodic.ci + $(CHARMC) periodic.ci + +clean: + rm -f *.decl.h *.def.h *.o periodic charmrun + +test: all + $(call run, ./periodic +p1 ) + $(call run, ./periodic +p2 ) + +testp: all + $(call run, ./periodic +p$(P)) + +smptest: + $(call run, ./periodic +p2 ++ppn 2) + $(call run, ./periodic +p4 ++ppn 2) diff --git a/tests/charm++/periodic/periodic.C b/tests/charm++/periodic/periodic.C new file mode 100644 index 0000000000..8caa2b8f1a --- /dev/null +++ b/tests/charm++/periodic/periodic.C @@ -0,0 +1,98 @@ +/* + * This test starts a timer on the mainchare then broadcasts + * over a group to start periodic callbacks which will print + * from each PE every second for a total of MAX_COUNTER + * seconds before performing a reduction to the mainchare. + * The mainchare checks that the run indeed took MAX_COUNTER + * seconds at minimum before exiting. If this program hangs, + * periodic callbacks are likely not being triggered properly. + */ + +#include "periodic.decl.h" + +/* + * Change to 1 in order to test CcdCallFnAfter, otherwise + * this tests CcdCallOnConditionKeep. + */ +#ifndef CALL_FN_AFTER +#define CALL_FN_AFTER 0 +#endif + +CProxy_main mProxy; +CProxy_testGroup gProxy; + +static constexpr int COUNTER_MAX = 3; /* How many iters or seconds to run for */ +static constexpr double TOL = 0.9; /* 10% tolerance */ + +void userFn(void *arg, double time); + +class main : public CBase_main { + double startTime; + public: + + main(CkArgMsg *msg) { + delete msg; + + mProxy = thisProxy; + startTime = CkWallTimer(); + gProxy = CProxy_testGroup::ckNew(COUNTER_MAX); + CkPrintf("Testing Converse periodic callbacks on %d PEs for %d seconds\n", + CkNumPes(), COUNTER_MAX); + + gProxy.testPeriodic(); + } + + void done() { + /* Time taken for the test should be at least MAX_COUNTER seconds */ + double totalTime = CkWallTimer() - startTime; + if (totalTime >= ((double)COUNTER_MAX * TOL)) { + CkPrintf("CcdPeriodic test PASSED\n"); + CkExit(); + } + else { + CkAbort("CcdPeriodic test FAILED: run only took %f seconds (less than minimum %d seconds)!\n", + totalTime, COUNTER_MAX); + } + } +}; + + +class testGroup : public CBase_testGroup { + int counter; + CkCallback cb; + + public: + testGroup(int max) { + CkAssert(max > 0); + counter = max; + cb = CkCallback(CkReductionTarget(main, done), mProxy); + } + + void testPeriodic(void) { +#if CALL_FN_AFTER + CcdCallFnAfter((CcdVoidFn)userFn, &counter, 1000 /*ms*/); +#else + CcdCallOnConditionKeep(CcdPERIODIC_1s, (CcdCondFn)userFn, &counter); +#endif + } + + void reduceToCompletion() { + contribute(cb); + } +}; + +void userFn(void *arg, double time) { + int *counter = (int *)arg; + (*counter)--; + CmiPrintf("PE %d inside periodic user callback fn: counter %d, time %f\n", CkMyPe(), *counter, time); + if (*counter == 0) { + gProxy.ckLocalBranch()->reduceToCompletion(); + } +#if CALL_FN_AFTER + else { + CcdCallFnAfter((CcdVoidFn)userFn, counter, 1000 /*ms*/); + } +#endif +} + +#include "periodic.def.h" diff --git a/tests/charm++/periodic/periodic.ci b/tests/charm++/periodic/periodic.ci new file mode 100644 index 0000000000..91ec5f97c0 --- /dev/null +++ b/tests/charm++/periodic/periodic.ci @@ -0,0 +1,15 @@ +mainmodule periodic { + + readonly CProxy_main mProxy; + readonly CProxy_testGroup gProxy; + + mainchare main { + entry main(CkArgMsg *msg); + entry [reductiontarget] void done(); + } + + group testGroup { + entry testGroup(int max); + entry void testPeriodic(); + } +}; From 333c8480a72c2d2f880b9d3dd55c19b4e568f296 Mon Sep 17 00:00:00 2001 From: Matthias Diener Date: Tue, 2 May 2023 15:47:35 -0500 Subject: [PATCH 074/155] Add ifx support --- buildcmake | 4 ++++ src/arch/common/conv-mach-ifx.h | 0 src/arch/common/conv-mach-ifx.sh | 19 +++++++++++++++++++ 3 files changed, 23 insertions(+) create mode 100644 src/arch/common/conv-mach-ifx.h create mode 100644 src/arch/common/conv-mach-ifx.sh diff --git a/buildcmake b/buildcmake index 2b8435b475..e2ea359204 100755 --- a/buildcmake +++ b/buildcmake @@ -241,6 +241,10 @@ function parse_platform_compilers() { opt_FC=ifort opt_compiler+=("$arg") ;; + ifx) + opt_FC=ifx + opt_compiler+=("$arg") + ;; xlc|xlc64) opt_CC=xlc_r opt_CXX=xlC_r diff --git a/src/arch/common/conv-mach-ifx.h b/src/arch/common/conv-mach-ifx.h new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/arch/common/conv-mach-ifx.sh b/src/arch/common/conv-mach-ifx.sh new file mode 100644 index 0000000000..6f4c11d8b7 --- /dev/null +++ b/src/arch/common/conv-mach-ifx.sh @@ -0,0 +1,19 @@ +# Intel LLVM-based compiler Intel® Fortran Compiler +# https://www.intel.com/content/www/us/en/developer/articles/guide/porting-guide-for-ifort-to-ifx.html + + +CMK_FPP="$CMK_CPP_C -P -CC" + +CMK_CF90="ifx" + +CMK_CF90_FIXED="$CMK_CF90 -ffixed-form " + +CMK_F90LIBS="-lrt" + +CMK_CF77=$CMK_CF90 +CMK_F77LIBS=$CMK_F90LIBS + +CMK_MOD_NAME_ALLCAPS= +CMK_MOD_EXT="mod" +CMK_F90_USE_MODDIR=1 +CMK_F90_MODINC="-I" From ab7c13dd18ddfa31e085a65af5eec9704198007e Mon Sep 17 00:00:00 2001 From: Aditya Bhosale Date: Tue, 25 Apr 2023 13:13:57 -0500 Subject: [PATCH 075/155] Bug #3660: Delete stale location manager entry on dynamic deletion --- src/ck-core/cklocation.C | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ck-core/cklocation.C b/src/ck-core/cklocation.C index 0dd725eaec..e0f6ea9514 100644 --- a/src/ck-core/cklocation.C +++ b/src/ck-core/cklocation.C @@ -2771,6 +2771,10 @@ void CkLocMgr::removeFromTable(const CmiUInt8 id) CkAbort("CkLocMgr::removeFromTable called on invalid index!"); #endif hash.erase(id); + // Don't erase this during migration because the entry will be updated to reflect + // the new location by calling recordEmigration + if (!duringMigration) + cache->erase(id); #if CMK_ERROR_CHECKING // Make sure it's really gone if (NULL != elementNrec(id)) From 54f4783a8025d37ba6c339bec8bb0513d28fee3a Mon Sep 17 00:00:00 2001 From: Aditya Bhosale Date: Tue, 25 Apr 2023 13:16:10 -0500 Subject: [PATCH 076/155] Add tests for dynamic insertion/deletion bugs --- tests/charm++/Makefile | 6 + tests/charm++/amr_1d_random/Makefile | 27 + tests/charm++/amr_1d_random/amr_1d_random.C | 611 ++++++++++++++++++ tests/charm++/amr_1d_random/amr_1d_random.ci | 42 ++ tests/charm++/amr_1d_random/amr_1d_random.h | 70 ++ tests/charm++/amr_1d_simple/Makefile | 26 + tests/charm++/amr_1d_simple/amr_1d_simple.C | 323 +++++++++ tests/charm++/amr_1d_simple/amr_1d_simple.ci | 29 + tests/charm++/amr_1d_simple/amr_1d_simple.h | 59 ++ tests/charm++/anytime_migration/Makefile | 19 + tests/charm++/anytime_migration/migrate.C | 79 +++ tests/charm++/anytime_migration/migrate.ci | 15 + tests/charm++/dynamic_insertion/Makefile | 25 + .../dynamic_insertion/dynamic_insertion.C | 155 +++++ .../dynamic_insertion/dynamic_insertion.ci | 28 + .../dynamic_insertion/dynamic_insertion.h | 33 + .../dynamic_insertion_deletion/Makefile | 24 + .../dynamic_insertion_deletion.C | 261 ++++++++ .../dynamic_insertion_deletion.ci | 30 + .../dynamic_insertion_deletion.h | 39 ++ 20 files changed, 1901 insertions(+) create mode 100644 tests/charm++/amr_1d_random/Makefile create mode 100644 tests/charm++/amr_1d_random/amr_1d_random.C create mode 100644 tests/charm++/amr_1d_random/amr_1d_random.ci create mode 100644 tests/charm++/amr_1d_random/amr_1d_random.h create mode 100644 tests/charm++/amr_1d_simple/Makefile create mode 100644 tests/charm++/amr_1d_simple/amr_1d_simple.C create mode 100644 tests/charm++/amr_1d_simple/amr_1d_simple.ci create mode 100644 tests/charm++/amr_1d_simple/amr_1d_simple.h create mode 100644 tests/charm++/anytime_migration/Makefile create mode 100644 tests/charm++/anytime_migration/migrate.C create mode 100644 tests/charm++/anytime_migration/migrate.ci create mode 100644 tests/charm++/dynamic_insertion/Makefile create mode 100644 tests/charm++/dynamic_insertion/dynamic_insertion.C create mode 100644 tests/charm++/dynamic_insertion/dynamic_insertion.ci create mode 100644 tests/charm++/dynamic_insertion/dynamic_insertion.h create mode 100644 tests/charm++/dynamic_insertion_deletion/Makefile create mode 100644 tests/charm++/dynamic_insertion_deletion/dynamic_insertion_deletion.C create mode 100644 tests/charm++/dynamic_insertion_deletion/dynamic_insertion_deletion.ci create mode 100644 tests/charm++/dynamic_insertion_deletion/dynamic_insertion_deletion.h diff --git a/tests/charm++/Makefile b/tests/charm++/Makefile index 7aee7ef022..7365eee59f 100644 --- a/tests/charm++/Makefile +++ b/tests/charm++/Makefile @@ -28,6 +28,11 @@ DIRS = \ periodic \ bombard \ varTRAM \ + dynamic_insertion \ + dynamic_insertion_deletion \ + amr_1d_random \ + amr_1d_simple \ + anytime_migration \ FTDIRS = \ jacobi3d \ @@ -41,6 +46,7 @@ NONSCALEDIRS = \ sdag \ sparse \ charmxi_parsing \ + anytime_migration \ TESTPDIRS = $(filter-out $(NONSCALEDIRS),$(TESTDIRS)) diff --git a/tests/charm++/amr_1d_random/Makefile b/tests/charm++/amr_1d_random/Makefile new file mode 100644 index 0000000000..889de5820d --- /dev/null +++ b/tests/charm++/amr_1d_random/Makefile @@ -0,0 +1,27 @@ +-include ../../common.mk +CHARMC=../../../bin/charmc $(OPTS) + +all: amr_1d_random + +amr_1d_random: random_amr.decl.h amr_1d_random.C + $(CHARMC) amr_1d_random.C -o amr_1d_random + +random_amr.decl.h: amr_1d_random.ci + $(CHARMC) amr_1d_random.ci + +test: amr_1d_random + $(call run, +p1 ./amr_1d_random) + $(call run, +p2 ./amr_1d_random) + $(call run, +p3 ./amr_1d_random) + $(call run, +p4 ./amr_1d_random) + +testp: amr_1d_random + $(call run, +p$(P) ./amr_1d_random) + +smptest: amr_1d_random + $(call run, +p2 ./amr_1d_random) + $(call run, +p3 ./amr_1d_random) + $(call run, +p4 ./amr_1d_random) + +clean: + rm -rf *.decl.h *.def.h amr_1d_random charmrun diff --git a/tests/charm++/amr_1d_random/amr_1d_random.C b/tests/charm++/amr_1d_random/amr_1d_random.C new file mode 100644 index 0000000000..084116849b --- /dev/null +++ b/tests/charm++/amr_1d_random/amr_1d_random.C @@ -0,0 +1,611 @@ +// This example is a simplified version of the algorithm being developed +// for adaptive mesh refinement for SpECTRE. It does random refinement +// (splitting and joining elements) in 1D. + +// The array chare DgElement represent non-overlapping elements that cover the +// unit interval. The id of an element is determined by its refinement level L +// and its index I. There are 2^L possible elements for refinement level L, +// indexed left-to-right from [0, 2^L -1]. The unique id of an element is +// given by id = 2^L + I +// +// Level 0 |---------------------------------------------------------------| +// id = 1 = 2^0 + 0 +// Level 1 |-------------------------------|-------------------------------| +// id = 2 = 2^1 + 0 id = 3 = 2^1 + 1 +// Level 2 |---------------|---------------|---------------|---------------| +// id = 4 = 2^2+0 id = 5 = 2^2+1 id = 6 = 2^2+2 id = 7 = 2^2+3 +// Level 3 |-------|-------|-------|-------|-------|-------|-------|-------| +// id = 8 id = 9 id = 10 id = 11 id = 12 id = 13 id = 14 id = 15 +// Level 4 |---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---| +// 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 +// +// As the elements covering the interval are refined, we require that +// neighboring elements be within one refinement level of each other. +// (This is referred to as 2:1 balance.) Splitting has a higher priority than +// joining, so an elements desired refinement level will be increased in order +// to maintain 2:1 balance. +// +// The interval is considered to be periodic, so that the element on the +// lower boundary is a neighbor of an element on the upper boundary. Thus +// the element with id 8 will have a lower neighbor whose id is either 7, 15, +// or 31. +// +// Note that two elements can only join if they are siblings, i.e. they had +// a common parent (i.e. elements 9 and 10 cannot join). +// +// This example creates an empty array chare DgElement. +// Then it creates the 2^L elements on the initial_refinement_level +// Then it performs a given number_of_iterations +// +// In each iteration (with quiessence detected between these phases): +// - Each element is asked to ping its neighbors. +// +// - Each element is asked to contribute its 1D volume to a reduction. +// Each element also checks that it was pinged by two neighbors. +// The main chare checks that the total volume contributed by the elements +// is one. +// +// - Each element is asked to randomly determine their AMR decision. +// The element then communicates this decision to its neighbors. +// Upon receiving a neighbor's decision, an element checks whether it +// needs to adjust its decision in order to preserve 2:1 balance or +// because it cannot join its sibling. If a decision is updated, it +// is communicated to the neighbors of the element. +// +// - Each element is asked to execute its AMR decision. +// - If it wants to split, it creates the lower child, which then creates +// the upper child, which then calls the original element to communicate +// its data to each child and then delete itself. The children then +// initialize themselves with the data provided. +// +// - If it wants to join and is the lower child, it creates the parent. +// (The upper child does nothing.) The parent then calls the lower child +// which calls the upper child, passing along data to eventually +// contribute to the new parent. The lower child then deletes itself. +// The upper child adds its data, communicates all the data to the new +// parent, and deletes itself. The parent then initializes itself with +// the provided data. +// +// - If it neither want to join nor split, the element updates its data +// (i.e. determines its new neighbors). + +#include "amr_1d_random.h" + +#include +#include +#include +#include + +/*readonly*/ CProxy_Main mainProxy; +/*readonly*/ CProxy_DgElement dgElementProxy; + +namespace { +static constexpr int initial_refinement_level = 0; + +static constexpr int number_of_iterations = 10; +static constexpr int maximum_refinement_level = 1; +static const double do_something_fraction = 1.0; + +static constexpr bool output_iteration = true; +static constexpr bool output_phase = true; +static constexpr bool output_action = true; +static constexpr bool output_data = false; + +constexpr int two_to_the(int n) { return 1 << n; } + +constexpr int initial_number_of_elements = two_to_the(initial_refinement_level); + +int refinement_level(const ElementId_t id) { + CkAssert(id > 0); + return std::floor(std::log2(id)); +} + +int index(const ElementId_t id) { + CkAssert(id > 0); + return id % two_to_the(refinement_level(id)); +} + +ElementId_t id(const int refinement_level, const int index) { + return two_to_the(refinement_level) + index; +} + +double fraction_of_block_volume(const ElementId_t& element_id) { + return 1.0 / two_to_the(refinement_level(element_id)); +} + +Flag_t random_flag(const int current_refinement_level) { + static std::random_device r; + static const auto seed = r(); + static std::mt19937 generator(seed); + static std::uniform_real_distribution<> distribution(0.0, 1.0); + + const double join_fraction = + current_refinement_level / static_cast(maximum_refinement_level); + + const double random_number = distribution(generator); + if (random_number > do_something_fraction) { + return 0; + } + if (random_number < join_fraction * do_something_fraction) { + return -1; + } + return 1; +} + +bool are_siblings(const ElementId_t& id, const ElementId_t& neighbor_id) { + CkAssert(id > 1); + CkAssert(neighbor_id > 1); + return id / 2 == neighbor_id / 2; +} + +// An abutting nibling is the neighbor child of my sibling +bool neighbor_is_my_abutting_nibling(const ElementId_t& id, + const ElementId_t& neighbor_id) { + CkAssert(id > 1); + CkAssert(neighbor_id > 1); + if(neighbor_id < 4) { + return false; + } + return neighbor_id / 4 == id / 2; +} + +bool check_amr_decision(Flag_t& flag, const ElementId_t& id, + const ElementId_t& neighbor_id, + const Flag_t& neighbor_flag) { + CkAssert(flag > -2 && flag < 2); + CkAssert(neighbor_flag > -2 && neighbor_flag < 2); + + // Check if desired refinement level is two or three less than that of + // neighbor. If so, change flag so it is within one level. + const int desired_level = refinement_level(id) + flag; + CkAssert(desired_level > -1 && desired_level <= maximum_refinement_level); + const int neighbor_desired_level = + refinement_level(neighbor_id) + neighbor_flag; + CkAssert(neighbor_desired_level > -1 && + neighbor_desired_level <= maximum_refinement_level); + if (desired_level + 1 < neighbor_desired_level) { + flag = neighbor_desired_level - 1 - refinement_level(id); + return true; + } + + // Next check if I want to join and the neighbor is either a sibling that + // does not want to join or an abutting nibling. If so, then change flag + // to do nothing. + if (flag == -1 && ((are_siblings(id, neighbor_id) && neighbor_flag != -1) || + neighbor_is_my_abutting_nibling(id, neighbor_id))) { + flag = 0; + return true; + } + + return false; +} + +ElementId_t new_lower_neighbor_id(const ElementId_t& old_id, + const Flag_t& old_flag) { + if (old_flag == 1) { + return 2 * old_id + 1; + } + if (old_flag == -1) { + return old_id / 2; + } + return old_id; +} + +ElementId_t new_upper_neighbor_id(const ElementId_t& old_id, + const Flag_t& old_flag) { + if (old_flag == 1) { + return 2 * old_id; + } + if (old_flag == -1) { + return old_id / 2; + } + return old_id; +} + +void print_iteration(const int iteration) { + if (output_iteration) { + CkPrintf("\n\n------------\nIteration %i\n------------\n\n\n", iteration); + } +} + +void print_phase(const std::string& phase_name) { + if (output_phase) { + CkPrintf("Main is in phase %s\n", phase_name.c_str()); + } +} + +void print_action(const std::string& action, const ElementId_t id) { + if (output_action) { + CkPrintf("Element (L%i,I%i) %s on (N%i, C%i)\n", refinement_level(id), + index(id), action.c_str(), CkMyNode(), CkMyPe()); + } +} +} // namespace + +// Creates an empty array chare DgElement +Main::Main(CkArgMsg* msg) { + delete msg; + dgElementProxy = CProxy_DgElement::ckNew(); + const int number_of_procs = CkNumPes(); + int which_proc = 0; + std::vector element_ids(initial_number_of_elements); + std::iota(element_ids.begin(), element_ids.end(), initial_number_of_elements); + for (size_t j = 0; j < element_ids.size(); ++j) { + dgElementProxy(element_ids[j]).insert(which_proc); + which_proc = (which_proc + 1 == number_of_procs ? 0 : which_proc + 1); + } + dgElementProxy.doneInserting(); + CkStartQD(CkCallback(CkIndex_Main::initialize(), mainProxy)); +} + +// Creates the 2^L elements on the initial_refinement_level distributed +// round-robin among the PEs +void Main::initialize() { + print_phase("initialize"); + dgElementProxy.initialize_initial_elements(); + CkStartQD(CkCallback(CkIndex_Main::check_neighbors(), mainProxy)); +} + +// Requests every element of the DgElement chare array to ping its neighboring +// elements (The interval is considered to be periodic, so the element on the +// lower boundary of the interval is a neighbor of the element on upper boundary +// of the interval) +void Main::check_neighbors() { + print_phase("check neighbors"); + dgElementProxy.ping_neighbors(); + CkStartQD(CkCallback(CkIndex_Main::check_domain(), mainProxy)); +} + +// Requests every element to contribute the 1D volume of the interval that it +// covers. +void Main::check_domain() { + print_phase("check"); + dgElementProxy.send_volume(); + + if (iteration >= number_of_iterations) { + CkStartQD(CkCallback(CkIndex_Main::exit(), mainProxy)); + } else { + CkStartQD(CkCallback(CkIndex_Main::evaluate_amr_criteria(), mainProxy)); + } +} + +// Requests every element to decide whether to split, join, or do no refinement +void Main::evaluate_amr_criteria() { + ++iteration; + print_iteration(iteration); + print_phase("evaluate refinement criteria"); + dgElementProxy.evaluate_refinement_criteria(); + CkStartQD(CkCallback(CkIndex_Main::begin_inserting(), mainProxy)); +} + +void Main::begin_inserting() { + print_phase("begin inserting"); + dgElementProxy.beginInserting(); + CkStartQD(CkCallback(CkIndex_Main::create_new_elements(), mainProxy)); +} + +// Creates new elements for elements that are split or joined +void Main::create_new_elements() { + print_phase("create new elements"); + dgElementProxy.create_new_elements(); + CkStartQD(CkCallback(CkIndex_Main::done_inserting(), mainProxy)); +} + +void Main::done_inserting() { + print_phase("done inserting"); + dgElementProxy.doneInserting(); + CkStartQD(CkCallback(CkIndex_Main::count_elements(), mainProxy)); +} + +void Main::count_elements() { + print_phase("count elements"); + dgElementProxy.count_elements(); +} + +// Initialize new elements and update the neighbors of unrefined elements +void Main::adjust_domain(int num_elements) { + print_phase("adjust domain"); + CkPrintf("Total elements = %i\n", num_elements); + dgElementProxy.adjust_domain(); + CkStartQD(CkCallback(CkIndex_Main::delete_old_elements(), mainProxy)); +} + +// Creates new elements for elements that are split or joined +void Main::delete_old_elements() { + print_phase("delete old elements"); + dgElementProxy.delete_old_elements(); + CkStartQD(CkCallback(CkIndex_Main::check_neighbors(), mainProxy)); +} + +// Cleanly ends the executable +void Main::exit() { + print_phase("exit"); + CkExit(); +} + +// Callback executed after all elements have contributed their volume. +// The total volume should be 1.0 +void Main::check_volume(const double volume) { + print_phase("check volume"); + if (volume != 1.0) { + CkAbort("Volume %f is not 1.0\n", volume); + } +} + +// Constructor for initial elements. All initial elements are on the +// same refinement level +DgElement::DgElement() { + print_action("created", thisIndex); +} + +void DgElement::count_elements() { + CkCallback cb(CkReductionTarget(Main, adjust_domain), mainProxy);; + int result = 1; + contribute(sizeof(int), &result, CkReduction::sum_int, cb); +} + +// Adjusts the domain based on the final AMR decisions of each element +void DgElement::adjust_domain() { + CkPrintf("Flag for %i is %i\n", thisIndex, flag_); + + if (flag_ == -2) { + // this is a newly created element, do nothing + } else if (flag_ == 1) { + send_data_to_children(); + } else if (flag_ == -1) { + // Element wants to join, if it is the lower child, create the parent + print_action("adjusting domain (join)", thisIndex); + if (thisIndex % 2 == 0) { + collect_data_from_children({thisIndex + 1}, {{0, 0}}); + } + } else { + // Element is neither splitting nor joining. Update the ids of its + // neighbors and reset/clear the AMR flags + print_action("adjusting domain (do nothing)", thisIndex); + if(neighbor_flags_.count(neighbors_[0]) == 0 || + neighbor_flags_.count(neighbors_[1]) == 0) { + CkPrintf("On Element %i, lower neighbor = %i, upper neighbor = %i \n" + "Neighbor flags = ", thisIndex, neighbors_[0], neighbors_[1]); + for (const auto& neighbor_flag : neighbor_flags_) { + CkPrintf("(%i, %i) ", neighbor_flag.first, neighbor_flag.second); + } + } + neighbors_[0] = + new_lower_neighbor_id(neighbors_[0], neighbor_flags_.at(neighbors_[0])); + neighbors_[1] = + new_upper_neighbor_id(neighbors_[1], neighbor_flags_.at(neighbors_[1])); + flag_ = -2; + neighbor_flags_.clear(); + } +} + +// Collect data from children to send to their newly created parent after a +// join. Then delete the child. +// +// sibling_ids_to_collect is the list of further children to collect data from +// parent_neighbors is the data being collected +void DgElement::collect_data_from_children( + std::deque sibling_ids_to_collect, + std::array parent_neighbors) { + print_action("collecting data from children", thisIndex); + if (sibling_ids_to_collect.empty()) { + // I am the upper child + parent_neighbors[1] = + new_upper_neighbor_id(neighbors_[1], neighbor_flags_.at(neighbors_[1])); + CkPrintf("initialize_parent called\n"); + thisProxy[thisIndex / 2].initialize_parent(parent_neighbors); + } else { + // I am the lower child + parent_neighbors[0] = + new_lower_neighbor_id(neighbors_[0], neighbor_flags_.at(neighbors_[0])); + const auto next_child_id = sibling_ids_to_collect.front(); + sibling_ids_to_collect.pop_front(); + thisProxy[next_child_id].collect_data_from_children(sibling_ids_to_collect, + parent_neighbors); + } +} + +void DgElement::create_new_elements() { + if (flag_ == 1) { + // Element wants to split, create the lower child + print_action("adjusting domain (split)", thisIndex); + thisProxy[2 * thisIndex].insert(); + thisProxy[2 * thisIndex + 1].insert(); + } else if (flag_ == -1) { + // Element wants to join, if it is the lower child, create the parent + print_action("adjusting domain (join)", thisIndex); + if (thisIndex % 2 == 0) { + thisProxy[thisIndex / 2].insert(); + } + } else { + // Element is neither splitting nor joining. + } +} + +void DgElement::delete_old_elements() { + if (flag_ == 1 || flag_ == -1) { + print_action("deleting", thisIndex); + thisProxy[thisIndex].ckDestroy(); + } +} + +// Evaluate the AMR criteria (for this example, randomly choose whether to +// join, split, or remain the same). Then communicate these decisions to +// the neighbors of the element in case elements need to adjust their decisions +void DgElement::evaluate_refinement_criteria() { + print_action("evaluating refinement criteria", thisIndex); + flag_ = random_flag(refinement_level(thisIndex)); + + // Actions can be executed in any order. Check if I have already received + // flags from my neighbors, and if so check if my decision needs to be + // changed. + if (!neighbor_flags_.empty()) { + for (const auto& neighbor_id_flag : neighbor_flags_) { + check_amr_decision(flag_, thisIndex, neighbor_id_flag.first, + neighbor_id_flag.second); + } + } + + thisProxy[neighbors_[0]].update_amr_decision(thisIndex, flag_); + thisProxy[neighbors_[1]].update_amr_decision(thisIndex, flag_); + print_data("Evaluate criteria"); +} + +// Initialize the data held by a newly created child element. +void DgElement::initialize_child(const ElementId_t& nonsibling_neighbor_id) { + print_action("initializing child", thisIndex); + if (thisIndex % 2 == 0) { + // I am the lower child + neighbors_[0] = nonsibling_neighbor_id; + neighbors_[1] = thisIndex + 1; + } else { + // I am the upper child + neighbors_[0] = thisIndex - 1; + neighbors_[1] = nonsibling_neighbor_id; + } +} + +// Initialize the initial elements +void DgElement::initialize_initial_elements() { + const int L = refinement_level(thisIndex); + const int I = index(thisIndex); + const int Imax = two_to_the(L) - 1; + // The interval is considered to be periodic so that the element on the + // lower boundary of the interval is a neighbor of the element on the + // upper boundary of the interval + neighbors_[0] = (I == 0 ? id(L, Imax) : thisIndex - 1); + neighbors_[1] = (I == Imax ? id(L, 0) : thisIndex + 1); +} + +// Initialize the data held by a newly created parent element. +void DgElement::initialize_parent( + const std::array& parent_neighbors) { + print_action("initializing parent", thisIndex); + neighbors_ = parent_neighbors; +} + +// Receive a ping from a neighboring element. +// +// pinger is the id of the neighbor +// index is 0 for the lower neighbor, 1 for the upper neighbor +void DgElement::ping(const ElementId_t& pinger, const size_t index) { + print_action("pinged", thisIndex); + if (neighbors_[index] != pinger) { + CkPrintf("On Element %i, Neighbors %zu = %i, pinger = %i\n", thisIndex, + index, neighbors_[index], pinger); + } + CkAssert(neighbors_[index] == pinger); + // Set pings_received to 2 if this is the second ping, to index if this + // is the first ping. A value of -1 indicates no previous pings. + if (index == 0) { + CkAssert(pings_received_ == -1 || pings_received_ == 1); + ++pings_received_; + } else { + CkAssert(pings_received_ == -1 || pings_received_ == 0); + pings_received_ += 2; + } +} + +// Ping each neighboring element with my id as well as if I am the +// lower (0) or upper (1) neighbor of that neighbor +void DgElement::ping_neighbors() { + print_data("pinging neighbors"); + CkAssert(neighbors_[0] > 0 && neighbors_[1] > 0); + thisProxy[neighbors_[0]].ping(thisIndex, 1); + thisProxy[neighbors_[1]].ping(thisIndex, 0); +} + +// After splitting, send data to all the newly created child elements of this +// element. Then delete the element. +void DgElement::send_data_to_children() { + print_action("sending data to children", thisIndex); + // Send data to lower child + CkPrintf("%i, Neighbors = %i, %i\n", thisIndex, neighbors_[0], neighbors_[1]); + thisProxy[2 * thisIndex].initialize_child( + new_lower_neighbor_id(neighbors_[0], neighbor_flags_.at(neighbors_[0]))); + // Send data to upper child + thisProxy[2 * thisIndex + 1].initialize_child( + new_upper_neighbor_id(neighbors_[1], neighbor_flags_.at(neighbors_[1]))); +} + +// Contribute the volume of the element to a reduction. Also check that +// the element received two pings during the check of neighbors and reset +// ping counter. +void DgElement::send_volume() { + print_data("sending volume"); + CkAssert(pings_received_ == 2); + pings_received_ = -1; + const double volume = fraction_of_block_volume(thisIndex); + contribute(sizeof(double), &volume, CkReduction::sum_double, + CkCallback(CkReductionTarget(Main, check_volume), mainProxy)); +} + +// Possibly update the AMR decision of this element based on the decision of +// one of its neighbors. There are two reasons an element will update its +// decision: +// - The desired refinement level of the neighbor is two or more levels +// higher than the desired refinement level of this element. In this +// case change the decision so that the desired level of this element +// is one lower than the desired refinement level of the neighbor +// - It want to join, but its sibling either does not want to join, or +// does not exist (i.e. it is currently refined). In this case the +// decision is changed to do nothing +// +// If the decision is updated, the new decison is sent to the neighbors. +// +// neighbor_id is the id of the neighbor +// neighbor_flag is its AMR decision +void DgElement::update_amr_decision(const ElementId_t& neighbor_id, + const Flag_t& neighbor_flag) { + print_action("updating AMR decision", thisIndex); + + // Actions can be executed in any order. Therefore we need to check: + // - If we received flags from a neighbor multiple times, but not in the + // order they were sent. Neighbor flags should only be sent again if + // they have changed to a higher priority (i.e. higher integral value of + // the flag). + if (1 == neighbor_flags_.count(neighbor_id)) { + const auto previously_received_flag = neighbor_flags_.at(neighbor_id); + if (previously_received_flag >= neighbor_flag) { + print_data("Update decision (old decision)"); + return; + } + } + + neighbor_flags_[neighbor_id] = neighbor_flag; + + // Actions can be executed in any order. Therefore we need to check: + // - If we have evaluated our own AMR decision. If not, return. + if (flag_ == -2) { + print_data("Update decision (waiting for evaluate"); + return; + } + + const bool my_amr_decision_changed = + check_amr_decision(flag_, thisIndex, neighbor_id, neighbor_flag); + + if (my_amr_decision_changed) { + thisProxy[neighbors_[0]].update_amr_decision(thisIndex, flag_); + thisProxy[neighbors_[1]].update_amr_decision(thisIndex, flag_); + print_data("Update decision (changed)"); + } else { + print_data("Update decision (not changed)"); + } +} + +void DgElement::print_data(const std::string& action_name) { + if (output_data) { + CkPrintf( + "Element %i is executing %s.\nNeighbors: (%i, %i)\nFlag: %i\nNeighbor " + "flags: (%i,%i)\n", + thisIndex, action_name.c_str(), neighbors_[0], neighbors_[1], flag_, + neighbor_flags_.count(neighbors_[0]) == 1 + ? neighbor_flags_.at(neighbors_[0]) + : -2, + neighbor_flags_.count(neighbors_[1]) == 1 + ? neighbor_flags_.at(neighbors_[1]) + : -2); + } +} + +#include "random_amr.def.h" diff --git a/tests/charm++/amr_1d_random/amr_1d_random.ci b/tests/charm++/amr_1d_random/amr_1d_random.ci new file mode 100644 index 0000000000..744af092ce --- /dev/null +++ b/tests/charm++/amr_1d_random/amr_1d_random.ci @@ -0,0 +1,42 @@ +mainmodule random_amr { + + readonly CProxy_Main mainProxy; + readonly CProxy_DgElement dgElementProxy; + + mainchare Main { + entry Main(CkArgMsg* msg); + entry void initialize(); + entry void check_neighbors(); + entry void check_domain(); + entry void evaluate_amr_criteria(); + entry void begin_inserting(); + entry void create_new_elements(); + entry void done_inserting(); + entry void count_elements(); + entry [reductiontarget] void adjust_domain(int num_elements); + entry void delete_old_elements(); + entry void exit(); + entry [reductiontarget] void check_volume(const double volume); + }; + + array [1D] DgElement { + entry DgElement(); + entry void count_elements(); + entry void adjust_domain(); + entry void collect_data_from_children( + std::deque sibling_ids_to_collect, + std::array& parent_neighbors); + entry void create_new_elements(); + entry void delete_old_elements(); + entry void ping(const ElementId_t& pinger, const size_t index); + entry void evaluate_refinement_criteria(); + entry void initialize_child(const ElementId_t& nonsibling_neighbor_id); + entry void initialize_initial_elements(); + entry void initialize_parent(std::array& parent_neighbors); + entry void ping_neighbors(); + entry void send_data_to_children(); + entry void send_volume(); + entry void update_amr_decision(const ElementId_t& neighbor_id, + const Flag_t& neighbor_flag); + }; +}; diff --git a/tests/charm++/amr_1d_random/amr_1d_random.h b/tests/charm++/amr_1d_random/amr_1d_random.h new file mode 100644 index 0000000000..3d71708173 --- /dev/null +++ b/tests/charm++/amr_1d_random/amr_1d_random.h @@ -0,0 +1,70 @@ +#pragma once + +#include +#include +#include +#include + +// Chare array index for an element (0 is reserved for unknown) +using ElementId_t = int; +// A flag denoting the current AMR decision of an element +// -2 = NoDecision; -1 = Join; 0 = DoNothing; 1 = Split +using Flag_t = int; +using NeighborFlags_t = std::unordered_map; + +#include "random_amr.decl.h" + +class Main : public CBase_Main { + private: + int iteration{0}; + + public: + Main(CkArgMsg* msg); + void initialize(); + void check_neighbors(); + void check_domain(); + void evaluate_amr_criteria(); + void begin_inserting(); + void create_new_elements(); + void done_inserting(); + void count_elements(); + void adjust_domain(int num_elements); + void delete_old_elements(); + void exit(); + void check_volume(const double volume); +}; + +class DgElement : public CBase_DgElement { + public: + DgElement(); + void count_elements(); + void adjust_domain(); + void collect_data_from_children( + std::deque sibling_ids_to_collect, + std::array parent_neighbors); + void create_new_elements(); + void delete_old_elements(); + void evaluate_refinement_criteria(); + void initialize_child(const ElementId_t& nonsibling_neighbor_id); + void initialize_initial_elements(); + void initialize_parent(const std::array& parent_neighbors); + void ping(const ElementId_t& pinger, const size_t index); + void ping_neighbors(); + void send_data_to_children(); + void send_volume(); + void update_amr_decision(const ElementId_t& neighbor_id, + const Flag_t& neighbor_flag); + + private: + void print_data(const std::string& action_name); + // Current AMR decision of element (see Flag_t above for meaning of values) + Flag_t flag_{-2}; + // The ids of the lower and upper neighbors + std::array neighbors_{{0, 0}}; + // The current AMR decision of neighboring elements + NeighborFlags_t neighbor_flags_{}; + // The number of pings received from neighbors during the check of neighbors + // The value is set to -1 prior to the check; 0 (lower neighbor) or 1 (upper + // neighbor) after the first ping; and 2 after both neighbors have pinged + int pings_received_{-1}; +}; diff --git a/tests/charm++/amr_1d_simple/Makefile b/tests/charm++/amr_1d_simple/Makefile new file mode 100644 index 0000000000..a6d95a55d7 --- /dev/null +++ b/tests/charm++/amr_1d_simple/Makefile @@ -0,0 +1,26 @@ +-include ../../common.mk +CHARMC=../../../bin/charmc $(OPTS) + +all: amr_1d_simple + +amr_1d_simple: random_amr.decl.h amr_1d_simple.C + $(CHARMC) amr_1d_simple.C -o amr_1d_simple + +random_amr.decl.h: amr_1d_simple.ci + $(CHARMC) amr_1d_simple.ci + +test: amr_1d_simple + $(call run, +p2 ./amr_1d_simple) + $(call run, +p3 ./amr_1d_simple) + $(call run, +p4 ./amr_1d_simple) + +testp: amr_1d_simple + $(call run, +p$(P) ./amr_1d_simple) + +smptest: amr_1d_simple + $(call run, +p2 ./amr_1d_simple) + $(call run, +p3 ./amr_1d_simple) + $(call run, +p4 ./amr_1d_simple) + +clean: + rm -rf *.decl.h *.def.h amr_1d_simple charmrun diff --git a/tests/charm++/amr_1d_simple/amr_1d_simple.C b/tests/charm++/amr_1d_simple/amr_1d_simple.C new file mode 100644 index 0000000000..e16fccb03d --- /dev/null +++ b/tests/charm++/amr_1d_simple/amr_1d_simple.C @@ -0,0 +1,323 @@ +// Tests a simple 1D AMR that was written as a reproduction for issue #3660 + +#include "amr_1d_simple.h" + +#include +#include +#include +#include + +/*readonly*/ CProxy_Main mainProxy; +/*readonly*/ CProxy_DgElement dgElementProxy; + +namespace { +static constexpr int initial_refinement_level = 0; + +static constexpr int number_of_iterations = 3; +static constexpr int maximum_refinement_level = 1; +static const double do_something_fraction = 1.0; + +static constexpr bool output_iteration = true; +static constexpr bool output_phase = true; +static constexpr bool output_action = true; +static constexpr bool output_data = false; + +constexpr int two_to_the(int n) { return 1 << n; } + +constexpr int initial_number_of_elements = two_to_the(initial_refinement_level); + +int refinement_level(const ElementId_t id) { + CkAssert(id > 0); + return std::floor(std::log2(id)); +} + +int index(const ElementId_t id) { + CkAssert(id > 0); + return id % two_to_the(refinement_level(id)); +} + +ElementId_t id(const int refinement_level, const int index) { + return two_to_the(refinement_level) + index; +} + +double fraction_of_block_volume(const ElementId_t& element_id) { + return 1.0 / two_to_the(refinement_level(element_id)); +} + +Flag_t random_flag(const int current_refinement_level) { + static std::random_device r; + static const auto seed = r(); + static std::mt19937 generator(seed); + static std::uniform_real_distribution<> distribution(0.0, 1.0); + + const double join_fraction = + current_refinement_level / static_cast(maximum_refinement_level); + + const double random_number = distribution(generator); + if (random_number > do_something_fraction) { + return 0; + } + if (random_number < join_fraction * do_something_fraction) { + return -1; + } + return 1; +} + +ElementId_t new_lower_neighbor_id(const ElementId_t& old_id, + const Flag_t& old_flag) { + if (old_flag == 1) { + return 2 * old_id + 1; + } + if (old_flag == -1) { + return old_id / 2; + } + return old_id; +} + +ElementId_t new_upper_neighbor_id(const ElementId_t& old_id, + const Flag_t& old_flag) { + if (old_flag == 1) { + return 2 * old_id; + } + if (old_flag == -1) { + return old_id / 2; + } + return old_id; +} + +void print_iteration(const int iteration) { + if (output_iteration) { + CkPrintf("\n\n------------\nIteration %i\n------------\n\n\n", iteration); + } +} + +void print_phase(const std::string& phase_name) { + if (output_phase) { + CkPrintf("Main is in phase %s\n", phase_name.c_str()); + } +} + +void print_action(const std::string& action, const ElementId_t id) { + if (output_action) { + CkPrintf("Element (L%i,I%i) %s on (N%i, C%i)\n", refinement_level(id), + index(id), action.c_str(), CkMyNode(), CkMyPe()); + } +} +} // namespace + +// Creates an empty array chare DgElement +Main::Main(CkArgMsg* msg) { + delete msg; + dgElementProxy = CProxy_DgElement::ckNew(); + const int number_of_procs = CkNumPes(); + int which_proc = 0; + std::vector element_ids(initial_number_of_elements); + std::iota(element_ids.begin(), element_ids.end(), initial_number_of_elements); + for (size_t j = 0; j < element_ids.size(); ++j) { + dgElementProxy(element_ids[j]).insert(0); + which_proc = (which_proc + 1 == number_of_procs ? 0 : which_proc + 1); + } + dgElementProxy.doneInserting(); + CkStartQD(CkCallback(CkIndex_Main::initialize(), mainProxy)); +} + +// Creates the 2^L elements on the initial_refinement_level distributed +// round-robin among the PEs +void Main::initialize() { + print_phase("initialize"); + dgElementProxy.initialize_initial_elements(); + CkStartQD(CkCallback(CkIndex_Main::create_new_elements(), mainProxy)); +} + +// Creates new elements for elements that are split or joined +void Main::create_new_elements() { + print_phase("create new elements"); + ++iteration; + if (iteration == number_of_iterations) + CkStartQD(CkCallback(CkIndex_Main::exit(), mainProxy)); + print_iteration(iteration); + + dgElementProxy.beginInserting(); + dgElementProxy.create_new_elements(iteration); + dgElementProxy.doneInserting(); + CkStartQD(CkCallback(CkIndex_Main::adjust_domain(), mainProxy)); +} + +// Initialize new elements and update the neighbors of unrefined elements +void Main::adjust_domain() { + print_phase("adjust domain"); + dgElementProxy.adjust_domain(); + CkStartQD(CkCallback(CkIndex_Main::delete_old_elements(), mainProxy)); +} + +// Creates new elements for elements that are split or joined +void Main::delete_old_elements() { + print_phase("delete old elements"); + dgElementProxy.delete_old_elements(); + CkStartQD(CkCallback(CkIndex_Main::create_new_elements(), mainProxy)); +} + +// Cleanly ends the executable +void Main::exit() { + print_phase("exit"); + CkExit(); +} + +// Constructor for initial elements. All initial elements are on the +// same refinement level +DgElement::DgElement() { + print_action("created", thisIndex); + init_flag = false; +} + +// Adjusts the domain based on the final AMR decisions of each element +void DgElement::adjust_domain() { + if (flag_ == -2) { + // this is a newly created element, do nothing + } else if (flag_ == 1) { + send_data_to_children(); + } else if (flag_ == -1) { + // Element wants to join, if it is the lower child, create the parent + print_action("adjusting domain (join)", thisIndex); + if (thisIndex % 2 == 0) { + collect_data_from_children({thisIndex + 1}, {{0, 0}}); + } + } +} + +// Collect data from children to send to their newly created parent after a +// join. Then delete the child. +// +// sibling_ids_to_collect is the list of further children to collect data from +// parent_neighbors is the data being collected +void DgElement::collect_data_from_children( + std::deque sibling_ids_to_collect, + std::array parent_neighbors) { + print_action("collecting data from children", thisIndex); + if (sibling_ids_to_collect.empty()) { + // I am the upper child + parent_neighbors[1] = + new_upper_neighbor_id(neighbors_[1], neighbor_flags_.at(neighbors_[1])); + thisProxy[thisIndex / 2].initialize_parent(parent_neighbors); + } else { + // I am the lower child + parent_neighbors[0] = + new_lower_neighbor_id(neighbors_[0], neighbor_flags_.at(neighbors_[0])); + const auto next_child_id = sibling_ids_to_collect.front(); + sibling_ids_to_collect.pop_front(); + thisProxy[next_child_id].collect_data_from_children(sibling_ids_to_collect, + parent_neighbors); + } +} + +void DgElement::create_new_elements(int iteration) { + + flag_ = iteration % 2 ? 1 : -1; + + neighbor_flags_[neighbors_[0]] = flag_; + neighbor_flags_[neighbors_[1]] = flag_; + + if (!init_flag) + CkAbort("Initialize on parent or children wasn't called\n"); + + if (flag_ == 1) { + // Element wants to split, create the lower child + print_action("adjusting domain (split)", thisIndex); + thisProxy[2 * thisIndex].insert(1); + thisProxy[2 * thisIndex + 1].insert(0); + } else if (flag_ == -1) { + // Element wants to join, if it is the lower child, create the parent + print_action("adjusting domain (join)", thisIndex); + if (thisIndex % 2 == 0) { + thisProxy[thisIndex / 2].insert(); + } + } else { + // Element is neither splitting nor joining. + } +} + +void DgElement::delete_old_elements() { + if (flag_ == 1 || flag_ == -1) { + print_action("deleting", thisIndex); + thisProxy[thisIndex].ckDestroy(); + } +} + +// Evaluate the AMR criteria (for this example, randomly choose whether to +// join, split, or remain the same). Then communicate these decisions to +// the neighbors of the element in case elements need to adjust their decisions +void DgElement::evaluate_refinement_criteria(int iteration) { + print_action("evaluating refinement criteria", thisIndex); + flag_ = iteration % 2 ? 1 : -1; //random_flag(refinement_level(thisIndex)); + + neighbor_flags_[neighbors_[0]] = flag_; + neighbor_flags_[neighbors_[1]] = flag_; + + print_data("Evaluate criteria"); +} + +// Initialize the data held by a newly created child element. +void DgElement::initialize_child(const ElementId_t& nonsibling_neighbor_id) { + print_action("initializing child", thisIndex); + init_flag = true; + if (thisIndex % 2 == 0) { + // I am the lower child + neighbors_[0] = nonsibling_neighbor_id; + neighbors_[1] = thisIndex + 1; + } else { + // I am the upper child + neighbors_[0] = thisIndex - 1; + neighbors_[1] = nonsibling_neighbor_id; + } +} + +// Initialize the initial elements +void DgElement::initialize_initial_elements() { + init_flag = true; + const int L = refinement_level(thisIndex); + const int I = index(thisIndex); + const int Imax = two_to_the(L) - 1; + // The interval is considered to be periodic so that the element on the + // lower boundary of the interval is a neighbor of the element on the + // upper boundary of the interval + neighbors_[0] = (I == 0 ? id(L, Imax) : thisIndex - 1); + neighbors_[1] = (I == Imax ? id(L, 0) : thisIndex + 1); +} + +// Initialize the data held by a newly created parent element. +void DgElement::initialize_parent( + const std::array& parent_neighbors) { + init_flag = true; + print_action("initializing parent", thisIndex); + neighbors_ = parent_neighbors; +} + +// After splitting, send data to all the newly created child elements of this +// element. Then delete the element. +void DgElement::send_data_to_children() { + print_action("sending data to children", thisIndex); + // Send data to lower child + CkPrintf("%i, Neighbors = %i, %i\n", thisIndex, neighbors_[0], neighbors_[1]); + thisProxy[2 * thisIndex].initialize_child( + new_lower_neighbor_id(neighbors_[0], neighbor_flags_.at(neighbors_[0]))); + // Send data to upper child + thisProxy[2 * thisIndex + 1].initialize_child( + new_upper_neighbor_id(neighbors_[1], neighbor_flags_.at(neighbors_[1]))); +} + +void DgElement::print_data(const std::string& action_name) { + if (output_data) { + CkPrintf( + "Element %i is executing %s.\nNeighbors: (%i, %i)\nFlag: %i\nNeighbor " + "flags: (%i,%i)\n", + thisIndex, action_name.c_str(), neighbors_[0], neighbors_[1], flag_, + neighbor_flags_.count(neighbors_[0]) == 1 + ? neighbor_flags_.at(neighbors_[0]) + : -2, + neighbor_flags_.count(neighbors_[1]) == 1 + ? neighbor_flags_.at(neighbors_[1]) + : -2); + } +} + +#include "random_amr.def.h" diff --git a/tests/charm++/amr_1d_simple/amr_1d_simple.ci b/tests/charm++/amr_1d_simple/amr_1d_simple.ci new file mode 100644 index 0000000000..c56011bdb5 --- /dev/null +++ b/tests/charm++/amr_1d_simple/amr_1d_simple.ci @@ -0,0 +1,29 @@ +mainmodule random_amr { + + readonly CProxy_Main mainProxy; + readonly CProxy_DgElement dgElementProxy; + + mainchare Main { + entry Main(CkArgMsg* msg); + entry void initialize(); + entry void create_new_elements(); + entry void adjust_domain(); + entry void delete_old_elements(); + entry void exit(); + }; + + array [1D] DgElement { + entry DgElement(); + entry void adjust_domain(); + entry void collect_data_from_children( + std::deque sibling_ids_to_collect, + std::array& parent_neighbors); + entry void create_new_elements(int iteration); + entry void delete_old_elements(); + entry void evaluate_refinement_criteria(int iteration); + entry void initialize_child(const ElementId_t& nonsibling_neighbor_id); + entry void initialize_initial_elements(); + entry void initialize_parent(std::array& parent_neighbors); + entry void send_data_to_children(); + }; +}; diff --git a/tests/charm++/amr_1d_simple/amr_1d_simple.h b/tests/charm++/amr_1d_simple/amr_1d_simple.h new file mode 100644 index 0000000000..a678f7da8f --- /dev/null +++ b/tests/charm++/amr_1d_simple/amr_1d_simple.h @@ -0,0 +1,59 @@ +#pragma once + +#include +#include +#include +#include + +// Chare array index for an element (0 is reserved for unknown) +using ElementId_t = int; +// A flag denoting the current AMR decision of an element +// -2 = NoDecision; -1 = Join; 0 = DoNothing; 1 = Split +using Flag_t = int; +using NeighborFlags_t = std::unordered_map; + +#include "random_amr.decl.h" + +class Main : public CBase_Main { + private: + int iteration{0}; + + public: + Main(CkArgMsg* msg); + void initialize(); + void create_new_elements(); + void adjust_domain(); + void delete_old_elements(); + void exit(); +}; + +class DgElement : public CBase_DgElement { + public: + bool init_flag; + + DgElement(); + void adjust_domain(); + void collect_data_from_children( + std::deque sibling_ids_to_collect, + std::array parent_neighbors); + void create_new_elements(int iteration); + void delete_old_elements(); + void evaluate_refinement_criteria(int iteration); + void initialize_child(const ElementId_t& nonsibling_neighbor_id); + void initialize_initial_elements(); + void initialize_parent(const std::array& parent_neighbors); + void send_data_to_children(); + + private: + void print_data(const std::string& action_name); + // Current AMR decision of element (see Flag_t above for meaning of values) + Flag_t flag_{-2}; + // The ids of the lower and upper neighbors + std::array neighbors_{{0, 0}}; + // The current AMR decision of neighboring elements + NeighborFlags_t neighbor_flags_{}; + // The number of pings received from neighbors during the check of neighbors + // The value is set to -1 prior to the check; 0 (lower neighbor) or 1 (upper + // neighbor) after the first ping; and 2 after both neighbors have pinged + int pings_received_{-1}; +}; diff --git a/tests/charm++/anytime_migration/Makefile b/tests/charm++/anytime_migration/Makefile new file mode 100644 index 0000000000..6cea554e83 --- /dev/null +++ b/tests/charm++/anytime_migration/Makefile @@ -0,0 +1,19 @@ +-include ../../common.mk +CHARMC=../../../bin/charmc $(OPTS) + +all: migrate + +migrate: migrate.decl.h migrate.C + $(CHARMC) migrate.C -o migrate + +migrate.decl.h: migrate.ci + $(CHARMC) migrate.ci + +test: migrate + $(call run, +p2 ./migrate) + +smptest: migrate + $(call run, +p2 ./migrate) + +clean: + rm -rf *.decl.h *.def.h migrate charmrun diff --git a/tests/charm++/anytime_migration/migrate.C b/tests/charm++/anytime_migration/migrate.C new file mode 100644 index 0000000000..d6b50344c9 --- /dev/null +++ b/tests/charm++/anytime_migration/migrate.C @@ -0,0 +1,79 @@ +#include +#include "migrate.decl.h" + +// This program is meant to test anytime migration and messaging in a simple context +// as a part of debugging the dynamic deletion-followed-by-reinsertion bug (#3660) +// It should be run on exactly 2 PEs with 3 chare array elements +// it is expected that A[0] lives on pe 0, A[2] on pe 1, and A[1] will alternate its location +// every MIGRATION_PERIOD steps. +// If the mapping is not right, then we should manually insert it on specific PEs. +// (but seems like the default map is doing the right thing) + +// The baseline program does the following: +// each element (in parallel) in its sayHi Method, sends ackPlease() to its next element +// ackPlease sends sayHi() to its predecessor. +// a count, passed as a parameter, is decremented by sayHi +// program stops via quiescence detection after counts reach 0. + +#define MIGRATION_PERIOD 5 +/*readonly*/ CProxy_Main mainProxy; +/*readonly*/ CProxy_Hello arrProxy; +/*readonly*/ int nElements; + +/*mainchare*/ +class Main : public CBase_Main +{ +public: + Main(CkArgMsg* m) + { + //Process command-line arguments + nElements=3; + if(m->argc >1 ) nElements=atoi(m->argv[1]); + delete m; + + //Start the computation + CkPrintf("Running Hello on %d processors for %d elements\n", + CkNumPes(),nElements); + mainProxy = thisProxy; + + arrProxy = CProxy_Hello::ckNew(nElements); + arrProxy.SayHi(12); + CkStartQD(CkCallback(CkIndex_Main::done(),thisProxy)); + }; + + void done(void) + { + CkPrintf("All done\n"); + CkExit(); + }; +}; + +/*array [1D]*/ +class Hello : public CBase_Hello +{ +public: + Hello() + { + CkPrintf("Hello[%d] on PE %d: created.\n",thisIndex, CkMyPe()); + } + + Hello(CkMigrateMessage *m) {} + + void SayHi(int count) + { + CkPrintf("Hello[%d] on PE %d : Saying Hi with count = %d\n",thisIndex,CkMyPe(),count); + if (count > 0) + thisProxy[(thisIndex+1)%nElements].ackPlease(thisIndex, count-1); + if (1 == (count % MIGRATION_PERIOD)) migrateMe(1-CkMyPe()); + // using 1 because no point migrating when you are about to exit + // 1 - CkMyPe() ensures it migrates between PE 0 and 1 (assuming it started on one of them.. + // This code is meant to be used on exactly 2 PEs anyway. + } + void ackPlease(int prev,int c) { + CkPrintf("Hello[%d] on PE %d: acking with count= %d\n",thisIndex,CkMyPe(),c); + thisProxy[prev].SayHi(c); + } + +}; + +#include "migrate.def.h" diff --git a/tests/charm++/anytime_migration/migrate.ci b/tests/charm++/anytime_migration/migrate.ci new file mode 100644 index 0000000000..ec8edf27d0 --- /dev/null +++ b/tests/charm++/anytime_migration/migrate.ci @@ -0,0 +1,15 @@ +mainmodule migrate { + readonly CProxy_Main mainProxy; + readonly int nElements; + + mainchare Main { + entry Main(CkArgMsg *m); + entry void done(void); + }; + + array [1D] Hello { + entry Hello(void); + entry void SayHi(int hiNum); + entry void ackPlease(int prev, int count); +}; +}; diff --git a/tests/charm++/dynamic_insertion/Makefile b/tests/charm++/dynamic_insertion/Makefile new file mode 100644 index 0000000000..e90675f49c --- /dev/null +++ b/tests/charm++/dynamic_insertion/Makefile @@ -0,0 +1,25 @@ +-include ../../common.mk +CHARMC=../../../bin/charmc $(OPTS) + +all: dynamic_insertion + +dynamic_insertion: dynamic_insertion.decl.h dynamic_insertion.C + $(CHARMC) dynamic_insertion.C -o dynamic_insertion + +dynamic_insertion.decl.h: dynamic_insertion.ci + $(CHARMC) dynamic_insertion.ci + +test: dynamic_insertion + $(call run, +p1 ./dynamic_insertion) + $(call run, +p2 ./dynamic_insertion) + $(call run, +p4 ./dynamic_insertion) + +testp: dynamic_insertion + $(call run, +p$(P) ./dynamic_insertion) + +smptest: dynamic_insertion + $(call run, +p2 ./dynamic_insertion) + $(call run, +p4 ./dynamic_insertion) + +clean: + rm -rf *.decl.h *.def.h dynamic_insertion charmrun diff --git a/tests/charm++/dynamic_insertion/dynamic_insertion.C b/tests/charm++/dynamic_insertion/dynamic_insertion.C new file mode 100644 index 0000000000..dacbe01e03 --- /dev/null +++ b/tests/charm++/dynamic_insertion/dynamic_insertion.C @@ -0,0 +1,155 @@ +// This test creates an empty array chare DgElement. +// +// Next it inserts an element on each PE. +// +// Then it performs a number of iterations. +// +// In each iteration, all elements are pinged which triggers a reduction +// checking that the sum of contributed ints is equal to the expected value. +// +// During some iterations (controlled by strides), CkNumPes() new elements are +// inserted into the array chare in one of three ways: +// - the main chare inserts the new element +// - a specific array element inserts the new element +// - a specific member of a group chare inserts the new element +// +// Each array element stores the iteration on which it is created +// The id of a newly created array element is iteration*CkNumPes() + i +// where 0 <= i < CkNumPes() +// +// During a reduction each element contributes thisIndex*iteration + +#include "dynamic_insertion.h" + +/*readonly*/ CProxy_Main mainProxy; +/*readonly*/ CProxy_DgGroup dgGroupProxy; +/*readonly*/ CProxy_DgElement dgElementProxy; + +namespace { +static constexpr bool print_phase = true; +static constexpr bool print_action = true; +static constexpr int main_creation_stride = 3; +static constexpr int array_creation_stride = 5; +static constexpr int group_creation_stride = 7; +static constexpr int number_of_iterations = 10; +} // namespace + +Main::Main(CkArgMsg* msg) { + delete msg; + dgGroupProxy = CProxy_DgGroup::ckNew(); + dgElementProxy = CProxy_DgElement::ckNew(); + dgElementProxy.doneInserting(); + CkStartQD(CkCallback(CkIndex_Main::initialize(), mainProxy)); +} + +void Main::initialize() { + if (print_phase) { + CkPrintf("Main is in phase initialize during iteration %i\n", iteration); + } + const int number_of_procs = CkNumPes(); + for (int i = 0; i < number_of_procs; ++i) { + dgElementProxy(i).insert(iteration, i); + sum_of_indices += i; + } + CkStartQD(CkCallback(CkIndex_Main::end_array_insertion(), mainProxy)); +} + +void Main::ping_elements() { + ++iteration; + if (print_phase) { + CkPrintf("Main is in phase ping during iteration %i\n", iteration); + } + dgElementProxy.ping(iteration); + CkStartQD(CkCallback(CkIndex_Main::begin_array_insertion(), mainProxy)); +} + +void Main::begin_array_insertion() { + dgGroupProxy.begin_array_insertion(); + CkStartQD(CkCallback(CkIndex_Main::create_new_elements(), mainProxy)); +} + +void Main::create_new_elements() { + if (print_phase) { + CkPrintf("Main is in phase create during iteration %i\n", iteration); + } + if (iteration % main_creation_stride == 0 || + iteration % group_creation_stride == 0 || + iteration % array_creation_stride == 0) { + const int number_of_procs = CkNumPes(); + const int offset = iteration*number_of_procs; + for (int i = 0; i < number_of_procs; ++i) { + if (iteration % array_creation_stride == 0) { + // create a new element on a specific existing element + dgElementProxy(i).create_new_element(iteration, offset + i); + } else if (iteration % main_creation_stride == 0) { + // create a new element directly on main chare + dgElementProxy(offset + i).insert(iteration, i); + } else { + // create a new element from a specific group member + dgGroupProxy[i].create_new_element(iteration, offset + i); + } + sum_of_indices += offset + i; + } + } + CkStartQD(CkCallback(CkIndex_Main::end_array_insertion(), mainProxy)); +} + +void Main::end_array_insertion() { + dgGroupProxy.end_array_insertion(); + if (iteration >= number_of_iterations) { + CkStartQD(CkCallback(CkIndex_Main::exit(), mainProxy)); + } else { + CkStartQD(CkCallback(CkIndex_Main::ping_elements(), mainProxy)); + } +} + +void Main::exit() { + if (print_phase) { + CkPrintf("Main is in phase exit during iteration %i\n", iteration); + } + CkExit(); +} + +void Main::check_sum(const int sum) { + CkPrintf("Main is checking sum %i during iteration %i is %i\n", sum, + iteration, iteration * sum_of_indices); + CkAssert(sum == iteration*sum_of_indices); +} + +DgGroup::DgGroup() {} + +void DgGroup::begin_array_insertion() { + dgElementProxy.beginInserting(); +} + +void DgGroup::end_array_insertion() { + dgElementProxy.doneInserting(); +} + +void DgGroup::create_new_element(const int iteration, const int new_id) { + dgElementProxy(new_id).insert(iteration); +} + +DgElement::DgElement(const int iteration) : iteration_at_creation(iteration) { + if (print_action) { + CkPrintf("Created element %i on (N%i, C%i) during iteration %i\n", + thisIndex, CkMyNode(), CkMyPe(), iteration); + } +} + +void DgElement::ping(const int iteration) { + if (print_action) { + CkPrintf("Pinged element %i on (N%i, C%i) during iteration %i\n", thisIndex, + CkMyNode(), CkMyPe(), iteration); + } + CkAssert(iteration > iteration_at_creation); + int value = thisIndex*iteration; + contribute(sizeof(int), &value, CkReduction::sum_int, + CkCallback(CkReductionTarget(Main, check_sum), mainProxy)); +} + +void DgElement::create_new_element(const int iteration, const int new_id) { + thisProxy(new_id).insert(iteration, CkMyPe()); +} + +#include "dynamic_insertion.def.h" diff --git a/tests/charm++/dynamic_insertion/dynamic_insertion.ci b/tests/charm++/dynamic_insertion/dynamic_insertion.ci new file mode 100644 index 0000000000..0c27fddf77 --- /dev/null +++ b/tests/charm++/dynamic_insertion/dynamic_insertion.ci @@ -0,0 +1,28 @@ +mainmodule dynamic_insertion { + + readonly CProxy_Main mainProxy; + readonly CProxy_DgElement dgElementProxy; + mainchare Main { + entry Main(CkArgMsg* msg); + entry void initialize(); + entry void create_new_elements(); + entry void ping_elements(); + entry void exit(); + entry [reductiontarget] void check_sum(int sum); + entry void begin_array_insertion(); + entry void end_array_insertion(); + }; + + group DgGroup { + entry DgGroup(); + entry void begin_array_insertion(); + entry void end_array_insertion(); + entry void create_new_element(int iteration, int new_id); + }; + + array [1D] DgElement { + entry DgElement(int iteration); + entry void ping(int iteration); + entry void create_new_element(int iteration, int new_id); + }; +}; diff --git a/tests/charm++/dynamic_insertion/dynamic_insertion.h b/tests/charm++/dynamic_insertion/dynamic_insertion.h new file mode 100644 index 0000000000..962a4b71e6 --- /dev/null +++ b/tests/charm++/dynamic_insertion/dynamic_insertion.h @@ -0,0 +1,33 @@ +#include "dynamic_insertion.decl.h" + +class Main : public CBase_Main { + private: + int iteration{0}; + int sum_of_indices{0}; + public: + Main(CkArgMsg* msg); + void initialize(); + void create_new_elements(); + void ping_elements(); + void exit(); + void check_sum(int sum); + void begin_array_insertion(); + void end_array_insertion(); +}; + +class DgGroup : public CBase_DgGroup { +public: + DgGroup(); + void begin_array_insertion(); + void end_array_insertion(); + void create_new_element(int iteration, int new_id); +}; + +class DgElement : public CBase_DgElement { + public: + DgElement(int iteration); + void ping(int iteration); + void create_new_element(int iteration, int new_id); +private: + int iteration_at_creation; +}; diff --git a/tests/charm++/dynamic_insertion_deletion/Makefile b/tests/charm++/dynamic_insertion_deletion/Makefile new file mode 100644 index 0000000000..539a01e2c6 --- /dev/null +++ b/tests/charm++/dynamic_insertion_deletion/Makefile @@ -0,0 +1,24 @@ +-include ../../common.mk +CHARMC=../../../bin/charmc $(OPTS) + +all: dynamic_insertion_deletion + +dynamic_insertion_deletion: dynamic_insertion_deletion.decl.h dynamic_insertion_deletion.C + $(CHARMC) dynamic_insertion_deletion.C -o dynamic_insertion_deletion + +dynamic_insertion_deletion.decl.h: dynamic_insertion_deletion.ci + $(CHARMC) dynamic_insertion_deletion.ci + +test: dynamic_insertion_deletion + $(call run, +p3 ./dynamic_insertion_deletion) + +testp: dynamic_insertion_deletion + $(call run, +p$(P) ./dynamic_insertion_deletion) + +smptest: dynamic_insertion_deletion + $(call run, +p2 ./dynamic_insertion_deletion) + $(call run, +p3 ./dynamic_insertion_deletion) + $(call run, +p4 ./dynamic_insertion_deletion) + +clean: + rm -rf *.decl.h *.def.h dynamic_insertion_deletion charmrun diff --git a/tests/charm++/dynamic_insertion_deletion/dynamic_insertion_deletion.C b/tests/charm++/dynamic_insertion_deletion/dynamic_insertion_deletion.C new file mode 100644 index 0000000000..b1444319b5 --- /dev/null +++ b/tests/charm++/dynamic_insertion_deletion/dynamic_insertion_deletion.C @@ -0,0 +1,261 @@ +// This test tests dynamic insertion and deletion of array elements meant to +// be used in an AMR code. + +// The array chare DgElement represent non-overlapping elements that cover the +// unit interval. The id of an element is determined by its refinement level L +// and its index I. There are 2^L possible elements for refinement level L, +// indexed left-to-right from [0, 2^L -1]. The unique id of an element is +// given by id = 2^L + I +// +// Level 0 |---------------------------------------------------------------| +// id = 1 = 2^0 + 0 +// Level 1 |-------------------------------|-------------------------------| +// id = 2 = 2^1 + 0 id = 3 = 2^1 + 1 +// Level 2 |---------------|---------------|---------------|---------------| +// id = 4 = 2^2+0 id = 5 = 2^2+1 id = 6 = 2^2+2 id = 7 = 2^2+3 +// Level 3 |-------|-------|-------|-------|-------|-------|-------|-------| +// id = 8 id = 9 id = 10 id = 11 id = 12 id = 13 id = 14 id = 15 +// Level 4 |---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---| +// 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 + +// This test creates an empty array chare DgElement. +// Then it creates the 2^L elements on the initial_refinement_level +// Then it performs a given number_of_iterations +// +// In each iteration: +// - It first checks the volume covered by the elements, +// by performing a reduction over all elements. This volume should be 1. +// +// - Next an unordered_map is built on the main chare by having all elements +// send their PE to main +// +// - Next, the main chare loops over the unordered_map and pings each element. +// When an element is pinged, it pings the main chare to remove the element +// from the unordered_map +// +// - Next new elements are created. On odd iterations, each element creates +// its two children. On even iterations, the lower child creates its +// parent +// +// - Finally the old elements are deleted. Thus the AMR grid is cycling +// back and forth between two refinement levels. + +#include "dynamic_insertion_deletion.h" +#include + +/*readonly*/ CProxy_Main mainProxy; +/*readonly*/ CProxy_DgElement dgElementProxy; + +namespace { +static constexpr bool print_iteration = true; +static constexpr bool print_phase = true; +static constexpr bool print_action = true; +static constexpr bool print_ping = true; + +static constexpr size_t initial_refinement_level = 2; + +static constexpr size_t number_of_iterations = 40; + +constexpr size_t two_to_the(size_t n) { return 1 << n; } + +constexpr size_t initial_number_of_elements = + two_to_the(initial_refinement_level); + +size_t refinement_level(const ElementId_t id) { + return std::floor(std::log2(id)); +} + +size_t index(const ElementId_t id) { + return static_cast(id) % two_to_the(refinement_level(id)); +} + +double fraction_of_block_volume(const ElementId_t& element_id) { + return 1.0 / two_to_the(refinement_level(element_id)); +} + +} // namespace + +Main::Main(CkArgMsg* msg) { + delete msg; + dgElementProxy = CProxy_DgElement::ckNew(); + dgElementProxy.doneInserting(); + CkStartQD(CkCallback(CkIndex_Main::initialize(), mainProxy)); +} + +void Main::initialize() { + if (print_phase) { + CkPrintf("Main is in phase initialize\n"); + } + const int number_of_procs = CkNumPes(); + int which_proc = 0; + std::vector element_ids(initial_number_of_elements); + std::iota(element_ids.begin(), element_ids.end(), initial_number_of_elements); + for (size_t j = 0; j < element_ids.size(); ++j) { + dgElementProxy(element_ids[j]).insert(iteration, which_proc); + which_proc = (which_proc + 1 == number_of_procs ? 0 : which_proc + 1); + } + CkStartQD(CkCallback(CkIndex_Main::check_domain(), mainProxy)); +} + +void Main::check_domain() { + ++iteration; + if (print_iteration) { + CkPrintf("\n\n------------\nIteration %zu\n------------\n\n\n", + iteration); + } + if (print_phase) { + CkPrintf("Main is in phase check\n"); + } + dgElementProxy.send_volume(iteration); + + if (iteration > number_of_iterations) { + if(possible_hangs.size() > 1) { + CkPrintf("\n\n\n\nPossible hang didn't hang!\n\n\n\n\n\n"); + } + CkStartQD(CkCallback(CkIndex_Main::exit(), mainProxy)); + } else { + CkStartQD(CkCallback(CkIndex_Main::build_proc_map(), mainProxy)); + } +} + +void Main::build_proc_map() { + if (print_phase) { + CkPrintf("Main is in phase build proc map\n"); + } + dgElementProxy.send_proc_to_main(iteration); + CkStartQD(CkCallback(CkIndex_Main::ping_elements(), mainProxy)); +} + +void Main::ping_elements() { + if (print_phase) { + CkPrintf("Main is in phase ping\n"); + } + if (print_ping) { + CkPrintf("Potential hangs: "); + for (const auto& id_proc : possible_hangs) { + const auto& id = id_proc.first; + const auto& proc = id_proc.second; + if(0 != proc) { + CkPrintf("(%i,%i) ", id, proc); + } + } + CkPrintf("\n"); + } + for (const auto& id_proc : proc_map) { + const auto& id = id_proc.first; + const auto& proc = id_proc.second; + dgElementProxy[id].receive_ping(iteration); + } + CkStartQD(CkCallback(CkIndex_Main::create_new_elements(), mainProxy)); +} + +void Main::create_new_elements() { + if (print_phase) { + CkPrintf("Main is in phase create\n"); + } + dgElementProxy.create_new_elements(iteration); + CkStartQD(CkCallback(CkIndex_Main::delete_old_elements(), mainProxy)); +} + +void Main::delete_old_elements() { + if (print_phase) { + CkPrintf("Main is in phase delete\n"); + } + dgElementProxy.delete_old_elements(iteration); + CkStartQD(CkCallback(CkIndex_Main::check_domain(), mainProxy)); +} + +void Main::exit() { + if (print_phase) { + CkPrintf("Main is in phase exit\n"); + } + CkExit(); +} + +void Main::check_volume(const double volume) { + CkPrintf("Volume = %f at iteration %zu\n", volume, iteration); + if (volume != 1.0) { + CkAbort("Volume %f is not 1.0\n", volume); + } +} + +void Main::add_proc_to_map(const ElementId_t& id, const int proc) { + if(iteration == 1) { + initial_proc_map[id] = proc; + } else { + if (refinement_level(id) == initial_refinement_level && + proc != initial_proc_map[id]) { + possible_hangs[id] = proc; + } + } + proc_map[id] = proc; +} + +void Main::remove_proc_from_map(const ElementId_t& id, const int proc) { + CkAssert(proc == proc_map.at(id)); + proc_map.erase(id); +} + +DgElement::DgElement(const size_t iteration) + : iteration_at_creation(iteration) { + if (print_action) { + CkPrintf("Created element %i on (N%i, C%i) on iteration %zu\n", + thisIndex, CkMyNode(), CkMyPe(), iteration); + } +} + +void DgElement::create_new_elements(const size_t iteration) { + if (print_action) { + CkPrintf("Creating new elements %i on (N%i, C%i) on iteration %zu\n", + thisIndex, CkMyNode(), CkMyPe(), iteration); + } + if (iteration % 2 == 1) { + thisProxy(2 * thisIndex).insert(iteration); + thisProxy(2 * thisIndex + 1).insert(iteration); + } else { + if (thisIndex % 2 == 0) { + thisProxy(thisIndex / 2).insert(iteration); + } + } +} + +void DgElement::delete_old_elements(const size_t iteration) { + if (print_action) { + CkPrintf("Adjusting element %i on (N%i, C%i) on iteration %zu\n", thisIndex, + CkMyNode(), CkMyPe(), iteration); + } + const auto lev = refinement_level(thisIndex); + if (iteration % 2 == 1 && lev == initial_refinement_level) { + thisProxy[thisIndex].ckDestroy(); + } else if (iteration % 2 == 0 && lev == initial_refinement_level + 1) { + thisProxy[thisIndex].ckDestroy(); + } +} + +void DgElement::send_volume(const size_t iteration) { + const double volume = fraction_of_block_volume(thisIndex); + if (print_action) { + CkPrintf("Sending volume %f from element %i on (N%i, C%i) on iter %zu\n", + volume, thisIndex, CkMyNode(), CkMyPe(), iteration); + } + contribute(sizeof(double), &volume, CkReduction::sum_double, + CkCallback(CkReductionTarget(Main, check_volume), mainProxy)); +} + +void DgElement::send_proc_to_main(const size_t iteration) { + if (print_ping) { + CkPrintf("Element %i sending proc %i to main on (N%i, C%i) on iter %zu\n", + thisIndex, CkMyPe(), CkMyNode(), CkMyPe(), iteration); + } + mainProxy.add_proc_to_map(thisIndex, CkMyPe()); +} + +void DgElement::receive_ping(const size_t iteration) { + if (print_ping) { + CkPrintf("Pinged element %i on (N%i, C%i) on iteration %zu\n", thisIndex, + CkMyNode(), CkMyPe(), iteration); + } + mainProxy.remove_proc_from_map(thisIndex, CkMyPe()); +} + +#include "dynamic_insertion_deletion.def.h" diff --git a/tests/charm++/dynamic_insertion_deletion/dynamic_insertion_deletion.ci b/tests/charm++/dynamic_insertion_deletion/dynamic_insertion_deletion.ci new file mode 100644 index 0000000000..9a6f0e3a36 --- /dev/null +++ b/tests/charm++/dynamic_insertion_deletion/dynamic_insertion_deletion.ci @@ -0,0 +1,30 @@ +// Distributed under the MIT License. +// See LICENSE.txt for details. + +mainmodule dynamic_insertion_deletion { + + readonly CProxy_Main mainProxy; + readonly CProxy_DgElement dgElementProxy; + mainchare Main { + entry Main(CkArgMsg* msg); + entry void initialize(); + entry void check_domain(); + entry void build_proc_map(); + entry void add_proc_to_map(const ElementId_t& id, const int proc); + entry void create_new_elements(); + entry void delete_old_elements(); + entry void ping_elements(); + entry void remove_proc_from_map(const ElementId_t& id, const int proc); + entry void exit(); + entry [reductiontarget] void check_volume(const double volume); + }; + + array [1D] DgElement { + entry DgElement(const size_t iteration); + entry void create_new_elements(const size_t iteration); + entry void delete_old_elements(const size_t iteration); + entry void send_volume(const size_t iteration); + entry void send_proc_to_main(const size_t iteration); + entry void receive_ping(const size_t iteration); + }; +}; diff --git a/tests/charm++/dynamic_insertion_deletion/dynamic_insertion_deletion.h b/tests/charm++/dynamic_insertion_deletion/dynamic_insertion_deletion.h new file mode 100644 index 0000000000..e452c1460c --- /dev/null +++ b/tests/charm++/dynamic_insertion_deletion/dynamic_insertion_deletion.h @@ -0,0 +1,39 @@ +#include +#include + +using ElementId_t = int; + +#include "dynamic_insertion_deletion.decl.h" + +class Main : public CBase_Main { + private: + size_t iteration{0}; + std::unordered_map proc_map{}; + std::unordered_map initial_proc_map{}; + std::unordered_map possible_hangs{}; + public: + Main(CkArgMsg* msg); + void initialize(); + void check_domain(); + void create_new_elements(); + void delete_old_elements(); + void exit(); + void check_volume(const double volume); + void build_proc_map(); + void add_proc_to_map(const ElementId_t& id, const int proc); + void remove_proc_from_map(const ElementId_t& id, const int proc); + void ping_elements(); +}; + +class DgElement : public CBase_DgElement { + public: + DgElement(const size_t iteration); + void create_new_elements(const size_t iteration); + void delete_old_elements(const size_t iteration); + void send_volume(const size_t iteration); + void receive_ping(const size_t iteration); + void send_proc_to_main(const size_t iteration); + + private: + size_t iteration_at_creation; +}; From afe77e538019322e61c9c5b894620564af34534a Mon Sep 17 00:00:00 2001 From: Nils Vu Date: Mon, 15 Aug 2022 03:04:46 +0200 Subject: [PATCH 077/155] Fix mention of CUDA support in docs --- doc/charm++/manual.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/charm++/manual.rst b/doc/charm++/manual.rst index a00c37287d..b909bf3b0d 100644 --- a/doc/charm++/manual.rst +++ b/doc/charm++/manual.rst @@ -9166,7 +9166,7 @@ Enabling GPU Support GPU support via GPU Manager and HAPI is not included by default when building Charm++. Use ``build`` with the ``cuda`` option to build Charm++ -with GPU support (CMake build is currently not supported), e.g. +with GPU support (or configure CMake with ``-D CUDA=ON``), e.g. .. code-block:: bash From f7b056bebf07d58cb3676767249ccf4527895b66 Mon Sep 17 00:00:00 2001 From: Eric Bohm Date: Wed, 8 Feb 2023 13:29:27 -0800 Subject: [PATCH 078/155] Bugfix #3688: Revise error message for Cray EX --- src/util/topomanager/CrayNid.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/util/topomanager/CrayNid.c b/src/util/topomanager/CrayNid.c index 61bbfa3362..e6775ccf45 100644 --- a/src/util/topomanager/CrayNid.c +++ b/src/util/topomanager/CrayNid.c @@ -43,7 +43,11 @@ CLINKAGE int getXTNodeID(int mpirank, int nummpiranks) #if CMK_HAS_PMI_GET_NID /* if it is a XT4/5 or XE */ PMI_Get_nid(mpirank, &nid); #else +#if CMK_CRAYEX +#error "Cannot get network topology information on a Cray build. Load the cray-pmi module and then rebuild" +#else #error "Cannot get network topology information on a Cray build. Swap current module xt-mpt with xt-mpt/5.0.0 or higher and xt-asyncpe with xt-asyncpe/4.0 or higher and then rebuild" +#endif #endif return nid; From bb969f75db051975bc4bb35fd60a296f44ac81b2 Mon Sep 17 00:00:00 2001 From: Matthias Diener Date: Sun, 7 May 2023 22:26:32 -0500 Subject: [PATCH 079/155] remove Tau profiling/tracing support --- README.md | 1 - buildold | 63 +----- cmake/ci-files.cmake | 2 - src/ck-perf/CMakeLists.txt | 2 +- src/ck-perf/trace-Tau.C | 425 ------------------------------------- src/ck-perf/trace-Tau.ci | 15 -- src/ck-perf/trace-Tau.h | 74 ------- src/ck-perf/trace-TauBOC.h | 32 --- src/ck-perf/trace-common.C | 28 --- src/ck-perf/trace-common.h | 1 - src/conv-core/threads.C | 10 +- src/scripts/Make.cidepends | 1 - src/scripts/Make.tau | 3 - src/scripts/Makefile | 49 +---- src/scripts/charmc | 58 +---- 15 files changed, 20 insertions(+), 744 deletions(-) delete mode 100644 src/ck-perf/trace-Tau.C delete mode 100644 src/ck-perf/trace-Tau.ci delete mode 100644 src/ck-perf/trace-Tau.h delete mode 100644 src/ck-perf/trace-TauBOC.h delete mode 100644 src/scripts/Make.tau diff --git a/README.md b/README.md index 9a3ddb86a2..e9a90e4039 100644 --- a/README.md +++ b/README.md @@ -189,7 +189,6 @@ and run * `charm++` The basic Charm++ language * `AMPI` An implementation of MPI on top of Charm++ * `LIBS` Charm++, AMPI, and other libraries built on top of them -* `Tau` TAU's performance profiling/tracing `` is described above in the "How to choose a ``" section. diff --git a/buildold b/buildold index 8647bae9d1..0f0208f333 100755 --- a/buildold +++ b/buildold @@ -27,7 +27,6 @@ syntax() { echo ' LIBS compile additional parallel libraries with Charm++ core' echo ' charm4py compile shared library version of Charm++ for charm4py' echo ' msa build Multiphase Shared Arrays(MSA) library' - echo ' Tau build the TAU tracing library for generating TAU performance data' echo ' ChaNGa compile Charm++ core and necessary libraries for ChaNGa' echo ' everylb compile EveryLB suite of load balancing strategies' echo '' @@ -114,7 +113,6 @@ syntax() { echo " --with-lbtime-type specify real type for the load balancing timers" echo " --destination=DIR build Charm++ inside DIR, by default the destination is " echo " --suffix=DIR append DIR to the destination directory of the Charm++ build" - echo " --tau-makefile=FILE Specify which TAU stub makefile to use" fi echo '' echo ': normal compiler options e.g. -g -optimize -save -verbose' @@ -134,7 +132,6 @@ syntax() { echo ' ./build charm++ mpi-linux-x86_64 --incdir /usr/local/mpich/include --libdir /usr/local/mpich/lib -optimize' echo ' or in short,' echo ' ./build charm++ mpi-linux-x86_64 --basedir /usr/local/mpich -optimize' - echo ' ./build Tau --tau-makefile=/usr/local/packages/TAU/x86_64/lib/Makefile.tau-mpi' echo '' echo 'Note: This script:' echo ' 1. Creates directories and /tmp' @@ -167,7 +164,7 @@ printOption() { # echo "Checking for $prefix in $dir" files="$(cd "$dir"; ls $prefix-*.h 2>/dev/null)" opts+=" $(echo "$files" | sed 's/'$prefix'-\([^.]*\).h/\1/g')" - done + done tmp=.tmp.$$ rm -f "$tmp"; touch "$tmp" for o in $opts @@ -197,7 +194,7 @@ TestIfCompiler() { for dir in "${OPT_DIRS[@]}" do [[ -f "$dir/cc-$compilerName.sh" ]] && return 1 - done + done return 0 } @@ -206,8 +203,8 @@ TestIfOption() { do [[ -f "$dir/conv-mach-$1.h" ]] && return 1 done - - echo "Error> option: $1 is not supported in this version!"; + + echo "Error> option: $1 is not supported in this version!"; printOption } @@ -228,7 +225,6 @@ BUILD_SHARED="" # default no shared lib WITH_PRODUCTION= DESTINATION="" DESTINATION_SUFFIX="" -TAU_MAKEFILE="" QUIET="" BUILD_OMP=0 ONLY_CONFIGURE= @@ -358,7 +354,7 @@ do shift ;; --build-shared) - BUILD_SHARED="-build-shared"; + BUILD_SHARED="-build-shared"; shift ;; --ampi-only) @@ -371,7 +367,7 @@ do WITH_ROMIO=""; shift ;; --with-production) - WITH_PRODUCTION="true" + WITH_PRODUCTION="true" shift ;; --with-*) @@ -400,14 +396,6 @@ do DESTINATION_SUFFIX="${1#--suffix=}" shift ;; - --tau-makefile) - TAU_MAKEFILE=$1 - shift - ;; - --tau-makefile=*) - TAU_MAKEFILE="${1#--tau-makefile=}" - shift - ;; --quiet) MAKEOPTS+=(--quiet) QUIET="--quiet" @@ -443,7 +431,7 @@ do MAKEOPTS+=("$1") shift; ;; - -*) + -*) # Compiler option (like -g or -Dfoo), copy it over OPTS+=("$1") shift @@ -507,11 +495,11 @@ if [[ "$ARCH" = 'net' ]]; then exit 1; fi -#Check if building verbs on Omni-Path +#Check if building verbs on Omni-Path if [[ "$ARCH" = 'verbs' ]] && type /usr/sbin/opafabricinfo >/dev/null 2>&1; then echo "WARNING: Detected Omni-Path diagnostic tools."; echo "Verbs on Omni-Path architectures is not well supported: please use an OFI build instead."; -fi +fi if [[ -z "$MAKE" ]] then @@ -661,23 +649,6 @@ then CONFIG_OPTS=(--disable-controlpoint --disable-tracing --disable-tracing-commthread --disable-charmdebug --disable-replay --disable-error-checking --disable-stats "${CONFIG_OPTS[@]}") fi -# build with Tau -WITH_TAU=0 -if [[ "$PROGRAM" = 'Tau' ]] -then - Echo "TAU>>>> makefile config option: $TAU_MAKEFILE" - if [[ -n "$TAU_MAKEFILE" && -f "$TAU_MAKEFILE" ]] - then - #Setting up TAU trace library: - Echo "TAU>>>> configuring with this TAU makefile: $TAU_MAKEFILE" - - WITH_TAU=1 - else - Echo "TAU>>>> ERROR could not find Makefile: $TAU_MAKEFILE, ignored" - TAU_MAKEFILE="" - fi -fi - if [[ "$PROGRAM" = 'ChaNGa' ]] then #Setting lbuserdata when the build is ChaNGa @@ -798,7 +769,6 @@ else touch "$DESTINATION/tmp/Make.lb" fi "$DESTINATION/tmp/system_ln" "$srcbase/scripts/Makefile" "$DESTINATION/tmp/Makefile" -"$DESTINATION/tmp/system_ln" "$srcbase/scripts/Make.tau" "$DESTINATION/tmp/Make.tau" "$DESTINATION/tmp/system_ln" "$srcbase/scripts/Make.gpu" "$DESTINATION/tmp/Make.gpu" touch "$DESTINATION/tmp/Makefile.machine" touch "$DESTINATION/tmp/Make.extlib" @@ -895,21 +865,6 @@ then echo '#define CMK_OPTIMIZE 1' >> "$ConvHeader" fi -if [[ $WITH_TAU -eq 1 ]] -then - [[ -z "$TAU_MAKEFILE" ]] && TAU_MAKEFILE='Make.tau' - SED_CHARMC="s@TAU_MAKEFILE=\(.*\)@TAU_MAKEFILE=$TAU_MAKEFILE@" - - sed -e "$SED_CHARMC" "$srcbaseabs/scripts/Makefile" > .Makefile.$$ && cp .Makefile.$$ "$srcbaseabs/scripts/Makefile" && rm -f .Makefile.$$ - sed -e "$SED_CHARMC" "$srcbaseabs/scripts/charmc" > .charmc.$$ && cp .charmc.$$ "$srcbaseabs/scripts/charmc" && rm -f .charmc.$$ - - echo "#define CMK_WITH_TAU 1" >> "$ConvHeader" - echo "#define pthread_create tau_pthread_create" >> "$ConvHeader" - echo "#define pthread_exit tau_pthread_exit" >> "$ConvHeader" - - echo "CMK_WITH_TAU=\"true\"" >> "$ConvSh" -fi - CMK_VDIR="$BASEVERSION" echo "$CMK_VDIR" > "$DESTINATION/tmp/.vdir" echo 'CMK_VDIR="'$CMK_VDIR'"' >> "$ConvSh" diff --git a/cmake/ci-files.cmake b/cmake/ci-files.cmake index 054023edd0..7efd5bb03a 100644 --- a/cmake/ci-files.cmake +++ b/cmake/ci-files.cmake @@ -77,8 +77,6 @@ foreach(in_f ${ci-files}) elseif(${in_f} MATCHES src/libs/ck-libs/pmaf/pgm.ci) # set(ci-output Pgm.decl.h) # disabled ; should be renamed ; not needed during LIBS build continue() - elseif(${in_f} MATCHES src/ck-perf/trace-Tau.ci) - set(ci-output TraceTau.decl.h) elseif(${in_f} MATCHES src/ck-perf/trace-summary.ci) set(ci-output TraceSummary.decl.h) elseif(${in_f} MATCHES src/ck-perf/trace-simple.ci) diff --git a/src/ck-perf/CMakeLists.txt b/src/ck-perf/CMakeLists.txt index 20b295b07e..55f0498c98 100644 --- a/src/ck-perf/CMakeLists.txt +++ b/src/ck-perf/CMakeLists.txt @@ -1,4 +1,4 @@ -set(ckperf-h-sources trace-Tau.h trace-TauBOC.h +set(ckperf-h-sources trace-controlPoints.h trace-controlPointsBOC.h trace-counter.h trace-common.h trace-memory.h trace-projections.h trace-projectionsBOC.h trace-projector.h trace-simple.h trace-simpleBOC.h trace-summary.h trace-summaryBOC.h diff --git a/src/ck-perf/trace-Tau.C b/src/ck-perf/trace-Tau.C deleted file mode 100644 index 77f0120e42..0000000000 --- a/src/ck-perf/trace-Tau.C +++ /dev/null @@ -1,425 +0,0 @@ -#include -#include "charm++.h" -#include "trace-Tau.h" -#include "trace-TauBOC.h" -#include "trace-common.h" -#include "TAU.h" -//#include "tau_selective.cpp" -#include "map" -#include "stack" -#include -using namespace std; - -#if defined(_WIN32) -#include -#define CHDIR _chdir -#define GETCWD _getcwd -#define PATHSEP '\\' -#define PATHSEPSTR "\\" -#else -#include -#define CHDIR chdir -#define GETCWD getcwd -#define PATHSEP '/' -#define PATHSEPSTR "/" -#endif - -/*#ifndef PROFILING_ON -void TAU_PROFILER_CREATE(void *p, char *n, char *s, taugroup_t t) { -dprintf("---> tau -create profiler: %s \n", s); } - -void TAU_PROFILER_STOP(void *p) { dprintf("---> tau -stop profiler"); } - -void TAU_PROFILER_START(void *p) { dprintf("---> tau -start profiler"); } - -void TAU_PROFILE_SET_NODE(int i) { dprintf("---> tau -set node"); } -#endif -*/ - -#ifdef DEBUG_PROF -#define dprintf printf -#else // DEBUG_PROF -#define dprintf if (0) printf -#endif - -extern bool processFileForInstrumentation(const string& file_name); -extern void printExcludeList(); -extern bool instrumentEntity(const string& function_name); -extern int processInstrumentationRequests(char *fname); - -// Charm++ "processor"(user thread)-private global variable -CkpvStaticDeclare(TraceTau*, _trace); - -// This global variable is required for any post-execution -// parallel analysis or activities the trace module might wish to perform. -CkGroupID traceTauGID; - -/** - For each TraceFoo module, _createTraceFoo() must be defined. - This function is called in _createTraces() generated in moduleInit.C -*/ - -void *idle, *comp; -//char *name = "default"; -bool profile = true, snapshotProfiling = false; - -//map events; -void* events[5000]; -stack eventStack; -int EX_VALUE = 0; -void *EXCLUDED = &EX_VALUE; -void startEntryEvent(int id) -{ - dprintf("---------> starting Entry Event with id: %d\n", id); - - if ((id == -1) || (events[id] == NULL)) - { - dprintf("-------> create event with id: %d\n", id); - //sprintf(name, "Event %d", id); - if (id == -1) - { /* - char *name = "dummy_thread_ep"; - dprintf(" ------> creating event: %s\n", name); - TAU_PROFILER_CREATE(events[id], name, "", TAU_DEFAULT); - dprintf("timer created.\n"); - eventStack.push(events[id]); - dprintf(" ------> starting event: %s\n", (char*) name); - TAU_PROFILER_START(eventStack.top());*/ - //exclude dummy event - dprintf("------> excluding dummy function"); - eventStack.push(EXCLUDED); - } - else - { - //string check("doFFT(RSFFTMsg* impl_msg)"); - //string name_s(_entryTable[id]->name); - //printf("checking name4: %s", _entryTable[id]->name); - //if (check.compare(name_s) != 0) - //{ - char name[500]; - snprintf(name, sizeof(name), "%s::%s::%d", _chareTable[_entryTable[id]->chareIdx]->name, - _entryTable[id]->name, id); - //should this fuction be excluded from instrumentation? - if (!instrumentEntity(name)) - { - //exclude function. - dprintf("------> excluding function %s\n", name); - events[id] = EXCLUDED; - eventStack.push(events[id]); - } - else - { - dprintf(" ------> creating event: %s\n", name); - TAU_PROFILER_CREATE(events[id], name, "", TAU_DEFAULT); - dprintf("timer created.\n"); - eventStack.push(events[id]); - dprintf("starting event\n"); - dprintf(" ------> starting event: %s\n", (char*) name); - TAU_PROFILER_START(eventStack.top()); - } - dprintf("done.\n"); - } - } - else - { - eventStack.push(events[id]); - if (events[id] != EXCLUDED) - { - TAU_PROFILER_START(eventStack.top()); - } - } -} - -void stopEntryEvent() -{ - dprintf("stop timer...\n"); - if (eventStack.top() != EXCLUDED) - { - TAU_PROFILER_STOP(eventStack.top()); - } - eventStack.pop(); -} - - -void _createTraceTau(char **argv) -{ - //TAU_INIT(1, argv); - memset(events, 0, sizeof(void *)*5000); - //CkPrintf("NEWEST VERSION"); - dprintf("arguments:\n"); - dprintf("[0] = %s, ", argv[0]); - dprintf("[1] = %s, ", argv[1]); - dprintf("[2] = %s, ", argv[2]); - dprintf("\n"); - string disable = "disable-profiling"; - if (argv[1] == NULL) { profile = true; } - else if (argv[1] == disable) { profile = false; } - if (not CkpvAccess(traceOn)) { - dprintf("traceoff selected using snapshot profiling.\n"); - snapshotProfiling = true; - } - - CkpvInitialize(TraceTau*, _trace); - CkpvAccess(_trace) = new TraceTau(argv); - CkpvAccess(_traces)->addTrace(CkpvAccess(_trace)); -} - -TraceTau::TraceTau(char **argv) -{ - if (CkpvAccess(traceOnPe) == 0) return; - - // Process runtime arguments intended for the module - CmiGetArgIntDesc(argv,"+TauPar0", &par0, "Fake integer parameter 0"); - CmiGetArgDoubleDesc(argv,"+TauPar1", &par1, "Fake double parameter 1"); - //TAU_REGISTER_THREAD(); - if (profile) - { - if (strcmp(CkpvAccess(selective), "")) - { - //printf("select file: %s\n", CkpvAccess(selective)); - //processFileForInstrumentation(CkpvAccess(selective)); - processInstrumentationRequests(CkpvAccess(selective)); - printExcludeList(); - if (!instrumentEntity("Main::done(void)::99")) - { - dprintf("selective file working...\n"); - } - else - dprintf("selective flile not working...\n"); - } - - TAU_PROFILER_CREATE(idle, "Idle", "", TAU_DEFAULT); - //TAU_PROFILER_CREATE(entry,name,"", TAU_DEFAULT); - dprintf("before %p\n", comp); - TAU_PROFILER_CREATE(comp, "Main", "", TAU_DEFAULT); - dprintf("after %p\n", comp); - - //Need to add an entry timer to the top of the stack because - //traceTauExitFunction calls CkExit() which calls endExecute - eventStack.push(EXCLUDED); - } - else - { - dprintf("--> [TAU] creating timers...\n"); - } -} - -void TraceTau::userEvent(int eventID) -{ - dprintf("[%d] User Point Event id %d encountered\n", CkMyPe(), eventID); -} - -void TraceTau::userBracketEvent(int eventID, double bt, double et) { - dprintf("[%d] User Bracket Event id %d encountered\n", CkMyPe(), eventID); -} - -void TraceTau::creation(envelope *, int epIdx, int num) { - dprintf("[%d] Point-to-Point Message for Entry Method id %d sent\n", - CkMyPe(), epIdx); -} - -void TraceTau::creationMulticast(envelope *, int epIdx, int num, - const int *pelist) { - dprintf("[%d] Multicast Message for Entry Method id %d sent to %d pes\n", - CkMyPe(), epIdx, num); -} - -void TraceTau::creationDone(int num) { - dprintf("[%d] Last initiated send completes\n", CkMyPe()); -} - -void TraceTau::messageRecv(char *env, int pe) { - dprintf("[%d] Message from pe %d received by scheduler\n", - CkMyPe(), pe); -} - -void TraceTau::beginExecute(CmiObjId *tid) -{ - // CmiObjId is a 4-integer tuple uniquely identifying a migratable - // Charm++ object. Note that there are other non-migratable Charm++ - // objects that CmiObjId will not identify. - dprintf("[%d] Entry Method invoked using object id\n", CkMyPe()); - if (profile) { - startEntryEvent(-1); - } - else - { - dprintf("--> [TAU] starting entry timer...\n"); - } -} - -void TraceTau::beginExecute(envelope *e) -{ - // no message means thread execution - if (e == NULL) { - dprintf("[%d] Entry Method invoked via thread id %d\n", CkMyPe(), - _threadEP); - if (profile) { - startEntryEvent(-1); - } - else - { - dprintf("--> [TAU] starting entry timer...\n"); - } - // Below is what is found in trace-summary. - // beginExecute(-1,-1,_threadEP,-1); - } else { - dprintf("[%d] Entry Method %d invoked via message envelope\n", - CkMyPe(), e->getEpIdx()); - if (profile) { - startEntryEvent(e->getEpIdx()); - } - else - { - dprintf("--> [TAU] starting entry timer...\n"); - } - // Below is what is found in trace-summary. - // beginExecute(-1,-1,e->getEpIdx(),-1); - } -} - -void TraceTau::beginExecute(int event,int msgType,int ep,int srcPe, - int mlen, CmiObjId *idx) -{ - dprintf("[%d] Entry Method %d invoked by parameters\n", CkMyPe(), - ep); - if (profile) { - startEntryEvent(ep); - } - else - { - dprintf("--> [TAU] starting entry timer...\n"); - } -} - -void TraceTau::endExecute(void) -{ - if (profile) { - stopEntryEvent(); - } - else - { - dprintf("--> [TAU] stoping entry timer...\n"); - } - dprintf("[%d] Previously executing Entry Method completes\n", CkMyPe()); -} - -void TraceTau::beginIdle(double curWallTime) { - dprintf("[%d] Scheduler has no useful user-work\n", CkMyPe()); - if (profile) { - TAU_PROFILER_START(idle); - } - else - { - dprintf("--> [TAU] starting idle timer...\n"); - } -} - -void TraceTau::endIdle(double curWallTime) { - if (profile) { - TAU_PROFILER_STOP(idle); - } - else - { - dprintf("--> [TAU] stopping idle timer...\n"); - } - dprintf("[%d] Scheduler now has useful user-work\n", CkMyPe()); -} - -void TraceTau::beginComputation(void) -{ - dprintf("[%d] Computation Begins\n", CkMyPe()); - //TAU_DISABLE_ALL_GROUPS(); - // Code Below shows what trace-summary would do. - // initialze arrays because now the number of entries is known. - // _logPool->initMem(); -} - -void TraceTau::endComputation(void) -{ - dprintf("[%d] Computation Ends\n", CkMyPe()); -} - -void TraceTau::traceBegin(void) -{ - dprintf("[%d] >>>>>> Tracing Begins\n", CkMyPe()); - if (profile) { - dprintf("ptr: %p\n", comp); - TAU_DB_PURGE(); - TAU_ENABLE_ALL_GROUPS(); - TAU_PROFILER_START(comp); - } - else - { - dprintf("--> [TAU] starting computation timer...\n"); - } -} - -void TraceTau::traceEnd(void) -{ - dprintf("[%d] >>>>>> Tracing Ends\n", CkMyPe()); - if (profile){ - dprintf("ptr: %p\n", comp); - //TAU_PROFILER_STOP(comp); - TAU_PROFILE_EXIT("tracing complete."); - TAU_DISABLE_ALL_GROUPS(); - } - else - { - dprintf("--> [TAU] stopping computation timer and writing profiles\n"); - } - dprintf("[%d] Computation Ends\n", CkMyPe()); -} - -void TraceTau::malloc(void *where, int size, void **stack, int stackSize) -{ - dprintf("[%d] Memory allocation of size %d occurred\n", CkMyPe(), size); -} - -void TraceTau::free(void *where, int size) { - dprintf("[%d] %d-byte Memory block freed\n", CkMyPe(), size); -} - -void TraceTau::traceClose(void) -{ - dprintf("traceClose called.\n"); - CkpvAccess(_trace)->endComputation(); - CkpvAccess(_trace)->traceEnd(); - //TAU_PROFILE_EXIT("closing trace..."); - //dprintf(" [%d] Exit called \n", CkMyPe()); - //TAU_PROFILE_EXIT("exiting..."); - // remove myself from traceArray so that no tracing will be called. - CkpvAccess(_traces)->removeTrace(this); -} - -extern "C" void traceTauExitFunction() { - dprintf("traceTauExitFunction called.\n"); - //TAU_PROFILE_EXIT("exiting..."); - //TAU_PROFILE_EXIT("done"); - //eventStack.push(NULL); - CkContinueExit(); -} - -// Initialization of the parallel trace module. -void initTraceTauBOC() { - //void *main; - dprintf("tracetauboc setting node %d\n", CmiMyPe()); - if (profile) { - TAU_PROFILE_SET_NODE(CmiMyPe()); - } - else - { - dprintf("---> [TAU] settting node.\n"); - } - //TAU_PROFILER_CREATE(main, "main", "", TAU_DEFAULT); - //TAU_PROFILER_START(main); - if (CkMyRank() == 0) { - registerExitFn(traceTauExitFunction); - } -} - -#include "TraceTau.def.h" diff --git a/src/ck-perf/trace-Tau.ci b/src/ck-perf/trace-Tau.ci deleted file mode 100644 index 562f84ef3c..0000000000 --- a/src/ck-perf/trace-Tau.ci +++ /dev/null @@ -1,15 +0,0 @@ -module TraceTau { - - mainchare TraceTauInit { - entry TraceTauInit(CkArgMsg *m); - }; - - initnode void initTraceTauBOC(); - readonly CkGroupID traceTauGID; - - group [migratable] TraceTauBOC { - entry TraceTauBOC(void); - }; - -}; - diff --git a/src/ck-perf/trace-Tau.h b/src/ck-perf/trace-Tau.h deleted file mode 100644 index 83fd2dded5..0000000000 --- a/src/ck-perf/trace-Tau.h +++ /dev/null @@ -1,74 +0,0 @@ -#ifndef _VERBOSE_H -#define _VERBOSE_H - -#include -#include - -#include "trace.h" -#include "envelope.h" -#include "register.h" -#include "trace-common.h" - -/** - * TraceTau is a template for an instrumentation module making use of - * the tracing framework hooks provided in Charm++. - * - * Only the more common hooks are listened to in this module. - */ -class TraceTau : public Trace { - public: - int par0; - double par1; - public: - TraceTau(char **argv); - - // a user event has just occured - void userEvent(int eventID); - // a pair of begin/end user event has just occured - void userBracketEvent(int eventID, double bt, double et); - - // "creation" of message(s) - message Sends - void creation(envelope *, int epIdx, int num=1); - void creationMulticast(envelope *, int epIdx, int num=1, const int *pelist=NULL); - void creationDone(int num=1); - - void messageRecv(char *env, int pe); - - // ************************************************************** - // begin/end execution of a Charm++ entry point - // NOTE: begin/endPack and begin/endUnpack can be called in between - // a beginExecute and its corresponding endExecute. - void beginExecute(envelope *); - void beginExecute(CmiObjId *tid); - void beginExecute( - int event, // event type defined in trace-common.h - int msgType, // message type - int ep, // Charm++ entry point id - int srcPe, // Which PE originated the call - int ml, // message size - CmiObjId* idx); // index - void endExecute(void); - - // begin/end idle time for this pe - void beginIdle(double curWallTime); - void endIdle(double curWallTime); - - // begin/end of execution - void beginComputation(void); - void endComputation(void); - - //begin/end tracing - void traceBegin(void); - void traceEnd(void); - - /* Memory tracing */ - void malloc(void *where, int size, void **stack, int stackSize); - void free(void *where, int size); - - // do any clean-up necessary for tracing - void traceClose(); -}; - -#endif - -/*@}*/ diff --git a/src/ck-perf/trace-TauBOC.h b/src/ck-perf/trace-TauBOC.h deleted file mode 100644 index 5e762456d0..0000000000 --- a/src/ck-perf/trace-TauBOC.h +++ /dev/null @@ -1,32 +0,0 @@ -#include "TraceTau.decl.h" - -extern CkGroupID traceTauGID; - -// We typically declare parallel object classes here for the purposes of -// performing parallel operations for the trace module after the main -// application has completed execution (and calls CkExit()). -// -// TraceTauInit is an initialization class. -// -// TraceTauBOC is a one-per-processor object (defined in the .ci file as -// a "group" instead of a "chare") which hosts the methods for the -// parallel operations. In this case, there are no methods defined. -// Otherwise, one may write any Charm++ code here. - -class TraceTauInit : public Chare { - public: - TraceTauInit(CkArgMsg *m) { - delete m; - traceTauGID = CProxy_TraceTauBOC::ckNew(); - CProxy_TraceTauBOC tauProxy(traceTauGID); - } - TraceTauInit(CkMigrateMessage *m):Chare(m) {} -}; - -class TraceTauBOC : public CBase_TraceTauBOC { -public: - TraceTauBOC(void) {}; - TraceTauBOC(CkMigrateMessage *m) {}; -}; - - diff --git a/src/ck-perf/trace-common.C b/src/ck-perf/trace-common.C index 5476dc95e2..a4a310db36 100644 --- a/src/ck-perf/trace-common.C +++ b/src/ck-perf/trace-common.C @@ -70,7 +70,6 @@ CkpvDeclare(int, traceOnPe); CkpvDeclare(char*, traceRoot); CkpvDeclare(char*, partitionRoot); CkpvDeclare(int, traceRootBaseLength); -CkpvDeclare(char*, selective); CkpvDeclare(bool, verbose); bool outlierAutomatic; bool findOutliers; @@ -176,33 +175,6 @@ static void traceCommonInit(char **argv) strcat(CkpvAccess(traceRoot), argv[0]); } CkpvAccess(traceRootBaseLength) += strlen(subdir); - /* added for TAU trace module. */ - char *cwd; - CkpvInitialize(char*, selective); - if (CmiGetArgStringDesc(argv, "+selective", &temproot, "TAU's selective instrumentation file")) { - // Trying to decide if the traceroot path is absolute or not. If it is not - // then create an absolute pathname for it. - if (temproot[0] != PATHSEP) { - cwd = GETCWD(NULL,0); - root = (char *)malloc(strlen(cwd)+strlen(temproot)+2); - strcpy(root, cwd); - strcat(root, PATHSEPSTR); - strcat(root, temproot); - } else { - root = (char *)malloc(strlen(temproot)+1); - strcpy(root,temproot); - } - CkpvAccess(selective) = (char *) malloc(strlen(root)+1); - _MEMCHECK(CkpvAccess(selective)); - strcpy(CkpvAccess(selective), root); - if (CkMyPe() == 0) - CmiPrintf("Trace: selective: %s\n", CkpvAccess(selective)); - } - else { - CkpvAccess(selective) = (char *) malloc(3); - _MEMCHECK(CkpvAccess(selective)); - strcpy(CkpvAccess(selective), ""); - } outlierAutomatic = true; findOutliers = false; diff --git a/src/ck-perf/trace-common.h b/src/ck-perf/trace-common.h index e38cf6c1ce..71a09ad442 100644 --- a/src/ck-perf/trace-common.h +++ b/src/ck-perf/trace-common.h @@ -78,7 +78,6 @@ CkpvExtern(CmiInt8, CtrLogBufSize); CkpvExtern(char*, traceRoot); CkpvExtern(char*, partitionRoot); CkpvExtern(int, traceRootBaseLength); -CkpvExtern(char*, selective); CkpvExtern(bool, verbose); CkpvExtern(double, traceInitTime); CkpvExtern(double, traceInitCpuTime); diff --git a/src/conv-core/threads.C b/src/conv-core/threads.C index a0d13b4e0c..636673aaa4 100644 --- a/src/conv-core/threads.C +++ b/src/conv-core/threads.C @@ -1567,16 +1567,8 @@ CthThread CthCreate(CthVoidFn fn, void *arg, int size) } } - /* **CWL** Am assuming Gengbin left this unchanged because the macro - re-definition of pthread_create would not happen before this part of - the code. If the assumption is not true, then we can simply replace - this hash-if with the else portion. - */ -#if CMK_WITH_TAU - r = tau_pthread_create(&(result->self), &attr, CthOnly, (void*) result); -#else r = pthread_create(&(result->self), &attr, CthOnly, (void*) result); -#endif + if (0 != r) { CmiPrintf("pthread_create failed with %d\n", r); CmiAbort("CthCreate failed to created a new pthread\n"); diff --git a/src/scripts/Make.cidepends b/src/scripts/Make.cidepends index 9ab0d8f815..71e3aff443 100644 --- a/src/scripts/Make.cidepends +++ b/src/scripts/Make.cidepends @@ -34,7 +34,6 @@ f90main.decl.h f90main.def.h: f90main.ci.stamp mpi_main.decl.h mpi_main.def.h: mpi-mainmodule.ci.stamp PathHistory.decl.h PathHistory.def.h: pathHistory.ci.stamp TraceAutoPerf.decl.h TraceAutoPerf.def.h: picsautoperf.ci.stamp -TraceTau.decl.h TraceTau.def.h: trace-Tau.ci.stamp TraceControlPoints.decl.h TraceControlPoints.def.h: trace-controlPoints.ci.stamp TraceProjections.decl.h TraceProjections.def.h: trace-projections.ci.stamp TraceSimple.decl.h TraceSimple.def.h: trace-simple.ci.stamp diff --git a/src/scripts/Make.tau b/src/scripts/Make.tau deleted file mode 100644 index 567be5c821..0000000000 --- a/src/scripts/Make.tau +++ /dev/null @@ -1,3 +0,0 @@ - - -# empty diff --git a/src/scripts/Makefile b/src/scripts/Makefile index ca1754429c..ce11888093 100644 --- a/src/scripts/Makefile +++ b/src/scripts/Makefile @@ -127,15 +127,6 @@ msa: charm++ $(MAKE) -C libs/ck-libs/multiphaseSharedArrays -#include TAU defs -TAU_MAKEFILE=Make.tau -include $(TAU_MAKEFILE) #stub-makefile - -#builds TAU's trace library -Tau: - @echo "Building Charm trace library with support for TAU." - $(MAKE) $(L)/libtrace-Tau.a $(L)/libtrace-all.a TAU_TRACE_OBJ=libtrace-Tau.o - LIBS: CONVLIBS CHARMLIBS everylb @echo "Built LIBS successfully" @@ -217,7 +208,7 @@ CKHEADERS=ck.h ckstream.h objid.h envelope.h init.h qd.h charm.h charm++.h \ DistBaseLB.decl.h \ HybridBaseLB.decl.h EveryLB.decl.h CommonLBs.decl.h \ TraceSummary.decl.h TraceAutoPerf.decl.h TraceProjections.decl.h \ - TraceSimple.decl.h TraceControlPoints.decl.h TraceTau.decl.h \ + TraceSimple.decl.h TraceControlPoints.decl.h \ TraceUtilization.decl.h \ ControlPoints.decl.h PathHistory.decl.h \ pathHistory.h envelope-path.h \ @@ -340,7 +331,7 @@ endif ############################################################################### # # Converse Libraries -# +# ############################################################################### CLBLIBS=$(L)/libldb-rand.a $(L)/libldb-spray.a $(L)/libldb-workstealing.a $(L)/libldb-neighbor.a $(L)/libldb-none.a $(L)/libldb-test.a @@ -544,7 +535,7 @@ CONVLIBS: converse $(MAKE) -C libs convlibs $(L)/libconverse.a: $(LIBCONV_CORE) $(LIBCONV_UTIL) $(LIBCONV_PARTITION) $(LIBCONV_LDB) machine.o $(LIBTMGR) | hwloc-target - $(CHARMC) $(TAU_LIBS) -o $@ $^ $(wildcard hwloc/hwloc/*.o) $(wildcard hwloc/hwloc/*.obj) + $(CHARMC) -o $@ $^ $(wildcard hwloc/hwloc/*.o) $(wildcard hwloc/hwloc/*.obj) $(L)/conv-static.o: conv-static.o cp -f $< $@ @@ -592,7 +583,7 @@ $(L)/libldb-spray.a: cldb.spray.C $(CVHEADERS) # $(CHARMC) -o $@ cldb.prioritycentralized.C #//$(L)/libldb-prioritycentralizedopt.a: cldb.prioritycentralizedopt.c cldb.prioritycentralizedopt.h $(CVHEADERS) -#// $(CHARMC) -o $@ cldb.prioritycentralizedopt.c +#// $(CHARMC) -o $@ cldb.prioritycentralizedopt.c $(L)/libldb-test.a: cldb.test.C $(CVHEADERS) $(CHARMC) -o $@ cldb.test.C @@ -708,7 +699,7 @@ charm-target: loadbalancers default_libs $(L)/libmpi-mainmodule.a CHARMLIBS: charm++ CONVLIBS $(MAKE) -C libs charmlibs -$(L)/libck.a: $(LIBCK_CORE) +$(L)/libck.a: $(LIBCK_CORE) $(CHARMC) -o $@ $(LIBCK_CORE) ## Fortran @@ -758,32 +749,6 @@ LIBTRACE_SIMPLE=trace-simple.o $(L)/libtrace-simple.a: $(LIBTRACE_SIMPLE) $(CHARMC) -o $@ $(LIBTRACE_SIMPLE) -libtrace-Tau.o: trace-Tau.C charm++.h charm.h converse.h conv-config.h \ - conv-autoconfig.h conv-common.h conv-mach.h conv-mach-opt.h \ - conv-mach-ifort.h pup_c.h conv-cpm.h conv-cpath.h conv-qd.h \ - pup_c_functions.h \ - conv-random.h conv-lists.h conv-trace.h persistent.h debug-conv.h pup.h \ - middle.h middle-conv.h cklists.h ckbitvector.h ckstream.h init.h \ - ckhashtable.h debug-charm.h CkMarshall.decl.h cksection.h ckcallback.h \ - conv-ccs.h sockRoutines.h ccs-server.h ckobjQ.h ckreduction.h \ - CkReduction.decl.h cksyncbarrier.h CkSyncBarrier.decl.h \ - ckmemcheckpoint.h CkMemCheckpoint.decl.h readonly.h ckarray.h cklocrec.h ckmigratable.h \ - cklocation.h ckmulticast.h LBDatabase.h LBManager.h MetaBalancer.h RandomForestModel.h lbdb.h LBObj.h LBOM.h LBComm.h \ - LBMachineUtil.h LBManager.decl.h MetaBalancer.decl.h BaseLB.decl.h \ - CkLocation.decl.h CkMulticast.decl.h CkArray.decl.h objid.h envelope.h envelope-path.h XArraySectionReducer.h CkFutures.decl.h \ - waitqd.h waitqd.decl.h \ - sdag.h ckcheckpoint.h CkCheckpoint.decl.h \ - trace.h trace-simple.h \ - register.h trace-common.h trace-simpleBOC.h TraceSimple.decl.h \ - TraceSimple.def.h ckregex.h - $(CHARMC) -c -I. $(TAU_INCLUDE) $(TAU_DEFS) trace-Tau.C -o libtrace-Tau.o - -tau_selective.o: $(TAUROOT)/utils/tau_selective.cpp - $(CHARMC) -I$(TAUROOT)/utils -DTAU_DYNINST $(TAUROOT)/utils/tau_selective.cpp - -$(L)/libtrace-Tau.a: $(TAU_TRACE_OBJ) tau_selective.o - $(CHARMC) $(TAU_LIBS) -o $@ $(TAU_TRACE_OBJ) tau_selective.o $(TAU_TRACE_OBJ) - LIBTRACE_COUNT=trace-counter.o $(L)/libtrace-counter.a: $(LIBTRACE_COUNT) $(CHARMC) -o $@ $(LIBTRACE_COUNT) @@ -793,7 +758,7 @@ $(L)/libtrace-memory.a: $(LIBTRACE_MEMORY) $(CHARMC) -o $@ $(LIBTRACE_MEMORY) LIBTRACE_ALL=trace-all.o trace-projections.o trace-controlPoints.o picstreenode.o picsdecisiontree.o picsautoperfAPI.o picsautoperf.o trace-perf.o trace-summary.o trace-simple.o \ -$(TAU_TRACE_OBJ) trace-projector.o traceCore.o traceCoreCommon.o charmProjections.o converseProjections.o machineProjections.o trace-memory.o trace-utilization.o + trace-projector.o traceCore.o traceCoreCommon.o charmProjections.o converseProjections.o machineProjections.o trace-memory.o trace-utilization.o $(L)/libtrace-all.a: $(LIBTRACE_ALL) $(CHARMC) -o $@ $(LIBTRACE_ALL) @@ -818,7 +783,7 @@ $(LIBTRACE_FOR): tracef_f.f90 TRACE_OBJS = trace-projections.o trace-controlPoints.o picstreenode.o picsdecisiontree.o trace-perf.o picsautoperfAPI.o picsautoperf.o trace-summary.o trace-simple.o \ trace-counter.o trace-utilization.o \ trace-projector.o trace-converse.o trace-all.o \ - trace-memory.o + trace-memory.o ############################################################################### # diff --git a/src/scripts/charmc b/src/scripts/charmc index 2b0b4d2390..04c5bb93ce 100755 --- a/src/scripts/charmc +++ b/src/scripts/charmc @@ -133,9 +133,6 @@ ROSE_OMP_TLS_GLOBALS="no" PRINT_BUILDING_BLOCKS="" NOABORT="" -TAU_MAKEFILE=Make.tau -TAU_TRACE_MPI=1 - MPI_INTEROPERATE="" NO_MAIN_MODULE="" NO_MAIN="" @@ -510,9 +507,6 @@ do fi shift ;; - "-no-trace-mpi") - TAU_TRACE_MPI=0 - ;; "-swapglobal"|"-swapglobals") SWAPGLOBALS="1" @@ -1379,22 +1373,9 @@ then CMK_XIOPTS+=" -count-tokens" fi -if [[ "$CMK_WITH_TAU" = 'true' ]] -then - echo "include $TAU_MAKEFILE" > _make.tau.tmp - echo "print-%:; @echo \$(\$*)" >> _make.tau.tmp - TAU_LIBS="$(make --no-print-directory -f _make.tau.tmp print-TAU_LIBS)" - TAU_MPI_LIBS="$(make --no-print-directory -f _make.tau.tmp print-TAU_MPI_LIBS)" - TAU_MPI_FLIBS="$(make --no-print-directory -f _make.tau.tmp print-TAU_MPI_FLIBS)" - TAU_DEFS="$(make --no-print-directory -f _make.tau.tmp print-TAU_DEFS)" - TAU_INCLUDE="$(make --no-print-directory -f _make.tau.tmp print-TAU_INCLUDE)" - - rm -f _make.tau.tmp -fi - #Add generic options to the compiler- and linker-options -OPTS_CC=("${OPTS[@]}" $TAU_DEFS $TAU_INCLUDE "${OPTS_CC[@]}") -OPTS_CXX=("${OPTS[@]}" $TAU_DEFS $TAU_INCLUDE "${OPTS_CXX[@]}") +OPTS_CC=("${OPTS[@]}" "${OPTS_CC[@]}") +OPTS_CXX=("${OPTS[@]}" "${OPTS_CXX[@]}") OPTS_F90=("${OPTS[@]}" "${OPTS_F90[@]}") OPTS_LD=("${OPTS[@]}" "${OPTS_LD[@]}") @@ -1632,21 +1613,6 @@ MAKE_LD="0" CORE_LIBS=(-lconverse "${TRACE_OBJ[@]}" -lm) -# get TAU stub makefile variables -if [[ "$CMK_WITH_TAU" = 'true' ]] -then - echo "include $TAU_MAKEFILE" > _make.tau.tmp - echo "print-%:; @echo \$(\$*)" >> _make.tau.tmp - TAU_LIBS="$(make --no-print-directory -f _make.tau.tmp print-TAU_LIBS)" - TAU_MPI_LIBS="$(make --no-print-directory -f _make.tau.tmp print-TAU_MPI_LIBS)" - TAU_MPI_FLIBS="$(make --no-print-directory -f _make.tau.tmp print-TAU_MPI_FLIBS)" - TAU_DEFS="$(make --no-print-directory -f _make.tau.tmp print-TAU_DEFS)" - TAU_INCLUDE="$(make --no-print-directory -f _make.tau.tmp print-TAU_INCLUDE)" - - rm -f _make.tau.tmp -fi -# done getting TAU variables - if [[ "$BUILD_SHARE" = '0' && "$USER_INITIATED_SHARED" = '0' ]] then MIDDLE_LIBS=("${MEM_OBJ[@]}" "${THREAD_OBJ[@]}" "${MIDDLE_LIBS[@]}") @@ -1663,10 +1629,6 @@ case "$PARADIGM" in MIDDLE_LIBS=(-lckmainf "${MIDDLE_LIBS[@]}") F90_MAIN="1" fi - if [[ "$TAU_TRACE_MPI" = '1' ]] - then - TAU_LIBS="$TAU_MPI_FLIBS $TAU_LIBS" - fi ;; "charm"|"charm++"|"f90charm") MAKE_LDXX="1" @@ -1682,10 +1644,6 @@ case "$PARADIGM" in MIDDLE_LIBS=(-lckmain "${MIDDLE_LIBS[@]}") fi fi - if [[ "$TAU_TRACE_MPI" = '1' ]] - then - TAU_LIBS="$TAU_MPI_LIBS $TAU_LIBS" - fi ;; "converse"|"converse++") MAKE_LDXX="1" @@ -1742,11 +1700,6 @@ then ALL_LIBS+=(-lstdc++) fi -if [[ "$TRACE_WITH_TAU" = '1' ]] -then - echo "Linking with the TAU libraries: $TAU_LIBS" - ALL_LIBS+=("$TAU_LIBS") -fi Debugf "All libraries are: ${ALL_LIBS[*]}" # preserve this variable in its state here for use later @@ -2261,9 +2214,6 @@ then elif [[ "$trace" = "simple" ]] then echo " extern void _registerTraceSimple();" >> "$modInitSrc" - elif [[ "$trace" = "Tau" ]] - then - echo " extern void _registerTraceTau();" >> "$modInitSrc" elif [[ "$trace" = "utilization" ]] then echo " extern void _registerTraceUtilization();" >> "$modInitSrc" @@ -2299,10 +2249,6 @@ then elif [[ "$trace" = "projections" ]] then echo " _registerTraceProjections();" >> "$modInitSrc" - elif [[ "$trace" = "Tau" ]] - then - TRACE_WITH_TAU=1 - echo " _registerTraceTau();" >> "$modInitSrc" elif [[ "$trace" = "simple" ]] then echo " _registerTraceSimple();" >> "$modInitSrc" From 9790de3a4d178ae014571d8a76a47e2a64ee0534 Mon Sep 17 00:00:00 2001 From: Sam White Date: Tue, 9 May 2023 11:16:37 -0500 Subject: [PATCH 080/155] Fix CcdCallback build issues with different build options --- src/conv-core/conv-conds.C | 5 +++-- src/conv-core/converse.h | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/conv-core/conv-conds.C b/src/conv-core/conv-conds.C index c52c72474d..79e8a0b5da 100644 --- a/src/conv-core/conv-conds.C +++ b/src/conv-core/conv-conds.C @@ -58,6 +58,9 @@ typedef struct _ccd_cblist { const static double periodicCallInterval[CCD_PERIODIC_MAX]= {0.001, 0.010, 0.100, 1.0, 5.0, 10.0, 60.0, 2*60.0, 5*60.0, 10*60.0, 3600.0, 12*3600.0, 24*3600.0}; +/** The number of timer-based condition callbacks */ +CpvDeclare(int, _ccd_num_timed_cond_cbs); + /* Cond callbacks that use the above time intervals for their condition are considered "timed" */ static bool isTimed(int condnum) { return (condnum >= CcdPERIODIC_FIRST && condnum < CcdPERIODIC_LAST); @@ -270,8 +273,6 @@ typedef struct { CpvStaticDeclare(ccd_heap_elem*, ccd_heap); /** The length of the callback heap */ CpvDeclare(int, _ccd_heaplen); -/** The number of timer-based condition callbacks */ -CpvDeclare(int, _ccd_num_timed_cond_cbs); /** The max allowed length of the callback heap */ CpvStaticDeclare(int, ccd_heapmaxlen); diff --git a/src/conv-core/converse.h b/src/conv-core/converse.h index bc3dbfae44..e33b20f8eb 100644 --- a/src/conv-core/converse.h +++ b/src/conv-core/converse.h @@ -1096,11 +1096,11 @@ typedef void (*CmiStartFn)(int argc, char **argv); @addtogroup ConverseScheduler @{ */ +extern void CcdCallBacks(void); #if CSD_NO_PERIODIC #define CsdPeriodic() #define CsdResetPeriodic() #else -extern void CcdCallBacks(void); extern int CcdNumTimerCBs(void); CpvExtern(int, _ccd_numchecks); CpvExtern(int, _ccd_heaplen); From 621adc4486b22c09141e6ea47353550420791b8c Mon Sep 17 00:00:00 2001 From: Aditya Bhosale Date: Tue, 9 May 2023 21:07:31 -0500 Subject: [PATCH 081/155] Avoid padding in converse message header due to alignment issues --- src/arch/gni/conv-common.h | 8 ++++---- src/arch/gni/conv-mach-syncft.h | 2 +- src/arch/mpi/conv-common.h | 4 ++-- src/arch/mpi/conv-mach-syncft.h | 2 +- src/arch/ofi/conv-common.h | 2 +- src/arch/pami/conv-common.h | 2 +- src/arch/pami/conv-mach-async.h | 2 +- src/arch/pamilrts/conv-common.h | 4 ++-- src/arch/pamilrts/conv-mach-async.h | 4 ++-- src/arch/ucx/conv-common.h | 2 +- src/arch/verbs/conv-common.h | 2 +- src/arch/verbs/conv-mach-syncft.h | 2 +- 12 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/arch/gni/conv-common.h b/src/arch/gni/conv-common.h index eb5aabc932..2b6d20a6af 100644 --- a/src/arch/gni/conv-common.h +++ b/src/arch/gni/conv-common.h @@ -18,15 +18,15 @@ #if DELTA_COMPRESS #if CMK_ERROR_CHECKING -#define CMK_MSG_HEADER_EXT_ CmiUInt4 size; CmiUInt2 seq; unsigned char cksum, magic; CmiUInt2 rank,hdl,xhdl,info,redID; CmiInt4 root; CmiUInt4 compressStart; CmiUInt2 compress_flag,xxhdl; CmiUInt8 persistRecvHandler; CmiUInt1 zcMsgType:4, cmaMsgType:2, nokeep:1; +#define CMK_MSG_HEADER_EXT_ CmiUInt8 persistRecvHandler; CmiUInt4 size, compressStart; CmiInt4 root; CmiUInt2 seq; unsigned char cksum, magic; CmiUInt2 rank,hdl,xhdl,info,redID,compress_flag,xxhdl; CmiUInt1 zcMsgType:4, cmaMsgType:2, nokeep:1; #else -#define CMK_MSG_HEADER_EXT_ CmiUInt4 size; CmiUInt4 seq; CmiUInt2 rank,hdl,xhdl,info,redID; CmiInt4 root; CmiUInt4 compressStart; CmiUInt2 compress_flag,xxhdl; CmiUInt8 persistRecvHandler; CmiUInt1 zcMsgType:4, cmaMsgType:2, nokeep:1; +#define CMK_MSG_HEADER_EXT_ CmiUInt8 persistRecvHandler; CmiUInt4 size, compressStart, seq; CmiInt4 root; CmiUInt2 rank,hdl,xhdl,info,redID; CmiUInt2 compress_flag,xxhdl; CmiUInt1 zcMsgType:4, cmaMsgType:2, nokeep:1; #endif #else #if CMK_ERROR_CHECKING -#define CMK_MSG_HEADER_EXT_ CmiUInt4 size; CmiUInt2 seq; unsigned char cksum, magic; CmiUInt2 rank,hdl,xhdl,info,redID; CmiInt4 root; CmiUInt1 zcMsgType:4, cmaMsgType:2, nokeep:1; +#define CMK_MSG_HEADER_EXT_ CmiInt4 root; CmiUInt4 size; CmiUInt2 seq; unsigned char cksum, magic; CmiUInt2 rank,hdl,xhdl,info,redID; CmiUInt1 zcMsgType:4, cmaMsgType:2, nokeep:1; #else -#define CMK_MSG_HEADER_EXT_ CmiUInt4 size; CmiUInt4 seq; CmiUInt2 rank,hdl,xhdl,info,redID; CmiInt4 root; CmiUInt1 zcMsgType:4, cmaMsgType:2, nokeep:1; +#define CMK_MSG_HEADER_EXT_ CmiInt4 root; CmiUInt4 size, seq; CmiUInt2 rank,hdl,xhdl,info,redID; CmiUInt1 zcMsgType:4, cmaMsgType:2, nokeep:1; #endif #endif diff --git a/src/arch/gni/conv-mach-syncft.h b/src/arch/gni/conv-mach-syncft.h index 57ee0e0fc9..aa314e9971 100644 --- a/src/arch/gni/conv-mach-syncft.h +++ b/src/arch/gni/conv-mach-syncft.h @@ -2,7 +2,7 @@ #undef CMK_MSG_HEADER_EXT_ //#undef CMK_MSG_HEADER_EXT /* expand the header to store the restart phase counter(pn) */ -#define CMK_MSG_HEADER_EXT_ CmiUInt4 size; CmiUInt4 seq; CmiUInt2 rank,hdl,xhdl,info,type,redID,pn,d9; CmiInt4 root; CmiUInt1 zcMsgType:4, cmaMsgType:2, nokeep:1;; +#define CMK_MSG_HEADER_EXT_ CmiInt4 root; CmiUInt4 size; CmiUInt4 seq; CmiUInt2 rank,hdl,xhdl,info,type,redID,pn,d9; CmiUInt1 zcMsgType:4, cmaMsgType:2, nokeep:1;; //#define CMK_MSG_HEADER_EXT { CMK_MSG_HEADER_EXT_ } #define CmiGetRestartPhase(m) ((((CmiMsgHeaderExt*)m)->pn)) diff --git a/src/arch/mpi/conv-common.h b/src/arch/mpi/conv-common.h index fe1f32208b..b6e43af57d 100644 --- a/src/arch/mpi/conv-common.h +++ b/src/arch/mpi/conv-common.h @@ -15,9 +15,9 @@ #define CMK_HANDLE_SIGUSR 1 #if CMK_ERROR_CHECKING -#define CMK_MSG_HEADER_EXT_ CmiUInt2 rank, hdl,xhdl,info, redID; CmiInt4 root; unsigned char cksum, magic, mpiMsgType; CmiUInt1 zcMsgType:4, cmaMsgType:2, nokeep:1; +#define CMK_MSG_HEADER_EXT_ CmiInt4 root; CmiUInt2 rank, hdl,xhdl,info, redID; unsigned char cksum, magic, mpiMsgType; CmiUInt1 zcMsgType:4, cmaMsgType:2, nokeep:1; #else -#define CMK_MSG_HEADER_EXT_ CmiUInt2 rank, hdl,xhdl,info, redID; CmiInt4 root; unsigned char mpiMsgType; CmiUInt1 zcMsgType:4, cmaMsgType:2, nokeep:1; +#define CMK_MSG_HEADER_EXT_ CmiInt4 root; CmiUInt2 rank, hdl,xhdl,info, redID; unsigned char mpiMsgType; CmiUInt1 zcMsgType:4, cmaMsgType:2, nokeep:1; #endif #define CMK_MSG_HEADER_BASIC CMK_MSG_HEADER_EXT diff --git a/src/arch/mpi/conv-mach-syncft.h b/src/arch/mpi/conv-mach-syncft.h index f8f5ff4838..0ca1de50bc 100644 --- a/src/arch/mpi/conv-mach-syncft.h +++ b/src/arch/mpi/conv-mach-syncft.h @@ -2,7 +2,7 @@ #undef CMK_MSG_HEADER_EXT_ //#undef CMK_MSG_HEADER_EXT /* expand the header to store the restart phase counter(pn) */ -#define CMK_MSG_HEADER_EXT_ CmiUInt2 rank, root, hdl,xhdl,info, type, pn,d7; unsigned char cksum, magic, mpiMsgType; CmiUInt2 redID; CmiUInt1 zcMsgType:4, cmaMsgType:2, nokeep:1; +#define CMK_MSG_HEADER_EXT_ CmiUInt2 rank, root, hdl,xhdl,info, type, pn,d7,redID; unsigned char cksum, magic, mpiMsgType; CmiUInt1 zcMsgType:4, cmaMsgType:2, nokeep:1; //#define CMK_MSG_HEADER_EXT { CMK_MSG_HEADER_EXT_ } #define CmiGetRestartPhase(m) ((((CmiMsgHeaderExt*)m)->pn)) diff --git a/src/arch/ofi/conv-common.h b/src/arch/ofi/conv-common.h index 8828645f54..0aef215bb3 100644 --- a/src/arch/ofi/conv-common.h +++ b/src/arch/ofi/conv-common.h @@ -22,7 +22,7 @@ * - startid, redID * - rank is needed by broadcast */ -#define CMK_MSG_HEADER_UNIQUE CmiUInt4 size; CmiUInt2 rank,hdl,xhdl,info,redID; CmiInt4 root; CmiUInt1 zcMsgType:4, cmaMsgType:2, nokeep:1; +#define CMK_MSG_HEADER_UNIQUE CmiUInt4 size; CmiInt4 root; CmiUInt2 rank,hdl,xhdl,info,redID; CmiUInt1 zcMsgType:4, cmaMsgType:2, nokeep:1; #define CMK_MSG_HEADER_BASIC CMK_MSG_HEADER_EXT #define CMK_MSG_HEADER_EXT { CMK_MSG_HEADER_UNIQUE } diff --git a/src/arch/pami/conv-common.h b/src/arch/pami/conv-common.h index 9ac953c294..432ee708ba 100644 --- a/src/arch/pami/conv-common.h +++ b/src/arch/pami/conv-common.h @@ -5,7 +5,7 @@ #define CMK_HANDLE_SIGUSR 1 -#define CMK_MSG_HEADER_EXT_ CmiUInt2 rank, hdl,xhdl,info, stratid; unsigned char cksum, magic; int root, size; CmiUInt2 redID, padding; CmiUInt1 cmaMsgType:2, nokeep:1; +#define CMK_MSG_HEADER_EXT_ int root, size; CmiUInt2 rank, hdl,xhdl,info, stratid, redID, padding; unsigned char cksum, magic; CmiUInt1 cmaMsgType:2, nokeep:1; #define CMK_MSG_HEADER_BASIC CMK_MSG_HEADER_EXT #define CMK_MSG_HEADER_EXT { CMK_MSG_HEADER_EXT_ } diff --git a/src/arch/pami/conv-mach-async.h b/src/arch/pami/conv-mach-async.h index 164d1e43f5..b10d624629 100644 --- a/src/arch/pami/conv-mach-async.h +++ b/src/arch/pami/conv-mach-async.h @@ -2,6 +2,6 @@ #undef CMK_MSG_HEADER_EXT_ -#define CMK_MSG_HEADER_EXT_ CmiUInt2 rank, hdl,xhdl,info, stratid; unsigned char cksum, magic; int root, size, dstnode; CmiUInt2 redID, padding; char work[8*sizeof(void *)]; CmiUInt1 cmaMsgType:2, nokeep:1; +#define CMK_MSG_HEADER_EXT_ int root, size, dstnode; CmiUInt2 rank, hdl,xhdl,info, stratid; unsigned char cksum, magic, redID, padding; char work[8*sizeof(void *)]; CmiUInt1 cmaMsgType:2, nokeep:1; diff --git a/src/arch/pamilrts/conv-common.h b/src/arch/pamilrts/conv-common.h index 202139c0e1..0638ba8492 100644 --- a/src/arch/pamilrts/conv-common.h +++ b/src/arch/pamilrts/conv-common.h @@ -11,9 +11,9 @@ //#define DELTA_COMPRESS 1 #if DELTA_COMPRESS -#define CMK_MSG_HEADER_EXT_ CmiUInt2 rank, hdl,xhdl,info; unsigned char cksum, magic; int root, size; CmiUInt2 redID, padding; CmiUInt4 compressStart; CmiUInt2 compress_flag,xxhdl; CmiUInt8 persistRecvHandler; CmiUInt1 zcMsgType:4, cmaMsgType:2, nokeep:1; +#define CMK_MSG_HEADER_EXT_ CmiUInt8 persistRecvHandler; CmiUInt4 compressStart; int root, size; CmiUInt2 rank, hdl,xhdl,info,redID,padding,compress_flag,xxhdl; unsigned char cksum, magic; CmiUInt1 zcMsgType:4, cmaMsgType:2, nokeep:1; #else -#define CMK_MSG_HEADER_EXT_ CmiUInt2 rank, hdl,xhdl,info; unsigned char cksum, magic; int root, size; CmiUInt2 redID, padding; CmiUInt1 zcMsgType:4, cmaMsgType:2, nokeep:1; +#define CMK_MSG_HEADER_EXT_ int root, size; CmiUInt2 rank, hdl,xhdl,info,redID,padding; unsigned char cksum, magic; CmiUInt1 zcMsgType:4, cmaMsgType:2, nokeep:1; #endif #define CMK_MSG_HEADER_BASIC CMK_MSG_HEADER_EXT diff --git a/src/arch/pamilrts/conv-mach-async.h b/src/arch/pamilrts/conv-mach-async.h index 07e158caee..be28585e5b 100644 --- a/src/arch/pamilrts/conv-mach-async.h +++ b/src/arch/pamilrts/conv-mach-async.h @@ -4,9 +4,9 @@ #undef CMK_MSG_HEADER_EXT_ #if DELTA_COMPRESS -#define CMK_MSG_HEADER_EXT_ CmiUInt2 rank, hdl,xhdl,info, type; unsigned char cksum, magic; int root, size, dstnode; CmiUInt2 redID, padding; char work[6*sizeof(void *)]; CmiUInt4 compressStart; CmiUInt2 compress_flag,xxhdl; CmiUInt8 persistRecvHandler; CmiUInt1 cmaMsgType:2, nokeep:1; +#define CMK_MSG_HEADER_EXT_ CmiUInt8 persistRecvHandler; int root, size, dstnode; CmiUInt4 compressStart; CmiUInt2 rank, hdl,xhdl,info, type, redID, padding, compress_flag,xxhdl; unsigned char cksum, magic; char work[6*sizeof(void *)]; CmiUInt1 cmaMsgType:2, nokeep:1; #else -#define CMK_MSG_HEADER_EXT_ CmiUInt2 rank, hdl,xhdl,info, type; unsigned char cksum, magic; int root, size, dstnode; CmiUInt2 redID, padding; char work[6*sizeof(void *)]; CmiUInt1 cmaMsgType:2, nokeep:1; +#define CMK_MSG_HEADER_EXT_ int root, size, dstnode; CmiUInt2 rank, hdl,xhdl,info, type, redID, padding; unsigned char cksum, magic; char work[6*sizeof(void *)]; CmiUInt1 cmaMsgType:2, nokeep:1; #endif diff --git a/src/arch/ucx/conv-common.h b/src/arch/ucx/conv-common.h index 016111d549..d256dd6910 100644 --- a/src/arch/ucx/conv-common.h +++ b/src/arch/ucx/conv-common.h @@ -22,7 +22,7 @@ * - startid, redID * - rank is needed by broadcast */ -#define CMK_MSG_HEADER_UNIQUE CmiUInt4 size; CmiUInt2 rank,hdl,xhdl,info,redID; CmiInt4 root; CmiUInt1 zcMsgType:4, cmaMsgType:2, nokeep:1; +#define CMK_MSG_HEADER_UNIQUE CmiUInt4 size; CmiInt4 root; CmiUInt2 rank,hdl,xhdl,info,redID; CmiUInt1 zcMsgType:4, cmaMsgType:2, nokeep:1; #define CMK_MSG_HEADER_BASIC CMK_MSG_HEADER_EXT #define CMK_MSG_HEADER_EXT { CMK_MSG_HEADER_UNIQUE } diff --git a/src/arch/verbs/conv-common.h b/src/arch/verbs/conv-common.h index c187125008..4a53e8ea10 100644 --- a/src/arch/verbs/conv-common.h +++ b/src/arch/verbs/conv-common.h @@ -24,7 +24,7 @@ of the message and used in the LRTS based CMA implementaion. */ #define CMK_MSG_HEADER_BASIC CMK_MSG_HEADER_EXT -#define CMK_MSG_HEADER_EXT_ CmiUInt2 d0,d1,d2,d3,hdl,xhdl,info,redID,rank; CmiInt4 root, size; CmiUInt1 zcMsgType:4, cmaMsgType:2, nokeep:1; +#define CMK_MSG_HEADER_EXT_ CmiInt4 root, size; CmiUInt2 d0,d1,d2,d3,hdl,xhdl,info,redID,rank; CmiUInt1 zcMsgType:4, cmaMsgType:2, nokeep:1; #define CMK_MSG_HEADER_EXT { CMK_MSG_HEADER_EXT_ } #define CMK_SPANTREE_MAXSPAN 4 diff --git a/src/arch/verbs/conv-mach-syncft.h b/src/arch/verbs/conv-mach-syncft.h index 2fbab2df1e..6f2a20461c 100644 --- a/src/arch/verbs/conv-mach-syncft.h +++ b/src/arch/verbs/conv-mach-syncft.h @@ -4,7 +4,7 @@ //#undef CMK_MSG_HEADER_EXT /* expand the header to store the restart phase counter(pn) */ #define CMK_MSG_HEADER_BASIC CMK_MSG_HEADER_EXT -#define CMK_MSG_HEADER_EXT_ CmiUInt2 d0,d1,d2,d3,hdl,pn,d4,type,xhdl,info,dd,redID,pad2,rank; CmiUInt4 root,size; CmiUInt1 zcMsgType:4, cmaMsgType:2, nokeep:1; +#define CMK_MSG_HEADER_EXT_ CmiUInt4 root,size; CmiUInt2 d0,d1,d2,d3,hdl,pn,d4,type,xhdl,info,dd,redID,pad2,rank; CmiUInt1 zcMsgType:4, cmaMsgType:2, nokeep:1; //#define CMK_MSG_HEADER_EXT { CMK_MSG_HEADER_EXT_ } #define CmiGetRestartPhase(m) ((((CmiMsgHeaderExt*)m)->pn)) From bb279697cf9814ef607fd322b51c40ff832c454f Mon Sep 17 00:00:00 2001 From: HanatoK Date: Mon, 22 May 2023 09:35:02 -0500 Subject: [PATCH 082/155] Fix FTBFS of NAMD when using GCC 13.1 with --std=c++20 The following use of class template fails to build when using GCC 13.1 with --std=c++20: ``` template class Foo { public: Foo() {} }; ``` The extra "" in the constructor should be removed for compilation. NAMD uses `CkHashtableAdaptorT` so I need to remove the redundant `` to make it compiled. --- src/util/ckhashtable.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/ckhashtable.h b/src/util/ckhashtable.h index 3f2c895aa2..6b19c4641a 100644 --- a/src/util/ckhashtable.h +++ b/src/util/ckhashtable.h @@ -437,9 +437,9 @@ as a fast key like this: template class CkHashtableAdaptorT { T val; public: - CkHashtableAdaptorT(const T &v):val(v) {} + CkHashtableAdaptorT(const T &v):val(v) {} /**added to allow pup to do Key k while unPacking*/ - CkHashtableAdaptorT(){} + CkHashtableAdaptorT(){} operator T & () {return val;} operator const T & () const {return val;} inline CkHashCode hash(void) const From f3ad1c335b878383aced7ace70aef03e8ab55533 Mon Sep 17 00:00:00 2001 From: Ronak Buch Date: Wed, 25 Apr 2018 16:24:55 -0500 Subject: [PATCH 083/155] Update random generation to use C++ Change-Id: I9e6a3ccd16951763b7aa12a9338141096661a393 Co-authored-by: Sam White Co-authored-by: Evan Ramos --- benchmarks/converse/commbench/proc.c | 8 +- src/conv-core/conv-random.h | 11 - src/conv-core/random.C | 15751 +------------------------ src/libs/ck-libs/ParFUM/symmetries.C | 4 +- tests/charm++/megatest/packtest.C | 10 - 5 files changed, 24 insertions(+), 15760 deletions(-) diff --git a/benchmarks/converse/commbench/proc.c b/benchmarks/converse/commbench/proc.c index 9c9d664ba0..47feaba716 100644 --- a/benchmarks/converse/commbench/proc.c +++ b/benchmarks/converse/commbench/proc.c @@ -24,12 +24,12 @@ static void doTrials(ProcMsg* msg) { int i, success = 0; int total = msg->success; double x, y; - CrnStream stream; - CrnInitStream(&stream, CmiMyPe(), 0); + CrnSrand(0); for (i = 0; i < total; i++) { - x = CrnDouble(&stream) - 0.5; - y = CrnDouble(&stream) - 0.5; + x = CrnDrand() - 0.5; + y = CrnDrand() - 0.5; + if ((x * x + y * y) <= 0.25) success++; } msg->success = success; diff --git a/src/conv-core/conv-random.h b/src/conv-core/conv-random.h index 84de789231..412d60bd37 100644 --- a/src/conv-core/conv-random.h +++ b/src/conv-core/conv-random.h @@ -5,17 +5,6 @@ extern "C" { #endif -typedef struct rngen_ -{ - unsigned int prime; - double state[3], multiplier[3];/* simulate 64 bit arithmetic */ -} CrnStream; - -/*Type must be 0, 1, or 2.*/ -void CrnInitStream(CrnStream *dest, unsigned int seed, int type); -int CrnInt(CrnStream *); -double CrnDouble(CrnStream *); -float CrnFloat(CrnStream *); void CrnSrand(unsigned int); int CrnRand(void); double CrnDrand(void); diff --git a/src/conv-core/random.C b/src/conv-core/random.C index 464c96d5aa..bbaddb1df2 100644 --- a/src/conv-core/random.C +++ b/src/conv-core/random.C @@ -1,15754 +1,41 @@ -/*************************************************************************/ -/*************************************************************************/ -/* Parallel 64-bit Linear Congruential Generator */ -/* */ -/* Author: Ashok Srinivasan, */ -/* NCSA, University of Illinois, Urbana-Champaign */ -/* E-Mail: ashoks@ncsa.uiuc.edu */ -/* */ -/* Note: The modulus is 2^64 */ -/* */ -/* Disclaimer: NCSA expressly disclaims any and all warranties, expressed*/ -/* or implied, concerning the enclosed software. The intent in sharing */ -/* this software is to promote the productive interchange of ideas */ -/* throughout the research community. All software is furnished on an */ -/* "as is" basis. No further updates to this software should be */ -/* expected. Although this may occur, no commitment exists. The authors */ -/* certainly invite your comments as well as the reporting of any bugs. */ -/* NCSA cannot commit that any or all bugs will be fixed. */ -/*************************************************************************/ -/*************************************************************************/ - -/* This is version 1.0, created 20 May 1998 */ - +#include #include "converse.h" -#include -#include - -#define MAX_STREAMS 15613 -/* -int MAX_STREAMS = (146138719); -*/ - -extern unsigned int _prime_list[]; - -unsigned int _PARAMLIST[3][2] = {{0x87b0b0fdU, 0x27bb2ee6U}, - {0xe78b6955U,0x2c6fe96eU}, - {0x31a53f85U,0x369dea0fU}}; - -/*************************************************************************/ -/* You should not need to look at the next few lines! */ - -#define INIT_SEED1 0x2bc6ffffU -#define INIT_SEED0 0x8cfe166dU -#define TWO_M22 2.384185791015625e-07 /* 2^(-22) */ -#define TWO_P22 4194304 /* 2^(22) */ -#define TWO_M20 9.5367431640625e-07 /* 2^(-20) */ -#define TWO_P20 1048576 /* 2^(20) */ -#define TWO_M42 2.273736754432321e-13 /* 2^(-42) */ -#define TWO_M64 5.4210108624275222e-20 /* 2^(-64) */ +using Distribution = std::uniform_real_distribution; +using Generator = std::minstd_rand; -/* */ -/************************************************************************/ - -CpvStaticDeclare(int, nstreams); -CpvStaticDeclare(CrnStream, _defaultStream); +CpvStaticDeclare(Generator*, _defaultStream); +CpvStaticDeclare(Distribution*, distribution); void CrnInit(void) { - CpvInitialize(int, nstreams); - CpvAccess(nstreams) = 0; - CpvInitialize(CrnStream, _defaultStream); - CrnInitStream(&CpvAccess(_defaultStream), 0, 0); + CpvInitialize(Generator*, _defaultStream); + CpvInitialize(Distribution*, distribution); + CpvAccess(distribution) = new Distribution(0.0, 1.0); + CpvAccess(_defaultStream) = new Generator(0); // This should probably be seeded with random_device } -/* Initialize random number stream */ - -void CrnInitStream(CrnStream *genptr, unsigned int seed, int type) -{ - unsigned int gennum = seed+CpvAccess(nstreams)*CmiNumPes(); - int i; - - genptr->prime = _prime_list[gennum%MAX_STREAMS]; - genptr->multiplier[0] = (double) (_PARAMLIST[type][0]&0x3fffff); - genptr->multiplier[1] = (double) - (_PARAMLIST[type][0]>>22 | (_PARAMLIST[type][1]&0xfff)<<10); - genptr->multiplier[2] = (double) (_PARAMLIST[type][1]>>12); - genptr->state[0] = (double) ((INIT_SEED0^gennum)&0x3fffff); - genptr->state[1] = (double) - ((INIT_SEED0^gennum)>>22 | ((INIT_SEED1 ^ (unsigned)seed<<1)&0xfff)<<10); - genptr->state[2] = (double) ((INIT_SEED1 ^ (unsigned)seed<<1)>>12); - - for(i=0; i<1000; i++) - CrnDouble(genptr); - CpvAccess(nstreams)++; -} - - -#define advance_state(genptr) {double t0, t1, t2, t3, st0, st1, st2;\ - t0 = genptr->state[0]*genptr->multiplier[0] + genptr->prime;\ - t1 = (double) (int) (t0*TWO_M22); \ - st0 = t0 - TWO_P22*t1; \ - t1 += genptr->state[1]*genptr->multiplier[0] + \ - genptr->state[0]*genptr->multiplier[1]; \ - t2 = (double) (int) (t1*TWO_M22); \ - st1 = t1 - TWO_P22*t2; \ - t2 += genptr->state[2]*genptr->multiplier[0] + \ - genptr->state[1]*genptr->multiplier[1] + \ - genptr->state[0]*genptr->multiplier[2];\ - t3 = (double) (int) (t2*TWO_M20); \ - st2 = t2 - TWO_P20*t3; \ - genptr->state[0] = st0; \ - genptr->state[1] = st1; \ - genptr->state[2] = st2;} - -double CrnDouble(CrnStream *genptr) -{ - advance_state(genptr); /* next state in sequence */ - return genptr->state[2]*TWO_M20 + genptr->state[1]*TWO_M42 + - genptr->state[0]*TWO_M64; -} - -int CrnInt(CrnStream *genptr) -{ - return (int) (CrnDouble(genptr)*0x80000000U); -} - -float CrnFloat(CrnStream *genptr) +void CrnSrand(unsigned int seed) { - return (float) CrnDouble(genptr); + CpvAccess(_defaultStream)->seed(seed); } -void CrnSrand(unsigned int seed) +int CrnRand(void) { - CrnInitStream(&CpvAccess(_defaultStream), seed, 0); + return (int)(CrnDrand()*0x80000000U); } -int CrnRand(void) +int CrnRandRange(int min, int max) { - return CrnInt(&CpvAccess(_defaultStream)); + return std::uniform_int_distribution(min, max)(*(CpvAccess(_defaultStream))); } double CrnDrand(void) { - return CrnDouble(&CpvAccess(_defaultStream)); + return (*CpvAccess(distribution))(*(CpvAccess(_defaultStream))); } -unsigned int _prime_list[MAX_STREAMS] = +double CrnDrandRange(double min, double max) { -3037000493U, -3037000453U, -3037000429U, -3037000427U, -3037000399U, -3037000391U, -3037000333U, -3037000331U, -3037000303U, -3037000289U, -3037000249U, -3037000193U, -3037000181U, -3037000177U, -3037000159U, -3037000121U, -3037000111U, -3037000103U, -3037000069U, -3037000039U, -3037000013U, -3036999991U, -3036999983U, -3036999941U, -3036999899U, -3036999887U, -3036999877U, -3036999841U, -3036999821U, -3036999817U, -3036999811U, -3036999803U, -3036999773U, -3036999769U, -3036999761U, -3036999739U, -3036999737U, -3036999733U, -3036999727U, -3036999499U, -3036999487U, -3036999473U, -3036999467U, -3036999457U, -3036999443U, -3036999439U, -3036999431U, -3036999403U, -3036999379U, -3036999341U, -3036999319U, -3036999307U, -3036999293U, -3036999283U, -3036999271U, -3036999233U, -3036999209U, -3036999167U, -3036999157U, -3036999137U, -3036999113U, -3036999101U, -3036999089U, -3036999079U, -3036999067U, -3036999061U, -3036999023U, -3036999019U, -3036999001U, -3036998999U, -3036998989U, -3036998977U, -3036998963U, -3036998957U, -3036998933U, -3036998903U, -3036998873U, -3036998857U, -3036998849U, -3036998843U, -3036998837U, -3036998803U, -3036998777U, -3036998761U, -3036998759U, -3036998743U, -3036998717U, -3036998611U, -3036998599U, -3036998567U, -3036998563U, -3036998561U, -3036998537U, -3036998477U, -3036998449U, -3036998429U, -3036998401U, -3036998381U, -3036998347U, -3036998333U, -3036998329U, -3036998299U, -3036998267U, -3036998257U, -3036998249U, -3036998231U, -3036998213U, -3036998183U, -3036998161U, -3036998113U, -3036998093U, -3036998071U, -3036998051U, -3036998047U, -3036998011U, -3036998009U, -3036997973U, -3036997939U, -3036997933U, -3036997897U, -3036997853U, -3036997837U, -3036997813U, -3036997811U, -3036997787U, -3036997783U, -3036997751U, -3036997741U, -3036997727U, -3036997721U, -3036997709U, -3036997697U, -3036997693U, -3036997643U, -3036997631U, -3036997619U, -3036997603U, -3036997597U, -3036997577U, -3036997559U, -3036997511U, -3036997501U, -3036997493U, -3036997393U, -3036997391U, -3036997343U, -3036997339U, -3036997331U, -3036997289U, -3036997279U, -3036997217U, -3036997213U, -3036997169U, -3036997151U, -3036997133U, -3036997109U, -3036997081U, -3036997063U, -3036997021U, -3036996983U, -3036996947U, -3036996931U, -3036996923U, -3036996901U, -3036996883U, -3036996863U, -3036996829U, -3036996817U, -3036996799U, -3036996769U, -3036996761U, -3036996737U, -3036996713U, -3036996709U, -3036996707U, -3036996673U, -3036996631U, -3036996601U, -3036996587U, -3036996553U, -3036996527U, -3036996497U, -3036996491U, -3036996481U, -3036996451U, -3036996439U, -3036996421U, -3036996379U, -3036996373U, -3036996353U, -3036996349U, -3036996329U, -3036996307U, -3036996299U, -3036996283U, -3036996253U, -3036996247U, -3036996211U, -3036996197U, -3036996121U, -3036996091U, -3036996077U, -3036996071U, -3036996049U, -3036996019U, -3036996013U, -3036995981U, -3036995977U, -3036995953U, -3036995933U, -3036995921U, -3036995909U, -3036995893U, -3036995887U, -3036995881U, -3036995867U, -3036995839U, -3036995833U, -3036995827U, -3036995791U, -3036995761U, -3036995737U, -3036995723U, -3036995711U, -3036995671U, -3036995641U, -3036995627U, -3036995609U, -3036995603U, -3036995581U, -3036995579U, -3036995573U, -3036995543U, -3036995531U, -3036995527U, -3036995491U, -3036995477U, -3036995459U, -3036995369U, -3036995281U, -3036995267U, -3036995257U, -3036995249U, -3036995239U, -3036995189U, -3036995161U, -3036995153U, -3036995123U, -3036995089U, -3036995083U, -3036995057U, -3036995051U, -3036995041U, -3036995021U, -3036994997U, -3036994963U, -3036994931U, -3036994921U, -3036994897U, -3036994889U, -3036994879U, -3036994847U, -3036994799U, -3036994787U, -3036994777U, -3036994747U, -3036994717U, -3036994703U, -3036994679U, -3036994673U, -3036994663U, -3036994661U, -3036994627U, -3036994621U, -3036994619U, -3036994591U, -3036994549U, -3036994547U, -3036994531U, -3036994511U, -3036994507U, -3036994489U, -3036994469U, -3036994439U, -3036994423U, -3036994417U, -3036994397U, -3036994381U, -3036994369U, -3036994349U, -3036994327U, -3036994309U, -3036994283U, -3036994249U, -3036994237U, -3036994229U, -3036994211U, -3036994193U, -3036994141U, -3036994099U, -3036994073U, -3036994069U, -3036994063U, -3036994043U, -3036994039U, -3036994033U, -3036994001U, -3036993977U, -3036993937U, -3036993913U, -3036993901U, -3036993893U, -3036993871U, -3036993769U, -3036993737U, -3036993727U, -3036993719U, -3036993677U, -3036993667U, -3036993613U, -3036993607U, -3036993601U, -3036993587U, -3036993571U, -3036993569U, -3036993541U, -3036993539U, -3036993529U, -3036993527U, -3036993511U, -3036993469U, -3036993437U, -3036993413U, -3036993367U, -3036993359U, -3036993331U, -3036993329U, -3036993319U, -3036993283U, -3036993277U, -3036993257U, -3036993251U, -3036993241U, -3036993233U, -3036993221U, -3036993217U, -3036993181U, -3036993161U, -3036993143U, -3036993133U, -3036993131U, -3036993107U, -3036993103U, -3036993097U, -3036993083U, -3036993077U, -3036993073U, -3036993023U, -3036992983U, -3036992977U, -3036992969U, -3036992957U, -3036992953U, -3036992921U, -3036992899U, -3036992879U, -3036992873U, -3036992869U, -3036992809U, -3036992773U, -3036992753U, -3036992747U, -3036992743U, -3036992741U, -3036992731U, -3036992719U, -3036992711U, -3036992701U, -3036992681U, -3036992669U, -3036992639U, -3036992579U, -3036992521U, -3036992507U, -3036992503U, -3036992461U, -3036992437U, -3036992423U, -3036992401U, -3036992383U, -3036992377U, -3036992341U, -3036992333U, -3036992293U, -3036992291U, -3036992249U, -3036992207U, -3036992191U, -3036992141U, -3036992131U, -3036992113U, -3036992087U, -3036992083U, -3036992069U, -3036992051U, -3036992033U, -3036992017U, -3036992011U, -3036991987U, -3036991981U, -3036991949U, -3036991943U, -3036991897U, -3036991891U, -3036991883U, -3036991861U, -3036991777U, -3036991757U, -3036991753U, -3036991747U, -3036991717U, -3036991649U, -3036991627U, -3036991619U, -3036991591U, -3036991543U, -3036991511U, -3036991501U, -3036991481U, -3036991453U, -3036991381U, -3036991361U, -3036991357U, -3036991327U, -3036991303U, -3036991301U, -3036991271U, -3036991261U, -3036991253U, -3036991249U, -3036991247U, -3036991189U, -3036991183U, -3036991171U, -3036991147U, -3036991127U, -3036991109U, -3036991081U, -3036991063U, -3036991049U, -3036991037U, -3036991033U, -3036991031U, -3036991021U, -3036990997U, -3036990977U, -3036990961U, -3036990949U, -3036990923U, -3036990907U, -3036990899U, -3036990893U, -3036990871U, -3036990851U, -3036990829U, -3036990779U, -3036990769U, -3036990763U, -3036990739U, -3036990727U, -3036990709U, -3036990703U, -3036990611U, -3036990559U, -3036990491U, -3036990431U, -3036990421U, -3036990401U, -3036990391U, -3036990379U, -3036990371U, -3036990323U, -3036990317U, -3036990277U, -3036990263U, -3036990247U, -3036990233U, -3036990227U, -3036990199U, -3036990193U, -3036990167U, -3036990163U, -3036990157U, -3036990071U, -3036990059U, -3036990049U, -3036990037U, -3036990029U, -3036990017U, -3036989999U, -3036989993U, -3036989983U, -3036989957U, -3036989863U, -3036989821U, -3036989797U, -3036989779U, -3036989723U, -3036989693U, -3036989687U, -3036989651U, -3036989611U, -3036989609U, -3036989603U, -3036989573U, -3036989561U, -3036989539U, -3036989477U, -3036989471U, -3036989441U, -3036989419U, -3036989381U, -3036989377U, -3036989363U, -3036989357U, -3036989353U, -3036989323U, -3036989297U, -3036989281U, -3036989261U, -3036989209U, -3036989167U, -3036989159U, -3036989149U, -3036989129U, -3036989107U, -3036989101U, -3036989077U, -3036989071U, -3036989063U, -3036989041U, -3036989027U, -3036988991U, -3036988879U, -3036988849U, -3036988819U, -3036988751U, -3036988739U, -3036988729U, -3036988727U, -3036988723U, -3036988699U, -3036988679U, -3036988673U, -3036988667U, -3036988651U, -3036988637U, -3036988631U, -3036988627U, -3036988583U, -3036988573U, -3036988571U, -3036988543U, -3036988523U, -3036988483U, -3036988469U, -3036988429U, -3036988417U, -3036988399U, -3036988397U, -3036988393U, -3036988387U, -3036988369U, -3036988349U, -3036988319U, -3036988313U, -3036988309U, -3036988301U, -3036988277U, -3036988271U, -3036988117U, -3036988111U, -3036988109U, -3036988081U, -3036988079U, -3036988043U, -3036988037U, -3036988027U, -3036988021U, -3036987991U, -3036987979U, -3036987937U, -3036987931U, -3036987929U, -3036987917U, -3036987913U, -3036987901U, -3036987883U, -3036987871U, -3036987809U, -3036987799U, -3036987773U, -3036987743U, -3036987731U, -3036987727U, -3036987719U, -3036987691U, -3036987659U, -3036987637U, -3036987631U, -3036987601U, -3036987589U, -3036987587U, -3036987581U, -3036987563U, -3036987557U, -3036987553U, -3036987533U, -3036987529U, -3036987523U, -3036987521U, -3036987469U, -3036987439U, -3036987427U, -3036987361U, -3036987337U, -3036987319U, -3036987311U, -3036987293U, -3036987251U, -3036987241U, -3036987197U, -3036987167U, -3036987127U, -3036987089U, -3036987077U, -3036987073U, -3036987067U, -3036987061U, -3036987043U, -3036986969U, -3036986957U, -3036986917U, -3036986881U, -3036986863U, -3036986851U, -3036986839U, -3036986803U, -3036986791U, -3036986789U, -3036986767U, -3036986759U, -3036986737U, -3036986713U, -3036986669U, -3036986609U, -3036986599U, -3036986593U, -3036986569U, -3036986509U, -3036986507U, -3036986501U, -3036986479U, -3036986441U, -3036986431U, -3036986417U, -3036986411U, -3036986383U, -3036986333U, -3036986287U, -3036986279U, -3036986203U, -3036986189U, -3036986167U, -3036986129U, -3036986123U, -3036986107U, -3036986041U, -3036986023U, -3036986009U, -3036985999U, -3036985993U, -3036985979U, -3036985949U, -3036985921U, -3036985877U, -3036985873U, -3036985837U, -3036985829U, -3036985817U, -3036985813U, -3036985799U, -3036985771U, -3036985753U, -3036985747U, -3036985741U, -3036985739U, -3036985733U, -3036985729U, -3036985709U, -3036985697U, -3036985673U, -3036985643U, -3036985613U, -3036985607U, -3036985603U, -3036985583U, -3036985561U, -3036985559U, -3036985547U, -3036985543U, -3036985499U, -3036985459U, -3036985439U, -3036985433U, -3036985409U, -3036985373U, -3036985361U, -3036985309U, -3036985291U, -3036985283U, -3036985267U, -3036985253U, -3036985249U, -3036985219U, -3036985207U, -3036985187U, -3036985177U, -3036985151U, -3036985097U, -3036985093U, -3036985073U, -3036985033U, -3036985031U, -3036985001U, -3036984997U, -3036984989U, -3036984971U, -3036984953U, -3036984943U, -3036984917U, -3036984887U, -3036984803U, -3036984799U, -3036984787U, -3036984773U, -3036984761U, -3036984751U, -3036984749U, -3036984721U, -3036984697U, -3036984673U, -3036984667U, -3036984637U, -3036984623U, -3036984589U, -3036984569U, -3036984563U, -3036984539U, -3036984527U, -3036984481U, -3036984479U, -3036984427U, -3036984421U, -3036984413U, -3036984407U, -3036984403U, -3036984373U, -3036984367U, -3036984361U, -3036984343U, -3036984319U, -3036984287U, -3036984259U, -3036984257U, -3036984253U, -3036984199U, -3036984191U, -3036984151U, -3036984133U, -3036984131U, -3036984089U, -3036984059U, -3036984053U, -3036984047U, -3036984017U, -3036983933U, -3036983923U, -3036983909U, -3036983897U, -3036983867U, -3036983843U, -3036983837U, -3036983827U, -3036983813U, -3036983809U, -3036983777U, -3036983771U, -3036983699U, -3036983689U, -3036983671U, -3036983657U, -3036983629U, -3036983623U, -3036983597U, -3036983567U, -3036983561U, -3036983539U, -3036983533U, -3036983497U, -3036983483U, -3036983441U, -3036983407U, -3036983387U, -3036983297U, -3036983281U, -3036983249U, -3036983203U, -3036983189U, -3036983177U, -3036983167U, -3036983137U, -3036983111U, -3036983099U, -3036983083U, -3036983063U, -3036983057U, -3036983041U, -3036982981U, -3036982937U, -3036982919U, -3036982853U, -3036982843U, -3036982841U, -3036982789U, -3036982777U, -3036982757U, -3036982727U, -3036982693U, -3036982643U, -3036982639U, -3036982601U, -3036982589U, -3036982577U, -3036982567U, -3036982547U, -3036982541U, -3036982523U, -3036982519U, -3036982489U, -3036982469U, -3036982451U, -3036982423U, -3036982397U, -3036982387U, -3036982349U, -3036982337U, -3036982331U, -3036982313U, -3036982297U, -3036982279U, -3036982271U, -3036982189U, -3036982139U, -3036982133U, -3036982121U, -3036982111U, -3036982103U, -3036982099U, -3036982093U, -3036982061U, -3036982043U, -3036982009U, -3036982001U, -3036981979U, -3036981967U, -3036981953U, -3036981931U, -3036981923U, -3036981917U, -3036981863U, -3036981859U, -3036981853U, -3036981851U, -3036981821U, -3036981811U, -3036981797U, -3036981763U, -3036981733U, -3036981713U, -3036981691U, -3036981659U, -3036981553U, -3036981547U, -3036981539U, -3036981533U, -3036981481U, -3036981421U, -3036981407U, -3036981401U, -3036981383U, -3036981373U, -3036981359U, -3036981347U, -3036981323U, -3036981313U, -3036981307U, -3036981301U, -3036981289U, -3036981287U, -3036981209U, -3036981179U, -3036981139U, -3036981097U, -3036981067U, -3036981043U, -3036981041U, -3036981023U, -3036981011U, -3036980971U, -3036980941U, -3036980917U, -3036980911U, -3036980897U, -3036980867U, -3036980851U, -3036980819U, -3036980803U, -3036980761U, -3036980753U, -3036980747U, -3036980701U, -3036980699U, -3036980677U, -3036980599U, -3036980579U, -3036980549U, -3036980537U, -3036980533U, -3036980519U, -3036980497U, -3036980491U, -3036980459U, -3036980423U, -3036980371U, -3036980363U, -3036980339U, -3036980327U, -3036980269U, -3036980267U, -3036980263U, -3036980207U, -3036980161U, -3036980129U, -3036980123U, -3036980117U, -3036980077U, -3036980071U, -3036980047U, -3036980041U, -3036980039U, -3036980033U, -3036980027U, -3036979997U, -3036979987U, -3036979937U, -3036979927U, -3036979919U, -3036979873U, -3036979861U, -3036979849U, -3036979837U, -3036979793U, -3036979787U, -3036979769U, -3036979763U, -3036979723U, -3036979709U, -3036979679U, -3036979661U, -3036979601U, -3036979597U, -3036979579U, -3036979571U, -3036979531U, -3036979529U, -3036979523U, -3036979457U, -3036979391U, -3036979357U, -3036979343U, -3036979339U, -3036979303U, -3036979301U, -3036979291U, -3036979289U, -3036979261U, -3036979249U, -3036979237U, -3036979223U, -3036762997U, -3036545581U, -3036327389U, -3036107951U, -3035888633U, -3035669363U, -3035449477U, -3035232667U, -3035014193U, -3034795427U, -3034577531U, -3034357853U, -3034138969U, -3033923621U, -3033706409U, -3033488597U, -3033267889U, -3033049871U, -3032832493U, -3032615063U, -3032396527U, -3032177359U, -3031960339U, -3031742731U, -3031526081U, -3031308359U, -3031092199U, -3030873071U, -3030655757U, -3030437257U, -3030218647U, -3029999191U, -3029780833U, -3029559389U, -3029339741U, -3029122153U, -3028904231U, -3028687897U, -3028467803U, -3028251181U, -3028034189U, -3027815579U, -3027597247U, -3027377317U, -3027158237U, -3026939441U, -3026721421U, -3026502179U, -3026282261U, -3026065561U, -3025847507U, -3025627663U, -3025409689U, -3025190813U, -3024971231U, -3024753383U, -3024533179U, -3024312673U, -3024094123U, -3023876753U, -3023655737U, -3023439317U, -3023222239U, -3023004151U, -3022786831U, -3022566857U, -3022349243U, -3022131979U, -3021911663U, -3021695137U, -3021477377U, -3021256289U, -3021037769U, -3020820247U, -3020600897U, -3020381843U, -3020165179U, -3019948573U, -3019729819U, -3019510561U, -3019294087U, -3019074679U, -3018854257U, -3018637471U, -3018418159U, -3018199469U, -3017981123U, -3017762807U, -3017544701U, -3017327809U, -3017107381U, -3016890403U, -3016671503U, -3016453117U, -3016234721U, -3016015661U, -3015797003U, -3015579211U, -3015360779U, -3015141427U, -3014924197U, -3014705597U, -3014487473U, -3014268743U, -3014052511U, -3013832473U, -3013615529U, -3013397269U, -3013177819U, -3012960241U, -3012743291U, -3012525497U, -3012307019U, -3012088889U, -3011870993U, -3011652491U, -3011434169U, -3011217061U, -3010999219U, -3010780781U, -3010564993U, -3010348387U, -3010127833U, -3009910177U, -3009693839U, -3009474253U, -3009255637U, -3009037517U, -3008820911U, -3008599381U, -3008379739U, -3008159723U, -3007941473U, -3007724221U, -3007506361U, -3007288589U, -3007068709U, -3006850277U, -3006630499U, -3006412979U, -3006194489U, -3005975761U, -3005755367U, -3005537413U, -3005317433U, -3005101609U, -3004884821U, -3004669463U, -3004450633U, -3004231093U, -3004011743U, -3003795953U, -3003576871U, -3003357971U, -3003138847U, -3002919079U, -3002700947U, -3002481649U, -3002264299U, -3002046821U, -3001828987U, -3001609753U, -3001390789U, -3001172389U, -3000954289U, -3000736049U, -3000517057U, -3000299059U, -3000081691U, -2999865541U, -2999645267U, -2999428681U, -2999208437U, -2998989517U, -2998769261U, -2998552309U, -2998331761U, -2998112737U, -2997895037U, -2997675017U, -2997456079U, -2997236027U, -2997018683U, -2996799863U, -2996579689U, -2996360473U, -2996141653U, -2995922999U, -2995706647U, -2995488203U, -2995270471U, -2995052131U, -2994832817U, -2994613397U, -2994394969U, -2994176371U, -2993958943U, -2993739953U, -2993521463U, -2993302891U, -2993085449U, -2992867159U, -2992647499U, -2992428287U, -2992211983U, -2991996857U, -2991776339U, -2991556427U, -2991341417U, -2991121901U, -2990904949U, -2990686943U, -2990471509U, -2990252131U, -2990033617U, -2989816859U, -2989597759U, -2989377431U, -2989159883U, -2988940987U, -2988721301U, -2988502883U, -2988285617U, -2988066629U, -2987849437U, -2987630771U, -2987414873U, -2987198597U, -2986980923U, -2986764181U, -2986545649U, -2986327571U, -2986109209U, -2985890657U, -2985670433U, -2985453733U, -2985237617U, -2985019019U, -2984801321U, -2984581697U, -2984360947U, -2984142757U, -2983925299U, -2983708313U, -2983488721U, -2983270751U, -2983052749U, -2982833473U, -2982617243U, -2982401029U, -2982184763U, -2981967419U, -2981746181U, -2981525629U, -2981308009U, -2981089733U, -2980871129U, -2980654093U, -2980435439U, -2980218091U, -2980002373U, -2979781547U, -2979562793U, -2979344219U, -2979127687U, -2978907857U, -2978690389U, -2978472713U, -2978255261U, -2978038267U, -2977818317U, -2977601191U, -2977384337U, -2977166617U, -2976948059U, -2976730721U, -2976512857U, -2976292927U, -2976075541U, -2975857043U, -2975638751U, -2975421623U, -2975204087U, -2974987151U, -2974768619U, -2974552081U, -2974332671U, -2974113341U, -2973895261U, -2973677171U, -2973458113U, -2973241703U, -2973023369U, -2972804099U, -2972586329U, -2972367829U, -2972149039U, -2971931051U, -2971711019U, -2971494139U, -2971277423U, -2971059173U, -2970838919U, -2970619343U, -2970403757U, -2970183743U, -2969959627U, -2969743547U, -2969525033U, -2969309891U, -2969090279U, -2968871251U, -2968651541U, -2968435117U, -2968214531U, -2967996443U, -2967780931U, -2967562369U, -2967343021U, -2967124487U, -2966906353U, -2966688983U, -2966472557U, -2966253179U, -2966035691U, -2965819673U, -2965600733U, -2965383739U, -2965166959U, -2964946847U, -2964729197U, -2964510889U, -2964292297U, -2964075437U, -2963855227U, -2963638693U, -2963421677U, -2963204119U, -2962986503U, -2962766491U, -2962547311U, -2962331657U, -2962112771U, -2961895337U, -2961679121U, -2961460591U, -2961241603U, -2961022781U, -2960805161U, -2960587099U, -2960369359U, -2960151149U, -2959931383U, -2959714627U, -2959495937U, -2959277393U, -2959059997U, -2958843161U, -2958625499U, -2958407399U, -2958189191U, -2957972767U, -2957753053U, -2957535137U, -2957317171U, -2957098873U, -2956880557U, -2956660747U, -2956441343U, -2956224577U, -2956007273U, -2955789979U, -2955569107U, -2955349213U, -2955131051U, -2954912297U, -2954693083U, -2954475233U, -2954255153U, -2954037211U, -2953818851U, -2953599667U, -2953381993U, -2953162151U, -2952942739U, -2952725873U, -2952506693U, -2952289517U, -2952071821U, -2951854319U, -2951636731U, -2951419189U, -2951201251U, -2950982971U, -2950763201U, -2950544221U, -2950326689U, -2950110017U, -2949891643U, -2949673561U, -2949456077U, -2949238151U, -2949022819U, -2948803327U, -2948584297U, -2948367439U, -2948148473U, -2947930483U, -2947712767U, -2947495459U, -2947277803U, -2947061057U, -2946842537U, -2946625949U, -2946405619U, -2946187753U, -2945970421U, -2945751373U, -2945535001U, -2945315713U, -2945096753U, -2944880387U, -2944658933U, -2944441141U, -2944223479U, -2944005997U, -2943788681U, -2943569197U, -2943351529U, -2943132887U, -2942914609U, -2942697049U, -2942480587U, -2942261857U, -2942041747U, -2941824229U, -2941604959U, -2941387153U, -2941168301U, -2940949691U, -2940733787U, -2940516781U, -2940299849U, -2940084479U, -2939867743U, -2939650613U, -2939432609U, -2939214277U, -2938996777U, -2938779271U, -2938560353U, -2938341551U, -2938124249U, -2937905819U, -2937690901U, -2937472607U, -2937253091U, -2937035341U, -2936814169U, -2936597249U, -2936378723U, -2936162003U, -2935942103U, -2935724443U, -2935504679U, -2935286489U, -2935067897U, -2934850591U, -2934633607U, -2934416071U, -2934197197U, -2933980571U, -2933761433U, -2933543771U, -2933324839U, -2933105831U, -2932886129U, -2932668953U, -2932451867U, -2932234901U, -2932015831U, -2931799373U, -2931579601U, -2931363089U, -2931144523U, -2930928227U, -2930711587U, -2930493919U, -2930273009U, -2930054573U, -2929836719U, -2929619653U, -2929400603U, -2929183613U, -2928966151U, -2928748139U, -2928530929U, -2928313153U, -2928094357U, -2927875619U, -2927658673U, -2927442487U, -2927222069U, -2927004709U, -2926787309U, -2926569361U, -2926350367U, -2926135529U, -2925917893U, -2925698173U, -2925480919U, -2925263279U, -2925046463U, -2924831069U, -2924613371U, -2924393729U, -2924175193U, -2923954801U, -2923737343U, -2923518683U, -2923300829U, -2923082209U, -2922864767U, -2922649421U, -2922430073U, -2922212519U, -2921994917U, -2921775803U, -2921559653U, -2921341103U, -2921126489U, -2920908283U, -2920689061U, -2920471049U, -2920251703U, -2920034347U, -2919817627U, -2919598021U, -2919381319U, -2919162959U, -2918943683U, -2918729057U, -2918510587U, -2918292271U, -2918072057U, -2917854413U, -2917635811U, -2917419499U, -2917202663U, -2916983521U, -2916765193U, -2916545773U, -2916328517U, -2916112183U, -2915893681U, -2915677241U, -2915456513U, -2915239601U, -2915020937U, -2914803761U, -2914586503U, -2914368059U, -2914150271U, -2913932779U, -2913714131U, -2913494791U, -2913274457U, -2913057307U, -2912839169U, -2912621401U, -2912404247U, -2912187853U, -2911970317U, -2911752157U, -2911532539U, -2911313501U, -2911094951U, -2910876457U, -2910657353U, -2910439451U, -2910221297U, -2910003703U, -2909787409U, -2909568721U, -2909351741U, -2909134769U, -2908916249U, -2908699601U, -2908480777U, -2908262023U, -2908043023U, -2907825317U, -2907607337U, -2907388073U, -2907166967U, -2906952473U, -2906736593U, -2906518943U, -2906300231U, -2906082233U, -2905864067U, -2905644013U, -2905426619U, -2905208881U, -2904993263U, -2904773771U, -2904556769U, -2904338867U, -2904123031U, -2903903861U, -2903686447U, -2903468497U, -2903250821U, -2903031559U, -2902812839U, -2902597123U, -2902380449U, -2902160717U, -2901941417U, -2901724187U, -2901507019U, -2901289403U, -2901071813U, -2900854379U, -2900634593U, -2900418889U, -2900202287U, -2899984603U, -2899766291U, -2899550011U, -2899332323U, -2899114357U, -2898895687U, -2898677891U, -2898458359U, -2898238669U, -2898022789U, -2897804407U, -2897587421U, -2897369021U, -2897150423U, -2896932589U, -2896714631U, -2896495643U, -2896278251U, -2896061459U, -2895842179U, -2895625609U, -2895408143U, -2895191393U, -2894976157U, -2894758709U, -2894538461U, -2894320211U, -2894101087U, -2893885381U, -2893666007U, -2893448681U, -2893230569U, -2893012403U, -2892794153U, -2892573601U, -2892357361U, -2892141401U, -2891924291U, -2891705197U, -2891485453U, -2891265869U, -2891046343U, -2890827241U, -2890611539U, -2890395037U, -2890176347U, -2889959197U, -2889741301U, -2889523193U, -2889304499U, -2889089393U, -2888872171U, -2888652913U, -2888435443U, -2888217103U, -2887998313U, -2887779967U, -2887561093U, -2887343237U, -2887123997U, -2886907081U, -2886689119U, -2886472033U, -2886253057U, -2886035473U, -2885816789U, -2885599417U, -2885384233U, -2885167091U, -2884947421U, -2884728403U, -2884511183U, -2884293637U, -2884076357U, -2883857357U, -2883636991U, -2883420959U, -2883205421U, -2882988211U, -2882768663U, -2882551601U, -2882332891U, -2882115923U, -2881893467U, -2881675499U, -2881460221U, -2881243067U, -2881026271U, -2880811447U, -2880592861U, -2880372919U, -2880155819U, -2879937503U, -2879719223U, -2879501707U, -2879284477U, -2879065151U, -2878847353U, -2878630171U, -2878412213U, -2878195469U, -2877978211U, -2877761027U, -2877542959U, -2877323003U, -2877103631U, -2876887777U, -2876669153U, -2876450789U, -2876234329U, -2876015969U, -2875798063U, -2875580219U, -2875359587U, -2875143757U, -2874924197U, -2874705727U, -2874488887U, -2874269987U, -2874053293U, -2873838833U, -2873621573U, -2873405077U, -2873184967U, -2872965317U, -2872747699U, -2872530079U, -2872311397U, -2872093027U, -2871876197U, -2871660371U, -2871442997U, -2871223709U, -2871006713U, -2870788931U, -2870569511U, -2870353319U, -2870136403U, -2869918537U, -2869699211U, -2869482403U, -2869264327U, -2869046833U, -2868829897U, -2868611561U, -2868394531U, -2868174143U, -2867957447U, -2867741813U, -2867525273U, -2867306537U, -2867087807U, -2866870037U, -2866650131U, -2866432507U, -2866214723U, -2865995389U, -2865779281U, -2865562759U, -2865345643U, -2865128281U, -2864909689U, -2864694359U, -2864474981U, -2864259109U, -2864041781U, -2863821967U, -2863603163U, -2863384697U, -2863168019U, -2862948337U, -2862729659U, -2862513271U, -2862296011U, -2862079601U, -2861861329U, -2861642369U, -2861425097U, -2861209789U, -2860995217U, -2860778423U, -2860561097U, -2860342603U, -2860123993U, -2859905843U, -2859688873U, -2859471767U, -2859252779U, -2859032731U, -2858814547U, -2858597117U, -2858380367U, -2858163197U, -2857943411U, -2857725271U, -2857506689U, -2857290773U, -2857072787U, -2856856927U, -2856636661U, -2856421241U, -2856205237U, -2855990087U, -2855772947U, -2855553373U, -2855333407U, -2855115623U, -2854898329U, -2854680739U, -2854464091U, -2854245203U, -2854025267U, -2853810433U, -2853595379U, -2853379457U, -2853160217U, -2852940071U, -2852723551U, -2852506303U, -2852289907U, -2852072389U, -2851854713U, -2851637123U, -2851420771U, -2851204067U, -2850984959U, -2850768589U, -2850549269U, -2850330421U, -2850111983U, -2849894777U, -2849677687U, -2849461753U, -2849245277U, -2849027833U, -2848809701U, -2848590973U, -2848374059U, -2848154471U, -2847936691U, -2847718589U, -2847501413U, -2847283139U, -2847064399U, -2846845681U, -2846630233U, -2846412451U, -2846195621U, -2845978997U, -2845761719U, -2845545929U, -2845328281U, -2845111153U, -2844894137U, -2844676819U, -2844457703U, -2844237833U, -2844020057U, -2843802061U, -2843583269U, -2843367311U, -2843148307U, -2842929931U, -2842712767U, -2842494803U, -2842276837U, -2842059893U, -2841843317U, -2841625249U, -2841405043U, -2841186893U, -2840966993U, -2840751341U, -2840533337U, -2840315887U, -2840099881U, -2839879993U, -2839663579U, -2839446527U, -2839227731U, -2839010423U, -2838792029U, -2838573323U, -2838357359U, -2838139411U, -2837920433U, -2837703611U, -2837486299U, -2837267611U, -2837049623U, -2836833059U, -2836613807U, -2836398179U, -2836180517U, -2835963887U, -2835744931U, -2835526247U, -2835309481U, -2835089911U, -2834871859U, -2834655797U, -2834437279U, -2834220317U, -2834003617U, -2833786201U, -2833565099U, -2833349143U, -2833132711U, -2832915803U, -2832695309U, -2832478303U, -2832259931U, -2832041741U, -2831822611U, -2831604649U, -2831385941U, -2831168953U, -2830949377U, -2830732193U, -2830514789U, -2830296191U, -2830078421U, -2829861907U, -2829645557U, -2829428501U, -2829210367U, -2828994253U, -2828776007U, -2828556517U, -2828338973U, -2828122361U, -2827905911U, -2827687451U, -2827470001U, -2827253929U, -2827036441U, -2826817351U, -2826600781U, -2826383321U, -2826165103U, -2825945599U, -2825728769U, -2825510437U, -2825292881U, -2825075599U, -2824857577U, -2824637267U, -2824421753U, -2824203383U, -2823985121U, -2823767741U, -2823552713U, -2823334027U, -2823115531U, -2822899567U, -2822681171U, -2822466149U, -2822249779U, -2822031559U, -2821815097U, -2821597187U, -2821377467U, -2821161307U, -2820944677U, -2820726023U, -2820509233U, -2820291787U, -2820074617U, -2819858617U, -2819639863U, -2819420909U, -2819204699U, -2818986097U, -2818769671U, -2818554127U, -2818338797U, -2818119323U, -2817902393U, -2817687143U, -2817470609U, -2817251677U, -2817033533U, -2816816729U, -2816597177U, -2816379701U, -2816161721U, -2815943177U, -2815724267U, -2815508719U, -2815292171U, -2815074161U, -2814855517U, -2814639523U, -2814424241U, -2814205813U, -2813989523U, -2813771789U, -2813553863U, -2813335013U, -2813118311U, -2812899511U, -2812682017U, -2812466269U, -2812247873U, -2812029713U, -2811814463U, -2811594971U, -2811377483U, -2811158557U, -2810940163U, -2810724047U, -2810504129U, -2810285299U, -2810067109U, -2809850917U, -2809632401U, -2809416563U, -2809198597U, -2808980641U, -2808761933U, -2808546109U, -2808327799U, -2808109763U, -2807892041U, -2807673161U, -2807455799U, -2807239129U, -2807021237U, -2806801457U, -2806581781U, -2806364989U, -2806148617U, -2805931031U, -2805715879U, -2805500573U, -2805283331U, -2805064187U, -2804847361U, -2804630473U, -2804413741U, -2804195767U, -2803975861U, -2803759481U, -2803540147U, -2803324603U, -2803107253U, -2802890353U, -2802672823U, -2802457183U, -2802239873U, -2802023131U, -2801805257U, -2801588953U, -2801372323U, -2801154773U, -2800937873U, -2800719839U, -2800502303U, -2800284107U, -2800066679U, -2799847909U, -2799629947U, -2799413213U, -2799194747U, -2798976953U, -2798757359U, -2798541121U, -2798323391U, -2798104747U, -2797889089U, -2797671869U, -2797455259U, -2797239293U, -2797022453U, -2796803531U, -2796585007U, -2796367729U, -2796151247U, -2795933939U, -2795714539U, -2795497283U, -2795280629U, -2795064541U, -2794846657U, -2794628513U, -2794411001U, -2794193641U, -2793974507U, -2793756883U, -2793538697U, -2793322783U, -2793104891U, -2792887567U, -2792669413U, -2792450077U, -2792234747U, -2792015983U, -2791799281U, -2791579949U, -2791362671U, -2791148117U, -2790929363U, -2790712147U, -2790494117U, -2790276341U, -2790057701U, -2789840201U, -2789622509U, -2789404531U, -2789187923U, -2788970959U, -2788753739U, -2788535047U, -2788317643U, -2788099129U, -2787883151U, -2787666533U, -2787448931U, -2787231721U, -2787014497U, -2786796839U, -2786578331U, -2786361649U, -2786144821U, -2785926443U, -2785709483U, -2785492691U, -2785276147U, -2785059701U, -2784842513U, -2784623269U, -2784403757U, -2784186253U, -2783970367U, -2783751689U, -2783533561U, -2783316001U, -2783098823U, -2782882673U, -2782664111U, -2782447223U, -2782229669U, -2782011607U, -2781792473U, -2781577033U, -2781359699U, -2781143957U, -2780925857U, -2780705443U, -2780487971U, -2780272037U, -2780052623U, -2779835621U, -2779620559U, -2779402261U, -2779184761U, -2778966361U, -2778750509U, -2778533341U, -2778314027U, -2778097499U, -2777877251U, -2777660539U, -2777443531U, -2777226589U, -2777009243U, -2776792973U, -2776576351U, -2776361117U, -2776143047U, -2775924847U, -2775707611U, -2775489313U, -2775272177U, -2775054169U, -2774836811U, -2774619791U, -2774401967U, -2774184313U, -2773966513U, -2773747181U, -2773530527U, -2773313149U, -2773095791U, -2772879017U, -2772660467U, -2772444667U, -2772228551U, -2772009767U, -2771792449U, -2771576581U, -2771359039U, -2771144221U, -2770927889U, -2770711787U, -2770494997U, -2770277231U, -2770058563U, -2769839873U, -2769624397U, -2769407651U, -2769188251U, -2768970991U, -2768754187U, -2768536579U, -2768319319U, -2768102431U, -2767887809U, -2767669573U, -2767451647U, -2767235123U, -2767018187U, -2766800807U, -2766583471U, -2766366329U, -2766148349U, -2765931257U, -2765713711U, -2765494453U, -2765279519U, -2765058767U, -2764841509U, -2764622239U, -2764406269U, -2764188703U, -2763970529U, -2763752401U, -2763533807U, -2763317149U, -2763100811U, -2762884231U, -2762668303U, -2762450149U, -2762230519U, -2762015407U, -2761798139U, -2761581419U, -2761365491U, -2761146097U, -2760927271U, -2760711053U, -2760493937U, -2760274871U, -2760056279U, -2759839081U, -2759621659U, -2759403499U, -2759183873U, -2758967117U, -2758749431U, -2758531091U, -2758312511U, -2758094869U, -2757875647U, -2757661289U, -2757443287U, -2757225577U, -2757009529U, -2756793001U, -2756576659U, -2756357939U, -2756141051U, -2755926427U, -2755708801U, -2755491989U, -2755275233U, -2755057649U, -2754840499U, -2754623321U, -2754407107U, -2754190189U, -2753970071U, -2753751277U, -2753533889U, -2753317397U, -2753098739U, -2752879889U, -2752663559U, -2752447129U, -2752230763U, -2752012477U, -2751795523U, -2751574817U, -2751359173U, -2751143231U, -2750927563U, -2750710201U, -2750494993U, -2750277767U, -2750058631U, -2749838719U, -2749621681U, -2749404323U, -2749186409U, -2748969491U, -2748754933U, -2748537481U, -2748318541U, -2748099931U, -2747881769U, -2747664079U, -2747446327U, -2747228923U, -2747009921U, -2746791577U, -2746574401U, -2746356461U, -2746139393U, -2745923597U, -2745705107U, -2745486259U, -2745268853U, -2745053603U, -2744837633U, -2744620103U, -2744402081U, -2744184061U, -2743965649U, -2743747399U, -2743529093U, -2743309747U, -2743091501U, -2742875263U, -2742657499U, -2742436849U, -2742221177U, -2742002209U, -2741784317U, -2741565467U, -2741350751U, -2741134939U, -2740917589U, -2740700147U, -2740484129U, -2740268543U, -2740051661U, -2739832097U, -2739613999U, -2739397519U, -2739180611U, -2738965601U, -2738750713U, -2738530519U, -2738312657U, -2738097601U, -2737880659U, -2737663919U, -2737447673U, -2737231039U, -2737011469U, -2736795203U, -2736577367U, -2736359929U, -2736140411U, -2735922361U, -2735707621U, -2735490701U, -2735272087U, -2735051993U, -2734834733U, -2734617673U, -2734399807U, -2734183789U, -2733964489U, -2733747299U, -2733531319U, -2733315773U, -2733096937U, -2732877229U, -2732659313U, -2732442539U, -2732224381U, -2732008493U, -2731791107U, -2731575277U, -2731359073U, -2731143791U, -2730927193U, -2730710711U, -2730492463U, -2730272821U, -2730056191U, -2729836853U, -2729618401U, -2729401309U, -2729183783U, -2728967399U, -2728750513U, -2728532957U, -2728316387U, -2728095649U, -2727876353U, -2727657487U, -2727441889U, -2727223129U, -2727005321U, -2726785889U, -2726567969U, -2726350567U, -2726134057U, -2725917767U, -2725702043U, -2725483997U, -2725265143U, -2725048691U, -2724834121U, -2724617173U, -2724400213U, -2724182843U, -2723963009U, -2723744983U, -2723527771U, -2723309219U, -2723091817U, -2722872419U, -2722654423U, -2722437283U, -2722221071U, -2722003787U, -2721787063U, -2721571087U, -2721354179U, -2721135533U, -2720918813U, -2720700211U, -2720482043U, -2720263867U, -2720045333U, -2719829513U, -2719610849U, -2719394527U, -2719178291U, -2718963449U, -2718746123U, -2718526709U, -2718310267U, -2718091331U, -2717873803U, -2717658043U, -2717440529U, -2717224541U, -2717007047U, -2716791377U, -2716572949U, -2716355051U, -2716137659U, -2715920573U, -2715704273U, -2715486167U, -2715267853U, -2715051109U, -2714833687U, -2714615261U, -2714398829U, -2714182301U, -2713964917U, -2713748071U, -2713530331U, -2713313419U, -2713095769U, -2712878431U, -2712662101U, -2712443231U, -2712227411U, -2712009089U, -2711793187U, -2711574529U, -2711360329U, -2711144291U, -2710924687U, -2710707551U, -2710489841U, -2710273571U, -2710057997U, -2709838841U, -2709622463U, -2709405917U, -2709186349U, -2708968877U, -2708750413U, -2708532971U, -2708318071U, -2708101423U, -2707882889U, -2707665913U, -2707449389U, -2707232833U, -2707015789U, -2706799423U, -2706580579U, -2706364931U, -2706147757U, -2705930971U, -2705712257U, -2705495677U, -2705279699U, -2705062303U, -2704846349U, -2704628477U, -2704412203U, -2704194443U, -2703975119U, -2703756427U, -2703538801U, -2703322967U, -2703105413U, -2702888407U, -2702670497U, -2702454919U, -2702235997U, -2702021737U, -2701801493U, -2701585729U, -2701367989U, -2701151581U, -2700934559U, -2700718619U, -2700500519U, -2700284057U, -2700067691U, -2699850661U, -2699632207U, -2699414203U, -2699197199U, -2698979867U, -2698763449U, -2698546423U, -2698328177U, -2698112723U, -2697894349U, -2697677911U, -2697461189U, -2697244709U, -2697028651U, -2696813281U, -2696594269U, -2696377417U, -2696159857U, -2695942259U, -2695726037U, -2695509877U, -2695293703U, -2695077029U, -2694857899U, -2694641657U, -2694426953U, -2694209863U, -2693992429U, -2693776999U, -2693558843U, -2693339317U, -2693121281U, -2692904281U, -2692687223U, -2692468787U, -2692252309U, -2692034089U, -2691819241U, -2691602107U, -2691383239U, -2691166903U, -2690948789U, -2690732003U, -2690515171U, -2690299373U, -2690081593U, -2689862561U, -2689645753U, -2689428227U, -2689209829U, -2688993607U, -2688777209U, -2688561017U, -2688343547U, -2688127933U, -2687911913U, -2687694539U, -2687476763U, -2687263067U, -2687049571U, -2686832471U, -2686615571U, -2686398347U, -2686179949U, -2685965081U, -2685747137U, -2685529541U, -2685310961U, -2685093211U, -2684876093U, -2684658019U, -2684440067U, -2684223953U, -2684005817U, -2683789963U, -2683571243U, -2683353733U, -2683137199U, -2682917623U, -2682700063U, -2682479377U, -2682264451U, -2682047707U, -2681828923U, -2681611753U, -2681394413U, -2681177111U, -2680959709U, -2680744291U, -2680525957U, -2680308977U, -2680096213U, -2679877279U, -2679660703U, -2679442013U, -2679225181U, -2679008639U, -2678791777U, -2678576051U, -2678358019U, -2678142487U, -2677926301U, -2677708807U, -2677493873U, -2677275257U, -2677055411U, -2676838837U, -2676620759U, -2676405769U, -2676189599U, -2675970641U, -2675755597U, -2675538689U, -2675323379U, -2675104633U, -2674886273U, -2674669183U, -2674452647U, -2674236199U, -2674019521U, -2673802099U, -2673589109U, -2673370517U, -2673153583U, -2672936393U, -2672719319U, -2672502383U, -2672285699U, -2672069171U, -2671851187U, -2671632563U, -2671414829U, -2671199281U, -2670982297U, -2670764023U, -2670547589U, -2670329219U, -2670112937U, -2669897969U, -2669681671U, -2669463829U, -2669247731U, -2669028689U, -2668810241U, -2668592911U, -2668377587U, -2668161701U, -2667945023U, -2667728057U, -2667510931U, -2667293077U, -2667076751U, -2666860253U, -2666643367U, -2666425523U, -2666207899U, -2665990751U, -2665773419U, -2665557353U, -2665337501U, -2665121737U, -2664904817U, -2664690073U, -2664472079U, -2664258323U, -2664039709U, -2663820461U, -2663602421U, -2663387431U, -2663168177U, -2662951507U, -2662735541U, -2662516147U, -2662300259U, -2662082509U, -2661865067U, -2661648779U, -2661432827U, -2661214163U, -2660999801U, -2660781689U, -2660562241U, -2660345951U, -2660127443U, -2659910443U, -2659691731U, -2659474313U, -2659255663U, -2659039301U, -2658822889U, -2658607327U, -2658391117U, -2658171743U, -2657953993U, -2657735627U, -2657519093U, -2657300533U, -2657084537U, -2656869827U, -2656653679U, -2656434799U, -2656218541U, -2656001609U, -2655785789U, -2655570427U, -2655354607U, -2655138589U, -2654923177U, -2654706149U, -2654489879U, -2654274641U, -2654055773U, -2653839263U, -2653621843U, -2653405831U, -2653189291U, -2652972197U, -2652754297U, -2652539249U, -2652321443U, -2652103859U, -2651884883U, -2651667787U, -2651451791U, -2651231629U, -2651014127U, -2650796653U, -2650580249U, -2650363361U, -2650147111U, -2649933037U, -2649715879U, -2649498611U, -2649282833U, -2649064001U, -2648847847U, -2648628863U, -2648409479U, -2648192941U, -2647976189U, -2647759267U, -2647543273U, -2647326169U, -2647110629U, -2646891629U, -2646675377U, -2646458467U, -2646241303U, -2646024781U, -2645808241U, -2645591363U, -2645373799U, -2645155729U, -2644938983U, -2644720241U, -2644505509U, -2644285547U, -2644068403U, -2643849823U, -2643632899U, -2643416371U, -2643198983U, -2642982389U, -2642764637U, -2642546867U, -2642330021U, -2642114309U, -2641897289U, -2641679903U, -2641464583U, -2641247107U, -2641030501U, -2640813577U, -2640595387U, -2640378677U, -2640158657U, -2639944249U, -2639727721U, -2639511683U, -2639296301U, -2639077267U, -2638858801U, -2638637987U, -2638423691U, -2638207669U, -2637992069U, -2637776507U, -2637558317U, -2637341431U, -2637125737U, -2636909777U, -2636691353U, -2636473793U, -2636255731U, -2636038121U, -2635820051U, -2635603241U, -2635384553U, -2635166099U, -2634948179U, -2634729767U, -2634513631U, -2634295421U, -2634078131U, -2633861851U, -2633645137U, -2633429243U, -2633212481U, -2632993633U, -2632775279U, -2632558007U, -2632341337U, -2632126339U, -2631908537U, -2631692597U, -2631477319U, -2631259781U, -2631043561U, -2630828731U, -2630613143U, -2630397893U, -2630179499U, -2629962739U, -2629744907U, -2629529321U, -2629310449U, -2629091953U, -2628874163U, -2628659393U, -2628440917U, -2628222629U, -2628006571U, -2627789387U, -2627571263U, -2627356183U, -2627139131U, -2626923749U, -2626706723U, -2626490747U, -2626273151U, -2626054199U, -2625836069U, -2625621469U, -2625405073U, -2625186331U, -2624968571U, -2624753177U, -2624536573U, -2624318867U, -2624102137U, -2623886479U, -2623670167U, -2623450667U, -2623233539U, -2623015669U, -2622798911U, -2622582203U, -2622365293U, -2622146899U, -2621929019U, -2621714273U, -2621497343U, -2621280383U, -2621064059U, -2620847813U, -2620631471U, -2620414429U, -2620198877U, -2619982487U, -2619765787U, -2619550579U, -2619333139U, -2619116081U, -2618899931U, -2618682371U, -2618463889U, -2618248037U, -2618032909U, -2617816303U, -2617598407U, -2617381099U, -2617163711U, -2616947087U, -2616730153U, -2616515873U, -2616296401U, -2616081211U, -2615863463U, -2615646091U, -2615429951U, -2615214491U, -2614996649U, -2614780747U, -2614561129U, -2614343869U, -2614125539U, -2613909959U, -2613692597U, -2613477539U, -2613260467U, -2613044363U, -2612829473U, -2612611453U, -2612394649U, -2612176891U, -2611957609U, -2611740809U, -2611525001U, -2611307623U, -2611092301U, -2610874723U, -2610658429U, -2610440659U, -2610225349U, -2610009869U, -2609793761U, -2609575523U, -2609357537U, -2609140153U, -2608923287U, -2608707473U, -2608489789U, -2608273363U, -2608055477U, -2607838963U, -2607621487U, -2607403291U, -2607186877U, -2606966951U, -2606751743U, -2606533609U, -2606317411U, -2606100793U, -2605883897U, -2605667153U, -2605448753U, -2605231193U, -2605014913U, -2604797309U, -2604582131U, -2604366593U, -2604149179U, -2603934233U, -2603717729U, -2603502661U, -2603284571U, -2603067263U, -2602846133U, -2602629787U, -2602412567U, -2602195759U, -2601979477U, -2601761791U, -2601547447U, -2601328687U, -2601107869U, -2600891873U, -2600673967U, -2600457787U, -2600242111U, -2600025353U, -2599807471U, -2599589617U, -2599374607U, -2599156873U, -2598942991U, -2598725593U, -2598507889U, -2598293911U, -2598075091U, -2597857697U, -2597643011U, -2597426287U, -2597207407U, -2596990943U, -2596775537U, -2596557989U, -2596340353U, -2596123469U, -2595906763U, -2595690697U, -2595473267U, -2595256019U, -2595041297U, -2594823029U, -2594608529U, -2594391979U, -2594174971U, -2593957823U, -2593739803U, -2593521767U, -2593305053U, -2593087513U, -2592871531U, -2592654041U, -2592437929U, -2592221161U, -2592003863U, -2591787493U, -2591571179U, -2591355859U, -2591139919U, -2590921727U, -2590705829U, -2590488157U, -2590272709U, -2590057949U, -2589843371U, -2589624967U, -2589408167U, -2589194147U, -2588976583U, -2588759923U, -2588542763U, -2588325721U, -2588107619U, -2587892101U, -2587675567U, -2587460251U, -2587244389U, -2587025141U, -2586807149U, -2586590401U, -2586374317U, -2586158693U, -2585941643U, -2585722697U, -2585505907U, -2585290069U, -2585072767U, -2584855279U, -2584640579U, -2584422497U, -2584204607U, -2583990001U, -2583773659U, -2583555721U, -2583338327U, -2583121259U, -2582905651U, -2582688041U, -2582469793U, -2582254019U, -2582037103U, -2581820699U, -2581606201U, -2581389763U, -2581174697U, -2580956501U, -2580739171U, -2580522377U, -2580305843U, -2580090167U, -2579872481U, -2579656291U, -2579442023U, -2579223007U, -2579006891U, -2578788097U, -2578569919U, -2578353559U, -2578136993U, -2577920299U, -2577706259U, -2577488027U, -2577272167U, -2577055669U, -2576837143U, -2576619973U, -2576404241U, -2576188333U, -2575971793U, -2575754497U, -2575538299U, -2575321747U, -2575105031U, -2574888223U, -2574672091U, -2574456811U, -2574239957U, -2574024287U, -2573808011U, -2573590927U, -2573375023U, -2573157761U, -2572940339U, -2572723019U, -2572506899U, -2572292279U, -2572077103U, -2571858599U, -2571642473U, -2571425821U, -2571208529U, -2570990369U, -2570773441U, -2570559869U, -2570342717U, -2570124047U, -2569905977U, -2569691791U, -2569474489U, -2569259047U, -2569043497U, -2568826747U, -2568610543U, -2568394487U, -2568177319U, -2567960729U, -2567743853U, -2567527723U, -2567312149U, -2567094511U, -2566876579U, -2566660301U, -2566443881U, -2566226821U, -2566010947U, -2565794353U, -2565579977U, -2565364231U, -2565146569U, -2564930507U, -2564713583U, -2564498843U, -2564283143U, -2564066677U, -2563849087U, -2563634039U, -2563419293U, -2563201339U, -2562985517U, -2562768883U, -2562550747U, -2562331649U, -2562114743U, -2561899009U, -2561684717U, -2561469901U, -2561252557U, -2561036551U, -2560819993U, -2560600963U, -2560383131U, -2560163939U, -2559947333U, -2559732017U, -2559515687U, -2559298571U, -2559083963U, -2558866837U, -2558650291U, -2558433401U, -2558218781U, -2558002897U, -2557785821U, -2557567981U, -2557350097U, -2557134737U, -2556919997U, -2556701327U, -2556484211U, -2556267677U, -2556051929U, -2555837747U, -2555622319U, -2555406457U, -2555188639U, -2554971443U, -2554754921U, -2554539539U, -2554320997U, -2554104451U, -2553889699U, -2553674129U, -2553456461U, -2553239069U, -2553022207U, -2552804363U, -2552586833U, -2552373497U, -2552154617U, -2551939211U, -2551722221U, -2551507171U, -2551289401U, -2551072441U, -2550854513U, -2550637459U, -2550422011U, -2550204619U, -2549989213U, -2549772451U, -2549556367U, -2549344409U, -2549126737U, -2548911913U, -2548696739U, -2548480237U, -2548263559U, -2548045919U, -2547829759U, -2547611191U, -2547396581U, -2547179527U, -2546962577U, -2546746981U, -2546529199U, -2546312413U, -2546095631U, -2545880399U, -2545664809U, -2545449493U, -2545232681U, -2545014881U, -2544797323U, -2544580949U, -2544362081U, -2544144749U, -2543927899U, -2543710349U, -2543493541U, -2543278021U, -2543058757U, -2542841729U, -2542624603U, -2542408513U, -2542191709U, -2541975707U, -2541759137U, -2541542141U, -2541326009U, -2541111257U, -2540896591U, -2540679419U, -2540462593U, -2540246953U, -2540030399U, -2539813907U, -2539596281U, -2539379419U, -2539161697U, -2538945569U, -2538728831U, -2538513301U, -2538297287U, -2538080243U, -2537864347U, -2537649151U, -2537433263U, -2537217229U, -2537001541U, -2536784311U, -2536567823U, -2536351751U, -2536135703U, -2535920071U, -2535703109U, -2535485651U, -2535267913U, -2535049381U, -2534835071U, -2534618899U, -2534401141U, -2534184743U, -2533968511U, -2533751977U, -2533535057U, -2533319801U, -2533103939U, -2532889717U, -2532672287U, -2532458581U, -2532240527U, -2532024263U, -2531808221U, -2531594033U, -2531375533U, -2531159747U, -2530945583U, -2530728091U, -2530510111U, -2530291601U, -2530076701U, -2529860363U, -2529644539U, -2529427169U, -2529210923U, -2528994893U, -2528778227U, -2528561443U, -2528344967U, -2528129983U, -2527914227U, -2527697857U, -2527483549U, -2527265941U, -2527048369U, -2526831781U, -2526617609U, -2526401041U, -2526186511U, -2525969521U, -2525751269U, -2525536837U, -2525319001U, -2525102543U, -2524883839U, -2524667221U, -2524449793U, -2524233617U, -2524016647U, -2523800459U, -2523584641U, -2523368747U, -2523151927U, -2522932883U, -2522717297U, -2522499653U, -2522283347U, -2522067281U, -2521852183U, -2521635689U, -2521420529U, -2521202821U, -2520984749U, -2520769301U, -2520551983U, -2520337163U, -2520121147U, -2519904151U, -2519687407U, -2519469941U, -2519254519U, -2519038309U, -2518820833U, -2518604357U, -2518386329U, -2518171613U, -2517954631U, -2517740233U, -2517524573U, -2517306587U, -2517091133U, -2516875549U, -2516659099U, -2516440349U, -2516223511U, -2516009189U, -2515791953U, -2515574741U, -2515356967U, -2515140851U, -2514925321U, -2514708857U, -2514492941U, -2514278527U, -2514060737U, -2513844511U, -2513629211U, -2513413999U, -2513197331U, -2512982491U, -2512767919U, -2512550039U, -2512333891U, -2512118659U, -2511902051U, -2511683351U, -2511466921U, -2511249691U, -2511035069U, -2510818363U, -2510602331U, -2510385959U, -2510168447U, -2509952597U, -2509736107U, -2509518721U, -2509301233U, -2509086889U, -2508870779U, -2508654017U, -2508436187U, -2508220999U, -2508004423U, -2507788471U, -2507572759U, -2507358193U, -2507142773U, -2506926857U, -2506708901U, -2506492003U, -2506275773U, -2506059841U, -2505843227U, -2505628639U, -2505412999U, -2505197309U, -2504978291U, -2504764349U, -2504546719U, -2504331703U, -2504116333U, -2503900211U, -2503686869U, -2503468057U, -2503251931U, -2503034987U, -2502819383U, -2502601529U, -2502383761U, -2502165307U, -2501950663U, -2501732017U, -2501516429U, -2501298523U, -2501082677U, -2500865963U, -2500651249U, -2500433521U, -2500215791U, -2499999013U, -2499784513U, -2499566551U, -2499348193U, -2499133477U, -2498919091U, -2498700949U, -2498484803U, -2498268767U, -2498051131U, -2497835203U, -2497619143U, -2497401107U, -2497185151U, -2496967981U, -2496751651U, -2496536257U, -2496318859U, -2496101129U, -2495884337U, -2495667091U, -2495449483U, -2495234069U, -2495015851U, -2494798981U, -2494586071U, -2494369567U, -2494153777U, -2493936787U, -2493720041U, -2493503279U, -2493288713U, -2493072847U, -2492855327U, -2492639627U, -2492424367U, -2492206993U, -2491988657U, -2491772527U, -2491556789U, -2491340471U, -2491123897U, -2490906919U, -2490690511U, -2490473023U, -2490256157U, -2490039371U, -2489824397U, -2489606737U, -2489386771U, -2489169691U, -2488953791U, -2488738607U, -2488524167U, -2488307113U, -2488089367U, -2487872069U, -2487655309U, -2487439177U, -2487224461U, -2487006499U, -2486788963U, -2486573101U, -2486356783U, -2486139791U, -2485923217U, -2485705493U, -2485487957U, -2485271471U, -2485052771U, -2484839933U, -2484624929U, -2484408247U, -2484192527U, -2483973307U, -2483759609U, -2483543987U, -2483328161U, -2483109467U, -2482893463U, -2482675901U, -2482457161U, -2482241299U, -2482026611U, -2481810781U, -2481595201U, -2481379739U, -2481163543U, -2480947769U, -2480731301U, -2480516641U, -2480302337U, -2480086997U, -2479867427U, -2479650223U, -2479434857U, -2479215799U, -2479001621U, -2478785357U, -2478571189U, -2478356417U, -2478141383U, -2477923397U, -2477707373U, -2477488961U, -2477271481U, -2477057941U, -2476842673U, -2476624159U, -2476409263U, -2476193219U, -2475977579U, -2475761023U, -2475543029U, -2475328783U, -2475110999U, -2474890879U, -2474674327U, -2474459227U, -2474244041U, -2474029147U, -2473812701U, -2473596403U, -2473381349U, -2473165927U, -2472951167U, -2472735413U, -2472520727U, -2472307091U, -2472091723U, -2471874173U, -2471656697U, -2471441579U, -2471224237U, -2471006873U, -2470790431U, -2470575083U, -2470358629U, -2470143691U, -2469927209U, -2469711271U, -2469499757U, -2469281999U, -2469064889U, -2468847947U, -2468629519U, -2468413229U, -2468197247U, -2467983239U, -2467766527U, -2467549933U, -2467333889U, -2467116077U, -2466900307U, -2466683279U, -2466465941U, -2466249673U, -2466036497U, -2465821507U, -2465604553U, -2465388727U, -2465172733U, -2464957717U, -2464740137U, -2464523959U, -2464308311U, -2464091587U, -2463874783U, -2463659027U, -2463441269U, -2463225563U, -2463010027U, -2462791873U, -2462574523U, -2462356487U, -2462139853U, -2461922713U, -2461706603U, -2461490771U, -2461272043U, -2461055423U, -2460842491U, -2460624181U, -2460409169U, -2460192541U, -2459976229U, -2459758421U, -2459540911U, -2459325443U, -2459107793U, -2458892551U, -2458677601U, -2458461193U, -2458243223U, -2458027157U, -2457811933U, -2457594323U, -2457378923U, -2457161789U, -2456946269U, -2456730629U, -2456513639U, -2456297149U, -2456079463U, -2455863857U, -2455649191U, -2455433069U, -2455218023U, -2455004333U, -2454788311U, -2454571607U, -2454356581U, -2454139231U, -2453920571U, -2453704789U, -2453488979U, -2453271463U, -2453054039U, -2452840781U, -2452623821U, -2452410967U, -2452195063U, -2451976601U, -2451763159U, -2451547559U, -2451331549U, -2451116651U, -2450900741U, -2450682943U, -2450465513U, -2450249993U, -2450033627U, -2449816027U, -2449597919U, -2449381289U, -2449162117U, -2448946469U, -2448729883U, -2448513373U, -2448294643U, -2448077341U, -2447859991U, -2447646029U, -2447430317U, -2447215081U, -2446995403U, -2446778861U, -2446563043U, -2446347913U, -2446130653U, -2445914279U, -2445699913U, -2445483571U, -2445267343U, -2445053797U, -2444836921U, -2444622311U, -2444408423U, -2444189777U, -2443974557U, -2443759229U, -2443540247U, -2443324393U, -2443106177U, -2442890503U, -2442673561U, -2442456791U, -2442241667U, -2442025237U, -2441808221U, -2441594489U, -2441376631U, -2441160893U, -2440945873U, -2440728361U, -2440510843U, -2440294657U, -2440080157U, -2439865657U, -2439651391U, -2439433319U, -2439217799U, -2439004261U, -2438787661U, -2438570569U, -2438355421U, -2438138531U, -2437923409U, -2437707127U, -2437492373U, -2437275517U, -2437061327U, -2436844313U, -2436629971U, -2436414881U, -2436198631U, -2435981077U, -2435762471U, -2435546731U, -2435333387U, -2435115047U, -2434897891U, -2434683133U, -2434464391U, -2434247779U, -2434031381U, -2433816977U, -2433598367U, -2433382891U, -2433166579U, -2432951363U, -2432734259U, -2432519267U, -2432303207U, -2432088437U, -2431871549U, -2431654009U, -2431438567U, -2431222883U, -2431004551U, -2430789007U, -2430572239U, -2430357899U, -2430140243U, -2429923631U, -2429708647U, -2429490697U, -2429277119U, -2429059631U, -2428841551U, -2428626203U, -2428410749U, -2428193741U, -2427976979U, -2427760243U, -2427542993U, -2427328229U, -2427113081U, -2426897147U, -2426680747U, -2426465647U, -2426250041U, -2426034613U, -2425818701U, -2425601929U, -2425385723U, -2425169891U, -2424956221U, -2424741701U, -2424525161U, -2424310661U, -2424093157U, -2423875841U, -2423659657U, -2423445293U, -2423230783U, -2423015821U, -2422799177U, -2422585771U, -2422367743U, -2422152179U, -2421936493U, -2421719873U, -2421503983U, -2421287081U, -2421068899U, -2420852347U, -2420636627U, -2420420903U, -2420204023U, -2419987799U, -2419771187U, -2419554157U, -2419338787U, -2419124819U, -2418907529U, -2418693047U, -2418479549U, -2418264571U, -2418048331U, -2417831257U, -2417614807U, -2417399119U, -2417184257U, -2416967611U, -2416752409U, -2416536271U, -2416319387U, -2416105057U, -2415886301U, -2415670069U, -2415453023U, -2415235709U, -2415018433U, -2414803031U, -2414586983U, -2414370943U, -2414155213U, -2413940083U, -2413723471U, -2413506059U, -2413290541U, -2413073251U, -2412857789U, -2412643193U, -2412426707U, -2412211163U, -2411993867U, -2411776583U, -2411562311U, -2411345479U, -2411129923U, -2410914791U, -2410699133U, -2410481377U, -2410266007U, -2410048829U, -2409832129U, -2409617663U, -2409401249U, -2409184651U, -2408968189U, -2408751419U, -2408534461U, -2408320127U, -2408104597U, -2407888957U, -2407671853U, -2407458671U, -2407241731U, -2407025459U, -2406810563U, -2406592847U, -2406378241U, -2406160049U, -2405944223U, -2405727229U, -2405511811U, -2405297623U, -2405082629U, -2404866197U, -2404648957U, -2404432183U, -2404215091U, -2403999487U, -2403782401U, -2403567059U, -2403350249U, -2403134623U, -2402919731U, -2402704211U, -2402489473U, -2402272571U, -2402054147U, -2401837289U, -2401621687U, -2401406131U, -2401189979U, -2400973123U, -2400757439U, -2400539651U, -2400323077U, -2400105919U, -2399889293U, -2399675141U, -2399460449U, -2399245733U, -2399029231U, -2398813981U, -2398597219U, -2398379413U, -2398164833U, -2397948569U, -2397732923U, -2397515801U, -2397299549U, -2397085021U, -2396867801U, -2396653109U, -2396435089U, -2396217739U, -2395999153U, -2395783231U, -2395566959U, -2395350827U, -2395135343U, -2394920179U, -2394702979U, -2394486719U, -2394270059U, -2394055669U, -2393840479U, -2393622653U, -2393406401U, -2393190893U, -2392975477U, -2392759277U, -2392544101U, -2392327433U, -2392113121U, -2391896839U, -2391678997U, -2391461393U, -2391247091U, -2391031847U, -2390816957U, -2390600393U, -2390384861U, -2390168317U, -2389953641U, -2389736719U, -2389520779U, -2389304989U, -2389091333U, -2388874603U, -2388658969U, -2388442499U, -2388225803U, -2388006067U, -2387791751U, -2387577977U, -2387360413U, -2387144453U, -2386930687U, -2386714199U, -2386497403U, -2386279781U, -2386064861U, -2385851509U, -2385635543U, -2385420431U, -2385202607U, -2384985487U, -2384769461U, -2384554421U, -2384337071U, -2384122519U, -2383906543U, -2383692127U, -2383476829U, -2383262647U, -2383047829U, -2382830459U, -2382615419U, -2382400133U, -2382184537U, -2381968223U, -2381751839U, -2381535539U, -2381318791U, -2381103733U, -2380886887U, -2380673297U, -2380455919U, -2380238759U, -2380021361U, -2379807751U, -2379591671U, -2379377153U, -2379160853U, -2378944891U, -2378727539U, -2378510513U, -2378293279U, -2378076593U, -2377861237U, -2377644917U, -2377429697U, -2377213193U, -2376996647U, -2376782251U, -2376566029U, -2376349571U, -2376133733U, -2375919907U, -2375704391U, -2375485579U, -2375270591U, -2375054579U, -2374837373U, -2374621817U, -2374406971U, -2374192853U, -2373976057U, -2373760531U, -2373545989U, -2373327241U, -2373111347U, -2372894317U, -2372680469U, -2372464907U, -2372249629U, -2372032771U, -2371818637U, -2371601437U, -2371383727U, -2371168507U, -2370952511U, -2370736603U, -2370518873U, -2370304579U, -2370089479U, -2369872579U, -2369658763U, -2369441329U, -2369224889U, -2369010191U, -2368793017U, -2368578991U, -2368362539U, -2368147211U, -2367932341U, -2367716921U, -2367502859U, -2367286853U, -2367071513U, -2366857811U, -2366642171U, -2366426123U, -2366209843U, -2365994641U, -2365779181U, -2365561397U, -2365345733U, -2365130297U, -2364913519U, -2364698551U, -2364482947U, -2364266941U, -2364048899U, -2363831777U, -2363616797U, -2363399443U, -2363185907U, -2362970219U, -2362753663U, -2362538753U, -2362325137U, -2362108759U, -2361891607U, -2361677057U, -2361460697U, -2361244889U, -2361029521U, -2360811251U, -2360593589U, -2360377871U, -2360160973U, -2359944163U, -2359729637U, -2359513753U, -2359298749U, -2359081141U, -2358864077U, -2358647191U, -2358433151U, -2358217307U, -2358002501U, -2357786393U, -2357572391U, -2357355223U, -2357140127U, -2356922443U, -2356706927U, -2356491167U, -2356276309U, -2356060219U, -2355843337U, -2355628351U, -2355412211U, -2355196939U, -2354979299U, -2354762923U, -2354547589U, -2354332327U, -2354116403U, -2353898347U, -2353682899U, -2353467719U, -2353251041U, -2353034861U, -2352821521U, -2352608729U, -2352391733U, -2352177071U, -2351959373U, -2351743871U, -2351527331U, -2351311103U, -2351095787U, -2350880537U, -2350663867U, -2350448987U, -2350233607U, -2350018009U, -2349802193U, -2349585643U, -2349371473U, -2349154459U, -2348938483U, -2348723393U, -2348506163U, -2348290627U, -2348073529U, -2347858001U, -2347641251U, -2347426061U, -2347210109U, -2346994847U, -2346777833U, -2346563741U, -2346347957U, -2346130597U, -2345915233U, -2345700967U, -2345483321U, -2345268559U, -2345055421U, -2344836029U, -2344620749U, -2344404077U, -2344188467U, -2343971621U, -2343753989U, -2343537377U, -2343322691U, -2343106237U, -2342889763U, -2342675663U, -2342461337U, -2342245693U, -2342028907U, -2341811071U, -2341594513U, -2341380673U, -2341165823U, -2340950653U, -2340737603U, -2340521567U, -2340303299U, -2340086269U, -2339869699U, -2339651581U, -2339437049U, -2339222891U, -2339007247U, -2338790449U, -2338576003U, -2338361213U, -2338146329U, -2337927731U, -2337714713U, -2337499061U, -2337281887U, -2337065981U, -2336851397U, -2336635331U, -2336418673U, -2336202863U, -2335987399U, -2335772269U, -2335553713U, -2335341083U, -2335126153U, -2334909481U, -2334693863U, -2334479723U, -2334262787U, -2334047503U, -2333831449U, -2333616709U, -2333401867U, -2333186161U, -2332970869U, -2332755569U, -2332541017U, -2332323197U, -2332106743U, -2331891473U, -2331676169U, -2331460273U, -2331243809U, -2331029143U, -2330814481U, -2330599837U, -2330384489U, -2330164511U, -2329947589U, -2329731637U, -2329515427U, -2329299289U, -2329084333U, -2328867469U, -2328652009U, -2328436417U, -2328218201U, -2328001597U, -2327784983U, -2327571221U, -2327354473U, -2327138579U, -2326921769U, -2326706687U, -2326492871U, -2326275509U, -2326060369U, -2325845507U, -2325630133U, -2325415607U, -2325198173U, -2324982083U, -2324766023U, -2324552177U, -2324336591U, -2324119951U, -2323903651U, -2323689751U, -2323472693U, -2323258859U, -2323044107U, -2322827393U, -2322611059U, -2322394247U, -2322179177U, -2321964247U, -2321747737U, -2321531423U, -2321315869U, -2321098673U, -2320883861U, -2320668953U, -2320454753U, -2320239629U, -2320027529U, -2319811937U, -2319596449U, -2319378899U, -2319162739U, -2318945131U, -2318727809U, -2318510639U, -2318296021U, -2318078921U, -2317863337U, -2317645181U, -2317427533U, -2317209683U, -2316994513U, -2316778027U, -2316562777U, -2316347219U, -2316132769U, -2315916809U, -2315702513U, -2315487613U, -2315271197U, -2315055979U, -2314841521U, -2314625671U, -2314411019U, -2314197409U, -2313983249U, -2313767077U, -2313551609U, -2313335711U, -2313119387U, -2312904719U, -2312689363U, -2312472829U, -2312256629U, -2312040277U, -2311822883U, -2311606477U, -2311392157U, -2311180061U, -2310965303U, -2310751957U, -2310537049U, -2310322247U, -2310106033U, -2309889749U, -2309673881U, -2309456431U, -2309242093U, -2309026361U, -2308810601U, -2308595363U, -2308379243U, -2308164263U, -2307949739U, -2307733583U, -2307514733U, -2307299173U, -2307083393U, -2306868197U, -2306651671U, -2306436793U, -2306223461U, -2306007931U, -2305792133U, -2305573537U, -2305358221U, -2305141999U, -2304925529U, -2304710599U, -2304495799U, -2304279137U, -2304063901U, -2303847761U, -2303633251U, -2303417483U, -2303201833U, -2302986457U, -2302770469U, -2302556077U, -2302338421U, -2302121279U, -2301906433U, -2301689417U, -2301475069U, -2301260047U, -2301042587U, -2300826287U, -2300609203U, -2300394193U, -2300180731U, -2299964179U, -2299748471U, -2299534609U, -2299320679U, -2299105141U, -2298888577U, -2298672281U, -2298456929U, -2298242797U, -2298027227U, -2297811077U, -2297594521U, -2297378177U, -2297160329U, -2296945369U, -2296729447U, -2296513621U, -2296300339U, -2296084877U, -2295871601U, -2295656147U, -2295440813U, -2295224741U, -2295008923U, -2294792809U, -2294578633U, -2294364481U, -2294148251U, -2293932703U, -2293718041U, -2293502089U, -2293287109U, -2293071899U, -2292855451U, -2292641287U, -2292422921U, -2292208781U, -2291993437U, -2291777737U, -2291564321U, -2291348981U, -2291133973U, -2290918037U, -2290702693U, -2290489129U, -2290270789U, -2290053737U, -2289838373U, -2289621101U, -2289405653U, -2289190741U, -2288976737U, -2288762257U, -2288547733U, -2288330609U, -2288117243U, -2287900829U, -2287686169U, -2287468607U, -2287251751U, -2287037479U, -2286824389U, -2286608047U, -2286394637U, -2286182329U, -2285966717U, -2285752123U, -2285536247U, -2285320237U, -2285106023U, -2284891771U, -2284674407U, -2284457257U, -2284241537U, -2284026853U, -2283811573U, -2283596327U, -2283380261U, -2283161161U, -2282946331U, -2282730977U, -2282518223U, -2282301737U, -2282084897U, -2281870651U, -2281654673U, -2281437143U, -2281221827U, -2281004771U, -2280789233U, -2280573557U, -2280359363U, -2280142591U, -2279927491U, -2279711261U, -2279494291U, -2279276653U, -2279060527U, -2278846901U, -2278628909U, -2278411781U, -2278196407U, -2277980993U, -2277763753U, -2277549089U, -2277334771U, -2277118411U, -2276902399U, -2276688613U, -2276472853U, -2276256329U, -2276042711U, -2275828517U, -2275612679U, -2275397063U, -2275181479U, -2274965159U, -2274748517U, -2274535463U, -2274319609U, -2274107327U, -2273891549U, -2273676997U, -2273462767U, -2273248399U, -2273032639U, -2272818917U, -2272605253U, -2272389437U, -2272172081U, -2271957209U, -2271743939U, -2271528041U, -2271313729U, -2271098429U, -2270884471U, -2270669353U, -2270455567U, -2270240681U, -2270025151U, -2269809527U, -2269596941U, -2269382131U, -2269165319U, -2268951577U, -2268735797U, -2268517921U, -2268302123U, -2268086111U, -2267870603U, -2267656903U, -2267442757U, -2267227777U, -2267012081U, -2266797487U, -2266582793U, -2266368007U, -2266153339U, -2265938137U, -2265722351U, -2265506083U, -2265290141U, -2265075049U, -2264860427U, -2264644769U, -2264428451U, -2264214773U, -2263997711U, -2263782289U, -2263565729U, -2263352327U, -2263137001U, -2262920839U, -2262705761U, -2262492191U, -2262278069U, -2262062813U, -2261848051U, -2261633197U, -2261418409U, -2261204657U, -2260990273U, -2260774759U, -2260560277U, -2260345247U, -2260129169U, -2259914563U, -2259700207U, -2259484361U, -2259267151U, -2259053309U, -2258839753U, -2258625431U, -2258409821U, -2258192591U, -2257975997U, -2257761001U, -2257544407U, -2257329817U, -2257113083U, -2256895787U, -2256679597U, -2256466463U, -2256251911U, -2256035759U, -2255819249U, -2255604433U, -2255387119U, -2255171729U, -2254957261U, -2254742569U, -2254525633U, -2254311419U, -2254096151U, -2253881089U, -2253665009U, -2253448303U, -2253232537U, -2253017629U, -2252801377U, -2252586353U, -2252370139U, -2252154943U, -2251940153U, -2251724287U, -2251508141U, -2251293211U, -2251080107U, -2250864989U, -2250650741U, -2250437317U, -2250221147U, -2250007937U, -2249792849U, -2249577443U, -2249360747U, -2249143511U, -2248928303U, -2248714289U, -2248500389U, -2248282607U, -2248066363U, -2247851681U, -2247636583U, -2247421817U, -2247207073U, -2246990947U, -2246775449U, -2246560403U, -2246348051U, -2246132507U, -2245917799U, -2245703177U, -2245488887U, -2245273741U, -2245058089U, -2244843721U, -2244629719U, -2244412999U, -2244197437U, -2243982737U, -2243769653U, -2243551433U, -2243337457U, -2243120419U, -2242904581U, -2242688449U, -2242473991U, -2242259861U, -2242043599U, -2241825133U, -2241609701U, -2241395071U, -2241180787U, -2240967343U, -2240751923U, -2240536327U, -2240319527U, -2240105237U, -2239888687U, -2239674629U, -2239458203U, -2239244101U, -2239028387U, -2238815521U, -2238600541U, -2238383569U, -2238167417U, -2237952851U, -2237735261U, -2237518081U, -2237301083U, -2237088229U, -2236873019U, -2236658693U, -2236444453U, -2236229201U, -2236016201U, -2235800159U, -2235586427U, -2235370021U, -2235154721U, -2234939537U, -2234725013U, -2234510909U, -2234295191U, -2234081099U, -2233866847U, -2233652459U, -2233436629U, -2233218679U, -2233003183U, -2232789619U, -2232571813U, -2232355067U, -2232138367U, -2231922923U, -2231708449U, -2231493413U, -2231277413U, -2231061221U, -2230846967U, -2230632791U, -2230417751U, -2230201531U, -2229985133U, -2229769579U, -2229554461U, -2229340651U, -2229128767U, -2228912453U, -2228698319U, -2228481883U, -2228267953U, -2228051513U, -2227836329U, -2227622203U, -2227408321U, -2227192519U, -2226974441U, -2226760573U, -2226547241U, -2226332261U, -2226116807U, -2225900503U, -2225684207U, -2225468123U, -2225253677U, -2225039759U, -2224826473U, -2224610537U, -2224393937U, -2224179077U, -2223962707U, -2223747133U, -2223531173U, -2223316279U, -2223098953U, -2222882659U, -2222668169U, -2222453179U, -2222236673U, -2222020433U, -2221805137U, -2221591007U, -2221375883U, -2221160077U, -2220945563U, -2220729323U, -2220513517U, -2220299443U, -2220085447U, -2219871361U, -2219657239U, -2219440397U, -2219226643U, -2219013089U, -2218798327U, -2218581803U, -2218365979U, -2218151977U, -2217936223U, -2217720587U, -2217503231U, -2217288769U, -2217073951U, -2216859137U, -2216643199U, -2216429123U, -2216217607U, -2216003639U, -2215785851U, -2215570163U, -2215356079U, -2215137607U, -2214921911U, -2214707081U, -2214490303U, -2214276599U, -2214059119U, -2213841127U, -2213626687U, -2213409799U, -2213195329U, -2212980269U, -2212766779U, -2212554011U, -2212339553U, -2212125329U, -2211910373U, -2211695159U, -2211479729U, -2211262793U, -2211046499U, -2210831927U, -2210615761U, -2210401003U, -2210185847U, -2209971091U, -2209755451U, -2209536949U, -2209322803U, -2209108799U, -2208892547U, -2208677441U, -2208463339U, -2208247117U, -2208034453U, -2207819147U, -2207604541U, -2207391643U, -2207176733U, -2206959901U, -2206745909U, -2206531433U, -2206317367U, -2206101241U, -2205886327U, -2205671543U, -2205456833U, -2205243319U, -2205027023U, -2204811307U, -2204595641U, -2204379659U, -2204165801U, -2203948541U, -2203733117U, -2203517681U, -2203300223U, -2203086371U, -2202871961U, -2202654689U, -2202436493U, -2202221279U, -2202004547U, -2201791373U, -2201574377U, -2201360167U, -2201145061U, -2200928497U, -2200714381U, -2200498441U, -2200281751U, -2200068601U, -2199853559U, -2199635749U, -2199418691U, -2199204421U, -2198990219U, -2198773793U, -2198559829U, -2198343977U, -2198127923U, -2197912859U, -2197698263U, -2197483471U, -2197269587U, -2197052761U, -2196839891U, -2196623977U, -2196407699U, -2196193177U, -2195978129U, -2195763049U, -2195548093U, -2195333801U, -2195118769U, -2194903967U, -2194689127U, -2194475233U, -2194259981U, -2194045093U, -2193829657U, -2193615779U, -2193400303U, -2193183463U, -2192968597U, -2192753141U, -2192540993U, -2192325229U, -2192109989U, -2191894543U, -2191680791U, -2191463497U, -2191249147U, -2191034509U, -2190820267U, -2190606317U, -2190390899U, -2190174199U, -2189958893U, -2189743967U, -2189528807U, -2189313311U, -2189096633U, -2188880977U, -2188665929U, -2188452439U, -2188238047U, -2188022989U, -2187806953U, -2187592339U, -2187375787U, -2187160567U, -2186947853U, -2186734469U, -2186520907U, -2186305777U, -2186090447U, -2185874939U, -2185660657U, -2185444423U, -2185228519U, -2185014731U, -2184798521U, -2184583937U, -2184368803U, -2184153427U, -2183937773U, -2183724187U, -2183508791U, -2183292037U, -2183077639U, -2182862839U, -2182647839U, -2182430443U, -2182214731U, -2181997007U, -2181781843U, -2181567317U, -2181352403U, -2181134429U, -2180919913U, -2180705173U, -2180489261U, -2180274289U, -2180059613U, -2179844789U, -2179628147U, -2179411453U, -2179195943U, -2178981173U, -2178765881U, -2178552247U, -2178338983U, -2178124589U, -2177911657U, -2177695537U, -2177480443U, -2177264501U, -2177048869U, -2176833577U, -2176622813U, -2176405919U, -2176191037U, -2175977563U, -2175761669U, -2175546547U, -2175332921U, -2175118607U, -2174905169U, -2174691347U, -2174474537U, -2174260867U, -2174044051U, -2173830367U, -2173613773U, -2173400321U, -2173182191U, -2172969907U, -2172756941U, -2172541463U, -2172324157U, -2172107263U, -2171892293U, -2171676751U, -2171462441U, -2171245553U, -2171030177U, -2170817087U, -2170603703U, -2170388111U, -2170175779U, -2169961919U, -2169744097U, -2169531443U, -2169315259U, -2169100067U, -2168884763U, -2168668939U, -2168454077U, -2168240089U, -2168025037U, -2167808509U, -2167594523U, -2167378901U, -2167164107U, -2166947911U, -2166735047U, -2166519647U, -2166305593U, -2166090191U, -2165877419U, -2165660327U, -2165445811U, -2165231377U, -2165016067U, -2164800061U, -2164584337U, -2164370653U, -2164156157U, -2163937541U, -2163722377U, -2163510857U, -2163294317U, -2163076691U, -2162863051U, -2162648759U, -2162435339U, -2162219417U, -2162005633U, -2161788371U, -2161572109U, -2161357039U, -2161143913U, -2160930071U, -2160715201U, -2160498959U, -2160284281U, -2160071057U, -2159857957U, -2159644441U, -2159431277U, -2159216399U, -2158999463U, -2158783609U, -2158570681U, -2158353931U, -2158136809U, -2157922717U, -2157706357U, -2157490921U, -2157278737U, -2157063401U, -2156846201U, -2156631929U, -2156417051U, -2156202101U, -2155984819U, -2155770917U, -2155555967U, -2155339559U, -2155125689U, -2154911813U, -2154697789U, -2154481897U, -2154267373U, -2154053557U, -2153838251U, -2153623891U, -2153409701U, -2153194049U, -2152977367U, -2152761631U, -2152549747U, -2152334189U, -2152120979U, -2151905143U, -2151690707U, -2151475523U, -2151261493U, -2151045469U, -2150830289U, -2150614667U, -2150399893U, -2150187059U, -2149972697U, -2149756703U, -2149543889U, -2149327627U, -2149112429U, -2148896411U, -2148679669U, -2148466009U, -2148250061U, -2148035749U, -2147821513U, -2147607401U, -2147392201U, -2147178329U, -2146961347U, -2146748057U, -2146533959U, -2146317191U, -2146102477U, -2145889267U, -2145675289U, -2145460909U, -2145248167U, -2145033001U, -2144818411U, -2144602787U, -2144389217U, -2144174281U, -2143959581U, -2143744997U, -2143529491U, -2143314917U, -2143101241U, -2142887399U, -2142671353U, -2142457117U, -2142240403U, -2142027137U, -2141814319U, -2141596757U, -2141383633U, -2141168963U, -2140954709U, -2140740733U, -2140527553U, -2140313443U, -2140096993U, -2139883771U, -2139669449U, -2139456377U, -2139240409U, -2139025991U, -2138809969U, -2138593397U, -2138376997U, -2138163977U, -2137948823U, -2137734017U, -2137517407U, -2137301819U, -2137086989U, -2136872957U, -2136658427U, -2136442873U, -2136229309U, -2136014159U, -2135798803U, -2135582873U, -2135366899U, -2135151517U, -2134935289U, -2134721027U, -2134508581U, -2134293869U, -2134076557U, -2133860653U, -2133647933U, -2133431987U, -2133216271U, -2133000449U, -2132785727U, -2132571839U, -2132356769U, -2132141177U, -2131927409U, -2131711019U, -2131494667U, -2131280273U, -2131062221U, -2130845993U, -2130632453U, -2130418541U, -2130203653U, -2129987053U, -2129772677U, -2129556967U, -2129342653U, -2129127817U, -2128912277U, -2128695007U, -2128478327U, -2128264429U, -2128050467U, -2127837703U, -2127623801U, -2127408931U, -2127193907U, -2126978179U, -2126761667U, -2126547263U, -2126332057U, -2126115379U, -2125901263U, -2125684789U, -2125470601U, -2125257157U, -2125041631U, -2124825877U, -2124610991U, -2124395233U, -2124182597U, -2123968739U, -2123753647U, -2123537153U, -2123322571U, -2123108069U, -2122892371U, -2122672733U, -2122457621U, -2122243469U, -2122030279U, -2121815011U, -2121602663U, -2121386779U, -2121170593U, -2120957849U, -2120743579U, -2120527163U, -2120310461U, -2120094611U, -2119880879U, -2119665617U, -2119452541U, -2119237949U, -2119023493U, -2118807931U, -2118592439U, -2118377557U, -2118162689U, -2117948653U, -2117734709U, -2117518787U, -2117303467U, -2117087933U, -2116872119U, -2116657061U, -2116443677U, -2116230829U, -2116016173U, -2115801371U, -2115585181U, -2115369701U, -2115153727U, -2114938379U, -2114722927U, -2114507833U, -2114296181U, -2114083091U, -2113870123U, -2113654157U, -2113441021U, -2113224103U, -2113012547U, -2112798203U, -2112583841U, -2112367709U, -2112151631U, -2111937301U, -2111724911U, -2111509861U, -2111295701U, -2111081629U, -2110866419U, -2110651363U, -2110438397U, -2110223261U, -2110009829U, -2109797897U, -2109582913U, -2109369523U, -2109152387U, -2108937829U, -2108720821U, -2108508851U, -2108295751U, -2108080607U, -2107865293U, -2107650091U, -2107436741U, -2107222657U, -2107007647U, -2106792673U, -2106576917U, -2106359917U, -2106144197U, -2105930401U, -2105715049U, -2105501309U, -2105287433U, -2105073029U, -2104858771U, -2104647023U, -2104433021U, -2104219151U, -2104005019U, -2103788759U, -2103574393U, -2103359521U, -2103143461U, -2102929097U, -2102714129U, -2102500709U, -2102287063U, -2102071733U, -2101858169U, -2101644367U, -2101430251U, -2101215421U, -2101000631U, -2100786707U, -2100573677U, -2100356977U, -2100144953U, -2099929943U, -2099714203U, -2099498983U, -2099284679U, -2099070541U, -2098855537U, -2098641661U, -2098426349U, -2098211051U, -2097996079U, -2097777797U, -2097563203U, -2097349259U, -2097134239U, -2096920559U, -2096705759U, -2096492033U, -2096275873U, -2096060987U, -2095845113U, -2095630739U, -2095417099U, -2095204193U, -2094990617U, -2094777257U, -2094563689U, -2094349931U, -2094135709U, -2093917997U, -2093703973U, -2093489929U, -2093275181U, -2093060483U, -2092847143U, -2092631617U, -2092415669U, -2092200577U, -2091986231U, -2091773147U, -2091560467U, -2091343981U, -2091128869U, -2090914373U, -2090697439U, -2090484707U, -2090271769U, -2090056609U, -2089841513U, -2089626109U, -2089413709U, -2089199999U, -2088986687U, -2088770249U, -2088557147U, -2088342253U, -2088126977U, -2087912909U, -2087700257U, -2087485703U, -2087269703U, -2087054653U, -2086840409U, -2086626083U, -2086411141U, -2086194871U, -2085979487U, -2085764441U, -2085549139U, -2085334943U, -2085119369U, -2084905873U, -2084691677U, -2084475109U, -2084259323U, -2084044163U, -2083831573U, -2083616219U, -2083402001U, -2083186583U, -2082971789U, -2082759373U, -2082545177U, -2082330127U, -2082117649U, -2081901823U, -2081688289U, -2081474251U, -2081261443U, -2081046613U, -2080831771U, -2080617281U, -2080400599U, -2080186891U, -2079971801U, -2079758281U, -2079542903U, -2079328387U, -2079114383U, -2078897809U, -2078683337U, -2078472707U, -2078257351U, -2078045183U, -2077830827U, -2077616641U, -2077400671U, -2077185667U, -2076969607U, -2076755251U, -2076538223U, -2076323617U, -2076108059U, -2075893903U, -2075679917U, -2075462471U, -2075249549U, -2075035973U, -2074823669U, -2074609139U, -2074395527U, -2074179623U, -2073964481U, -2073751951U, -2073538321U, -2073326219U, -2073110059U, -2072896093U, -2072680901U, -2072466947U, -2072251847U, -2072036851U, -2071820351U, -2071608421U, -2071392137U, -2071176323U, -2070961337U, -2070746221U, -2070532231U, -2070319253U, -2070103601U, -2069889037U, -2069675147U, -2069458541U, -2069244319U, -2069030893U, -2068817347U, -2068602559U, -2068387669U, -2068172839U, -2067958549U, -2067743423U, -2067529463U, -2067313427U, -2067097567U, -2066881273U, -2066666963U, -2066452979U, -2066238739U, -2066026559U, -2065812179U, -2065594439U, -2065379831U, -2065165519U, -2064950903U, -2064736903U, -2064522697U, -2064309791U, -2064095249U, -2063882111U, -2063669011U, -2063454871U, -2063240269U, -2063025931U, -2062811071U, -2062597567U, -2062384199U, -2062167797U, -2061955403U, -2061740983U, -2061522713U, -2061310241U, -2061094153U, -2060880043U, -2060665253U, -2060449087U, -2060235917U, -2060020987U, -2059806971U, -2059590917U, -2059377119U, -2059160731U, -2058946231U, -2058731617U, -2058517511U, -2058304147U, -2058088283U, -2057873417U, -2057656157U, -2057439991U, -2057225377U, -2057011381U, -2056797829U, -2056582037U, -2056367063U, -2056152523U, -2055938219U, -2055726181U, -2055511897U, -2055295643U, -2055080669U, -2054867093U, -2054653849U, -2054438983U, -2054223761U, -2054008921U, -2053794817U, -2053582747U, -2053368827U, -2053151159U, -2052935029U, -2052719261U, -2052503023U, -2052290129U, -2052077113U, -2051862493U, -2051648983U, -2051433383U, -2051217811U, -2051001461U, -2050788151U, -2050575347U, -2050360619U, -2050148801U, -2049934517U, -2049720053U, -2049507997U, -2049295841U, -2049080531U, -2048866219U, -2048651251U, -2048437513U, -2048223949U, -2048009279U, -2047791847U, -2047578653U, -2047363049U, -2047149409U, -2046934993U, -2046720463U, -2046506843U, -2046291199U, -2046077087U, -2045861539U, -2045647739U, -2045434463U, -2045221103U, -2045007113U, -2044792049U, -2044576769U, -2044363891U, -2044149299U, -2043936319U, -2043720761U, -2043504637U, -2043292763U, -2043078641U, -2042866541U, -2042653213U, -2042438569U, -2042225033U, -2042009527U, -2041792717U, -2041579739U, -2041363763U, -2041147879U, -2040934349U, -2040718517U, -2040504493U, -2040289607U, -2040074797U, -2039858837U, -2039645171U, -2039430467U, -2039216407U, -2039003861U, -2038790651U, -2038576081U, -2038359943U, -2038146151U, -2037932623U, -2037716911U, -2037503981U, -2037287653U, -2037073373U, -2036858851U, -2036643893U, -2036429471U, -2036215387U, -2036000677U, -2035784449U, -2035570907U, -2035354273U, -2035139747U, -2034925411U, -2034711461U, -2034497363U, -2034284051U, -2034072233U, -2033859251U, -2033644259U, -2033431303U, -2033216407U, -2033002691U, -2032786661U, -2032573117U, -2032359227U, -2032146469U, -2031931939U, -2031718771U, -2031504173U, -2031288319U, -2031072521U, -2030860333U, -2030646193U, -2030432291U, -2030217193U, -2030003243U, -2029787321U, -2029573459U, -2029359097U, -2029144891U, -2028930721U, -2028716447U, -2028500113U, -2028285971U, -2028072061U, -2027854601U, -2027639671U, -2027425307U, -2027211397U, -2026995167U, -2026782997U, -2026568471U, -2026352353U, -2026140001U, -2025926909U, -2025711001U, -2025496607U, -2025283669U, -2025069139U, -2024855797U, -2024642273U, -2024426897U, -2024211479U, -2024000453U, -2023784047U, -2023568411U, -2023353641U, -2023137863U, -2022923561U, -2022708829U, -2022496247U, -2022282133U, -2022068203U, -2021852201U, -2021636473U, -2021423681U, -2021208647U, -2020993567U, -2020777973U, -2020563967U, -2020350851U, -2020136771U, -2019921859U, -2019706397U, -2019493009U, -2019277723U, -2019064589U, -2018850983U, -2018639201U, -2018424713U, -2018208637U, -2017993009U, -2017777939U, -2017562731U, -2017348253U, -2017134761U, -2016919963U, -2016705421U, -2016490933U, -2016277763U, -2016063589U, -2015850721U, -2015637157U, -2015421799U, -2015209013U, -2014994939U, -2014782433U, -2014566331U, -2014351637U, -2014137989U, -2013925063U, -2013711647U, -2013499049U, -2013286763U, -2013075139U, -2012859839U, -2012647649U, -2012431891U, -2012216867U, -2012004413U, -2011791329U, -2011576517U, -2011362433U, -2011148519U, -2010933593U, -2010720161U, -2010505199U, -2010290519U, -2010075337U, -2009859959U, -2009645977U, -2009431447U, -2009218259U, -2009003429U, -2008787149U, -2008574681U, -2008360573U, -2008145099U, -2007930259U, -2007716329U, -2007502459U, -2007286573U, -2007071909U, -2006858713U, -2006644403U, -2006430821U, -2006218061U, -2006003647U, -2005789979U, -2005575623U, -2005364209U, -2005151389U, -2004935551U, -2004721613U, -2004506423U, -2004292663U, -2004078577U, -2003863541U, -2003650409U, -2003440357U, -2003225123U, -2003010937U, -2002796941U, -2002581443U, -2002369483U, -2002153999U, -2001941651U, -2001729157U, -2001516353U, -2001301853U, -2001088319U, -2000875991U, -2000662501U, -2000447263U, -2000234189U, -2000021819U, -1999805713U, -1999591519U, -1999377031U, -1999163767U, -1998946837U, -1998733271U, -1998518189U, -1998303647U, -1998088991U, -1997874821U, -1997659667U, -1997445841U, -1997235533U, -1997021729U, -1996806061U, -1996589219U, -1996372933U, -1996159237U, -1995945257U, -1995733277U, -1995516739U, -1995302677U, -1995089477U, -1994873599U, -1994659547U, -1994447443U, -1994233277U, -1994020141U, -1993804573U, -1993591349U, -1993377929U, -1993161893U, -1992947581U, -1992735991U, -1992521611U, -1992307687U, -1992093223U, -1991878487U, -1991663129U, -1991450303U, -1991237041U, -1991022613U, -1990808779U, -1990594729U, -1990379987U, -1990165141U, -1989950267U, -1989736093U, -1989522463U, -1989308263U, -1989094451U, -1988879909U, -1988668001U, -1988453771U, -1988239081U, -1988022431U, -1987809871U, -1987597069U, -1987382933U, -1987166897U, -1986953041U, -1986741131U, -1986525991U, -1986312707U, -1986097783U, -1985884553U, -1985668123U, -1985453983U, -1985239303U, -1985025799U, -1984808653U, -1984596529U, -1984382563U, -1984169507U, -1983958577U, -1983743011U, -1983527261U, -1983314681U, -1983099403U, -1982885549U, -1982671441U, -1982456033U, -1982243303U, -1982026903U, -1981813313U, -1981600333U, -1981386437U, -1981174301U, -1980956819U, -1980744853U, -1980530767U, -1980316879U, -1980102307U, -1979890327U, -1979675213U, -1979460403U, -1979246653U, -1979031823U, -1978817069U, -1978604077U, -1978390889U, -1978178009U, -1977963947U, -1977749701U, -1977534121U, -1977320621U, -1977108079U, -1976893027U, -1976678113U, -1976464909U, -1976253337U, -1976037941U, -1975823131U, -1975607279U, -1975395517U, -1975179749U, -1974966589U, -1974752149U, -1974538739U, -1974325789U, -1974111697U, -1973900053U, -1973685503U, -1973472451U, -1973255929U, -1973042179U, -1972827331U, -1972612991U, -1972401703U, -1972186661U, -1971974149U, -1971760337U, -1971547093U, -1971334973U, -1971122009U, -1970910197U, -1970696591U, -1970480849U, -1970265071U, -1970049421U, -1969836083U, -1969621729U, -1969408369U, -1969193627U, -1968979921U, -1968765377U, -1968552293U, -1968339173U, -1968125447U, -1967912579U, -1967699759U, -1967485391U, -1967270213U, -1967054437U, -1966839869U, -1966624633U, -1966410613U, -1966194941U, -1965982463U, -1965767701U, -1965554191U, -1965341783U, -1965125849U, -1964913271U, -1964698751U, -1964484989U, -1964271983U, -1964054333U, -1963841857U, -1963626869U, -1963415351U, -1963201589U, -1962987557U, -1962773513U, -1962559147U, -1962341369U, -1962128447U, -1961914793U, -1961701477U, -1961488423U, -1961275501U, -1961060869U, -1960848299U, -1960633061U, -1960417241U, -1960204229U, -1959988241U, -1959770467U, -1959554581U, -1959344813U, -1959133037U, -1958918903U, -1958704933U, -1958490823U, -1958275273U, -1958060563U, -1957848889U, -1957634227U, -1957421957U, -1957206529U, -1956991991U, -1956777359U, -1956563137U, -1956349627U, -1956136801U, -1955922713U, -1955709199U, -1955494259U, -1955281897U, -1955067349U, -1954854449U, -1954638899U, -1954424539U, -1954210151U, -1953996521U, -1953781757U, -1953568061U, -1953354313U, -1953138323U, -1952924947U, -1952711471U, -1952499607U, -1952285947U, -1952073337U, -1951860359U, -1951646947U, -1951429421U, -1951215599U, -1951001777U, -1950789343U, -1950577147U, -1950364093U, -1950151409U, -1949937593U, -1949722681U, -1949510449U, -1949296903U, -1949084747U, -1948870019U, -1948653431U, -1948438379U, -1948225849U, -1948010171U, -1947797431U, -1947584029U, -1947369353U, -1947156833U, -1946945327U, -1946730593U, -1946516281U, -1946303641U, -1946090359U, -1945876957U, -1945662233U, -1945447381U, -1945234493U, -1945019243U, -1944807173U, -1944592619U, -1944378089U, -1944164279U, -1943952403U, -1943736161U, -1943523271U, -1943309701U, -1943097553U, -1942884479U, -1942669921U, -1942453361U, -1942239361U, -1942026481U, -1941812861U, -1941599599U, -1941383267U, -1941169357U, -1940955971U, -1940740007U, -1940530087U, -1940315623U, -1940101721U, -1939887941U, -1939671631U, -1939459111U, -1939246339U, -1939030463U, -1938815773U, -1938601583U, -1938388579U, -1938173087U, -1937959571U, -1937746337U, -1937530079U, -1937314759U, -1937100097U, -1936885309U, -1936673131U, -1936458907U, -1936247077U, -1936033289U, -1935819463U, -1935605239U, -1935390563U, -1935176689U, -1934965691U, -1934751667U, -1934537677U, -1934322787U, -1934110439U, -1933897331U, -1933680613U, -1933466789U, -1933253327U, -1933040761U, -1932827927U, -1932614807U, -1932400721U, -1932186007U, -1931972417U, -1931759197U, -1931545013U, -1931330741U, -1931116997U, -1930902073U, -1930690271U, -1930477583U, -1930262641U, -1930050217U, -1929835819U, -1929622771U, -1929410531U, -1929197299U, -1928981581U, -1928767499U, -1928552657U, -1928340781U, -1928126819U, -1927911509U, -1927700891U, -1927487371U, -1927272463U, -1927060243U, -1926846787U, -1926631963U, -1926417281U, -1926202891U, -1925987633U, -1925774309U, -1925560577U, -1925346653U, -1925132813U, -1924917391U, -1924703741U, -1924489667U, -1924274753U, -1924061647U, -1923848099U, -1923635011U, -1923423013U, -1923209657U, -1922995003U, -1922780593U, -1922567051U, -1922354261U, -1922142449U, -1921923569U, -1921709773U, -1921496867U, -1921285153U, -1921071419U, -1920855917U, -1920641953U, -1920426647U, -1920210139U, -1919997463U, -1919784743U, -1919571817U, -1919357707U, -1919144197U, -1918928327U, -1918716967U, -1918505287U, -1918288951U, -1918074289U, -1917859243U, -1917645077U, -1917431177U, -1917217327U, -1917001897U, -1916787517U, -1916575319U, -1916359751U, -1916145289U, -1915931917U, -1915718513U, -1915503833U, -1915291013U, -1915078507U, -1914865129U, -1914652417U, -1914438937U, -1914226511U, -1914012007U, -1913797597U, -1913583341U, -1913369903U, -1913155711U, -1912942181U, -1912728781U, -1912513847U, -1912300451U, -1912087831U, -1911873253U, -1911657779U, -1911442763U, -1911231353U, -1911015773U, -1910802847U, -1910588893U, -1910375063U, -1910162201U, -1909948321U, -1909733303U, -1909520323U, -1909307419U, -1909093247U, -1908879877U, -1908664063U, -1908449857U, -1908236677U, -1908022811U, -1907810987U, -1907598467U, -1907384467U, -1907169083U, -1906953211U, -1906739209U, -1906525109U, -1906310951U, -1906096999U, -1905884731U, -1905673373U, -1905457363U, -1905243209U, -1905029017U, -1904816713U, -1904602537U, -1904389517U, -1904176861U, -1903963189U, -1903749361U, -1903537567U, -1903322501U, -1903108331U, -1902895109U, -1902682841U, -1902468143U, -1902255833U, -1902042173U, -1901825033U, -1901610857U, -1901394977U, -1901180863U, -1900966337U, -1900753301U, -1900539409U, -1900326377U, -1900115621U, -1899902029U, -1899689683U, -1899477733U, -1899264779U, -1899050837U, -1898835283U, -1898621423U, -1898407963U, -1898196023U, -1897983083U, -1897770997U, -1897556651U, -1897344901U, -1897133809U, -1896919259U, -1896705157U, -1896491041U, -1896277457U, -1896063769U, -1895850709U, -1895636689U, -1895420279U, -1895208223U, -1894993829U, -1894782023U, -1894566353U, -1894350527U, -1894137731U, -1893924589U, -1893710851U, -1893496691U, -1893283459U, -1893069709U, -1892854861U, -1892641133U, -1892428999U, -1892215747U, -1892003387U, -1891790491U, -1891579493U, -1891362449U, -1891148263U, -1890934141U, -1890720857U, -1890507551U, -1890292267U, -1890078847U, -1889865743U, -1889652253U, -1889438801U, -1889224241U, -1889013617U, -1888800223U, -1888587439U, -1888373471U, -1888163867U, -1887952039U, -1887737603U, -1887523223U, -1887309659U, -1887096331U, -1886884289U, -1886670587U, -1886456149U, -1886240141U, -1886028191U, -1885812587U, -1885599461U, -1885386431U, -1885172129U, -1884957803U, -1884746813U, -1884531721U, -1884315151U, -1884102601U, -1883889043U, -1883673413U, -1883458481U, -1883244703U, -1883033723U, -1882821439U, -1882608839U, -1882393321U, -1882178719U, -1881963827U, -1881750943U, -1881536119U, -1881320087U, -1881108149U, -1880896177U, -1880681953U, -1880466319U, -1880252831U, -1880038367U, -1879824493U, -1879610081U, -1879395409U, -1879181047U, -1878969739U, -1878756823U, -1878542957U, -1878330583U, -1878116137U, -1877904227U, -1877689511U, -1877474453U, -1877263457U, -1877050621U, -1876835243U, -1876622257U, -1876411883U, -1876197749U, -1875985613U, -1875770417U, -1875554969U, -1875341953U, -1875126829U, -1874913457U, -1874701039U, -1874489093U, -1874272849U, -1874060159U, -1873846979U, -1873635529U, -1873421219U, -1873209713U, -1872994463U, -1872782473U, -1872569861U, -1872355663U, -1872141379U, -1871927711U, -1871713241U, -1871499821U, -1871282653U, -1871070701U, -1870859063U, -1870646521U, -1870431113U, -1870216661U, -1870002733U, -1869789989U, -1869578903U, -1869364733U, -1869150917U, -1868934923U, -1868723261U, -1868509567U, -1868296949U, -1868082787U, -1867868263U, -1867655113U, -1867441489U, -1867226723U, -1867011511U, -1866798541U, -1866586681U, -1866375299U, -1866161233U, -1865946409U, -1865732599U, -1865516353U, -1865304169U, -1865090393U, -1864877809U, -1864661059U, -1864446949U, -1864231703U, -1864019951U, -1863806657U, -1863593309U, -1863380551U, -1863168421U, -1862955293U, -1862742773U, -1862527981U, -1862316163U, -1862102299U, -1861887043U, -1861671997U, -1861458811U, -1861246481U, -1861033093U, -1860819593U, -1860606511U, -1860392983U, -1860179969U, -1859966057U, -1859753327U, -1859537033U, -1859321609U, -1859109403U, -1858896001U, -1858682179U, -1858468021U, -1858255141U, -1858040617U, -1857826583U, -1857614989U, -1857401957U, -1857189121U, -1856974877U, -1856761057U, -1856548943U, -1856334443U, -1856122343U, -1855909711U, -1855697113U, -1855485559U, -1855272659U, -1855059971U, -1854846797U, -1854633577U, -1854417667U, -1854205447U, -1853992741U, -1853779349U, -1853563861U, -1853348593U, -1853135209U, -1852922107U, -1852710059U, -1852494713U, -1852281311U, -1852068733U, -1851856651U, -1851644933U, -1851430187U, -1851217127U, -1851003919U, -1850791277U, -1850576047U, -1850363993U, -1850149817U, -1849934699U, -1849722047U, -1849507193U, -1849292813U, -1849082251U, -1848865933U, -1848650597U, -1848437771U, -1848223219U, -1848011083U, -1847798189U, -1847584031U, -1847369309U, -1847155309U, -1846942483U, -1846728739U, -1846515617U, -1846302167U, -1846089199U, -1845873173U, -1845658319U, -1845445027U, -1845234277U, -1845021179U, -1844808467U, -1844594179U, -1844381387U, -1844167673U, -1843954171U, -1843740683U, -1843527457U, -1843314307U, -1843101739U, -1842889381U, -1842677059U, -1842463939U, -1842250661U, -1842035359U, -1841822201U, -1841610737U, -1841396317U, -1841181707U, -1840969279U, -1840756397U, -1840542703U, -1840329529U, -1840114021U, -1839902681U, -1839690289U, -1839477257U, -1839262553U, -1839049451U, -1838834191U, -1838622671U, -1838409107U, -1838193991U, -1837980367U, -1837766683U, -1837552097U, -1837338709U, -1837126441U, -1836914561U, -1836700787U, -1836487573U, -1836273797U, -1836060607U, -1835848667U, -1835633953U, -1835420233U, -1835206981U, -1834993807U, -1834782097U, -1834566973U, -1834353881U, -1834140647U, -1833926671U, -1833715579U, -1833503561U, -1833293153U, -1833081637U, -1832866859U, -1832653061U, -1832438771U, -1832224573U, -1832010209U, -1831797823U, -1831585487U, -1831372853U, -1831157287U, -1830944299U, -1830730943U, -1830517193U, -1830305447U, -1830091709U, -1829876317U, -1829662273U, -1829449411U, -1829236631U, -1829023943U, -1828810271U, -1828596149U, -1828382207U, -1828170133U, -1827959183U, -1827746581U, -1827532807U, -1827317861U, -1827106199U, -1826891467U, -1826680879U, -1826467309U, -1826253997U, -1826039113U, -1825825087U, -1825610833U, -1825397839U, -1825185599U, -1824970999U, -1824757813U, -1824544453U, -1824331781U, -1824120253U, -1823907461U, -1823694571U, -1823483819U, -1823269337U, -1823056657U, -1822841029U, -1822628681U, -1822413007U, -1822199881U, -1821987077U, -1821771307U, -1821559319U, -1821348401U, -1821133981U, -1820921497U, -1820707351U, -1820492903U, -1820278483U, -1820065243U, -1819853467U, -1819640743U, -1819428503U, -1819214503U, -1818999947U, -1818786679U, -1818571829U, -1818358589U, -1818143609U, -1817931289U, -1817716661U, -1817504939U, -1817292857U, -1817077921U, -1816863773U, -1816650911U, -1816437629U, -1816224331U, -1816011343U, -1815798827U, -1815584137U, -1815372683U, -1815158353U, -1814944921U, -1814730259U, -1814519281U, -1814305679U, -1814091911U, -1813878061U, -1813665221U, -1813450559U, -1813237159U, -1813022209U, -1812810889U, -1812598517U, -1812386621U, -1812172727U, -1811959999U, -1811746201U, -1811532013U, -1811320249U, -1811105171U, -1810891699U, -1810676641U, -1810464479U, -1810251841U, -1810039403U, -1809825361U, -1809610937U, -1809398191U, -1809185471U, -1808972351U, -1808760589U, -1808548033U, -1808335171U, -1808122291U, -1807908719U, -1807695269U, -1807482529U, -1807269617U, -1807056437U, -1806843373U, -1806629173U, -1806416483U, -1806203057U, -1805989663U, -1805777483U, -1805564641U, -1805352947U, -1805137171U, -1804922843U, -1804709029U, -1804496621U, -1804282919U, -1804070239U, -1803858137U, -1803644209U, -1803430969U, -1803217879U, -1803004363U, -1802791009U, -1802576609U, -1802366077U, -1802150351U, -1801937953U, -1801724581U, -1801510229U, -1801298753U, -1801085947U, -1800871399U, -1800657197U, -1800444797U, -1800231943U, -1800018919U, -1799806523U, -1799593049U, -1799379191U, -1799166077U, -1798952293U, -1798742359U, -1798528609U, -1798316879U, -1798103999U, -1797889399U, -1797677771U, -1797463951U, -1797250849U, -1797038773U, -1796829191U, -1796613449U, -1796399977U, -1796188403U, -1795976477U, -1795764959U, -1795551127U, -1795337413U, -1795124281U, -1794911507U, -1794700001U, -1794488291U, -1794275677U, -1794061361U, -1793848423U, -1793635369U, -1793420693U, -1793210383U, -1792996691U, -1792784233U, -1792570531U, -1792358257U, -1792146007U, -1791934237U, -1791723223U, -1791509171U, -1791295381U, -1791082301U, -1790868851U, -1790656031U, -1790443537U, -1790230961U, -1790017003U, -1789805027U, -1789593419U, -1789379479U, -1789164787U, -1788954239U, -1788740491U, -1788525853U, -1788313313U, -1788099323U, -1787886053U, -1787673467U, -1787459507U, -1787246339U, -1787034257U, -1786821557U, -1786608137U, -1786394063U, -1786182059U, -1785967481U, -1785754219U, -1785541067U, -1785328469U, -1785115117U, -1784902591U, -1784691409U, -1784479457U, -1784264249U, -1784052359U, -1783837177U, -1783625471U, -1783412083U, -1783199161U, -1782985577U, -1782774361U, -1782561791U, -1782349147U, -1782135227U, -1781922349U, -1781707453U, -1781494499U, -1781281357U, -1781067257U, -1780853203U, -1780641661U, -1780427603U, -1780215917U, -1780004623U, -1779789901U, -1779579163U, -1779366067U, -1779154763U, -1778941309U, -1778728537U, -1778516123U, -1778303041U, -1778091787U, -1777879687U, -1777663243U, -1777451671U, -1777236971U, -1777025297U, -1776810323U, -1776599551U, -1776385619U, -1776175129U, -1775962709U, -1775748791U, -1775538503U, -1775324981U, -1775111743U, -1774897037U, -1774682293U, -1774468921U, -1774256161U, -1774044773U, -1773831989U, -1773617759U, -1773403967U, -1773190319U, -1772977307U, -1772763497U, -1772549873U, -1772335879U, -1772125603U, -1771913347U, -1771699337U, -1771487587U, -1771272023U, -1771059089U, -1770847583U, -1770636541U, -1770423601U, -1770210877U, -1769994487U, -1769781749U, -1769568701U, -1769356007U, -1769142241U, -1768928741U, -1768713641U, -1768501909U, -1768289251U, -1768078313U, -1767865181U, -1767649771U, -1767438721U, -1767226861U, -1767012337U, -1766798269U, -1766585551U, -1766372479U, -1766160161U, -1765946669U, -1765734799U, -1765523477U, -1765309201U, -1765095139U, -1764883123U, -1764672967U, -1764461749U, -1764246829U, -1764032813U, -1763819731U, -1763606881U, -1763393377U, -1763181727U, -1762969993U, -1762756637U, -1762543031U, -1762331981U, -1762118279U, -1761903823U, -1761692489U, -1761477937U, -1761263827U, -1761050773U, -1760839001U, -1760628371U, -1760413229U, -1760197709U, -1759985173U, -1759773131U, -1759560839U, -1759348933U, -1759135717U, -1758923039U, -1758710171U, -1758498877U, -1758285307U, -1758073949U, -1757860073U, -1757647841U, -1757436281U, -1757222959U, -1757008063U, -1756793993U, -1756581121U, -1756368917U, -1756154579U, -1755940577U, -1755728027U, -1755514219U, -1755303233U, -1755091193U, -1754878501U, -1754665361U, -1754454571U, -1754242561U, -1754030731U, -1753816681U, -1753602211U, -1753389713U, -1753176443U, -1752964153U, -1752750449U, -1752537337U, -1752324599U, -1752112291U, -1751899441U, -1751687213U, -1751473417U, -1751261329U, -1751049169U, -1750837849U, -1750623913U, -1750410733U, -1750198199U, -1749985409U, -1749773527U, -1749560107U, -1749347723U, -1749135239U, -1748924363U, -1748710897U, -1748498359U, -1748287217U, -1748070949U, -1747857149U, -1747644641U, -1747430963U, -1747216301U, -1747002469U, -1746789469U, -1746578459U, -1746366119U, -1746151037U, -1745939603U, -1745725207U, -1745513141U, -1745303071U, -1745089651U, -1744877551U, -1744663763U, -1744451789U, -1744237181U, -1744025083U, -1743814301U, -1743600853U, -1743387367U, -1743174197U, -1742962841U, -1742749471U, -1742536847U, -1742322259U, -1742111281U, -1741899253U, -1741687861U, -1741474171U, -1741258007U, -1741045811U, -1740835949U, -1740621881U, -1740408053U, -1740196361U, -1739983067U, -1739771023U, -1739558827U, -1739345351U, -1739134457U, -1738920671U, -1738707163U, -1738494731U, -1738281847U, -1738067677U, -1737856069U, -1737644603U, -1737432539U, -1737221611U, -1737006983U, -1736794487U, -1736581619U, -1736369281U, -1736154647U, -1735943387U, -1735729111U, -1735517011U, -1735305269U, -1735090199U, -1734876943U, -1734664441U, -1734449077U, -1734237377U, -1734024737U, -1733811263U, -1733597969U, -1733384509U, -1733171707U, -1732961677U, -1732746863U, -1732535537U, -1732321049U, -1732108141U, -1731895523U, -1731682793U, -1731469843U, -1731254191U, -1731041219U, -1730829523U, -1730618177U, -1730405549U, -1730192197U, -1729976291U, -1729763383U, -1729549669U, -1729337327U, -1729125011U, -1728914417U, -1728701587U, -1728488477U, -1728276799U, -1728063221U, -1727849777U, -1727635841U, -1727422667U, -1727208947U, -1726994957U, -1726783987U, -1726573733U, -1726361471U, -1726147603U, -1725936371U, -1725724123U, -1725510341U, -1725297971U, -1725083699U, -1724868617U, -1724657423U, -1724445431U, -1724230499U, -1724017907U, -1723805329U, -1723596101U, -1723381903U, -1723167899U, -1722954017U, -1722740653U, -1722527047U, -1722312811U, -1722102953U, -1721891051U, -1721678617U, -1721466457U, -1721252303U, -1721040851U, -1720830509U, -1720616329U, -1720403401U, -1720190291U, -1719977801U, -1719766823U, -1719554429U, -1719342839U, -1719129833U, -1718917727U, -1718705621U, -1718492519U, -1718278847U, -1718067781U, -1717854091U, -1717640279U, -1717427989U, -1717216279U, -1717003237U, -1716788687U, -1716577411U, -1716367007U, -1716156181U, -1715943997U, -1715731957U, -1715519549U, -1715306557U, -1715093563U, -1714882331U, -1714670413U, -1714457677U, -1714244459U, -1714031303U, -1713818269U, -1713604801U, -1713389563U, -1713178517U, -1712965213U, -1712753267U, -1712539687U, -1712328841U, -1712113927U, -1711899883U, -1711688063U, -1711475021U, -1711261333U, -1711051409U, -1710837059U, -1710624329U, -1710413077U, -1710198703U, -1709987243U, -1709773981U, -1709563153U, -1709351911U, -1709141977U, -1708930331U, -1708718107U, -1708502867U, -1708290503U, -1708076729U, -1707863831U, -1707652277U, -1707439001U, -1707227173U, -1707014329U, -1706801633U, -1706589107U, -1706378419U, -1706166377U, -1705953643U, -1705741783U, -1705531549U, -1705316959U, -1705106129U, -1704894109U, -1704681709U, -1704468937U, -1704255689U, -1704045223U, -1703832359U, -1703619641U, -1703405609U, -1703195113U, -1702983229U, -1702769197U, -1702556957U, -1702344983U, -1702131659U, -1701917627U, -1701705373U, -1701491459U, -1701278609U, -1701065897U, -1700854567U, -1700644447U, -1700429513U, -1700217709U, -1700006197U, -1699793419U, -1699580317U, -1699369627U, -1699155581U, -1698940723U, -1698727337U, -1698513253U, -1698301307U, -1698091267U, -1697877743U, -1697664337U, -1697450791U, -1697237897U, -1697025769U, -1696813771U, -1696599187U, -1696387493U, -1696177811U, -1695964349U, -1695752273U, -1695539983U, -1695328517U, -1695112499U, -1694901031U, -1694687689U, -1694475023U, -1694261953U, -1694049001U, -1693835707U, -1693622737U, -1693410343U, -1693197481U, -1692985631U, -1692774529U, -1692562093U, -1692348953U, -1692136417U, -1691923169U, -1691710081U, -1691497571U, -1691284057U, -1691071279U, -1690859791U, -1690645939U, -1690435493U, -1690223939U, -1690010563U, -1689798259U, -1689584801U, -1689374539U, -1689162413U, -1688949023U, -1688734417U, -1688524517U, -1688313817U, -1688102477U, -1687890049U, -1687679137U, -1687466219U, -1687256309U, -1687042309U, -1686831407U, -1686620363U, -1686407869U, -1686194189U, -1685982491U, -1685769949U, -1685554763U, -1685339581U, -1685127391U, -1684918171U, -1684703561U, -1684493633U, -1684280249U, -1684067551U, -1683855757U, -1683645311U, -1683433723U, -1683221711U, -1683008251U, -1682796551U, -1682583167U, -1682371753U, -1682155987U, -1681944119U, -1681733363U, -1681519849U, -1681308011U, -1681098073U, -1680884237U, -1680671623U, -1680459233U, -1680247291U, -1680031811U, -1679819293U, -1679605723U, -1679392699U, -1679181041U, -1678968337U, -1678756411U, -1678543357U, -1678332811U, -1678122869U, -1677911009U, -1677697997U, -1677485779U, -1677275011U, -1677060713U, -1676850353U, -1676637649U, -1676424697U, -1676211011U, -1676000453U, -1675787273U, -1675576393U, -1675363649U, -1675151339U, -1674939241U, -1674727057U, -1674512789U, -1674299479U, -1674087917U, -1673876467U, -1673661967U, -1673449919U, -1673235139U, -1673021521U, -1672808327U, -1672596941U, -1672384589U, -1672173589U, -1671961757U, -1671749039U, -1671536963U, -1671325529U, -1671112967U, -1670901179U, -1670689117U, -1670475277U, -1670262637U, -1670051791U, -1669837633U, -1669625107U, -1669414039U, -1669203233U, -1668990637U, -1668775393U, -1668563849U, -1668350561U, -1668138847U, -1667926867U, -1667713757U, -1667501833U, -1667287651U, -1667077777U, -1666863299U, -1666650637U, -1666439549U, -1666227977U, -1666014149U, -1665800771U, -1665591229U, -1665380273U, -1665168877U, -1664957753U, -1664744593U, -1664532421U, -1664320123U, -1664105249U, -1663891367U, -1663680947U, -1663469519U, -1663254757U, -1663042397U, -1662830083U, -1662618499U, -1662405971U, -1662195949U, -1661984659U, -1661771983U, -1661559659U, -1661347057U, -1661134081U, -1660921679U, -1660710313U, -1660497737U, -1660285441U, -1660073287U, -1659859973U, -1659645607U, -1659431777U, -1659216851U, -1659004939U, -1658794849U, -1658581553U, -1658372297U, -1658159369U, -1657946183U, -1657734823U, -1657521973U, -1657309891U, -1657097159U, -1656885457U, -1656674549U, -1656462763U, -1656251131U, -1656038099U, -1655824243U, -1655613227U, -1655398643U, -1655187257U, -1654976711U, -1654763909U, -1654550113U, -1654337563U, -1654125673U, -1653912119U, -1653698759U, -1653486361U, -1653274141U, -1653059761U, -1652848279U, -1652634989U, -1652424523U, -1652209519U, -1651998191U, -1651784759U, -1651572101U, -1651359301U, -1651147033U, -1650934469U, -1650723083U, -1650509953U, -1650298159U, -1650085873U, -1649872649U, -1649659841U, -1649449441U, -1649235881U, -1649024249U, -1648812073U, -1648598869U, -1648387141U, -1648175587U, -1647962123U, -1647750473U, -1647538483U, -1647326743U, -1647114061U, -1646903021U, -1646688727U, -1646476903U, -1646264027U, -1646051219U, -1645838983U, -1645628581U, -1645415971U, -1645204021U, -1644993293U, -1644776921U, -1644563593U, -1644351343U, -1644139267U, -1643924603U, -1643713501U, -1643499029U, -1643288453U, -1643075813U, -1642860589U, -1642648877U, -1642437869U, -1642225457U, -1642012793U, -1641801523U, -1641589661U, -1641376409U, -1641162559U, -1640952241U, -1640741437U, -1640529173U, -1640318839U, -1640106227U, -1639894213U, -1639681237U, -1639470661U, -1639257131U, -1639045273U, -1638833389U, -1638619711U, -1638407233U, -1638194989U, -1637980541U, -1637769223U, -1637559887U, -1637346769U, -1637134337U, -1636922267U, -1636710653U, -1636499873U, -1636286867U, -1636076087U, -1635863939U, -1635650407U, -1635436661U, -1635226577U, -1635015631U, -1634803927U, -1634589751U, -1634378377U, -1634166799U, -1633954739U, -1633743409U, -1633531651U, -1633318207U, -1633106641U, -1632897269U, -1632687919U, -1632475811U, -1632263639U, -1632052379U, -1631839457U, -1631626849U, -1631414489U, -1631202467U, -1630990519U, -1630778063U, -1630565177U, -1630354853U, -1630143049U, -1629931943U, -1629719171U, -1629508193U, -1629295721U, -1629082687U, -1628870843U, -1628660101U, -1628448221U, -1628236867U, -1628023801U, -1627812029U, -1627600441U, -1627389431U, -1627177001U, -1626962539U, -1626751979U, -1626539179U, -1626326791U, -1626113729U, -1625903567U, -1625691247U, -1625478037U, -1625266073U, -1625054153U, -1624841633U, -1624630261U, -1624417189U, -1624206053U, -1623992599U, -1623781619U, -1623568949U, -1623354829U, -1623142987U, -1622929513U, -1622718421U, -1622506999U, -1622294161U, -1622082901U, -1621868393U, -1621658257U, -1621446997U, -1621235573U, -1621024253U, -1620813553U, -1620603793U, -1620392623U, -1620180607U, -1619968247U, -1619753719U, -1619541383U, -1619329603U, -1619117597U, -1618904627U, -1618691989U, -1618479787U, -1618267333U, -1618055717U, -1617843229U, -1617630947U, -1617417619U, -1617204377U, -1616993519U, -1616781559U, -1616568367U, -1616356229U, -1616143759U, -1615933097U, -1615723597U, -1615509367U, -1615297399U, -1615086917U, -1614874609U, -1614661459U, -1614448681U, -1614236551U, -1614023113U, -1613812303U, -1613601079U, -1613389003U, -1613176379U, -1612963951U, -1612751549U, -1612540789U, -1612329503U, -1612118173U, -1611906383U, -1611695711U, -1611483151U, -1611271957U, -1611057827U, -1610844611U, -1610632469U, -1610418559U, -1610206529U, -1609994033U, -1609781203U, -1609569413U, -1609359209U, -1609145459U, -1608933947U, -1608720361U, -1608508801U, -1608296717U, -1608084109U, -1607870417U, -1607658197U, -1607445701U, -1607234537U, -1607022997U, -1606810687U, -1606600679U, -1606388731U, -1606176347U, -1605965227U, -1605752081U, -1605539021U, -1605328313U, -1605115663U, -1604904061U, -1604693239U, -1604480057U, -1604268389U, -1604057183U, -1603842913U, -1603631873U, -1603420561U, -1603210649U, -1603000219U, -1602789143U, -1602577609U, -1602365857U, -1602153079U, -1601940149U, -1601727781U, -1601517839U, -1601302363U, -1601090371U, -1600879667U, -1600667899U, -1600455133U, -1600242403U, -1600031369U, -1599820517U, -1599606803U, -1599396749U, -1599184751U, -1598975051U, -1598761279U, -1598549501U, -1598335411U, -1598123407U, -1597911299U, -1597700057U, -1597487621U, -1597277893U, -1597065859U, -1596852787U, -1596642133U, -1596428957U, -1596216553U, -1596002173U, -1595792243U, -1595579933U, -1595369533U, -1595158241U, -1594948063U, -1594737161U, -1594525729U, -1594311107U, -1594098707U, -1593885151U, -1593671377U, -1593458753U, -1593247781U, -1593035057U, -1592822603U, -1592610959U, -1592398513U, -1592185459U, -1591975481U, -1591765501U, -1591554421U, -1591341443U, -1591131319U, -1590920003U, -1590707633U, -1590494783U, -1590283363U, -1590070931U, -1589859377U, -1589646811U, -1589434129U, -1589223187U, -1589011031U, -1588799903U, -1588586047U, -1588375429U, -1588163957U, -1587952687U, -1587741893U, -1587529987U, -1587318851U, -1587105677U, -1586891203U, -1586680391U, -1586469947U, -1586257091U, -1586045543U, -1585835543U, -1585622579U, -1585410503U, -1585198583U, -1584985397U, -1584772169U, -1584559601U, -1584347197U, -1584135689U, -1583923169U, -1583711639U, -1583501189U, -1583290279U, -1583078971U, -1582868279U, -1582658101U, -1582445219U, -1582233599U, -1582020931U, -1581806959U, -1581596773U, -1581385601U, -1581173551U, -1580962969U, -1580751941U, -1580539157U, -1580325619U, -1580114611U, -1579903427U, -1579693151U, -1579481467U, -1579268359U, -1579056379U, -1578842593U, -1578632179U, -1578421843U, -1578209747U, -1577998151U, -1577787647U, -1577579093U, -1577369909U, -1577155537U, -1576943099U, -1576730611U, -1576521313U, -1576311547U, -1576100221U, -1575886001U, -1575674297U, -1575462277U, -1575251819U, -1575039077U, -1574829143U, -1574617871U, -1574406947U, -1574196319U, -1573984591U, -1573771307U, -1573558699U, -1573347103U, -1573134727U, -1572923981U, -1572710869U, -1572499171U, -1572285719U, -1572074671U, -1571864771U, -1571650979U, -1571438179U, -1571225417U, -1571013593U, -1570801511U, -1570589539U, -1570376557U, -1570164923U, -1569953963U, -1569742417U, -1569531179U, -1569320693U, -1569107899U, -1568896783U, -1568684263U, -1568472599U, -1568261309U, -1568048311U, -1567834613U, -1567622321U, -1567411583U, -1567200757U, -1566991141U, -1566778691U, -1566568769U, -1566357157U, -1566143399U, -1565932283U, -1565721347U, -1565509193U, -1565297891U, -1565085653U, -1564873847U, -1564660499U, -1564447433U, -1564235279U, -1564021853U, -1563811489U, -1563600547U, -1563390781U, -1563178303U, -1562966143U, -1562753519U, -1562540341U, -1562328893U, -1562116663U, -1561904369U, -1561691323U, -1561478873U, -1561266367U, -1561053881U, -1560842071U, -1560628519U, -1560415321U, -1560203707U, -1559991437U, -1559780639U, -1559568349U, -1559356307U, -1559145017U, -1558935383U, -1558724383U, -1558512313U, -1558300649U, -1558088447U, -1557875689U, -1557664697U, -1557452837U, -1557241417U, -1557027809U, -1556815321U, -1556607361U, -1556394971U, -1556182799U, -1555972007U, -1555757803U, -1555547131U, -1555336427U, -1555123693U, -1554912313U, -1554701053U, -1554488371U, -1554276719U, -1554064399U, -1553854661U, -1553642743U, -1553430247U, -1553219651U, -1553007349U, -1552796459U, -1552584197U, -1552373029U, -1552160453U, -1551947497U, -1551736567U, -1551524531U, -1551312557U, -1551101779U, -1550890007U, -1550680333U, -1550469667U, -1550258377U, -1550048537U, -1549836947U, -1549626413U, -1549413953U, -1549202497U, -1548990721U, -1548777619U, -1548566603U, -1548353953U, -1548143243U, -1547932783U, -1547718707U, -1547508233U, -1547295949U, -1547084933U, -1546874491U, -1546660861U, -1546449799U, -1546240771U, -1546029269U, -1545817543U, -1545608279U, -1545395063U, -1545184891U, -1544973307U, -1544762029U, -1544550919U, -1544340169U, -1544126369U, -1543917269U, -1543704583U, -1543492921U, -1543278167U, -1543066607U, -1542855121U, -1542643969U, -1542432631U, -1542220997U, -1542009797U, -1541798197U, -1541588329U, -1541375651U, -1541164321U, -1540951459U, -1540741079U, -1540529233U, -1540316951U, -1540104407U, -1539892303U, -1539682103U, -1539472589U, -1539260353U, -1539048419U, -1538837119U, -1538625079U, -1538413381U, -1538200369U, -1537988381U, -1537776257U, -1537564159U, -1537351003U, -1537141829U, -1536930599U, -1536719453U, -1536509207U, -1536298567U, -1536084287U, -1535872307U, -1535661467U, -1535448043U, -1535237141U, -1535025673U, -1534813279U, -1534603751U, -1534391513U, -1534179809U, -1533966341U, -1533756793U, -1533546401U, -1533334199U, -1533122693U, -1532910019U, -1532698561U, -1532487683U, -1532274157U, -1532063317U, -1531852901U, -1531640309U, -1531427567U, -1531215589U, -1531002287U, -1530788503U, -1530577127U, -1530366421U, -1530154837U, -1529942443U, -1529731897U, -1529522737U, -1529311841U, -1529103517U, -1528891963U, -1528680841U, -1528467029U, -1528256663U, -1528046269U, -1527835061U, -1527624487U, -1527413753U, -1527202763U, -1526992429U, -1526780881U, -1526568913U, -1526357621U, -1526146381U, -1525935077U, -1525723673U, -1525511483U, -1525301759U, -1525088857U, -1524876253U, -1524665299U, -1524452729U, -1524241639U, -1524031711U, -1523819651U, -1523608943U, -1523397277U, -1523184791U, -1522974181U, -1522761347U, -1522549627U, -1522339421U, -1522130107U, -1521919109U, -1521705557U, -1521496439U, -1521282947U, -1521071219U, -1520860261U, -1520647981U, -1520436857U, -1520224591U, -1520013307U, -1519800533U, -1519589777U, -1519377709U, -1519166063U, -1518957403U, -1518747859U, -1518537569U, -1518326107U, -1518115609U, -1517902261U, -1517689727U, -1517479627U, -1517268097U, -1517056027U, -1516842331U, -1516630799U, -1516422581U, -1516211933U, -1516000391U, -1515788333U, -1515576967U, -1515365569U, -1515154343U, -1514942327U, -1514732293U, -1514522249U, -1514311637U, -1514100949U, -1513888829U, -1513677317U, -1513464419U, -1513253267U, -1513040521U, -1512829321U, -1512619337U, -1512406871U, -1512196163U, -1511984137U, -1511773339U, -1511559821U, -1511349289U, -1511138999U, -1510926353U, -1510713947U, -1510500547U, -1510288337U, -1510077571U, -1509863603U, -1509652121U, -1509441179U, -1509226711U, -1509014431U, -1508801669U, -1508591653U, -1508381621U, -1508170903U, -1507960691U, -1507750679U, -1507539263U, -1507328419U, -1507115851U, -1506903271U, -1506692387U, -1506480763U, -1506267967U, -1506056749U, -1505847173U, -1505635909U, -1505425291U, -1505215927U, -1505005493U, -1504793657U, -1504581619U, -1504371229U, -1504162333U, -1503952867U, -1503740867U, -1503529823U, -1503316649U, -1503105971U, -1502893967U, -1502682551U, -1502471153U, -1502260021U, -1502047271U, -1501834643U, -1501623469U, -1501411771U, -1501200923U, -1500989389U, -1500775873U, -1500565127U, -1500353909U, -1500143621U, -1499932537U, -1499720281U, -1499508971U, -1499297563U, -1499086661U, -1498874747U, -1498663967U, -1498451329U, -1498239949U, -1498028803U, -1497818087U, -1497605653U, -1497394813U, -1497185497U, -1496972819U, -1496762291U, -1496551181U, -1496339959U, -1496130263U, -1495919351U, -1495706561U, -1495496021U, -1495283507U, -1495072847U, -1494862697U, -1494651533U, -1494441001U, -1494230201U, -1494019927U, -1493808817U, -1493596171U, -1493385767U, -1493174381U, -1492964443U, -1492753439U, -1492542301U, -1492331219U, -1492120969U, -1491911543U, -1491699217U, -1491487813U, -1491275839U, -1491064643U, -1490853697U, -1490645441U, -1490435729U, -1490226733U, -1490013949U, -1489802617U, -1489589581U, -1489379527U, -1489166039U, -1488954433U, -1488743299U, -1488531413U, -1488320387U, -1488111187U, -1487900389U, -1487690467U, -1487478497U, -1487267263U, -1487057459U, -1486847729U, -1486637849U, -1486427429U, -1486216819U, -1486003891U, -1485793697U, -1485583139U, -1485372797U, -1485160133U, -1484950217U, -1484741021U, -1484529037U, -1484317111U, -1484106011U, -1483894001U, -1483681889U, -1483471441U, -1483259819U, -1483049713U, -1482838807U, -1482628339U, -1482417641U, -1482206351U, -1481995027U, -1481782711U, -1481570309U, -1481359603U, -1481147693U, -1480933667U, -1480722539U, -1480513499U, -1480303739U, -1480090541U, -1479879637U, -1479668173U, -1479455969U, -1479244651U, -1479032449U, -1478822083U, -1478609551U, -1478399057U, -1478187493U, -1477978231U, -1477768079U, -1477556897U, -1477346933U, -1477136621U, -1476926603U, -1476715193U, -1476506771U, -1476293653U, -1476083051U, -1475872933U, -1475662079U, -1475452523U, -1475242933U, -1475032721U, -1474821919U, -1474611221U, -1474401239U, -1474190131U, -1473977039U, -1473765289U, -1473553997U, -1473340133U, -1473130889U, -1472919583U, -1472708987U, -1472498773U, -1472287043U, -1472077699U, -1471867637U, -1471657441U, -1471446443U, -1471235713U, -1471023823U, -1470812389U, -1470599993U, -1470390283U, -1470178133U, -1469966669U, -1469755801U, -1469543599U, -1469330881U, -1469119987U, -1468907851U, -1468695629U, -1468484929U, -1468273421U, -1468062059U, -1467851149U, -1467640763U, -1467428411U, -1467217327U, -1467006161U, -1466794151U, -1466583073U, -1466371843U, -1466160329U, -1465948373U, -1465736777U, -1465525723U, -1465314119U, -1465102643U, -1464892417U, -1464680897U, -1464467821U, -1464255641U, -1464045809U, -1463835853U, -1463624989U, -1463414549U, -1463204381U, -1462995643U, -1462784161U, -1462573369U, -1462359733U, -1462148579U, -1461938441U, -1461727649U, -1461517399U, -1461304841U, -1461094379U, -1460884471U, -1460673547U, -1460463343U, -1460253167U, -1460041901U, -1459830943U, -1459617227U, -1459408543U, -1459198619U, -1458986429U, -1458775291U, -1458563719U, -1458353033U, -1458142883U, -1457931973U, -1457721589U, -1457511773U, -1457299489U, -1457087893U, -1456876859U, -1456666873U, -1456456499U, -1456244849U, -1456034231U, -1455822019U, -1455611659U, -1455401117U, -1455191977U, -1454981797U, -1454771543U, -1454560109U, -1454349367U, -1454137843U, -1453927427U, -1453715761U, -1453504249U, -1453294127U, -1453081739U, -1452870073U, -1452659729U, -1452448273U, -1452238709U, -1452026141U, -1451813369U, -1451603563U, -1451391889U, -1451180063U, -1450969483U, -1450758469U, -1450547621U, -1450334971U, -1450123639U, -1449913747U, -1449701947U, -1449489913U, -1449279817U, -1449069893U, -1448857687U, -1448648989U, -1448438279U, -1448227537U, -1448017553U, -1447806317U, -1447595869U, -1447382917U, -1447174103U, -1446960607U, -1446749641U, -1446540443U, -1446328439U, -1446119281U, -1445908159U, -1445699449U, -1445489839U, -1445278733U, -1445068367U, -1444856983U, -1444646449U, -1444435033U, -1444222807U, -1444011887U, -1443800339U, -1443587273U, -1443379013U, -1443171043U, -1442957707U, -1442748763U, -1442539339U, -1442327533U, -1442114507U, -1441904047U, -1441690351U, -1441476593U, -1441266361U, -1441055647U, -1440847669U, -1440637277U, -1440426077U, -1440217231U, -1440006509U, -1439794799U, -1439583407U, -1439374171U, -1439162957U, -1438950691U, -1438740437U, -1438528463U, -1438318181U, -1438106513U, -1437895027U, -1437681979U, -1437470873U, -1437259559U, -1437048287U, -1436837653U, -1436626987U, -1436415569U, -1436205919U, -1435995373U, -1435784563U, -1435572799U, -1435360867U, -1435150831U, -1434940153U, -1434729199U, -1434520643U, -1434309757U, -1434099409U, -1433886089U, -1433674607U, -1433466031U, -1433253691U, -1433041403U, -1432829141U, -1432619269U, -1432407803U, -1432197869U, -1431984497U, -1431775249U, -1431565097U, -1431356779U, -1431143009U, -1430932183U, -1430722303U, -1430512469U, -1430300119U, -1430090093U, -1429879069U, -1429668403U, -1429460267U, -1429249499U, -1429038931U, -1428829397U, -1428618013U, -1428406739U, -1428195491U, -1427984963U, -1427775317U, -1427565439U, -1427352851U, -1427142841U, -1426932539U, -1426720049U, -1426508137U, -1426295809U, -1426083629U, -1425873301U, -1425663559U, -1425453457U, -1425242501U, -1425033223U, -1424823151U, -1424609591U, -1424398769U, -1424186873U, -1423976707U, -1423764707U, -1423554833U, -1423345877U, -1423133431U, -1422924851U, -1422714019U, -1422502589U, -1422290981U, -1422080969U, -1421869187U, -1421659849U, -1421447683U, -1421235259U, -1421022943U, -1420814009U, -1420605029U, -1420395637U, -1420184053U, -1419971947U, -1419759763U, -1419551207U, -1419341041U, -1419129991U, -1418921551U, -1418709581U, -1418500289U, -1418290387U, -1418078429U, -1417870807U, -1417660261U, -1417450193U, -1417239283U, -1417028629U, -1416816109U, -1416605381U, -1416393973U, -1416184151U, -1415974367U, -1415759791U, -1415548481U, -1415338993U, -1415127737U, -1414916513U, -1414706081U, -1414496683U, -1414285841U, -1414075933U, -1413865723U, -1413655609U, -1413443107U, -1413233803U, -1413023639U, -1412815031U, -1412603749U, -1412393903U, -1412182423U, -1411972363U, -1411758683U, -1411549081U, -1411338163U, -1411128419U, -1410915481U, -1410704203U, -1410493127U, -1410282767U, -1410072823U, -1409859751U, -1409648803U, -1409438881U, -1409228333U, -1409018059U, -1408806713U, -1408597321U, -1408386337U, -1408174433U, -1407966977U, -1407755081U, -1407545411U, -1407331943U, -1407121483U, -1406910187U, -1406702161U, -1406491811U, -1406281687U, -1406072201U, -1405861619U, -1405649281U, -1405438123U, -1405227907U, -1405017281U, -1404804259U, -1404592459U, -1404382807U, -1404170093U, -1403960413U, -1403749219U, -1403539117U, -1403328253U, -1403117977U, -1402907347U, -1402696543U, -1402487101U, -1402274179U, -1402063451U, -1401852989U, -1401641771U, -1401431819U, -1401220687U, -1401008503U, -1400799527U, -1400586883U, -1400375531U, -1400164691U, -1399955521U, -1399745411U, -1399536209U, -1399323823U, -1399113361U, -1398902599U, -1398693211U, -1398480011U, -1398271157U, -1398059851U, -1397849273U, -1397638597U, -1397427527U, -1397219311U, -1397008007U, -1396796321U, -1396584877U, -1396373389U, -1396163933U, -1395953003U, -1395742811U, -1395532583U, -1395320299U, -1395110599U, -1394900411U, -1394691731U, -1394481623U, -1394269621U, -1394061323U, -1393848473U, -1393637447U, -1393427027U, -1393216597U, -1393005013U, -1392793447U, -1392582857U, -1392373667U, -1392162097U, -1391951017U, -1391739917U, -1391531941U, -1391323799U, -1391112179U, -1390903231U, -1390693357U, -1390480867U, -1390273177U, -1390061591U, -1389854443U, -1389644899U, -1389435529U, -1389224101U, -1389013657U, -1388802889U, -1388590771U, -1388379371U, -1388168759U, -1387959973U, -1387749851U, -1387538531U, -1387326557U, -1387115207U, -1386903257U, -1386690259U, -1386480191U, -1386269273U, -1386059749U, -1385850449U, -1385640629U, -1385426899U, -1385217611U, -1385009077U, -1384797541U, -1384587221U, -1384376911U, -1384166219U, -1383955427U, -1383743587U, -1383531871U, -1383321073U, -1383109709U, -1382900023U, -1382688089U, -1382478193U, -1382270801U, -1382059321U, -1381850683U, -1381640213U, -1381429349U, -1381218071U, -1381008397U, -1380799099U, -1380588893U, -1380376549U, -1380165037U, -1379956027U, -1379745391U, -1379534699U, -1379324861U, -1379115107U, -1378903499U, -1378695559U, -1378484147U, -1378274273U, -1378062869U, -1377849181U, -1377638539U, -1377427537U, -1377217271U, -1377005527U, -1376795093U, -1376583451U, -1376372927U, -1376163917U, -1375954799U, -1375744219U, -1375533587U, -1375323067U, -1375111141U, -1374901441U, -1374690479U, -1374476767U, -1374266947U, -1374055327U, -1373845763U, -1373635849U, -1373424677U, -1373214013U, -1373002481U, -1372792661U, -1372582951U, -1372371989U, -1372160681U, -1371951631U, -1371740347U, -1371530051U, -1371317737U, -1371107293U, -1370898161U, -1370689351U, -1370478199U, -1370269447U, -1370059211U, -1369848439U, -1369638217U, -1369428089U, -1369216799U, -1369007459U, -1368795163U, -1368583901U, -1368373793U, -1368162869U, -1367952449U, -1367742331U, -1367532007U, -1367321981U, -1367114009U, -1366899931U, -1366690271U, -1366478059U, -1366267829U, -1366055539U, -1365846239U, -1365637037U, -1365426473U, -1365217783U, -1365005639U, -1364797337U, -1364586019U, -1364374621U, -1364163901U, -1363954373U, -1363745497U, -1363535959U, -1363324243U, -1363115399U, -1362903431U, -1362693061U, -1362483347U, -1362272159U, -1362061843U, -1361852521U, -1361642413U, -1361433547U, -1361222483U, -1361011681U, -1360802489U, -1360590611U, -1360380881U, -1360171817U, -1359961501U, -1359749983U, -1359539257U, -1359328409U, -1359117871U, -1358908721U, -1358698249U, -1358486093U, -1358278799U, -1358066891U, -1357857821U, -1357647553U, -1357437911U, -1357226729U, -1357017223U, -1356807173U, -1356596411U, -1356385637U, -1356176741U, -1355964263U, -1355755039U, -1355545183U, -1355336251U, -1355128459U, -1354919273U, -1354708483U, -1354498751U, -1354287721U, -1354078309U, -1353870257U, -1353661961U, -1353449791U, -1353240853U, -1353029723U, -1352821361U, -1352612003U, -1352403421U, -1352193341U, -1351982417U, -1351771667U, -1351559323U, -1351347821U, -1351136029U, -1350925787U, -1350716659U, -1350507239U, -1350298679U, -1350086779U, -1349874391U, -1349663261U, -1349453851U, -1349244133U, -1349031391U, -1348822213U, -1348612427U, -1348402843U, -1348194559U, -1347983867U, -1347773291U, -1347559459U, -1347350909U, -1347141193U, -1346933207U, -1346723429U, -1346514991U, -1346305277U, -1346093471U, -1345883647U, -1345672399U, -1345461539U, -1345252241U, -1345040321U, -1344829741U, -1344618323U, -1344407489U, -1344196753U, -1343988967U, -1343780203U, -1343568277U, -1343355241U, -1343147083U, -1342937987U, -1342728071U, -1342517987U, -1342307893U, -1342097557U, -1341887003U, -1341675697U, -1341468683U, -1341261511U, -1341050771U, -1340841889U, -1340632757U, -1340423269U, -1340211359U, -1340001323U, -1339791269U, -1339578307U, -1339367231U, -1339154987U, -1338943393U, -1338732971U, -1338525077U, -1338315793U, -1338103777U, -1337891767U, -1337684981U, -1337475847U, -1337265647U, -1337056157U, -1336846079U, -1336636783U, -1336427837U, -1336218349U, -1336009819U, -1335798707U, -1335587749U, -1335378673U, -1335167833U, -1334957387U, -1334748409U, -1334537419U, -1334327461U, -1334118859U, -1333910269U, -1333701917U, -1333489019U, -1333276801U, -1333068907U, -1332859907U, -1332650933U, -1332443591U, -1332235007U, -1332026453U, -1331816303U, -1331608273U, -1331395193U, -1331182871U, -1330972241U, -1330765867U, -1330554023U, -1330343453U, -1330131511U, -1329919051U, -1329708893U, -1329498817U, -1329287497U, -1329079417U, -1328868181U, -1328658781U, -1328450027U, -1328240899U, -1328029309U, -1327816559U, -1327606783U, -1327398283U, -1327186691U, -1326977819U, -1326767693U, -1326556859U, -1326346837U, -1326137347U, -1325926681U, -1325717227U, -1325506499U, -1325296927U, -1325087851U, -1324877819U, -1324667611U, -1324459139U, -1324247699U, -1324035077U, -1323826727U, -1323617293U, -1323406849U, -1323194489U, -1322982083U, -1322772643U, -1322561957U, -1322351603U, -1322140619U, -1321930747U, -1321720937U, -1321512457U, -1321303331U, -1321092109U, -1320882851U, -1320674917U, -1320465659U, -1320254339U, -1320043337U, -1319834357U, -1319625709U, -1319414983U, -1319203747U, -1318993883U, -1318785301U, -1318577279U, -1318366037U, -1318152007U, -1317943181U, -1317732791U, -1317523841U, -1317314303U, -1317103897U, -1316895257U, -1316685211U, -1316474221U, -1316265331U, -1316054891U, -1315843693U, -1315632137U, -1315421413U, -1315208959U, -1314999743U, -1314788777U, -1314578333U, -1314370261U, -1314159463U, -1313949479U, -1313740369U, -1313531839U, -1313319703U, -1313108959U, -1312898203U, -1312688057U, -1312479703U, -1312267717U, -1312058303U, -1311847529U, -1311637417U, -1311426583U, -1311215863U, -1311006553U, -1310797487U, -1310588473U, -1310377987U, -1310168747U, -1309958267U, -1309749391U, -1309539499U, -1309329479U, -1309120567U, -1308910397U, -1308700637U, -1308490721U, -1308281453U, -1308072991U, -1307865961U, -1307656717U, -1307445779U, -1307237363U, -1307026261U, -1306817159U, -1306605631U, -1306395403U, -1306185103U, -1305975263U, -1305767531U, -1305558109U, -1305348797U, -1305139603U, -1304929123U, -1304720051U, -1304511617U, -1304300269U, -1304090467U, -1303881353U, -1303671079U, -1303459217U, -1303250287U, -1303040521U, -1302831029U, -1302621143U, -1302409819U, -1302198973U, -1301989541U, -1301779541U, -1301570293U, -1301362219U, -1301151557U, -1300942213U, -1300732399U, -1300522403U, -1300313351U, -1300106153U, -1299895273U, -1299682561U, -1299472831U, -1299264649U, -1299053519U, -1298843407U, -1298634643U, -1298425393U, -1298213723U, -1298005127U, -1297796261U, -1297585661U, -1297373851U, -1297163779U, -1296953461U, -1296743507U, -1296533111U, -1296323929U, -1296112973U, -1295901839U, -1295691101U, -1295482039U, -1295272897U, -1295060023U, -1294851017U, -1294641659U, -1294429363U, -1294219313U, -1294009729U, -1293800581U, -1293592733U, -1293382037U, -1293171641U, -1292958059U, -1292746541U, -1292537063U, -1292325929U, -1292117027U, -1291908257U, -1291699309U, -1291488907U, -1291281083U, -1291071497U, -1290862493U, -1290651811U, -1290443393U, -1290234571U, -1290025021U, -1289815477U, -1289604307U, -1289395417U, -1289184679U, -1288975997U, -1288766833U, -1288556921U, -1288348429U, -1288138339U, -1287928099U, -1287718339U, -1287505741U, -1287295949U, -1287085523U, -1286875927U, -1286667689U, -1286457461U, -1286249161U, -1286040269U, -1285833047U, -1285623533U, -1285412059U, -1285202393U, -1284992759U, -1284780683U, -1284571111U, -1284360967U, -1284151301U, -1283940841U, -1283732231U, -1283522021U, -1283313019U, -1283104279U, -1282895363U, -1282682057U, -1282472407U, -1282264663U, -1282053103U, -1281842747U, -1281633181U, -1281423527U, -1281213191U, -1281003403U, -1280793589U, -1280583313U, -1280372719U, -1280164439U, -1279955377U, -1279745221U, -1279534447U, -1279326287U, -1279117223U, -1278905813U, -1278698909U, -1278491231U, -1278280687U, -1278070979U, -1277860873U, -1277650267U, -1277440727U, -1277231077U, -1277022427U, -1276813621U, -1276603609U, -1276392329U, -1276182547U, -1275971579U, -1275761801U, -1275553781U, -1275343483U, -1275133991U, -1274922373U, -1274710727U, -1274501663U, -1274294531U, -1274083753U, -1273875037U, -1273665233U, -1273455991U, -1273245527U, -1273035679U, -1272825977U, -1272615397U, -1272407239U, -1272197977U, -1271987671U, -1271776811U, -1271566627U, -1271355739U, -1271148253U, -1270937953U, -1270728527U, -1270517849U, -1270308241U, -1270098527U, -1269886873U, -1269680053U, -1269470837U, -1269262321U, -1269054197U, -1268844481U, -1268635651U, -1268427047U, -1268216891U, -1268006891U, -1267800031U, -1267590887U, -1267381691U, -1267170791U, -1266961207U, -1266754579U, -1266546143U, -1266337901U, -1266129401U, -1265918683U, -1265706697U, -1265496943U, -1265288159U, -1265077771U, -1264869971U, -1264660013U, -1264449523U, -1264238123U, -1264029539U, -1263820993U, -1263611597U, -1263400771U, -1263193111U, -1262981519U, -1262772097U, -1262563301U, -1262354279U, -1262142769U, -1261934431U, -1261723741U, -1261515029U, -1261306933U, -1261099303U, -1260888019U, -1260676409U, -1260468359U, -1260257827U, -1260050257U, -1259839093U, -1259629243U, -1259419391U, -1259210399U, -1259001217U, -1258793857U, -1258585037U, -1258375523U, -1258165679U, -1257955429U, -1257744953U, -1257534881U, -1257325829U, -1257116669U, -1256905073U, -1256695789U, -1256486117U, -1256277961U, -1256067493U, -1255856647U, -1255647719U, -1255437529U, -1255225837U, -1255015369U, -1254806131U, -1254595753U, -1254386789U, -1254178421U, -1253968913U, -1253758447U, -1253548619U, -1253338423U, -1253130479U, -1252923073U, -1252715501U, -1252508093U, -1252297457U, -1252086653U, -1251874859U, -1251664657U, -1251453971U, -1251246587U, -1251037709U, -1250828521U, -1250619481U, -1250410003U, -1250200339U, -1249992089U, -1249782367U, -1249573147U, -1249364279U, -1249156483U, -1248948131U, -1248738089U, -1248528599U, -1248319139U, -1248109439U, -1247902109U, -1247692639U, -1247481349U, -1247271547U, -1247063087U, -1246854223U, -1246645307U, -1246435901U, -1246227581U, -1246018871U, -1245810227U, -1245601571U, -1245392903U, -1245184243U, -1244973703U, -1244765047U, -1244557333U, -1244346863U, -1244135653U, -1243927999U, -1243717823U, -1243509257U, -1243298579U, -1243088681U, -1242879059U, -1242671167U, -1242460357U, -1242246671U, -1242039277U, -1241829913U, -1241620693U, -1241410673U, -1241202409U, -1240991117U, -1240782497U, -1240572649U, -1240363273U, -1240153777U, -1239943217U, -1239734767U, -1239525311U, -1239313181U, -1239103571U, -1238893823U, -1238684219U, -1238472803U, -1238262409U, -1238054203U, -1237844537U, -1237634821U, -1237427551U, -1237217627U, -1237009793U, -1236798539U, -1236589789U, -1236381481U, -1236172387U, -1235964097U, -1235754187U, -1235545853U, -1235335271U, -1235126447U, -1234917487U, -1234708621U, -1234500199U, -1234289923U, -1234080811U, -1233871147U, -1233660019U, -1233451543U, -1233242953U, -1233033727U, -1232823541U, -1232613331U, -1232402621U, -1232193211U, -1231982483U, -1231772611U, -1231562147U, -1231353373U, -1231146467U, -1230937441U, -1230727991U, -1230517793U, -1230311371U, -1230102737U, -1229895523U, -1229684839U, -1229476231U, -1229268809U, -1229059703U, -1228850041U, -1228638493U, -1228429607U, -1228220797U, -1228011221U, -1227800507U, -1227590239U, -1227381409U, -1227172223U, -1226964671U, -1226753419U, -1226542657U, -1226332829U, -1226122453U, -1225911629U, -1225702547U, -1225493051U, -1225282477U, -1225072763U, -1224862213U, -1224653371U, -1224442993U, -1224234727U, -1224025021U, -1223816687U, -1223607443U, -1223398019U, -1223187829U, -1222978951U, -1222770077U, -1222560371U, -1222351069U, -1222142459U, -1221933131U, -1221721819U, -1221514477U, -1221302977U, -1221094829U, -1220885647U, -1220675699U, -1220464283U, -1220254433U, -1220047229U, -1219838999U, -1219629767U, -1219421089U, -1219213297U, -1219005551U, -1218797189U, -1218587507U, -1218377591U, -1218168283U, -1217959759U, -1217750113U, -1217539289U, -1217329511U, -1217123249U, -1216913377U, -1216703687U, -1216494469U, -1216286101U, -1216077211U, -1215867539U, -1215660739U, -1215451949U, -1215241673U, -1215031777U, -1214822281U, -1214612899U, -1214402617U, -1214193439U, -1213983487U, -1213775221U, -1213567811U, -1213358513U, -1213147499U, -1212936583U, -1212727433U, -1212520013U, -1212311081U, -1212103577U, -1211893097U, -1211685161U, -1211473667U, -1211264987U, -1211058197U, -1210849229U, -1210639567U, -1210431389U, -1210221599U, -1210011203U, -1209802301U, -1209594917U, -1209386179U, -1209175673U, -1208967143U, -1208757743U, -1208547889U, -1208338451U, -1208131159U, -1207920361U, -1207710793U, -1207501777U, -1207294171U, -1207084621U, -1206876179U, -1206669041U, -1206459521U, -1206249859U, -1206041953U, -1205831299U, -1205622923U, -1205415979U, -1205207389U, -1204998191U, -1204787341U, -1204578779U, -1204371323U, -1204162783U, -1203951167U, -1203740099U, -1203532607U, -1203322357U, -1203111703U, -1202902793U, -1202693599U, -1202485397U, -1202275051U, -1202065471U, -1201854851U, -1201645231U, -1201434701U, -1201227581U, -1201018723U, -1200811463U, -1200602569U, -1200391783U, -1200182749U, -1199970719U, -1199762611U, -1199552531U, -1199343581U, -1199132707U, -1198924267U, -1198714327U, -1198506821U, -1198298653U, -1198090477U, -1197882457U, -1197674893U, -1197466163U, -1197256231U, -1197048563U, -1196838133U, -1196629429U, -1196420011U, -1196211407U, -1196001601U, -1195792771U, -1195585481U, -1195374319U, -1195164823U, -1194956393U, -1194748517U, -1194540509U, -1194329251U, -1194120047U, -1193911993U, -1193703031U, -1193491619U, -1193283407U, -1193075309U, -1192865567U, -1192657183U, -1192448381U, -1192240703U, -1192030831U, -1191823163U, -1191612913U, -1191402739U, -1191193649U, -1190984173U, -1190775451U, -1190564161U, -1190355941U, -1190148107U, -1189939213U, -1189728121U, -1189519997U, -1189311247U, -1189101713U, -1188892717U, -1188685703U, -1188475777U, -1188268001U, -1188058351U, -1187849153U, -1187640917U, -1187433263U, -1187226367U, -1187015953U, -1186805089U, -1186596007U, -1186388261U, -1186178297U, -1185970603U, -1185761939U, -1185550823U, -1185341567U, -1185133997U, -1184923501U, -1184713903U, -1184506039U, -1184297089U, -1184087273U, -1183878329U, -1183669787U, -1183458817U, -1183250791U, -1183041817U, -1182832331U, -1182623809U, -1182414503U, -1182205709U, -1181997067U, -1181787179U, -1181577517U, -1181368277U, -1181158673U, -1180949249U, -1180738123U, -1180528859U, -1180320989U, -1180111057U, -1179901351U, -1179692753U, -1179482891U, -1179277469U, -1179068017U, -1178859497U, -1178650687U, -1178442443U, -1178232611U, -1178021371U, -1177811227U, -1177601077U, -1177390987U, -1177182557U, -1176975281U, -1176766693U, -1176558433U, -1176348211U, -1176142267U, -1175934349U, -1175724499U, -1175516383U, -1175305661U, -1175096981U, -1174887067U, -1174678643U, -1174471559U, -1174261367U, -1174052647U, -1173844219U, -1173636703U, -1173426931U, -1173217663U, -1173009319U, -1172799917U, -1172590231U, -1172381857U, -1172174807U, -1171965953U, -1171758163U, -1171550299U, -1171342357U, -1171133347U, -1170923531U, -1170715573U, -1170506611U, -1170297743U, -1170087619U, -1169879033U, -1169673629U, -1169464913U, -1169253593U, -1169046509U, -1168837333U, -1168628623U, -1168419073U, -1168211003U, -1168001629U, -1167792499U, -1167582679U, -1167374083U, -1167164641U, -1166955613U, -1166747363U, -1166538743U, -1166330059U, -1166119189U, -1165910633U, -1165703027U, -1165492703U, -1165285949U, -1165078643U, -1164868769U, -1164659869U, -1164451963U, -1164242549U, -1164034369U, -1163827999U, -1163620747U, -1163411423U, -1163203091U, -1162992989U, -1162784431U, -1162574671U, -1162365587U, -1162159013U, -1161950299U, -1161741389U, -1161533117U, -1161327229U, -1161119857U, -1160911247U, -1160702561U, -1160493413U, -1160284217U, -1160074693U, -1159865429U, -1159657883U, -1159447573U, -1159238293U, -1159029413U, -1158821291U, -1158610679U, -1158401791U, -1158192437U, -1157983051U, -1157773979U, -1157566313U, -1157356867U, -1157148761U, -1156940111U, -1156732697U, -1156522207U, -1156314457U, -1156105541U, -1155900293U, -1155689329U, -1155480661U, -1155273419U, -1155064697U, -1154855899U, -1154646653U, -1154436793U, -1154228027U, -1154020729U, -1153810711U, -1153603991U, -1153394663U, -1153187417U, -1152978973U, -1152771073U, -1152563249U, -1152353821U, -1152145993U, -1151938247U, -1151730473U, -1151522587U, -1151315437U, -1151105951U, -1150895927U, -1150688501U, -1150477577U, -1150271407U, -1150063381U, -1149855211U, -1149644887U, -1149437147U, -1149227243U, -1149020567U, -1148810137U, -1148600951U, -1148394769U, -1148185991U, -1147977247U, -1147768847U, -1147562491U, -1147353859U, -1147143593U, -1146933899U, -1146724949U, -1146514861U, -1146306919U, -1146100591U, -1145894003U, -1145683807U, -1145478899U, -1145271119U, -1145060519U, -1144849163U, -1144640489U, -1144431487U, -1144221607U, -1144014493U, -1143805609U, -1143596227U, -1143388151U, -1143178501U, -1142967641U, -1142757263U, -1142548973U, -1142340253U, -1142130797U, -1141922099U, -1141712267U, -1141504339U, -1141295399U, -1141085873U, -1140875789U, -1140666523U, -1140455947U, -1140247531U, -1140040739U, -1139831323U, -1139624011U, -1139414651U, -1139205901U, -1138998829U, -1138789373U, -1138581187U, -1138373713U, -1138165307U, -1137956741U, -1137749777U, -1137543557U, -1137334369U, -1137125887U, -1136915501U, -1136704747U, -1136495683U, -1136285251U, -1136077577U, -1135868191U, -1135660817U, -1135452361U, -1135244809U, -1135035169U, -1134824861U, -1134615437U, -1134406519U, -1134197663U, -1133988629U, -1133778851U, -1133568727U, -1133357807U, -1133149687U, -1132940047U, -1132731473U, -1132524047U, -1132317119U, -1132109567U, -1131901469U, -1131692797U, -1131482159U, -1131273667U, -1131064631U, -1130857417U, -1130648083U, -1130439929U, -1130231803U, -1130021449U, -1129813459U, -1129605619U, -1129394641U, -1129186661U, -1128976669U, -1128768803U, -1128560591U, -1128354179U, -1128145127U, -1127938793U, -1127729279U, -1127520491U, -1127310199U, -1127101757U, -1126891127U, -1126683491U, -1126474469U, -1126268371U, -1126060379U, -1125850861U, -1125645503U, -1125435653U, -1125228911U, -1125019937U, -1124810191U, -1124601029U, -1124391427U, -1124181301U, -1123972217U, -1123763177U, -1123553309U, -1123346023U, -1123136743U, -1122928627U, -1122720967U, -1122511417U, -1122302417U, -1122093737U, -1121887787U, -1121678477U, -1121468987U, -1121263597U, -1121054999U, -1120848263U, -1120639991U, -1120430299U, -1120221979U, -1120012321U, -1119805361U, -1119597139U, -1119388597U, -1119178637U, -1118973001U, -1118764489U, -1118557243U, -1118348449U, -1118141587U, -1117932931U, -1117724207U, -1117513043U, -1117305067U, -1117096891U, -1116887111U, -1116679621U, -1116471449U, -1116262709U, -1116055631U, -1115846243U, -1115635361U, -1115427913U, -1115219251U, -1115012053U, -1114803533U, -1114593659U, -1114385507U, -1114178473U, -1113968143U, -1113762623U, -1113553663U, -1113347029U, -1113138293U, -1112928077U, -1112717911U, -1112509877U, -1112301271U, -1112092691U, -1111885717U, -1111677641U, -1111467271U, -1111260041U, -1111051927U, -1110844181U, -1110635249U, -1110426409U, -1110217847U, -1110008941U, -1109801263U, -1109592233U, -1109383721U, -1109176469U, -1108968821U, -1108760137U, -1108551179U, -1108344191U, -1108137031U, -1107929003U, -1107720883U, -1107514039U, -1107305911U, -1107098303U, -1106892403U, -1106683751U, -1106474197U, -1106265071U, -1106056043U, -1105847839U, -1105639783U, -1105429693U, -1105221853U, -1105013123U, -1104804509U, -1104595663U, -1104387239U, -1104180157U, -1103972567U, -1103765197U, -1103556331U, -1103348461U, -1103142101U, -1102933277U, -1102726543U, -1102519267U, -1102313431U, -1102104473U, -1101895429U, -1101685861U, -1101479651U, -1101268541U, -1101060229U, -1100852899U, -1100645999U, -1100436301U, -1100227207U, -1100018219U, -1099811047U, -1099602997U, -1099393643U, -1099185673U, -1098978599U, -1098770263U, -1098561227U, -1098351797U, -1098144017U, -1097937167U, -1097728157U, -1097520947U, -1097312089U, -1097103767U, -1096897601U, -1096689799U, -1096482011U, -1096274651U, -1096066739U, -1095859199U, -1095650089U, -1095442963U, -1095231623U, -1095024257U, -1094816797U, -1094609557U, -1094398931U, -1094189693U, -1093980971U, -1093770611U, -1093563649U, -1093358719U, -1093150999U, -1092943727U, -1092736243U, -1092527509U, -1092318377U, -1092112319U, -1091904797U, -1091696719U, -1091489419U, -1091281019U, -1091072471U, -1090864699U, -1090656817U, -1090447843U, -1090240531U, -1090031741U, -1089824773U, -1089618017U, -1089409109U, -1089200053U, -1088991263U, -1088783723U, -1088576893U, -1088365753U, -1088157073U, -1087948157U, -1087740917U, -1087532689U, -1087324613U, -1087118537U, -1086911729U, -1086703643U, -1086495727U, -1086288169U, -1086080651U, -1085870603U, -1085664887U, -1085456423U, -1085247697U, -1085038519U, -1084833017U, -1084624049U, -1084416631U, -1084208351U, -1084001693U, -1083793349U, -1083585871U, -1083377047U, -1083170471U, -1082963663U, -1082756149U, -1082546651U, -1082338427U, -1082131829U, -1081924471U, -1081716761U, -1081511393U, -1081303913U, -1081096957U, -1080887629U, -1080678889U, -1080469007U, -1080262063U, -1080055027U, -1079847971U, -1079640707U, -1079432869U, -1079223599U, -1079014879U, -1078808681U, -1078599227U, -1078390589U, -1078182643U, -1077975377U, -1077768583U, -1077558403U, -1077350501U, -1077143029U, -1076934251U, -1076724241U, -1076518097U, -1076309501U, -1076101567U, -1075893557U, -1075684787U, -1075475461U, -1075267649U, -1075058701U, -1074849661U, -1074641677U, -1074432679U, -1074225577U, -1074019853U, -1073811041U, -1073601887U, -1073392231U, -1073184083U, -1072976483U, -1072767901U, -1072560497U, -1072351633U, -1072144147U, -1071935113U, -1071728831U, -1071520193U, -1071314423U, -1071105181U, -1070897921U, -1070692321U, -1070484431U, -1070277881U, -1070069713U, -1069861379U, -1069652459U, -1069443377U, -1069236671U, -1069029323U, -1068821141U, -1068613543U, -1068406421U, -1068198277U, -1067990419U, -1067782787U, -1067575109U, -1067369003U, -1067160917U, -1066953301U, -1066746419U, -1066536941U, -1066330519U, -1066124239U, -1065916381U, -1065710047U, -1065502043U, -1065293909U, -1065085093U, -1064875531U, -1064669233U, -1064464769U, -1064256913U, -1064052889U, -1063841941U, -1063634183U, -1063429519U, -1063220489U, -1063011779U, -1062803279U, -1062594389U, -1062385393U, -1062178993U, -1061971153U, -1061765231U, -1061557109U, -1061348021U, -1061139697U, -1060931147U, -1060724087U, -1060514333U, -1060306607U, -1060098943U, -1059890033U, -1059683543U, -1059476063U, -1059268699U, -1059058799U, -1058851631U, -1058644291U, -1058437243U, -1058228651U, -1058022887U, -1057815553U, -1057607189U, -1057398107U, -1057191097U, -1056981413U, -1056774827U, -1056567443U, -1056358829U, -1056150707U, -1055942477U, -1055735311U, -1055524109U, -1055317657U, -1055108851U, -1054899821U, -1054691531U, -1054482683U, -1054276051U, -1054070753U, -1053861643U, -1053652829U, -1053443057U, -1053235811U, -1053029443U, -1052820511U, -1052613781U, -1052407277U, -1052201207U, -1051991939U, -1051782857U, -1051575347U, -1051368133U, -1051161451U, -1050953941U, -1050747079U, -1050538583U, -1050331537U, -1050123911U, -1049915177U, -1049708141U, -1049499391U, -1049291899U, -1049084801U, -1048875713U, -1048666351U, -1048459133U, -1048250167U, -1048043951U, -1047834761U, -1047627271U, -1047418517U, -1047210709U, -1047002123U, -1046793551U, -1046584937U, -1046377229U, -1046170379U, -1045963277U, -1045755479U, -1045548289U, -1045341391U, -1045131757U, -1044923059U, -1044714707U, -1044506663U, -1044299353U, -1044089779U, -1043881469U, -1043675887U, -1043468333U, -1043259947U, -1043052079U, -1042842733U, -1042636327U, -1042430009U, -1042222837U, -1042014559U, -1041806749U, -1041601129U, -1041395071U, -1041186929U, -1040977403U, -1040770943U, -1040561549U, -1040352769U, -1040148119U, -1039940617U, -1039734901U, -1039527631U, -1039319389U, -1039112171U, -1038904313U, -1038697459U, -1038489227U, -1038281971U, -1038076063U, -1037869297U, -1037660693U, -1037454337U, -1037245081U, -1037036801U, -1036830203U, -1036622537U, -1036418689U, -1036209221U, -1036001821U, -1035793637U, -1035585337U, -1035377579U, -1035169859U, -1034963477U, -1034755889U, -1034547919U, -1034339519U, -1034133439U, -1033926133U, -1033718393U, -1033508219U, -1033301741U, -1033093891U, -1032883727U, -1032675671U, -1032468491U, -1032261277U, -1032053389U, -1031846441U, -1031638939U, -1031432029U, -1031222191U, -1031015443U, -1030807237U, -1030602227U, -1030394653U, -1030187299U, -1029978863U, -1029770507U, -1029562477U, -1029356557U, -1029149479U, -1028943049U, -1028736311U, -1028526439U, -1028322089U, -1028114587U, -1027905079U, -1027698571U, -1027491097U, -1027281383U, -1027072499U, -1026864593U, -1026655111U, -1026449509U, -1026242017U, -1026034411U, -1025827493U, -1025619773U, -1025412833U, -1025205917U, -1024998553U, -1024790993U, -1024585409U, -1024377589U, -1024170479U, -1023963079U, -1023754891U, -1023546973U, -1023340459U, -1023130879U, -1022924689U, -1022717417U, -1022509559U, -1022303539U, -1022093477U, -1021885679U, -1021678703U, -1021470403U, -1021262609U, -1021056017U, -1020847343U, -1020639803U, -1020432683U, -1020225047U, -1020020171U, -1019812693U, -1019606831U, -1019398117U, -1019190233U, -1018982821U, -1018775161U, -1018567057U, -1018358507U, -1018151209U, -1017944381U, -1017736241U, -1017530897U, -1017324137U, -1017116063U, -1016908021U, -1016700959U, -1016493871U, -1016286463U, -1016078939U, -1015870729U, -1015663459U, -1015456751U, -1015249799U, -1015043849U, -1014837041U, -1014630109U, -1014424841U, -1014216271U, -1014010013U, -1013804111U, -1013594851U, -1013387113U, -1013179397U, -1012969481U, -1012763077U, -1012555567U, -1012347803U, -1012140301U, -1011933803U, -1011728813U, -1011522041U, -1011312689U, -1011105943U, -1010899103U, -1010691037U, -1010484037U, -1010277799U, -1010068273U, -1009863587U, -1009654741U, -1009449401U, -1009242103U, -1009035059U, -1008826657U, -1008617111U, -1008409531U, -1008202501U, -1007995843U, -1007786251U, -1007579669U, -1007371847U, -1007167529U, -1006961783U, -1006755119U, -1006546817U, -1006337861U, -1006130189U, -1005921529U, -1005714239U, -1005508093U, -1005301811U, -1005096139U, -1004888011U, -1004681233U, -1004475079U, -1004267977U, -1004061257U, -1003852589U, -1003647949U, -1003439069U, -1003232161U, -1003024067U, -1002817859U, -1002610171U, -1002403361U, -1002194651U, -1001986877U, -1001778803U, -1001571667U, -1001364493U, -1001156677U, -1000951957U, -1000744669U, -1000537129U, -1000327297U, -1000119983U, -999912523U, -999703801U, -999493673U, -999286423U, -999078749U, -998871407U, -998664533U, -998458471U, -998253203U, -998046109U, -997839767U, -997633313U, -997426693U, -997218899U, -997011133U, -996803813U, -996597577U, -996390223U, -996183359U, -995977547U, -995770397U, -995562409U, -995354803U, -995146829U, -994941529U, -994735051U, -994527539U, -994320137U, -994113697U, -993907393U, -993698323U, -993491119U, -993282299U, -993076549U, -992870051U, -992663029U, -992455333U, -992248849U, -992042297U, -991833253U, -991624423U, -991417409U, -991211311U, -991005881U, -990798979U, -990592243U, -990385157U, -990176959U, -989971237U, -989762567U, -989556467U, -989348963U, -989142277U, -988934563U, -988729121U, -988519901U, -988313663U, -988104911U, -987897461U, -987692201U, -987484747U, -987276473U, -987069637U, -986861357U, -986656057U, -986450291U, -986242583U, -986034559U, -985828897U, -985620491U, -985413613U, -985208027U, -984999641U, -984793639U, -984586049U, -984379723U, -984171319U, -983966077U, -983761687U, -983554151U, -983347199U, -983139727U, -982933051U, -982728209U, -982520449U, -982314679U, -982108307U, -981899161U, -981692263U, -981484789U, -981277889U, -981072341U, -980865359U, -980657081U, -980449601U, -980242871U, -980035361U, -979828741U, -979620721U, -979413271U, -979206149U, -979000333U, -978793337U, -978582823U, -978378091U, -978170003U, -977962343U, -977755951U, -977548213U, -977341201U, -977134861U, -976928089U, -976721873U, -976515613U, -976308323U, -976101821U, -975892903U, -975685771U, -975477911U, -975270103U, -975063059U, -974856133U, -974650109U, -974441773U, -974234951U, -974027363U, -973819969U, -973612897U, -973407217U, -973200797U, -972991693U, -972783767U, -972575189U, -972370271U, -972161327U, -971955211U, -971747593U, -971541997U, -971334241U, -971126231U, -970917953U, -970712653U, -970504793U, -970298893U, -970093193U, -969885979U, -969678383U, -969471989U, -969264253U, -969059699U, -968852399U, -968645647U, -968438519U, -968231983U, -968024059U, -967817281U, -967613329U, -967406161U, -967197743U, -966990467U, -966783197U, -966577459U, -966369473U, -966164629U, -965956177U, -965746939U, -965540179U, -965333641U, -965127589U, -964920427U, -964712663U, -964505779U, -964297351U, -964090601U, -963884557U, -963679721U, -963472667U, -963264233U, -963057677U, -962851469U, -962644237U, -962439397U, -962233927U, -962026067U, -961818331U, -961609657U, -961402753U, -961196113U, -960989921U, -960783503U, -960575053U, -960369671U, -960164357U, -959958569U, -959751467U, -959545339U, -959337787U, -959132063U, -958927643U, -958719757U, -958513207U, -958308079U, -958099903U, -957892121U, -957686003U, -957479813U, -957274463U, -957070073U, -956863231U, -956656499U, -956450219U, -956243017U, -956035967U, -955827647U, -955619213U, -955411801U, -955206139U, -955000157U, -954793003U, -954587419U, -954379667U, -954173333U, -953967467U, -953761241U, -953554561U, -953347751U, -953141549U, -952936403U, -952729321U, -952522433U, -952313891U, -952108571U, -951902069U, -951695267U, -951487843U, -951281183U, -951072641U, -950867891U, -950659939U, -950453393U, -950245817U, -950038891U, -949831711U, -949624163U, -949418621U, -949210631U, -949004237U, -948797947U, -948590129U, -948383503U, -948176329U, -947969749U, -947762281U, -947557529U, -947350549U, -947146309U, -946941377U, -946733339U, -946525397U, -946319123U, -946112749U, -945906653U, -945699767U, -945493957U, -945286103U, -945079393U, -944872997U, -944666137U, -944457727U, -944251129U, -944045093U, -943841623U, -943634413U, -943428457U, -943221553U, -943014223U, -942807059U, -942599201U, -942394279U, -942186577U, -941980649U, -941770757U, -941565017U, -941358941U, -941153023U, -940944761U, -940739473U, -940534457U, -940328141U, -940121129U, -939914237U, -939707311U, -939498481U, -939290711U, -939083969U, -938877299U, -938670497U, -938463313U, -938256743U, -938050571U, -937843117U, -937635403U, -937430023U, -937224481U, -937017241U, -936808751U, -936602551U, -936393247U, -936187487U, -935980187U, -935774839U, -935568223U, -935362513U, -935157149U, -934950433U, -934744141U, -934538333U, -934332799U, -934125721U, -933915907U, -933712601U, -933505961U, -933298987U, -933094187U, -932887321U, -932682197U, -932474657U, -932268949U, -932062069U, -931853539U, -931648031U, -931441501U, -931235729U, -931028831U, -930822023U, -930615799U, -930410359U, -930203363U, -929997377U, -929791073U, -929583461U, -929378647U, -929171809U, -928961563U, -928753213U, -928546337U, -928340111U, -928133047U, -927927431U, -927719873U, -927511327U, -927303313U, -927097819U, -926891057U, -926683861U, -926476429U, -926272069U, -926065423U, -925858279U, -925653983U, -925447087U, -925239961U, -925034359U, -924827639U, -924620899U, -924415159U, -924208093U, -924001801U, -923795833U, -923589143U, -923381033U, -923174653U, -922968353U, -922762307U, -922554167U, -922346597U, -922140283U, -921933101U, -921726833U, -921521323U, -921314491U, -921104917U, -920900389U, -920696473U, -920488883U, -920284241U, -920077003U, -919871549U, -919665931U, -919461089U, -919253327U, -919047611U, -918843181U, -918636781U, -918431209U, -918225853U, -918018929U, -917810801U, -917602223U, -917395903U, -917188477U, -916982489U, -916774951U, -916568707U, -916361893U, -916156721U, -915951917U, -915745531U, -915540091U, -915333547U, -915126503U, -914921417U, -914715511U, -914509529U, -914303749U, -914097449U, -913892719U, -913684151U, -913479859U, -913271237U, -913061893U, -912856787U, -912650659U, -912447581U, -912239071U, -912033929U, -911828861U, -911623931U, -911416811U, -911211313U, -911004803U, -910799521U, -910594129U, -910388137U, -910180189U, -909975103U, -909769517U, -909564301U, -909358363U, -909154039U, -908950027U, -908742859U, -908536289U, -908330999U, -908122427U, -907915453U, -907709161U, -907504669U, -907298807U, -907092811U, -906888161U, -906681863U, -906477373U, -906270719U, -906063619U, -905857787U, -905652047U, -905446649U, -905241457U, -905037937U, -904830643U, -904624129U, -904412191U, -904207417U, -904001689U, -903795047U, -903589319U, -903382463U, -903178417U, -902973857U, -902767081U, -902558269U, -902351161U, -902142887U, -901935031U, -901729561U, -901524121U, -901318051U, -901111439U, -900906637U, -900700831U, -900494867U, -900290857U, -900084401U, -899879263U, -899671099U, -899463869U, -899258387U, -899051437U, -898845781U, -898638131U, -898431239U, -898226999U, -898020311U, -897812969U, -897607853U, -897401333U, -897194827U, -896988797U, -896782561U, -896575313U, -896370289U, -896163013U, -895955897U, -895751147U, -895544131U, -895337041U, -895131739U, -894924157U, -894717371U, -894511207U, -894304603U, -894098801U, -893892721U, -893686333U, -893479253U, -893273831U, -893069227U, -892863337U, -892659133U, -892455203U, -892249121U, -892042433U, -891836821U, -891629833U, -891421211U, -891214297U, -891007393U, -890801147U, -890593727U, -890387999U, -890182673U, -889977527U, -889771829U, -889565387U, -889357043U, -889151611U, -888944711U, -888738751U, -888533159U, -888326333U, -888119311U, -887913683U, -887710319U, -887504369U, -887298869U, -887092457U, -886885721U, -886678853U, -886474403U, -886268503U, -886062503U, -885857129U, -885650761U, -885443579U, -885236993U, -885030703U, -884822867U, -884615929U, -884409923U, -884205199U, -883998877U, -883793107U, -883588081U, -883380077U, -883172489U, -882967091U, -882760639U, -882556957U, -882351131U, -882144853U, -881939497U, -881732437U, -881527169U, -881321641U, -881116981U, -880910321U, -880702661U, -880495237U, -880288337U, -880082239U, -879875501U, -879669793U, -879464407U, -879258439U, -879051493U, -878846819U, -878642081U, -878436607U, -878230709U, -878025917U, -877819699U, -877613479U, -877406449U, -877200449U, -876993101U, -876786593U, -876580267U, -876375277U, -876167623U, -875960333U, -875755271U, -875547059U, -875341081U, -875133761U, -874927159U, -874724077U, -874517923U, -874312423U, -874106309U, -873900127U, -873692717U, -873487577U, -873282323U, -873076363U, -872872051U, -872667931U, -872461297U, -872252947U, -872048687U, -871843979U, -871637411U, -871431779U, -871224707U, -871016617U, -870810277U, -870604591U, -870398107U, -870193447U, -869988349U, -869782429U, -869579747U, -869372099U, -869166061U, -868958539U, -868754771U, -868548341U, -868343237U, -868135109U, -867930487U, -867723991U, -867518711U, -867314957U, -867109753U, -866904347U, -866699791U, -866493643U, -866287339U, -866080493U, -865873159U, -865665811U, -865460467U, -865256173U, -865051073U, -864844751U, -864638191U, -864434687U, -864229549U, -864024071U, -863818961U, -863613349U, -863408839U, -863200651U, -862995349U, -862789141U, -862584491U, -862376869U, -862173199U, -861967571U, -861759439U, -861555043U, -861350729U, -861143057U, -860938087U, -860732359U, -860524417U, -860319727U, -860112137U, -859906457U, -859700689U, -859493447U, -859285943U, -859078879U, -858872177U, -858667783U, -858462079U, -858257021U, -858050153U, -857845171U, -857641481U, -857434343U, -857229661U, -857021821U, -856815683U, -856610141U, -856403957U, -856197857U, -855991243U, -855787067U, -855580549U, -855376927U, -855170389U, -854963783U, -854759743U, -854554699U, -854348233U, -854142089U, -853936907U, -853731059U, -853526381U, -853322969U, -853117247U, -852910259U, -852705479U, -852499171U, -852292559U, -852088277U, -851882099U, -851674477U, -851469019U, -851264669U, -851057611U, -850851587U, -850646939U, -850441219U, -850233557U, -850027799U, -849822679U, -849618937U, -849412657U, -849206053U, -849000613U, -848795179U, -848593357U, -848389111U, -848183599U, -847977167U, -847770809U, -847565239U, -847359661U, -847153661U, -846946957U, -846740357U, -846533267U, -846328151U, -846122219U, -845917427U, -845711719U, -845507317U, -845300191U, -845093831U, -844888931U, -844684639U, -844476407U, -844270619U, -844064857U, -843857627U, -843651791U, -843446467U, -843243067U, -843038501U, -842832899U, -842629639U, -842424053U, -842217149U, -842013313U, -841808101U, -841604131U, -841399711U, -841190411U, -840984299U, -840779671U, -840573443U, -840368603U, -840162481U, -839958013U, -839751259U, -839547497U, -839344031U, -839137381U, -838930861U, -838723777U, -838515877U, -838312229U, -838108081U, -837905749U, -837700639U, -837495367U, -837289603U, -837084181U, -836877871U, -836671211U, -836468057U, -836260973U, -836056369U, -835849453U, -835644737U, -835437937U, -835233631U, -835027631U, -834821531U, -834617561U, -834413053U, -834207961U, -834001559U, -833795381U, -833590399U, -833388103U, -833180779U, -832975837U, -832771883U, -832566463U, -832361093U, -832154209U, -831950087U, -831745181U, -831538217U, -831331097U, -831128377U, -830922097U, -830714711U, -830510453U, -830306963U, -830101141U, -829895009U, -829689409U, -829481797U, -829277191U, -829072877U, -828868163U, -828661567U, -828457241U, -828252463U, -828047761U, -827842021U, -827636519U, -827429737U, -827225387U, -827019359U, -826814369U, -826608259U, -826403551U, -826198921U, -825992749U, -825787181U, -825582193U, -825377621U, -825173177U, -824968519U, -824762513U, -824555269U, -824349683U, -824142367U, -823937089U, -823731899U, -823527623U, -823323491U, -823117289U, -822911773U, -822704539U, -822498949U, -822298387U, -822092333U, -821884897U, -821679041U, -821473817U, -821267743U, -821060567U, -820857749U, -820652309U, -820449247U, -820243231U, -820038239U, -819832337U, -819626957U, -819422881U, -819216481U, -819009029U, -818804929U, -818600191U, -818395423U, -818188193U, -817983277U, -817775953U, -817571851U, -817365001U, -817161731U, -816957101U, -816754249U, -816547183U, -816342731U, -816137629U, -815932811U, -815728063U, -815525041U, -815320771U, -815114593U, -814909063U, -814704377U, -814499137U, -814294979U, -814090049U, -813884047U, -813678431U, -813473777U, -813266687U, -813062197U, -812858303U, -812653463U, -812444767U, -812240867U, -812035387U, -811829387U, -811623677U, -811416707U, -811210409U, -811006307U, -810802211U, -810597041U, -810391237U, -810187129U, -809982451U, -809777047U, -809570357U, -809367527U, -809162383U, -808957727U, -808753609U, -808548869U, -808343827U, -808138619U, -807933043U, -807728011U, -807520933U, -807315097U, -807110879U, -806906183U, -806700733U, -806496791U, -806292649U, -806087551U, -805883863U, -805677811U, -805473197U, -805269511U, -805063621U, -804860167U, -804656609U, -804452377U, -804248353U, -804043717U, -803837729U, -803632777U, -803427617U, -803222543U, -803016983U, -802811783U, -802605607U, -802398869U, -802193299U, -801988721U, -801783091U, -801576833U, -801372301U, -801170593U, -800964947U, -800759837U, -800555507U, -800349989U, -800145637U, -799941431U, -799735591U, -799530211U, -799321723U, -799115183U, -798908287U, -798702907U, -798498577U, -798294529U, -798091429U, -797886301U, -797683489U, -797478323U, -797274593U, -797070173U, -796866731U, -796663463U, -796458079U, -796253543U, -796047509U, -795843017U, -795637589U, -795433099U, -795228689U, -795024343U, -794818757U, -794611771U, -794405483U, -794201981U, -793996361U, -793791871U, -793589521U, -793383473U, -793175657U, -792971173U, -792767303U, -792562187U, -792356891U, -792152663U, -791946361U, -791741987U, -791537057U, -791331511U, -791127121U, -790921451U, -790715449U, -790512449U, -790309699U, -790103269U, -789898783U, -789696023U, -789491359U, -789286541U, -789083311U, -788879213U, -788676593U, -788471473U, -788266363U, -788060909U, -787855697U, -787649867U, -787445047U, -787238801U, -787033469U, -786827917U, -786623683U, -786418057U, -786213613U, -786009541U, -785805851U, -785602429U, -785397241U, -785192389U, -784987867U, -784784137U, -784580513U, -784374709U, -784168753U, -783964201U, -783759491U, -783556097U, -783350957U, -783146677U, -782942621U, -782737691U, -782533847U, -782329189U, -782124271U, -781920047U, -781716347U, -781508461U, -781306091U, -781102481U, -780898067U, -780693167U, -780489373U, -780281669U, -780078977U, -779874761U, -779670799U, -779465539U, -779259721U, -779055377U, -778850389U, -778646443U, -778439353U, -778234753U, -778029961U, -777825071U, -777620797U, -777415897U, -777212977U, -777008467U, -776805607U, -776599469U, -776394529U, -776188249U, -775983587U, -775778981U, -775571197U, -775363819U, -775160839U, -774958963U, -774755101U, -774549131U, -774344911U, -774139987U, -773935823U, -773731103U, -773525183U, -773320489U, -773114789U, -772908407U, -772703273U, -772499641U, -772296299U, -772091959U, -771888739U, -771682333U, -771478817U, -771274909U, -771069413U, -770866417U, -770659819U, -770457361U, -770251723U, -770047417U, -769842737U, -769639153U, -769435741U, -769230353U, -769026721U, -768821993U, -768617809U, -768415003U, -768209993U, -768005369U, -767801081U, -767596649U, -767392177U, -767188109U, -766984861U, -766780723U, -766577017U, -766370587U, -766165427U, -765960827U, -765755923U, -765551887U, -765346807U, -765140107U, -764934101U, -764729831U, -764524559U, -764318081U, -764113409U, -763908421U, -763702871U, -763496977U, -763292863U, -763085441U, -762881213U, -762677887U, -762472883U, -762269491U, -762066233U, -761861773U, -761656757U, -761454761U, -761250397U, -761045281U, -760841267U, -760636241U, -760431571U, -760227421U, -760022563U, -759818119U, -759613373U, -759409121U, -759205961U, -759002147U, -758797409U, -758590351U, -758386777U, -758180999U, -757974431U, -757770557U, -757563913U, -757360343U, -757155391U, -756951557U, -756745879U, -756541993U, -756335977U, -756132043U, -755928577U, -755725219U, -755522717U, -755318411U, -755117449U, -754911943U, -754708613U, -754505491U, -754301363U, -754096429U, -753891353U, -753686273U, -753478769U, -753274433U, -753071041U, -752863843U, -752659769U, -752454491U, -752252723U, -752047913U, -751843847U, -751641613U, -751436113U, -751231693U, -751027219U, -750820591U, -750617599U, -750413071U, -750209107U, -750002681U, -749799353U, -749596063U, -749390321U, -749187239U, -748983497U, -748777097U, -748570727U, -748365781U, -748161493U, -747956771U, -747753049U, -747549137U, -747345839U, -747141341U, -746936653U, -746730653U, -746525287U, -746319589U, -746115709U, -745910587U, -745706963U, -745500979U, -745297621U, -745091561U, -744887953U, -744681803U, -744478247U, -744274087U, -744070963U, -743866531U, -743660123U, -743455499U, -743252057U, -743046131U, -742841441U, -742636201U, -742430959U, -742227581U, -742023407U, -741819343U, -741614831U, -741412043U, -741210733U, -741006107U, -740802157U, -740599147U, -740395081U, -740190901U, -739986479U, -739783483U, -739579301U, -739376173U, -739172509U, -738967561U, -738763513U, -738560629U, -738354811U, -738150871U, -737948891U, -737742631U, -737539013U, -737333279U, -737130917U, -736926341U, -736721627U, -736518637U, -736313399U, -736107901U, -735905449U, -735701039U, -735498311U, -735292559U, -735087839U, -734883719U, -734680031U, -734475019U, -734270261U, -734066527U, -733863617U, -733658491U, -733451969U, -733248409U, -733045849U, -732842687U, -732637471U, -732431977U, -732227963U, -732024677U, -731820107U, -731616659U, -731410013U, -731206789U, -731003699U, -730800157U, -730597859U, -730392911U, -730186241U, -729983159U, -729778739U, -729572989U, -729367999U, -729164873U, -728958179U, -728752537U, -728547713U, -728343281U, -728139547U, -727934741U, -727731241U, -727527331U, -727325023U, -727122239U, -726918719U, -726714731U, -726508303U, -726304021U, -726100841U, -725896487U, -725691401U, -725488607U, -725283917U, -725079499U, -724872257U, -724670717U, -724465921U, -724262933U, -724059107U, -723855389U, -723651367U, -723447541U, -723243071U, -723040919U, -722835679U, -722632091U, -722430077U, -722225747U, -722022241U, -721818211U, -721614809U, -721411309U, -721206137U, -721001899U, -720798943U, -720594737U, -720394001U, -720189739U, -719985113U, -719779663U, -719574659U, -719370763U, -719168381U, -718965557U, -718759667U, -718557457U, -718352377U, -718147487U, -717944737U, -717741457U, -717537397U, -717333257U, -717129419U, -716926489U, -716723647U, -716518147U, -716314759U, -716110303U, -715906249U, -715701733U, -715496503U, -715293221U, -715088713U, -714884113U, -714679831U, -714473567U, -714269599U, -714065827U, -713862659U, -713657779U, -713453441U, -713248951U, -713045633U, -712842859U, -712636681U, -712433479U, -712230031U, -712028087U, -711824431U, -711620251U, -711416557U, -711212743U, -711009647U, -710806249U, -710602241U, -710397929U, -710193521U, -709987973U, -709784423U, -709579397U, -709375097U, -709173313U, -708971059U, -708766621U, -708560641U, -708357941U, -708154789U, -707951423U, -707747771U, -707544449U, -707340901U, -707136037U, -706933907U, -706729477U, -706526057U, -706322767U, -706119229U, -705915263U, -705708581U, -705507211U, -705303433U, -705098729U, -704896967U, -704689123U, -704485543U, -704283677U, -704081153U, -703877453U, -703673827U, -703469479U, -703265593U, -703061603U, -702857261U, -702652763U, -702450323U, -702246911U, -702042587U, -701839483U, -701635811U, -701431931U, -701230391U, -701026709U, -700824233U, -700619299U, -700414969U, -700211597U, -700008041U, -699803639U, -699601703U, -699396107U, -699192971U, -698990321U, -698784601U, -698583167U, -698379893U, -698174573U, -697969771U, -697766647U, -697562161U, -697358087U, -697153277U, -696948883U, -696745613U, -696541897U, -696337199U, -696132923U, -695930063U, -695727287U, -695524421U, -695321987U, -695118793U, -694915033U, -694713121U, -694510799U, -694308409U, -694103749U, -693902189U, -693697861U, -693495707U, -693290693U, -693086063U, -692880593U, -692676043U, -692471839U, -692267629U, -692066027U, -691860787U, -691654427U, -691452701U, -691248563U, -691046197U, -690843497U, -690640073U, -690436451U, -690233857U, -690031691U, -689827861U, -689626391U, -689421461U, -689218693U, -689016061U, -688813313U, -688608259U, -688404593U, -688201453U, -688000597U, -687794941U, -687591491U, -687387941U, -687185729U, -686981179U, -686778749U, -686575619U, -686372573U, -686170627U, -685965883U, -685763807U, -685561589U, -685358743U, -685152973U, -684952267U, -684749539U, -684546301U, -684343783U, -684139223U, -683937043U, -683733839U, -683530657U, -683328223U, -683124397U, -682920827U, -682714943U, -682511183U, -682309351U, -682103599U, -681899051U, -681696179U, -681493469U, -681289709U, -681085721U, -680882903U, -680679397U, -680471927U, -680270299U, -680065777U, -679861867U, -679660061U, -679456607U, -679253357U, -679050059U, -678847717U, -678642989U, -678440069U, -678236347U, -678035641U, -677830873U, -677628803U, -677424799U, -677220611U, -677016947U, -676812611U, -676609151U, -676406209U, -676201349U, -675997891U, -675795247U, -675590893U, -675387701U, -675183583U, -674978831U, -674776187U, -674572439U, -674370167U, -674165113U, -673961681U, -673757599U, -673553927U, -673350653U, -673147133U, -672945331U, -672743177U, -672540733U, -672338573U, -672133181U, -671930689U, -671727011U, -671523233U, -671318261U, -671115199U, -670911421U, -670709293U, -670506917U, -670302641U, -670101259U, -669897967U, -669694541U, -669491029U, -669287683U, -669083971U, -668881069U, -668676179U, -668472397U, -668270507U, -668068201U, -667863941U, -667658281U, -667455779U, -667252673U, -667049989U, -666846907U, -666644311U, -666440711U, -666237587U, -666033439U, -665831629U, -665628493U, -665425433U, -665220097U, -665019863U, -664815269U, -664610027U, -664406489U, -664204199U, -663999913U, -663797773U, -663594973U, -663391571U, -663189217U, -662985991U, -662781139U, -662578771U, -662376301U, -662173163U, -661970923U, -661766587U, -661564117U, -661360867U, -661158109U, -660956579U, -660753323U, -660550507U, -660347899U, -660143741U, -659941621U, -659737963U, -659535911U, -659332409U, -659131883U, -658928773U, -658726249U, -658522097U, -658318981U, -658115791U, -657911473U, -657709483U, -657506237U, -657303599U, -657101573U, -656898113U, -656695649U, -656493203U, -656289511U, -656086637U, -655885333U, -655683869U, -655477967U, -655274233U, -655071191U, -654867817U, -654663497U, -654460787U, -654256483U, -654053731U, -653852063U, -653650927U, -653448149U, -653244967U, -653042101U, -652837447U, -652635847U, -652434457U, -652230121U, -652026413U, -651823261U, -651619429U, -651414263U, -651213137U, -651010247U, -650806159U, -650604349U, -650401841U, -650199787U, -649998353U, -649795441U, -649591843U, -649389071U, -649186823U, -648983471U, -648779801U, -648576407U, -648375163U, -648172121U, -647967751U, -647766323U, -647563951U, -647360759U, -647158151U, -646956643U, -646751759U, -646549147U, -646347641U, -646142711U, -645940591U, -645738493U, -645535757U, -645336379U, -645133271U, -644930747U, -644725849U, -644524271U, -644320097U, -644116379U, -643912121U, -643709431U, -643507399U, -643302419U, -643098277U, -642895997U, -642692101U, -642490577U, -642287293U, -642084581U, -641879369U, -641675651U, -641473507U, -641272769U, -641068943U, -640865791U, -640663691U, -640461149U, -640258441U, -640056797U, -639853933U, -639651763U, -639448993U, -639245209U, -639043667U, -638841017U, -638636197U, -638432797U, -638230627U, -638028499U, -637825693U, -637622473U, -637419509U, -637218331U, -637014737U, -636813649U, -636611513U, -636407791U, -636204119U, -636002737U, -635801591U, -635599907U, -635397629U, -635193677U, -634989863U, -634789277U, -634586243U, -634382291U, -634179061U, -633977947U, -633775931U, -633574021U, -633367927U, -633164879U, -632962807U, -632759377U, -632555153U, -632351501U, -632150209U, -631946437U, -631743881U, -631540807U, -631339997U, -631139219U, -630934589U, -630731029U, -630527089U, -630324089U, -630122813U, -629920561U, -629717899U, -629513603U, -629311447U, -629108819U, -628907117U, -628703701U, -628502051U, -628298389U, -628095469U, -627893857U, -627691369U, -627491489U, -627289417U, -627087541U, -626884411U, -626682481U, -626481029U, -626279263U, -626075917U, -625873021U, -625669463U, -625467991U, -625264193U, -625060103U, -624858583U, -624656741U, -624453941U, -624251627U, -624049919U, -623848559U, -623644843U, -623442283U, -623240573U, -623038027U, -622835881U, -622632193U, -622429267U, -622225393U, -622024201U, -621821443U, -621618353U, -621416293U, -621213811U, -621010913U, -620807219U, -620605273U, -620404303U, -620202071U, -619998289U, -619795069U, -619594111U, -619392973U, -619191751U, -618987839U, -618784261U, -618581881U, -618380407U, -618179491U, -617976509U, -617775247U, -617572051U, -617364289U, -617162387U, -616957969U, -616754869U, -616551841U, -616350121U, -616148317U, -615943327U, -615740759U, -615539033U, -615337127U, -615132989U, -614932831U, -614733143U, -614529679U, -614325851U, -614124109U, -613920361U, -613718159U, -613514249U, -613312057U, -613110397U, -612910351U, -612707237U, -612504667U, -612304261U, -612103909U, -611900753U, -611698123U, -611496157U, -611294227U, -611090479U, -610887731U, -610683587U, -610480919U, -610280401U, -610078039U, -609876131U, -609674269U, -609471799U, -609269761U, -609066739U, -608862853U, -608660761U, -608456423U, -608255107U, -608053217U, -607852319U, -607649767U, -607446799U, -607245157U, -607042897U, -606840127U, -606637931U, -606436657U, -606232813U, -606032149U, -605830289U, -605626213U, -605422177U, -605219947U, -605016959U, -604813397U, -604610459U, -604408589U, -604206847U, -604006127U, -603805283U, -603604933U, -603403301U, -603202087U, -603001453U, -602798479U, -602596451U, -602394857U, -602192561U, -601991009U, -601786813U, -601586017U, -601384957U, -601182587U, -600980227U, -600778547U, -600576233U, -600374387U, -600172591U, -599971679U, -599769923U, -599566883U, -599363221U, -599161111U, -598958683U, -598756549U, -598555813U, -598352719U, -598150877U, -597947153U, -597745297U, -597541999U, -597337567U, -597136207U, -596934421U, -596732161U, -596529809U, -596328263U, -596126887U, -595926047U, -595726231U, -595525477U, -595323367U, -595123103U, -594920329U, -594717373U, -594516499U, -594314507U, -594112087U, -593912741U, -593711309U, -593508803U, -593308451U, -593103053U, -592900741U, -592698257U, -592494193U, -592293173U, -592091407U, -591888067U, -591687923U, -591486463U, -591284051U, -591082729U, -590883119U, -590681459U, -590480369U, -590278001U, -590076283U, -589874573U, -589674193U, -589472339U, -589270849U, -589070381U, -588870313U, -588669443U, -588464057U, -588263561U, -588060061U, -587857031U, -587654689U, -587452897U, -587251337U, -587049017U, -586846721U, -586644491U, -586443799U, -586242571U, -586040383U, -585835819U, -585633127U, -585433627U, -585230879U, -585029329U, -584826139U, -584624393U, -584422913U, -584219341U, -584015989U, -583814299U, -583611703U, -583411267U, -583210997U, -583007807U, -582807571U, -582605579U, -582405001U, -582205361U, -582002873U, -581798431U, -581597867U, -581397871U, -581194717U, -580991603U, -580790069U, -580589203U, -580387013U, -580186129U, -579982621U, -579781781U, -579578579U, -579376393U, -579178037U, -578976389U, -578773919U, -578570711U, -578369717U, -578169673U, -577965979U, -577763447U, -577562731U, -577360717U, -577158581U, -576956839U, -576754333U, -576554747U, -576354287U, -576152683U, -575949761U, -575748139U, -575545297U, -575344691U, -575141939U, -574940273U, -574739071U, -574537841U, -574335733U, -574132697U, -573930839U, -573729197U, -573527359U, -573326459U, -573124847U, -572923643U, -572722207U, -572520763U, -572320277U, -572119133U, -571917083U, -571714459U, -571514039U, -571312447U, -571109333U, -570908267U, -570706163U, -570505211U, -570302011U, -570100901U, -569899741U, -569695739U, -569494903U, -569292637U, -569090791U, -568890131U, -568688333U, -568486201U, -568285241U, -568083853U, -567883439U, -567682277U, -567480181U, -567278477U, -567075389U, -566876873U, -566672047U, -566471351U, -566269831U, -566067713U, -565866193U, -565665403U, -565463131U, -565261157U, -565060669U, -564859157U, -564657833U, -564456637U, -564253399U, -564050923U, -563849423U, -563648951U, -563446757U, -563245951U, -563043527U, -562844081U, -562640021U, -562439363U, -562237279U, -562037263U, -561836309U, -561636739U, -561436591U, -561233341U, -561031321U, -560827517U, -560628337U, -560425741U, -560224517U, -560023267U, -559821347U, -559619603U, -559418737U, -559216529U, -559013027U, -558812473U, -558611803U, -558408817U, -558207941U, -558007081U, -557807857U, -557605397U, -557403169U, -557203447U, -557001349U, -556799281U, -556595849U, -556396177U, -556194521U, -555994253U, -555791333U, -555590479U, -555389213U, -555186431U, -554986511U, -554785073U, -554584267U, -554380919U, -554178277U, -553976713U, -553776191U, -553572707U, -553372213U, -553172117U, -552972401U, -552771497U, -552570311U, -552369217U, -552167767U, -551967211U, -551766811U, -551565811U, -551364811U, -551162357U, -550961809U, -550761137U, -550560139U, -550358761U, -550159567U, -549958901U, -549757049U, -549557549U, -549356981U, -549155773U, -548954101U, -548752109U, -548551309U, -548349407U, -548149279U, -547949123U, -547747367U, -547545563U, -547344871U, -547145353U, -546945383U, -546744547U, -546542723U, -546340393U, -546138457U, -545937809U, -545735521U, -545535997U, -545334311U, -545133191U, -544932499U, -544732439U, -544530967U, -544329011U, -544127197U, -543926419U, -543724817U, -543523769U, -543322561U, -543119747U, -542918149U, -542717267U, -542513899U, -542313859U, -542112257U, -541910729U, -541709111U, -541507361U, -541304821U, -541103399U, -540902563U, -540701129U, -540501653U, -540301187U, -540098873U, -539897623U, -539694797U, -539494807U, -539294407U, -539095981U, -538892941U, -538692157U, -538491649U, -538288771U, -538087817U, -537887657U, -537687739U, -537487169U, -537284981U, -537083843U, -536882651U, -536681611U, -536479873U, -536280743U, -536080177U, -535880399U, -535676699U, -535475179U, -535275227U, -535076489U, -534877139U, -534675809U, -534475439U, -534273799U, -534072523U, -533871847U, -533669711U, -533467969U, -533268401U, -533066321U, -532865881U, -532665751U, -532465837U, -532263973U, -532062943U, -531863203U, -531661121U, -531460661U, -531258587U, -531058793U, -530857277U, -530654587U, -530453389U, -530251793U, -530050559U, -529850803U, -529650467U, -529450759U, -529250581U, -529048207U, -528848687U, -528646109U, -528445363U, -528244949U, -528043793U, -527843429U, -527644543U, -527442943U, -527244271U, -527042909U, -526841269U, -526640363U, -526441231U, -526241101U, -526040443U, -525839239U, -525638411U, -525434137U, -525234989U, -525033917U, -524833663U, -524631677U, -524432423U, -524231369U, -524029361U, -523831199U, -523626899U, -523425431U, -523225741U, -523026701U, -522826373U, -522627043U, -522427067U, -522224917U, -522023401U, -521821427U, -521621959U, -521422549U, -521221067U, -521019319U, -520817963U, -520616627U, -520416683U, -520213721U, -520012981U, -519811693U, -519612167U, -519410641U, -519212537U, -519010183U, -518809799U, -518610613U, -518408963U, -518208749U, -518007229U, -517808209U, -517608347U, -517408183U, -517207921U, -517005949U, -516805997U, -516604573U, -516406013U, -516207467U, -516008153U, -515806139U, -515604629U, -515405351U, -515204141U, -515003767U, -514802657U, -514601641U, -514400261U, -514198963U, -513997249U, -513796343U, -513594311U, -513394933U, -513194443U, -512993147U, -512791793U, -512591657U, -512391179U, -512189567U, -511989869U, -511791689U, -511592533U, -511390471U, -511189741U, -510988547U, -510785537U, -510583921U, -510382417U, -510182483U, -509981909U, -509779393U, -509577611U, -509376979U, -509178223U, -508978709U, -508776343U, -508576129U, -508377131U, -508175669U, -507974827U, -507776117U, -507575839U, -507374239U, -507172243U, -506971207U, -506771051U, -506569117U, -506371009U, -506169997U, -505970363U, -505771171U, -505568621U, -505370287U, -505167449U, -504965723U, -504765221U, -504565993U, -504363793U, -504162943U, -503962243U, -503761499U, -503562671U, -503362183U, -503161073U, -502963723U, -502760147U, -502557053U, -502358569U, -502157779U, -501955921U, -501757211U, -501555529U, -501353029U, -501151003U, -500950243U, -500749423U, -500548927U, -500349547U, -500150419U, -499949237U, -499748027U, -499548073U, -499348043U, -499148371U, -498946183U, -498744937U, -498544243U, -498344221U, -498145331U, -497944339U, -497742803U, -497542301U, -497342597U, -497142461U, -496944137U, -496743421U, -496542467U, -496342559U, -496141033U, -495942431U, -495744017U, -495541757U, -495342109U, -495144467U, -494944381U, -494744039U, -494544251U, -494343253U, -494142589U, -493941887U, -493744421U, -493544963U, -493343107U, -493144049U, -492942053U, -492741779U, -492543169U, -492340843U, -492142411U, -491941981U, -491741039U, -491539963U, -491339879U, -491139391U, -490939979U, -490739591U, -490540991U, -490338143U, -490138709U, -489939733U, -489741347U, -489539027U, -489340637U, -489141589U, -488941511U, -488740841U, -488539937U, -488338727U, -488139371U, -487937057U, -487738711U, -487538809U, -487339261U, -487140481U, -486937639U, -486736531U, -486537329U, -486338273U, -486136883U, -485937509U, -485738203U, -485538127U, -485337989U, -485140349U, -484937711U, -484737509U, -484536757U, -484336837U, -484137497U, -483939971U, -483737039U, -483537449U, -483337639U, -483138653U, -482938283U, -482739253U, -482538299U, -482338403U, -482138263U, -481938917U, -481736617U, -481536409U, -481337513U, -481137857U, -480937759U, -480739001U, -480537581U, -480336917U, -480136567U, -479938223U, -479737619U, -479539097U, -479339183U, -479141059U, -478942067U, -478741559U, -478542703U, -478340857U, -478142449U, -477944321U, -477743977U, -477546011U, -477347399U, -477147521U, -476947259U, -476747641U, -476548901U, -476348827U, -476150273U, -475948013U, -475750589U, -475551379U, -475352797U, -475150409U, -474949693U, -474751171U, -474549793U, -474348517U, -474147491U, -473949131U, -473748619U, -473548253U, -473348831U, -473147219U, -472948547U, -472747463U, -472547989U, -472347287U, -472145659U, -471945917U, -471748649U, -471548069U, -471348961U, -471149207U, -470950153U, -470748791U, -470549347U, -470351477U, -470150717U, -469952341U, -469751767U, -469551091U, -469352539U, -469151213U, -468950203U, -468751051U, -468552247U, -468353461U, -468152129U, -467952377U, -467754227U, -467555227U, -467355353U, -467156101U, -466955911U, -466757003U, -466556239U, -466357963U, -466158311U, -465959267U, -465760007U, -465561557U, -465360937U, -465161383U, -464962279U, -464762321U, -464563501U, -464362757U, -464163571U, -463962397U, -463764967U, -463564469U, -463364893U, -463166261U, -462966761U, -462766189U, -462569413U, -462372247U, -462170981U, -461971409U, -461772973U, -461573053U, -461372407U, -461172953U, -460973837U, -460773757U, -460575421U, -460375787U, -460175531U, -459975463U, -459775529U, -459576269U, -459375529U, -459176827U, -458978837U, -458778251U, -458579623U, -458378449U, -458179201U, -457980247U, -457780087U, -457579873U, -457380149U, -457179883U, -456978043U, -456778277U, -456580403U, -456382621U, -456183779U, -455983999U, -455784811U, -455587133U, -455387473U, -455190709U, -454989583U, -454790839U, -454592141U, -454393207U, -454192829U, -453991639U, -453792349U, -453594863U, -453395477U, -453195317U, -452997271U, -452797781U, -452598371U, -452398861U, -452198111U, -451999063U, -451798381U, -451599991U, -451401329U, -451203043U, -451003369U, -450804311U, -450605033U, -450406111U, -450207323U, -450005779U, -449805127U, -449607377U, -449408263U, -449210183U, -449009257U, -448811263U, -448610651U, -448410961U, -448211779U, -448012727U, -447814069U, -447614969U, -447417629U, -447219607U, -447018653U, -446819507U, -446619211U, -446420999U, -446222983U, -446025029U, -445823501U, -445625413U, -445426213U, -445225961U, -445026437U, -444825617U, -444626759U, -444429047U, -444229369U, -444030101U, -443829811U, -443630137U, -443431517U, -443232901U, -443033827U, -442834741U, -442637519U, -442437967U, -442240273U, -442041881U, -441842741U, -441643283U, -441444281U, -441245989U, -441046421U, -440848217U, -440650913U, -440452801U, -440253907U, -440054633U, -439853749U, -439654013U, -439457189U, -439257359U, -439056533U, -438858703U, -438659831U, -438462467U, -438263159U, -438064609U, -437865427U, -437666947U, -437466863U, -437268773U, -437068847U, -436868449U, -436670497U, -436471037U, -436273589U, -436074449U, -435875689U, -435675841U, -435478531U, -435278447U, -435078181U, -434878967U, -434679697U, -434481449U, -434283781U, -434085941U, -433886129U, -433689709U, -433489633U, -433289327U, -433091431U, -432890333U, -432691601U, -432492787U, -432294497U, -432094483U, -431894923U, -431696873U, -431497559U, -431296277U, -431098417U, -430900109U, -430702603U, -430503809U, -430302787U, -430105099U, -429906679U, -429707029U, -429509417U, -429310421U, -429109423U, -428910857U, -428711483U, -428511703U, -428314927U, -428117311U, -427918651U, -427719401U, -427521481U, -427322989U, -427123111U, -426925133U, -426724349U, -426525871U, -426326893U, -426127813U, -425928799U, -425728997U, -425533403U, -425334583U, -425135617U, -424936537U, -424737011U, -424541581U, -424343551U, -424146511U, -423946121U, -423748387U, -423548303U, -423351671U, -423152069U, -422954933U, -422755831U, -422557453U, -422359213U, -422158339U, -421960291U, -421763827U, -421563733U, -421366151U, -421167689U, -420969389U, -420769309U, -420572881U, -420375001U, -420176611U, -419976331U, -419776127U, -419578361U, -419379509U, -419179603U, -418979641U, -418780897U, -418582277U, -418383109U, -418183849U, -417986473U, -417785383U, -417587249U, -417388949U, -417191617U, -416992963U, -416794331U, -416597381U, -416398579U, -416200951U, -416001809U, -415803473U, -415603697U, -415405307U, -415207843U, -415009589U, -414810257U, -414610699U, -414413353U, -414215677U, -414018053U, -413818421U, -413621567U, -413423687U, -413225717U, -413026183U, -412828747U, -412631039U, -412431941U, -412232773U, -412034221U, -411835729U, -411636413U, -411439513U, -411240233U, -411042397U, -410843287U, -410646013U, -410449189U, -410249803U, -410050819U, -409853333U, -409656281U, -409458463U, -409258793U, -409058711U, -408860971U, -408664187U, -408464179U, -408266189U, -408065837U, -407867311U, -407669081U, -407471927U, -407271439U, -407073881U, -406877249U, -406679659U, -406479001U, -406280117U, -406082849U, -405884041U, -405687781U, -405490279U, -405291479U, -405093827U, -404895737U, -404697413U, -404499299U, -404301481U, -404102047U, -403904159U, -403705843U, -403507213U, -403310881U, -403112621U, -402915971U, -402715903U, -402517751U, -402320783U, -402121381U, -401923957U, -401724599U, -401528717U, -401332213U, -401131697U, -400931189U, -400733779U, -400535969U, -400336843U, -400139683U, -399941057U, -399744157U, -399547763U, -399350779U, -399152113U, -398954053U, -398755499U, -398555467U, -398357359U, -398159819U, -397961419U, -397764043U, -397567669U, -397369877U, -397171807U, -396973267U, -396774629U, -396577301U, -396379943U, -396181067U, -395980789U, -395781667U, -395584159U, -395385007U, -395188181U, -394990331U, -394794503U, -394596827U, -394396969U, -394198813U, -394002709U, -393804911U, -393606827U, -393408269U, -393210053U, -393009401U, -392811593U, -392612743U, -392415109U, -392218621U, -392022847U, -391824457U, -391626553U, -391429637U, -391231889U, -391033793U, -390835553U, -390637921U, -390441223U, -390241699U, -390042449U, -389843183U, -389645681U, -389447621U, -389248823U, -389052439U, -388855781U, -388656199U, -388459307U, -388259567U, -388061561U, -387864629U, -387667837U, -387469879U, -387272381U, -387076399U, -386878507U, -386682287U, -386482841U, -386284729U, -386088091U, -385888673U, -385690637U, -385492399U, -385295177U, -385097183U, -384897481U, -384702599U, -384503279U, -384303877U, -384105457U, -383910119U, -383710697U, -383513033U, -383314843U, -383118283U, -382920323U, -382722091U, -382526117U, -382327081U, -382131317U, -381932543U, -381733871U, -381536263U, -381339001U, -381141713U, -380943287U, -380745119U, -380549473U, -380353643U, -380155829U, -379959787U, -379761233U, -379564693U, -379368433U, -379169093U, -378972059U, -378774973U, -378576661U, -378379069U, -378181577U, -377986579U, -377790331U, -377593961U, -377396317U, -377199353U, -377001491U, -376804807U, -376607597U, -376412041U, -376214897U, -376016687U, -375818951U, -375622451U, -375423943U, -375226717U, -375030277U, -374835067U, -374637187U, -374441663U, -374245843U, -374049421U, -373850149U, -373652611U, -373455721U, -373259041U, -373061153U, -372865313U, -372666439U, -372467983U, -372269861U, -372073027U, -371875487U, -371679949U, -371481403U, -371284019U, -371087051U, -370890119U, -370690913U, -370493017U, -370294313U, -370097443U, -369899443U, -369703973U, -369505193U, -369307739U, -369109889U, -368911969U, -368714663U, -368517571U, -368320279U, -368120243U, -367923209U, -367726043U, -367529347U, -367332887U, -367135781U, -366938617U, -366741209U, -366543559U, -366347753U, -366149503U, -365955307U, -365756527U, -365558581U, -365363857U, -365166587U, -364970513U, -364773737U, -364575859U, -364377521U, -364179511U, -363983131U, -363785197U, -363588817U, -363390553U, -363195181U, -362999201U, -362803139U, -362604239U, -362406371U, -362210389U, -362014487U, -361815557U, -361619017U, -361423003U, -361226137U, -361028461U, -360832673U, -360635521U, -360439447U, -360240187U, -360040679U, -359842253U, -359645311U, -359447687U, -359249707U, -359052313U, -358858273U, -358661063U, -358463939U, -358266409U, -358068593U, -357872413U, -357675007U, -357478169U, -357280499U, -357083897U, -356885869U, -356688811U, -356492189U, -356295151U, -356098751U, -355901947U, -355704463U, -355507771U, -355309891U, -355114247U, -354917833U, -354720913U, -354523361U, -354326381U, -354130529U, -353933969U, -353737781U, -353539999U, -353342723U, -353145461U, -352948801U, -352753501U, -352555993U, -352360607U, -352163509U, -351967027U, -351769367U, -351572531U, -351374641U, -351177149U, -350980813U, -350785063U, -350585953U, -350388953U, -350192669U, -349996081U, -349801069U, -349605001U, -349408399U, -349212121U, -349017743U, -348820009U, -348624013U, -348426301U, -348229087U, -348031709U, -347834699U, -347637391U, -347439167U, -347242471U, -347044981U, -346849813U, -346652567U, -346454621U, -346257913U, -346061753U, -345865753U, -345669557U, -345473837U, -345275929U, -345078781U, -344882101U, -344684033U, -344488973U, -344292059U, -344097217U, -343898977U, -343703963U, -343508807U, -343311377U, -343115831U, -342919721U, -342722383U, -342523879U, -342328037U, -342131789U, -341935313U, -341738809U, -341541943U, -341347519U, -341150387U, -340953829U, -340757311U, -340561127U, -340364267U, -340168667U, -339974029U, -339778027U, -339582403U, -339384623U, -339187153U, -338991377U, -338796769U, -338599637U, -338403323U, -338206987U, -338010899U, -337813561U, -337615627U, -337419529U, -337223017U, -337028317U, -336830243U, -336634169U, -336437867U, -336240617U, -336046489U, -335848273U, -335650519U, -335451937U, -335257631U, -335061379U, -334866143U, -334671119U, -334475023U, -334278407U, -334081999U, -333885493U, -333689641U, -333493817U, -333295159U, -333099301U, -332902267U, -332708333U, -332513537U, -332317099U, -332121589U, -331923899U, -331726243U, -331530721U, -331334567U, -331139597U, -330943961U, -330746777U, -330549281U, -330353497U, -330155801U, -329958217U, -329761063U, -329565997U, -329372503U, -329175647U, -328979237U, -328784177U, -328586053U, -328389337U, -328193059U, -327995519U, -327800741U, -327605669U, -327410011U, -327213077U, -327017179U, -326821853U, -326623663U, -326428433U, -326231999U, -326037541U, -325842991U, -325645601U, -325448521U, -325253213U, -325057771U, -324862957U, -324666421U, -324471799U, -324273199U, -324076547U, -323881451U, -323686007U, -323491559U, -323294771U, -323098057U, -322903201U, -322706641U, -322510327U, -322315337U, -322119839U, -321923383U, -321727409U, -321530717U, -321333583U, -321137129U, -320941081U, -320744891U, -320551463U, -320355521U, -320159297U, -319962779U, -319766467U, -319571167U, -319375031U, -319180403U, -318982711U, -318785903U, -318589429U, -318393197U, -318196201U, -318000107U, -317805539U, -317609239U, -317414249U, -317218159U, -317021557U, -316825007U, -316630189U, -316434571U, -316240933U, -316042729U, -315846803U, -315650969U, -315456887U, -315260969U, -315064801U, -314867783U, -314671963U, -314475647U, -314281483U, -314084747U, -313889507U, -313693873U, -313499171U, -313301939U, -313106369U, -312911791U, -312714757U, -312520513U, -312326171U, -312130883U, -311935249U, -311740393U, -311544097U, -311348537U, -311150603U, -310954757U, -310760423U, -310565063U, -310367201U, -310172567U, -309976889U, -309780833U, -309585277U, -309390391U, -309194843U, -308999861U, -308803367U, -308608061U, -308414591U, -308219759U, -308025181U, -307831889U, -307635407U, -307438961U, -307243633U, -307049789U, -306853601U, -306659321U, -306462509U, -306268327U, -306071489U, -305877857U, -305682331U, -305488069U, -305293357U, -305095501U, -304900741U, -304706543U, -304511563U, -304317733U, -304123049U, -303926687U, -303730639U, -303533579U, -303337841U, -303142717U, -302947639U, -302751403U, -302556227U, -302360789U, -302164789U, -301969669U, -301774477U, -301578371U, -301384009U, -301189789U, -300993977U, -300799193U, -300604537U, -300409147U, -300214097U, -300018991U, -299824153U, -299630267U, -299435627U, -299240393U, -299045213U, -298849277U, -298652239U, -298456597U, -298263409U, -298066163U, -297872719U, -297677909U, -297481843U, -297285559U, -297091783U, -296897011U, -296700601U, -296505931U, -296311601U, -296116567U, -295921999U, -295726633U, -295531559U, -295336793U, -295140841U, -294942679U, -294748271U, -294553247U, -294359101U, -294165023U, -293968579U, -293776391U, -293581697U, -293386861U, -293190439U, -292996973U, -292800799U, -292605169U, -292409519U, -292215767U, -292021063U, -291827639U, -291633949U, -291437387U, -291242587U, -291048767U, -290854877U, -290661247U, -290463907U, -290269211U, -290071961U, -289876151U, -289683391U, -289489001U, -289295263U, -289099033U, -288904207U, -288709153U, -288515441U, -288322451U, -288125489U, -287931167U, -287736619U, -287540761U, -287346179U, -287151391U, -286959503U, -286764607U, -286568573U, -286374031U, -286178987U, -285983519U, -285789107U, -285594181U, -285399307U, -285205703U, -285008237U, -284812981U, -284618359U, -284422013U, -284227513U, -284032559U, -283836739U, -283642439U, -283449623U, -283255697U, -283058701U, -282864317U, -282669041U, -282475181U, -282280811U, -282085339U, -281889917U, -281695201U, -281500633U, -281306489U, -281113423U, -280918579U, -280723097U, -280528693U, -280334149U, -280141241U, -279946393U, -279751027U, -279560293U, -279365003U, -279170747U, -278975017U, -278780989U, -278585389U, -278389271U, -278195611U, -278001011U, -277805389U, -277611193U, -277419089U, -277225111U, -277029673U, -276835171U, -276644429U, -276448457U, -276252617U, -276058423U, -275863681U, -275669291U, -275475751U, -275281729U, -275088881U, -274894013U, -274697779U, -274504193U, -274310441U, -274117891U, -273924907U, -273730747U, -273535697U, -273342491U, -273147961U, -272953697U, -272758777U, -272564821U, -272371163U, -272178229U, -271982563U, -271787753U, -271595333U, -271400323U, -271206511U, -271009061U, -270814079U, -270619381U, -270427243U, -270232243U, -270036869U, -269844067U, -269647501U, -269451593U, -269257223U, -269063869U, -268870291U, -268676921U, -268483349U, -268290353U, -268094273U, -267900641U, -267707107U, -267513931U, -267318967U, -267123811U, -266929331U, -266735921U, -266541529U, -266344789U, -266149801U, -265955761U, -265762681U, -265568717U, -265376333U, -265184369U, -264990793U, -264798371U, -264604061U, -264408223U, -264215219U, -264021649U, -263825923U, -263631391U, -263435899U, -263239267U, -263046703U, -262852531U, -262658387U, -262464793U, -262271809U, -262080089U, -261886379U, -261692357U, -261498031U, -261306077U, -261112427U, -260918267U, -260725741U, -260532791U, -260338409U, -260144699U, -259950673U, -259756537U, -259560409U, -259367083U, -259174913U, -258980681U, -258786469U, -258593123U, -258399347U, -258205139U, -258011459U, -257818237U, -257623973U, -257431091U, -257237641U, -257044279U, -256853161U, -256658621U, -256462571U, -256266811U, -256073957U, -255879553U, -255687011U, -255493417U, -255301757U, -255107311U, -254913271U, -254719727U, -254527073U, -254334673U, -254141203U, -253946449U, -253754503U, -253559893U, -253366097U, -253173623U, -252979483U, -252786907U, -252591419U, -252398903U, -252204389U, -252012149U, -251819627U, -251622391U, -251429363U, -251237071U, -251043629U, -250851683U, -250658201U, -250465169U, -250271443U, -250077787U, -249883757U, -249690719U, -249497777U, -249303823U, -249110591U, -248917909U, -248722577U, -248531111U, -248338187U, -248146201U, -247953331U, -247759651U, -247565719U, -247371941U, -247179193U, -246985139U, -246791761U, -246598217U, -246406241U, -246212237U, -246018317U, -245824157U, -245630933U, -245437499U, -245244113U, -245050829U, -244859389U, -244669351U, -244476997U, -244284641U, -244092203U, -243896459U, -243703637U, -243509891U, -243316207U, -243123827U, -242930803U, -242737823U, -242542541U, -242349871U, -242155003U, -241962229U, -241768279U, -241573951U, -241381463U, -241187647U, -240994267U, -240802189U, -240609661U, -240417691U, -240225439U, -240033793U, -239840473U, -239647459U, -239455163U, -239262083U, -239068651U, -238874029U, -238681423U, -238488847U, -238295927U, -238103737U, -237912613U, -237719497U, -237528143U, -237335599U, -237142793U, -236950423U, -236759689U, -236566277U, -236372723U, -236180239U, -235988591U, -235796063U, -235601153U, -235409131U, -235218167U, -235025429U, -234833069U, -234642053U, -234449203U, -234255401U, -234063703U, -233870243U, -233675419U, -233483567U, -233289703U, -233095871U, -232901521U, -232711207U, -232517699U, -232323913U, -232130593U, -231937631U, -231744913U, -231553181U, -231360061U, -231167999U, -230975573U, -230782369U, -230591323U, -230400697U, -230206813U, -230014139U, -229822447U, -229631383U, -229437889U, -229244651U, -229050709U, -228859753U, -228667319U, -228474931U, -228283373U, -228091951U, -227898883U, -227705561U, -227510263U, -227318057U, -227125973U, -226933331U, -226741129U, -226549201U, -226356973U, -226164139U, -225972629U, -225781723U, -225588239U, -225395087U, -225201127U, -225008657U, -224817499U, -224623351U, -224430487U, -224238809U, -224047783U, -223854737U, -223660903U, -223470251U, -223278821U, -223088597U, -222898021U, -222703603U, -222513397U, -222320779U, -222128581U, -221936789U, -221745649U, -221553767U, -221359997U, -221169271U, -220977649U, -220785023U, -220592791U, -220400603U, -220207301U, -220014643U, -219822851U, -219630181U, -219437957U, -219245029U, -219053453U, -218861609U, -218669813U, -218477293U, -218283259U, -218092937U, -217902037U, -217708723U, -217515989U, -217323787U, -217133011U, -216939881U, -216748201U, -216554441U, -216362941U, -216171331U, -215979851U, -215787829U, -215595199U, -215402939U, -215211307U, -215019767U, -214829773U, -214638997U, -214447763U, -214255211U, -214063807U, -213871681U, -213679183U, -213484949U, -213293911U, -213101849U, -212911249U, -212719163U, -212526101U, -212335061U, -212143537U, -211951819U, -211758037U, -211566871U, -211375777U, -211184881U, -210993641U, -210801817U, -210609337U, -210416527U, -210224867U, -210032651U, -209840663U, -209650703U, -209460331U, -209269979U, -209078249U, -208885571U, -208694699U, -208503187U, -208309727U, -208118389U, -207925591U, -207734029U, -207542903U, -207352543U, -207161509U, -206968849U, -206778353U, -206587259U, -206395493U, -206205443U, -206012971U, -205821611U, -205629667U, -205438339U, -205246957U, -205056107U, -204863557U, -204673607U, -204481997U, -204291247U, -204098737U, -203907721U, -203717797U, -203524921U, -203334251U, -203142649U, -202952569U, -202762199U, -202569253U, -202376893U, -202185367U, -201993299U, -201804233U, -201612913U, -201420629U, -201230069U, -201038863U, -200847253U, -200655667U, -200466187U, -200271727U, -200082481U, -199893791U, -199701701U, -199509859U, -199319431U, -199128547U, -198937253U, -198745559U, -198554557U, -198365039U, -198174583U, -197981587U, -197790517U, -197598103U, -197405587U, -197214601U, -197022479U, -196832221U, -196641343U, -196450417U, -196258003U, -196065559U, -195875749U, -195684091U, -195493957U, -195301861U, -195110033U, -194920021U, -194730253U, -194538937U, -194348221U, -194157839U, -193967047U, -193777123U, -193586951U, -193397299U, -193205863U, -193014079U, -192823493U, -192634577U, -192444121U, -192253307U, -192063899U, -191872073U, -191680613U, -191488183U, -191296309U, -191105209U, -190913759U, -190722271U, -190531303U, -190340209U, -190148869U, -189959467U, -189768749U, -189578791U, -189386867U, -189195871U, -189006953U, -188817067U, -188626177U, -188434369U, -188243597U, -188051989U, -187862693U, -187672487U, -187479947U, -187290289U, -187101599U, -186909721U, -186718979U, -186529927U, -186340093U, -186149101U, -185957879U, -185767973U, -185576759U, -185386519U, -185196007U, -185006201U, -184815809U, -184626997U, -184437511U, -184248707U, -184057999U, -183868519U, -183677189U, -183489073U, -183299393U, -183108421U, -182919001U, -182726549U, -182535739U, -182343781U, -182154179U, -181962689U, -181771903U, -181582549U, -181390861U, -181200457U, -181010399U, -180818789U, -180628141U, -180437107U, -180246329U, -180056753U, -179865403U, -179677123U, -179488103U, -179298667U, -179108591U, -178917853U, -178729183U, -178538917U, -178348147U, -178156337U, -177967877U, -177779429U, -177589199U, -177399011U, -177208567U, -177020047U, -176829997U, -176641147U, -176450971U, -176261209U, -176070889U, -175881457U, -175690829U, -175501171U, -175312391U, -175124483U, -174934229U, -174744569U, -174553387U, -174362887U, -174173123U, -173984141U, -173793853U, -173603611U, -173414587U, -173225827U, -173036407U, -172846613U, -172655837U, -172466647U, -172276381U, -172087627U, -171897619U, -171708997U, -171518131U, -171328837U, -171140153U, -170951563U, -170762941U, -170571809U, -170381957U, -170191919U, -170004691U, -169814977U, -169624019U, -169434773U, -169248449U, -169058089U, -168869417U, -168679261U, -168490577U, -168301619U, -168112519U, -167921771U, -167733523U, -167543461U, -167355193U, -167165281U, -166977197U, -166787039U, -166597537U, -166409207U, -166221217U, -166031297U, -165842861U, -165653129U, -165462509U, -165272743U, -165083201U, -164893327U, -164702893U, -164514887U, -164325341U, -164135749U, -163945493U, -163758097U, -163569001U, -163380533U, -163193077U, -163003367U, -162815113U, -162625381U, -162435659U, -162247079U, -162058889U, -161868769U, -161679187U, -161490583U, -161299297U, -161109331U, -160920703U, -160733017U, -160544453U, -160355989U, -160166753U, -159978367U, -159790819U, -159601727U, -159412639U, -159223517U, -159034937U, -158847659U, -158657761U, -158466983U, -158277827U, -158087929U, -157899923U, -157711129U, -157521739U, -157333247U, -157144913U, -156955559U, -156766583U, -156578579U, -156389789U, -156200969U, -156012877U, -155824663U, -155635999U, -155449181U, -155259329U, -155071097U, -154882151U, -154692103U, -154504913U, -154316737U, -154127989U, -153937877U, -153750617U, -153563087U, -153374737U, -153184901U, -152998253U, -152808611U, -152622137U, -152433731U, -152244559U, -152054831U, -151864819U, -151676659U, -151488713U, -151299593U, -151112447U, -150922319U, -150734347U, -150543803U, -150355943U, -150167639U, -149979413U, -149790647U, -149602613U, -149414519U, -149226059U, -149036633U, -148848053U, -148660459U, -148473037U, -148284233U, -148095697U, -147908051U, -147719849U, -147530927U, -147342497U, -147154583U, -146967131U, -146779973U, -146592161U, -146404283U, -146215987U, -146028829U, -145840997U, -145653953U, -145465849U, -145277879U, -145088759U, -144900647U, -144710743U, -144522883U, -144335641U, -144148133U, -143960009U, -143772731U, -143584663U, -143397817U, -143211583U, -143023403U, -142836769U, -142649069U, -142460501U, -142273903U, -142086817U, -141901079U, -141713353U, -141526009U, -141337631U, -141150731U, -140963029U, -140773079U, -140585771U, -140397097U, -140208613U, -140020883U, -139833637U, -139647301U, -139459559U, -139273223U, -139084727U, -138896581U, -138710941U, -138523223U, -138335569U, -138146971U, -137958407U, -137770219U, -137581757U, -137396477U, -137209543U, -137020991U, -136832713U, -136645373U, -136459727U, -136273777U, -136085947U, -135898517U, -135710527U, -135521381U, -135334181U, -135146093U, -134959613U, -134773459U, -134586799U, -134399621U, -134213483U, -134026553U, -133838149U, -133651027U, -133462151U, -133276543U, -133087957U, -132901367U, -132714497U, -132526507U, -132339761U, -132152729U, -131965111U, -131777039U, -131591081U, -131403011U, -131217089U, -131030267U, -130844327U, -130658131U, -130471373U, -130284131U, -130096721U, -129908039U, -129720413U, -129533941U, -129348269U, -129161959U, -128974297U, -128787667U, -128603047U, -128417117U, -128229061U, -128042461U, -127856539U, -127670819U, -127482731U, -127296359U, -127108343U, -126923837U, -126736237U, -126549919U, -126363241U, -126176537U, -125990521U, -125804839U, -125619577U, -125431459U, -125245501U, -125059483U, -124873351U, -124686977U, -124499801U, -124313051U, -124128931U, -123941581U, -123756023U, -123570427U, -123384229U, -123198661U, -123012431U, -122825713U, -122640377U, -122453621U, -122265487U, -122079197U, -121893817U, -121707613U, -121521013U, -121334561U, -121148387U, -120964253U, -120777233U, -120590153U, -120403117U, -120216113U, -120030817U, -119846431U, -119659843U, -119473723U, -119288087U, -119101837U, -118913621U, -118726159U, -118540469U, -118355789U, -118168691U, -117983309U, -117797447U, -117610693U, -117426377U, -117239467U, -117053617U, -116868613U, -116680763U, -116495963U, -116310731U, -116124461U, -115940059U, -115755071U, -115570151U, -115383889U, -115197619U, -115012217U, -114826507U, -114639611U, -114453901U, -114268459U, -114083461U, -113896997U, -113710601U, -113523551U, -113337607U, -113151163U, -112968187U, -112781413U, -112597567U, -112410863U, -112224869U, -112041313U, -111856057U, -111671939U, -111485417U, -111300359U, -111113659U, -110927723U, -110742817U, -110558197U, -110373097U, -110185429U, -110000207U, -109816123U, -109631227U, -109445953U, -109261027U, -109076729U, -108891301U, -108706319U, -108520781U, -108338011U, -108154273U, -107969483U, -107783167U, -107599229U, -107414033U, -107229569U, -107045951U, -106860881U, -106674979U, -106491023U, -106305917U, -106121371U, -105936421U, -105751201U, -105566597U, -105380491U, -105195661U, -105011527U, -104826877U, -104640791U, -104456647U, -104271161U, -104088581U, -103905899U, -103720889U, -103535363U, -103351607U, -103166803U, -102982193U, -102797509U, -102611801U, -102428533U, -102245177U, -102061153U, -101878417U, -101693441U, -101508191U, -101324557U, -101140019U, -100957291U, -100772813U, -100587523U, -100402817U, -100217561U, -100034317U, -99851249U, -99665549U, -99482633U, -99298943U, -99112829U, -98929081U, -98743261U, -98558099U, -98374879U, -98191759U, -98006033U, -97821839U, -97638559U, -97456841U, -97272631U, -97087433U, -96904513U, -96719809U, -96537893U, -96353401U, -96168011U, -95983787U, -95801747U, -95616853U, -95433263U, -95249807U, -95066039U, -94883111U, -94700833U, -94516717U, -94333933U, -94149721U, -93966659U, -93784181U, -93599687U, -93415661U, -93232427U, -93049301U, -92863711U, -92681111U, -92497303U, -92313943U, -92129753U, -91947211U, -91761893U, -91580219U, -91395749U, -91213127U, -91030321U, -90846887U, -90664879U, -90480161U, -90297667U, -90115583U, -89933297U, -89749379U, -89564353U, -89380243U, -89196911U, -89014231U, -88831753U, -88648711U, -88464433U, -88281301U, -88099309U, -87918041U, -87735311U, -87551473U, -87368143U, -87185521U, -87002527U, -86819059U, -86635727U, -86454139U, -86271967U, -86087539U, -85905473U, -85723789U, -85539823U, -85358417U, -85175957U, -84992489U, -84809147U, -84626603U, -84444043U, -84260999U, -84077507U, -83895419U, -83714789U, -83531321U, -83348579U, -83165221U, -82982057U, -82800373U, -82619401U, -82436671U, -82253887U, -82070687U, -81889261U, -81706409U, -81524419U, -81342557U, -81159839U, -80980007U, -80798779U, -80617753U, -80435371U, -80253763U, -80072779U, -79888511U, -79706771U, -79525021U, -79343701U, -79161149U, -78979279U, -78796441U, -78615211U, -78433877U, -78250223U, -78068383U, -77887133U, -77705807U, -77523223U, -77341399U, -77159333U, -76977959U, -76797257U, -76614667U, -76431583U, -76249919U, -76067633U, -75886747U, -75706193U, -75523937U, -75343739U, -75163607U, -74982307U, -74800723U, -74619133U, -74438183U, -74256739U, -74075017U, -73892317U, -73710739U, -73531123U, -73349173U, -73168181U, -72986443U, -72806519U, -72624863U, -72443671U, -72262847U, -72083749U, -71902819U, -71721367U, -71540317U, -71360867U, -71180273U, -70999073U, -70818323U, -70636019U, -70455323U, -70275589U, -70095271U, -69913423U, -69732599U, -69552737U, -69373621U, -69192857U, -69011251U, -68831857U, -68650541U, -68469409U, -68288557U, -68108351U, -67927511U, -67746827U, -67567627U, -67387867U, -67208347U, -67028069U, -66848311U, -66666751U, -66487507U, -66307727U, -66128837U, -65950439U, -65770451U, -65589409U, -65410649U, -65230259U, -65049041U, -64870343U, -64688747U, -64507787U, -64327903U, -64147561U, -63968063U, -63789757U, -63610199U, -63430931U, -63251467U, -63071809U, -62892839U, -62713073U, -62532517U, -62352571U, -62173597U, -61994887U, -61815977U, -61636231U, -61456183U, -61275419U, -61094951U, -60915853U, -60737837U, -60559241U, -60379751U, -60201523U, -60021539U, -59841973U, -59663497U, -59484767U, -59305187U, -59125333U, -58945219U, -58767607U, -58589033U, -58410523U, -58231967U, -58052879U, -57873817U, -57694499U, -57514829U, -57335981U, -57158411U, -56980423U, -56800753U, -56624527U, -56446043U, -56266219U, -56088649U, -55910791U, -55732351U, -55555231U, -55376369U, -55197721U, -55019897U, -54841331U, -54662059U, -54485107U, -54306403U, -54126781U, -53949167U, -53770853U, -53593171U, -53413639U, -53235829U, -53058007U, -52880033U, -52702613U, -52525171U, -52347107U, -52168973U, -51990767U, -51813187U, -51636499U, -51458861U, -51281453U, -51104257U, -50925361U, -50748149U, -50570687U, -50394067U, -50216953U, -50039263U, -49861883U, -49684643U, -49508111U, -49332421U, -49155797U, -48978451U, -48802009U, -48623479U, -48446927U, -48269713U, -48092383U, -47913799U, -47737211U, -47559517U, -47382877U, -47205551U, -47028899U, -46852483U, -46675831U, -46499939U, -46323493U, -46146389U, -45969251U, -45792757U, -45616187U, -45441163U, -45266317U, -45089893U, -44914523U, -44738009U, -44563219U, -44387113U, -44210707U, -44034449U, -43858921U, -43682351U, -43505453U, -43330681U, -43154911U, -42978773U, -42801313U, -42625673U, -42449963U, -42274433U, -42100169U, -41923451U, -41748299U, -41572033U, -41396093U, -41219881U, -41044891U, -40868299U, -40695289U, -40518707U, -40343419U, -40168781U, -39994211U, -39817907U, -39642653U, -39468991U, -39294637U, -39120883U, -38945273U, -38772131U, -38597917U, -38422801U, -38249219U, -38075273U, -37901167U, -37725713U, -37551001U, -37377479U, -37201921U, -37029367U, -36854551U, -36679801U, -36505093U, -36330773U, -36157423U, -35984339U, -35809141U, -35635627U, -35461177U, -35287939U, -35114207U, -34939903U, -34767391U, -34591933U, -34418939U, -34244071U, -34069129U, -33893689U, -33721511U, -33548077U, -33374401U, -33202313U, -33028577U, -32856277U, -32682743U, -32509907U, -32337311U, -32163991U, -31991731U, -31819127U, -31646471U, -31473479U, -31300459U, -31127519U, -30953453U, -30781319U, -30609311U, -30437177U, -30265159U, -30092813U, -29922733U, -29750759U, -29579519U, -29406439U, -29235953U, -29062879U, -28890787U, -28718537U, -28546591U, -28374859U, -28204291U, -28031611U, -27861667U, -27689833U, -27518653U, -27347557U, -27174779U, -27004343U, -26834293U, -26662327U, -26491921U, -26321989U, -26150171U, -25979521U, -25809083U, -25638607U, -25468039U, -25298069U, -25124909U, -24955681U, -24783713U, -24614839U, -24444313U, -24274847U, -24105251U, -23935453U, -23765431U, -23595163U, -23425559U, -23256053U, -23085833U, -22916461U, -22747187U, -22578419U, -22409393U, -22239713U, -22068143U, -21900377U, -21731779U, -21563219U, -21394229U, -21226157U, -21056153U, -20887649U, -20718781U, -20551697U, -20382253U, -20213983U, -20045197U, -19878041U, -19710289U, -19541903U, -19374079U, -19206023U, -19038311U, -18870161U, -18703387U, -18536303U, -18368221U, -18201941U, -18033391U, -17866619U, -17699107U, -17532169U, -17366749U, -17201039U, -17032781U, -16867867U, -16702099U, -16535639U, -16369853U, -16203367U, -16036523U, -15870383U, -15705071U, -15539987U, -15374041U, -15208997U, -15042919U, -14876951U, -14712427U, -14547283U, -14382007U, -14218571U, -14053619U, -13887953U, -13724233U, -13560847U, -13395559U, -13231343U, -13067423U, -12902137U, -12738433U, -12575881U, -12411409U, -12249493U, -12086059U, -11923057U, -11760059U, -11597701U, -11435887U, -11272697U, -11109827U, -10947941U, -10786267U, -10624787U, -10463443U, -10302407U, -10140307U, -9979111U, -9817057U, -9655759U, -9495601U, -9334487U, -9174793U, -9014101U, -8853359U, -8693653U, -8534489U, -8375273U, -8215633U, -8056423U, -7896949U, -7738559U, -7580459U, -7421383U, -7263143U, -7104341U, -6947753U, -6791437U, -6633877U, -6477301U, -6319483U, -6163567U, -6007247U, -5851717U, -5695831U, -5539363U, -5383601U, -5229331U, -5074633U, -4920613U, -4766999U, -4613237U, -4459951U, -4307453U, -4154791U, -4002547U, -3849943U, -3698881U, -3548471U, -3396661U, -3246119U, -3097141U, -2948161U, -2799451U, -2650931U, -2503597U, -2356573U, -2209499U, -2063573U, -1918439U, -1774937U, -1630987U, -1488133U, -1346567U, -1205653U, -1066909U, -927853U, -791447U, -656683U, -523417U, -393073U, -266083U, -143687U -}; - + return std::uniform_real_distribution(min, max)(*(CpvAccess(_defaultStream))); +} diff --git a/src/libs/ck-libs/ParFUM/symmetries.C b/src/libs/ck-libs/ParFUM/symmetries.C index 06c6cf1cc5..45b25e06bf 100644 --- a/src/libs/ck-libs/ParFUM/symmetries.C +++ b/src/libs/ck-libs/ParFUM/symmetries.C @@ -458,7 +458,6 @@ FLINKAGE void FTN_NAME(FEM_SET_SYM_NODES,fem_set_sym_nodes) const int a2bPoints=aPoints; -static CrnStream rs; void print(const char *str) { printf("%s",str); @@ -470,7 +469,7 @@ void print(const CkVector3d &src,int digits=3) { //Return random number on [0,max] double randVal(double max) { - return max*CrnDouble(&rs); + return max*CrnDrand(); } CkVector3d randVec(const CkVector3d &scale) { return CkVector3d(randVal(scale.x),randVal(scale.y),randVal(scale.z)); @@ -537,7 +536,6 @@ void testUnion(int n,int *parent) { int main(int argc,char *argv[]) { CkPrintf("init called\n"); - CrnInitStream(&rs,0,0); int facesA[nFaces*nPer],facesB[nFaces*nPer]; const int nPoints=aPoints+bPoints; CkVector3d pts[nPoints]; diff --git a/tests/charm++/megatest/packtest.C b/tests/charm++/megatest/packtest.C index f9425a7d94..ddef7c9fb1 100644 --- a/tests/charm++/megatest/packtest.C +++ b/tests/charm++/megatest/packtest.C @@ -38,16 +38,6 @@ packtest_Msg * packtest_Msg::unpack(void *buf) packtest_Btest::packtest_Btest(void) { -/* - static CrnStream str; - static int flag = 0; - if (0 == flag) { - CrnInitStream(&str, (int)this, 0); - flag = 1; - } - // seed needs to be set only once -*/ - if(CkMyPe()==0) { packtest_Msg *msg = new packtest_Msg; From 691fdc252883dfa93af8569d60c2b6f1ae405906 Mon Sep 17 00:00:00 2001 From: Laxmikant Kale Date: Thu, 1 Jun 2023 23:18:27 -0500 Subject: [PATCH 084/155] added documentation for using steal queues (taskQ) --- doc/charm++/manual.rst | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/doc/charm++/manual.rst b/doc/charm++/manual.rst index b909bf3b0d..e33a536662 100644 --- a/doc/charm++/manual.rst +++ b/doc/charm++/manual.rst @@ -1,4 +1,4 @@ -======================================= +x1======================================= The Charm++ Parallel Programming System ======================================= @@ -8711,6 +8711,38 @@ computational power because those dedicated cores are not utilized at all during most of the application's execution time. This case indicates the necessity of a unified runtime supporting both types of parallelism. + +Tass with StealQ for within-node load balancing +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Converse, the underlying scheduling-and-communication system for Charm++, supports a steal queue as abuild time option, +which can be used to create tasks so that they can be executed by any PE within a logical node (i.e. a process), +in SMP mode. +To use this feature, you need an option --enable-task-queue while *building* Charm++ initially. +Tasks are fired with the call CsdTaskEnqueue(m) where m is a pointer to a Converse message, which is different +(and simpler and shorter) than a Charm++ message. It is simply a struct with an initial set of bytes +(CmiMsgHeaderSizeBytes bytes) reserved for system information. You must also write a handler that has the code +to execute the task and register with the system using CmiRegisterHandler called during system initialization. +(use *initcall* or *moduleinit* methods). Typically, it is also necessary to have a synchronization object that +can take action (such as a callback) when all the tasks +arising recursively from a set of fired objects, so you know when they are all done. + +An example program illustrating this feature is in pgms/tasksAndRing, which illustrates concurrent execution +of tasks with regular Charm++ messages. Another example that illustrates the utility of tasks +for within-node load balancing is in pgms/testTasks. + + +The task queue is Cilk-style (specifically the so called "THE") queue, which aims to minimize inter-PE interactions. +Each PE has its own task queue, annd the Converse scheduler polls this regularly. But only when the PE is completely +idle (no tasks and no other messages to process) does it steal tasks from other PE's queues. Efficiency of this method +requires that you try to divide the tasks recursively. (E.g. if you are processing a large array A[0:N], you may +want to fire tasks each responsible for range A[x:y] and each subdividing that range further (and enqueuing 2 tasks) +until some minimal tasks size is reached, when the handler will just do the work instead of firing subtasks. +This method is prefered to firing many +small subtasks at once, because it minimizes the number of steals, and therefore associated synchronization overheads. + + + CkLoop library ~~~~~~~~~~~~~~ From 29382d36107ed0865cb11febf43f3ff8d458af6c Mon Sep 17 00:00:00 2001 From: Laxmikant Kale Date: Wed, 7 Jun 2023 16:25:09 -0500 Subject: [PATCH 085/155] made edits in response to Sam's comments --- doc/charm++/manual.rst | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/doc/charm++/manual.rst b/doc/charm++/manual.rst index e33a536662..ca2c7f913a 100644 --- a/doc/charm++/manual.rst +++ b/doc/charm++/manual.rst @@ -1,4 +1,4 @@ -x1======================================= +======================================= The Charm++ Parallel Programming System ======================================= @@ -8712,37 +8712,40 @@ all during most of the application's execution time. This case indicates the necessity of a unified runtime supporting both types of parallelism. -Tass with StealQ for within-node load balancing +Stealable Tasks for within-node load balancing ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Converse, the underlying scheduling-and-communication system for Charm++, supports a steal queue as abuild time option, -which can be used to create tasks so that they can be executed by any PE within a logical node (i.e. a process), -in SMP mode. +Converse, the underlying scheduling-and-communication system for Charm++, supports a +*work-stealing task queue* (steal queue for bervity) as a build time option, +which can be used to create tasks so that +they can be executed by any PE +within a logical node (i.e. a process), in SMP mode. To use this feature, you need an option --enable-task-queue while *building* Charm++ initially. Tasks are fired with the call CsdTaskEnqueue(m) where m is a pointer to a Converse message, which is different (and simpler and shorter) than a Charm++ message. It is simply a struct with an initial set of bytes (CmiMsgHeaderSizeBytes bytes) reserved for system information. You must also write a handler that has the code to execute the task and register with the system using CmiRegisterHandler called during system initialization. -(use *initcall* or *moduleinit* methods). Typically, it is also necessary to have a synchronization object that +(use *initproc* or *moduleinit* methods). Typically, it is also necessary to have a synchronization object that can take action (such as a callback) when all the tasks arising recursively from a set of fired objects, so you know when they are all done. -An example program illustrating this feature is in pgms/tasksAndRing, which illustrates concurrent execution +An example program illustrating this feature is in https://github.com/UIUC-PPL/pgms/tasksAndRing, +which illustrates concurrent execution of tasks with regular Charm++ messages. Another example that illustrates the utility of tasks for within-node load balancing is in pgms/testTasks. -The task queue is Cilk-style (specifically the so called "THE") queue, which aims to minimize inter-PE interactions. -Each PE has its own task queue, annd the Converse scheduler polls this regularly. But only when the PE is completely -idle (no tasks and no other messages to process) does it steal tasks from other PE's queues. Efficiency of this method +The task queue implementation itself is a Cilk-style (specifically the so called "THE") steal queue, which aims to minimize inter-PE interactions. +Each PE has its own task queue, and the Converse scheduler polls its own queue regularly. But only when the PE is completely +idle (no tasks and no other messages to process) does it steal tasks from queues of other PE's within the same process. +This limits the overhead of checking other PE's queues. Efficiency of this method requires that you try to divide the tasks recursively. (E.g. if you are processing a large array A[0:N], you may want to fire tasks each responsible for range A[x:y] and each subdividing that range further (and enqueuing 2 tasks) until some minimal tasks size is reached, when the handler will just do the work instead of firing subtasks. -This method is prefered to firing many +This method is preferred to firing many small subtasks at once, because it minimizes the number of steals, and therefore associated synchronization overheads. - CkLoop library ~~~~~~~~~~~~~~ From c5500073fcc6cfda395f88efeeecb30fe4a2c639 Mon Sep 17 00:00:00 2001 From: Laxmikant Kale Date: Thu, 8 Jun 2023 11:16:05 -0500 Subject: [PATCH 086/155] fixed link --- doc/charm++/manual.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/charm++/manual.rst b/doc/charm++/manual.rst index ca2c7f913a..e78eaf4194 100644 --- a/doc/charm++/manual.rst +++ b/doc/charm++/manual.rst @@ -8729,7 +8729,8 @@ to execute the task and register with the system using CmiRegisterHandler called can take action (such as a callback) when all the tasks arising recursively from a set of fired objects, so you know when they are all done. -An example program illustrating this feature is in https://github.com/UIUC-PPL/pgms/tasksAndRing, +An example program illustrating this feature is in +https://github.com/UIUC-PPL/pgms/tree/main/charm%2B%2B/tasksWithRing, which illustrates concurrent execution of tasks with regular Charm++ messages. Another example that illustrates the utility of tasks for within-node load balancing is in pgms/testTasks. From a4cb22ac9eaf0dfeac9cb8e95ef75293e8c37417 Mon Sep 17 00:00:00 2001 From: Sam White Date: Wed, 10 May 2023 09:39:01 -0500 Subject: [PATCH 087/155] Converse: print at startup if build is using non-default features --- src/conv-core/convcore.C | 33 +++++++++++++++++++++++++-------- 1 file changed, 25 insertions(+), 8 deletions(-) diff --git a/src/conv-core/convcore.C b/src/conv-core/convcore.C index c62b19b96a..d1c63c4b36 100644 --- a/src/conv-core/convcore.C +++ b/src/conv-core/convcore.C @@ -2202,14 +2202,31 @@ void CsdInit(char **argv) CsvInitialize(CmiMemoryAtomicUInt, idleThreadsCnt); CsvAccess(idleThreadsCnt) = 0; #endif - #if CMK_USE_STL_MSGQ - if (CmiMyPe() == 0) CmiPrintf("Charm++> Using STL-based msgQ:\n"); - #endif - #if CMK_RANDOMIZED_MSGQ - if (CmiMyPe() == 0) CmiPrintf("Charm++> Using randomized msgQ. Priorities will not be respected!\n"); - #elif CMK_NO_MSG_PRIOS - if (CmiMyPe() == 0) CmiPrintf("Charm++> Message priorities have been turned off and will not be respected.\n"); - #endif + if (CmiMyPe() == 0) { + #if CMK_USE_STL_MSGQ + CmiPrintf("Charm++> Using STL-based msgQ.\n"); + #endif + #if CMK_RANDOMIZED_MSGQ + CmiPrintf("Charm++> Using randomized msgQ. Priorities will not be respected!\n"); + #elif CMK_NO_MSG_PRIOS + CmiPrintf("Charm++> Message priorities have been turned off and will not be respected.\n"); + #endif + #if CMK_FIFO_QUEUE_ONLY + CmiPrintf("Charm++> Non-FIFO message queueing support is disabled.\n"); + #endif + #if CMK_NO_INTEROP + CmiPrintf("Charm++> MPI-interop support is disabled.\n"); + #endif + #if CSD_NO_SCHEDLOOP + CmiPrintf("Charm++> CcdSCHEDLOOP conditional CcdCallback support is disabled.\n"); + #endif + #if CSD_NO_PERIODIC + CmiPrintf("Charm++> Periodic CcdCallback support is disabled.\n"); + #endif + #if CSD_NO_IDLE_TRACING + CmiPrintf("Charm++> Idle tracing support is disabled.\n"); + #endif + } #if CMK_OBJECT_QUEUE_AVAILABLE CpvInitialize(Queue, CsdObjQueue); From dcd3e70ea3531d8f23415a4d23efd6fa11c4c0c0 Mon Sep 17 00:00:00 2001 From: Sam White Date: Wed, 10 May 2023 10:25:13 -0500 Subject: [PATCH 088/155] Update Converse init print statements --- src/conv-core/convcore.C | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/conv-core/convcore.C b/src/conv-core/convcore.C index d1c63c4b36..c1b1a38100 100644 --- a/src/conv-core/convcore.C +++ b/src/conv-core/convcore.C @@ -2203,11 +2203,17 @@ void CsdInit(char **argv) CsvAccess(idleThreadsCnt) = 0; #endif if (CmiMyPe() == 0) { + #if CMK_SMP && CMK_LOCKLESS_QUEUE + CmiPrintf("Charm++> Using lockless concurrent queue.\n"); + #endif + #if CMK_SMP && CMK_TASKQUEUE + CmiPrintf("Charm++> Work stealing task queue support is enabled.\n"); + #endif #if CMK_USE_STL_MSGQ - CmiPrintf("Charm++> Using STL-based msgQ.\n"); + CmiPrintf("Charm++> Using STL-based message queue optimized for non-bitvec priority types.\n"); #endif #if CMK_RANDOMIZED_MSGQ - CmiPrintf("Charm++> Using randomized msgQ. Priorities will not be respected!\n"); + CmiPrintf("Charm++> Using randomized message queue. Priorities will not be respected!\n"); #elif CMK_NO_MSG_PRIOS CmiPrintf("Charm++> Message priorities have been turned off and will not be respected.\n"); #endif From 41d51a1006942229d9120435c90a52ddf6075dde Mon Sep 17 00:00:00 2001 From: Evan Ramos Date: Thu, 8 Jun 2023 21:45:21 -0500 Subject: [PATCH 089/155] tests/charm++/varTRAM: Fix inefficient uses of std::vector --- tests/charm++/varTRAM/vartest.C | 11 +++++------ tests/charm++/varTRAM/vartest.ci | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/tests/charm++/varTRAM/vartest.C b/tests/charm++/varTRAM/vartest.C index be8872bff8..9ae07ba28e 100644 --- a/tests/charm++/varTRAM/vartest.C +++ b/tests/charm++/varTRAM/vartest.C @@ -67,7 +67,8 @@ public: void simulate() { for (int j = 0;j != N-1;++j) { for (int k = 0;k != msgcount;++k) { - auto temp = rand(); + std::vector temp; + randvec(temp); thisProxy[(thisIndex+j+1)%N].ping(temp); result1 = std::accumulate(temp.begin(),temp.end(),result1); } @@ -75,7 +76,7 @@ public: contribute(sizeof(int), &result1, CkReduction::sum_int, CkCallback(CkReductionTarget(main,startsum), mainProxy)); } - void ping(std::vector val) { + void ping(const std::vector& val) { result2 = std::accumulate(val.begin(),val.end(),result2); ++iter; if (iter == (N-1)*msgcount) { @@ -83,17 +84,15 @@ public: } } - std::vector rand() { + void randvec(std::vector& gener) { //int length=lambda/4; std::uniform_int_distribution<> gen1(lambda/8,3*lambda/8); int length = gen1(mt); + gener.resize(length); std::uniform_int_distribution<> gen2(0,373); - std::vector gener(gen1(mt)); - gener.reserve(gen1(mt)); for(auto& g : gener) { g = gen2(mt); } - return gener; } }; diff --git a/tests/charm++/varTRAM/vartest.ci b/tests/charm++/varTRAM/vartest.ci index 9942ea3fdd..e9a61bcc6e 100644 --- a/tests/charm++/varTRAM/vartest.ci +++ b/tests/charm++/varTRAM/vartest.ci @@ -11,6 +11,6 @@ mainmodule vartest { entry engine(); entry engine(int,int,int); entry void simulate(); - entry [aggregate(bufferSize : 2048, numDimensions : 2, thresholdNumer : 1, thresholdDenom : 2, cutoffNumer : 1, cutoffDenom : 2)] void ping(std::vector); + entry [aggregate(bufferSize : 2048, numDimensions : 2, thresholdNumer : 1, thresholdDenom : 2, cutoffNumer : 1, cutoffDenom : 2)] void ping(const std::vector&); }; }; From 489b69f7feec8fc4d5791f97630f087286c0fdf3 Mon Sep 17 00:00:00 2001 From: Evan Ramos Date: Fri, 12 May 2023 20:06:42 -0500 Subject: [PATCH 090/155] conv-conds: Replace floating-point division by constant with multiplication --- src/conv-core/conv-conds.C | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/conv-core/conv-conds.C b/src/conv-core/conv-conds.C index 79e8a0b5da..78c886c773 100644 --- a/src/conv-core/conv-conds.C +++ b/src/conv-core/conv-conds.C @@ -538,7 +538,7 @@ void CcdCancelCallOnConditionKeep(int condnum, int idx) void CcdCallFnAfterOnPE(CcdVoidFn fnp, void *arg, double deltaT, int pe) { double ctime = CmiWallTimer(); - double tcall = ctime + deltaT/1000.0; + double tcall = ctime + deltaT * (1.0/1000.0); ccd_heap_insert(tcall, fnp, arg, pe); } From 8c8789099699c2a8025daa2074f9246d16c0b39c Mon Sep 17 00:00:00 2001 From: Evan Ramos Date: Mon, 28 Jan 2019 13:29:58 -0600 Subject: [PATCH 091/155] Cleanup #1982: Use C++ STL data structures in conv-conds Co-authored-by: Sam White Change-Id: Ie533057d1dba8db277388affce245dc8d2cb50e6 --- src/conv-core/conv-conds.C | 424 ++++++++++++------------------------- src/conv-core/converse.h | 2 - 2 files changed, 132 insertions(+), 294 deletions(-) diff --git a/src/conv-core/conv-conds.C b/src/conv-core/conv-conds.C index 78c886c773..2fa742bcf5 100644 --- a/src/conv-core/conv-conds.C +++ b/src/conv-core/conv-conds.C @@ -5,6 +5,10 @@ #include "converse.h" #include "charm-api.h" +#include +#include +#include + #if CMK_ERROR_CHECKING CpvDeclare(double, idleBeginWalltime); // used for determining the conditon for long idle #endif @@ -12,54 +16,49 @@ CpvDeclare(double, idleBeginWalltime); // used for determining the conditon for /** * Structure to hold the requisites for a conditional callback */ -typedef struct _ccd_cond_callback { +struct ccd_cond_callback { CcdCondFn fn; void *arg; int pe; /* the pe that sets the callback */ -} ccd_cond_callback; + ccd_cond_callback(CcdCondFn f, void *a, int p) + : fn{f}, arg{a}, pe{p} + { } +}; /** * Structure to hold the requisites for a periodic callback */ -typedef struct _ccd_periodic_callback { +struct ccd_periodic_callback { CcdVoidFn fn; void *arg; int pe; /* the pe that sets the callback */ -} ccd_periodic_callback; + ccd_periodic_callback(CcdVoidFn f, void *a, int p) + : fn{f}, arg{a}, pe{p} + { } +}; /** - * An element (a single callback) in a list of callbacks + * A list of cond callbacks */ -typedef struct _ccd_cblist_elem { - ccd_cond_callback cb; - short int next; - short int prev; -} ccd_cblist_elem; - - +struct ccd_cblist { + std::deque elems{}; + bool flag = false; +}; -/** - * A list of callbacks stored as an array and handled like a list - */ -typedef struct _ccd_cblist { - unsigned short int len, maxlen; - short int first, last, first_free; - bool flag; - ccd_cblist_elem *elems; -} ccd_cblist; /*Make sure this matches the CcdPERIODIC_* list in converse.h*/ #define CCD_PERIODIC_MAX (CcdPERIODIC_LAST - CcdPERIODIC_FIRST) -const static double periodicCallInterval[CCD_PERIODIC_MAX]= + +static constexpr double periodicCallInterval[CCD_PERIODIC_MAX] = {0.001, 0.010, 0.100, 1.0, 5.0, 10.0, 60.0, 2*60.0, 5*60.0, 10*60.0, 3600.0, 12*3600.0, 24*3600.0}; -/** The number of timer-based condition callbacks */ -CpvDeclare(int, _ccd_num_timed_cond_cbs); +/** The number of timer-based conditional callbacks */ +CpvStaticDeclare(int, _ccd_num_timed_cond_cbs); /* Cond callbacks that use the above time intervals for their condition are considered "timed" */ static bool isTimed(int condnum) { @@ -67,109 +66,39 @@ static bool isTimed(int condnum) { } -/** Initialize a list of callbacks. Alloc memory, set counters etc. */ -static void init_cblist(ccd_cblist *l, unsigned int ml) -{ - int i; - l->elems = (ccd_cblist_elem*) malloc(ml*sizeof(ccd_cblist_elem)); - _MEMCHECK(l->elems); - for(i=0;ielems[i].next = i+1; - l->elems[i].prev = i-1; - } - l->elems[ml-1].next = -1; - l->len = 0; - l->maxlen = ml; - l->first = l->last = -1; - l->first_free = 0; - l->flag = false; -} - - - -/** Expand the callback list to a max length of ml */ -static void expand_cblist(ccd_cblist *l, unsigned int ml) -{ - ccd_cblist_elem *old_elems = l->elems; - int i = 0; - l->elems = (ccd_cblist_elem*) malloc(ml*sizeof(ccd_cblist_elem)); - _MEMCHECK(l->elems); - for(i=0;i<(l->len);i++) - l->elems[i] = old_elems[i]; - free(old_elems); - for(i=l->len;ielems[i].next = i+1; - l->elems[i].prev = i-1; - } - l->elems[ml-1].next = -1; - l->elems[l->len].prev = -1; - l->maxlen = ml; - l->first_free = l->len; -} - - - /** Remove element referred to by given list index idx. */ -static void remove_elem(ccd_cblist *l, int condnum, int idx) +static inline void remove_elem(ccd_cblist & l, int condnum, int idx) { - ccd_cblist_elem *e = l->elems; - /* remove lidx from the busy list */ - if(e[idx].next != (-1)) - e[e[idx].next].prev = e[idx].prev; - if(e[idx].prev != (-1)) - e[e[idx].prev].next = e[idx].next; - if(idx==(l->first)) - l->first = e[idx].next; - if(idx==(l->last)) - l->last = e[idx].prev; - /* put lidx in the free list */ - e[idx].prev = -1; - e[idx].next = l->first_free; - if(e[idx].next != (-1)) - e[e[idx].next].prev = idx; - l->first_free = idx; - l->len--; - if (isTimed(condnum)) CpvAccess(_ccd_num_timed_cond_cbs)--; + if (isTimed(condnum)) + CpvAccess(_ccd_num_timed_cond_cbs)--; + + l.elems.erase(l.elems.begin() + idx); } /** Remove n elements from the beginning of the list. */ -static void remove_n_elems(ccd_cblist *l, int condnum, int n) +static inline void remove_n_elems(ccd_cblist & l, int condnum, size_t n) { - int i; - if(n==0 || (l->len < n)) + if (n == 0 || l.elems.size() < n) return; - for(i=0;ifirst); - } + + if (isTimed(condnum)) + CpvAccess(_ccd_num_timed_cond_cbs) -= n; + + l.elems.erase(l.elems.begin(), l.elems.begin() + n); } /** Append callback to the given cblist, and return the index. */ -static int append_elem(ccd_cblist *l, int condnum, CcdCondFn fn, void *arg, int pe) +static inline int append_elem(ccd_cblist & l, int condnum, CcdCondFn fn, void *arg, int pe) { - int idx; - ccd_cblist_elem *e; - if(l->len == l->maxlen) - expand_cblist(l, l->maxlen*2); - idx = l->first_free; - e = l->elems; - l->first_free = e[idx].next; - e[idx].next = -1; - e[idx].prev = l->last; - if(l->first == (-1)) - l->first = idx; - if(l->last != (-1)) - e[l->last].next = idx; - l->last = idx; - e[idx].cb.fn = fn; - e[idx].cb.arg = arg; - e[idx].cb.pe = pe; - l->len++; - if (isTimed(condnum)) CpvAccess(_ccd_num_timed_cond_cbs)++; - return idx; + if (isTimed(condnum)) + CpvAccess(_ccd_num_timed_cond_cbs)++; + + l.elems.emplace_back(fn, arg, pe); + return l.elems.size()-1; } @@ -182,13 +111,18 @@ static int append_elem(ccd_cblist *l, int condnum, CcdCondFn fn, void *arg, int * registered from other callbacks) are ignored. * @note: It is illegal to cancel callbacks from within ccd callbacks. */ -static void call_cblist_keep(ccd_cblist *l) +static void call_cblist_keep(const ccd_cblist & l) { - for (int i = 0, idx = l->first; i < l->len; i++) { - int old = CmiSwitchToPE(l->elems[idx].cb.pe); - (*(l->elems[idx].cb.fn))(l->elems[idx].cb.arg); + // save the length in case callbacks are added during execution + const size_t len = l.elems.size(); + + // we must iterate this way because insertion invalidates deque iterators + for (size_t i = 0; i < len; ++i) + { + const ccd_cond_callback & cb = l.elems[i]; + int old = CmiSwitchToPE(cb.pe); + (*(cb.fn))(cb.arg); int unused = CmiSwitchToPE(old); - idx = l->elems[idx].next; } } @@ -202,20 +136,28 @@ static void call_cblist_keep(ccd_cblist *l) * registered from other callbacks) are ignored. * @note: It is illegal to cancel callbacks from within ccd callbacks. */ -static void call_cblist_remove(ccd_cblist *l, int condnum) +static void call_cblist_remove(ccd_cblist & l, int condnum) { - int len = l->len; + // save the length in case callbacks are added during execution + const size_t len = l.elems.size(); + /* reentrant */ - if (len == 0 || l->flag) return; - l->flag = true; - for (int i = 0, idx = l->first; i < len; i++) { - int old = CmiSwitchToPE(l->elems[idx].cb.pe); - (*(l->elems[idx].cb.fn))(l->elems[idx].cb.arg); + if (len == 0 || l.flag) + return; + l.flag = true; + + // we must iterate this way because insertion invalidates deque iterators + // i < len is correct. after i==0, unsigned underflow will wrap to SIZE_MAX + for (size_t i = len-1; i < len; --i) + { + const ccd_cond_callback & cb = l.elems[i]; + int old = CmiSwitchToPE(cb.pe); + (*(cb.fn))(cb.arg); int unused = CmiSwitchToPE(old); - idx = l->elems[idx].next; } - remove_n_elems(l,condnum,len); - l->flag = false; + + remove_n_elems(l, condnum, len); + l.flag = false; } @@ -226,10 +168,10 @@ static void call_cblist_remove(ccd_cblist *l, int condnum) /** * Lists of conditional callbacks that are maintained by the scheduler */ -typedef struct { +struct ccd_cond_callbacks { ccd_cblist condcb[MAXNUMCONDS]; ccd_cblist condcb_keep[MAXNUMCONDS]; -} ccd_cond_callbacks; +}; /***/ CpvStaticDeclare(ccd_cond_callbacks, conds); @@ -238,15 +180,17 @@ CpvStaticDeclare(ccd_cond_callbacks, conds); // Default resolution of .005 seconds aka 5 milliseconds #define CCD_DEFAULT_RESOLUTION 5.0e-3 + /** * List of periodic callbacks maintained by the scheduler */ -typedef struct { +struct ccd_periodic_callbacks { int nSkip;/*Number of opportunities to skip*/ double lastCheck;/*Time of last check*/ double resolution; double nextCall[CCD_PERIODIC_MAX]; -} ccd_periodic_callbacks; +}; + /** */ CpvStaticDeclare(ccd_periodic_callbacks, pcb); @@ -254,27 +198,28 @@ CpvDeclare(int, _ccd_numchecks); -#define MAXTIMERHEAPENTRIES 128 - /** - * Structure used to manage callbacks in a heap + * Structure used to manage periodic callbacks in a heap */ -typedef struct { - double time; - ccd_periodic_callback cb; -} ccd_heap_elem; +struct ccd_heap_elem { + double time; + ccd_periodic_callback cb; + + ccd_heap_elem(double t, CcdVoidFn fn, void *arg, int pe) + : time{t}, cb{fn, arg, pe} + { } + + bool operator>(const ccd_heap_elem & rhs) const + { + return this->time > rhs.time; + } +}; -/* Note : The heap is only stored in elements ccd_heap[0] to - * ccd_heap[_ccd_heaplen] - */ -/** An array of time-scheduled callbacks managed as a heap */ -CpvStaticDeclare(ccd_heap_elem*, ccd_heap); -/** The length of the callback heap */ -CpvDeclare(int, _ccd_heaplen); -/** The max allowed length of the callback heap */ -CpvStaticDeclare(int, ccd_heapmaxlen); +/** periodic callbacks */ +using ccd_heap_type = std::priority_queue, std::greater>; +CpvStaticDeclare(ccd_heap_type, ccd_heap); /** @@ -282,115 +227,17 @@ CpvStaticDeclare(int, ccd_heapmaxlen); * if it needs to call CcdCallBacks or not. */ int CcdNumTimerCBs(void) { - return (CpvAccess(_ccd_heaplen) + CpvAccess(_ccd_num_timed_cond_cbs)); -} - - -/** Swap two elements on the heap */ -static void ccd_heap_swap(int index1, int index2) -{ - ccd_heap_elem *h = CpvAccess(ccd_heap); - ccd_heap_elem temp; - - temp = h[index1]; - h[index1] = h[index2]; - h[index2] = temp; + return (CpvAccess(ccd_heap).size() + CpvAccess(_ccd_num_timed_cond_cbs)); } - -/** - * Expand the ccd_heap to make more room. - * - * Double the heap size and copy everything over. Initial 128 is reasonably - * big, so expanding won't happen often. - * - * Had a bug previously due to late expansion, should work now - Gengbin 12/4/03 -*/ -static void expand_ccd_heap(void) -{ - int i; - int oldlen = CpvAccess(ccd_heapmaxlen); - int newlen = oldlen*2; - ccd_heap_elem *newheap; - - CmiPrintf("[%d] Warning: ccd_heap expand from %d to %d\n", CmiMyPe(),oldlen, newlen); - - newheap = (ccd_heap_elem*) malloc(sizeof(ccd_heap_elem)*2*(newlen+1)); - _MEMCHECK(newheap); - /* need to copy the second half part ??? */ - for (i=0; i<=oldlen; i++) { - newheap[i] = CpvAccess(ccd_heap)[i]; - newheap[i+newlen] = CpvAccess(ccd_heap)[i+oldlen]; - } - free(CpvAccess(ccd_heap)); - CpvAccess(ccd_heap) = newheap; - CpvAccess(ccd_heapmaxlen) = newlen; -} - - - /** * Insert a new callback into the heap */ -static void ccd_heap_insert(double t, CcdVoidFn fnp, void *arg, int pe) -{ - int child, parent; - ccd_heap_elem *h; - - if(CpvAccess(_ccd_heaplen) >= CpvAccess(ccd_heapmaxlen)) { -/* CmiAbort("Heap overflow (InsertInHeap), exiting...\n"); */ - expand_ccd_heap(); - } - - h = CpvAccess(ccd_heap); - - { - ccd_heap_elem *e = &(h[++CpvAccess(_ccd_heaplen)]); - e->time = t; - e->cb.fn = fnp; - e->cb.arg = arg; - e->cb.pe = pe; - child = CpvAccess(_ccd_heaplen); - parent = child / 2; - while((parent>0) && (h[child].time0) { - /* put deleted value at end of heap */ - ccd_heap_swap(1,CpvAccess(_ccd_heaplen)); - CpvAccess(_ccd_heaplen)--; - if(CpvAccess(_ccd_heaplen)) { - /* if any left, then bubble up values */ - child = 2 * parent; - while(child <= CpvAccess(_ccd_heaplen)) { - if(((child + 1) <= CpvAccess(_ccd_heaplen)) && - (h[child].time > h[child+1].time)) - child++; /* use the smaller of the two */ - if(h[parent].time <= h[child].time) - break; - ccd_heap_swap(parent,child); - parent = child; /* go down the tree one more step */ - child = 2 * child; - } - } - } + auto & h = CpvAccess(ccd_heap); + h.emplace(t, fnp, arg, pe); } @@ -401,26 +248,32 @@ static void ccd_heap_remove(void) */ static void ccd_heap_update(double curWallTime) { - ccd_heap_elem *h = CpvAccess(ccd_heap); - ccd_heap_elem *e = h+CpvAccess(ccd_heapmaxlen); - int i,ne=0; + auto & h = CpvAccess(ccd_heap); + + std::vector expired; + /* Pull out all expired heap entries */ - while ((CpvAccess(_ccd_heaplen)>0) && (h[1].time= curWallTime) + break; + + expired.emplace_back(std::move(e.cb)); + + h.pop(); } + /* Now execute those heap entries. This must be separated from the removal phase because executing an entry may change the heap. */ - for (i=0;i 0) && (CpvAccess(_ccd_numchecks)-- <= 0)) { \ From 1514bdcb755a0116dd3d8b260bb31ee14d979b00 Mon Sep 17 00:00:00 2001 From: Evan Ramos Date: Fri, 12 May 2023 16:35:18 -0500 Subject: [PATCH 092/155] conv-conds: Eliminate `std::vector expired` --- src/conv-core/conv-conds.C | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/src/conv-core/conv-conds.C b/src/conv-core/conv-conds.C index 2fa742bcf5..dcf32c3e88 100644 --- a/src/conv-core/conv-conds.C +++ b/src/conv-core/conv-conds.C @@ -250,9 +250,7 @@ static void ccd_heap_update(double curWallTime) { auto & h = CpvAccess(ccd_heap); - std::vector expired; - - /* Pull out all expired heap entries */ + // Execute all expired heap entries while (!h.empty()) { const ccd_heap_elem & e = h.top(); @@ -260,17 +258,10 @@ static void ccd_heap_update(double curWallTime) if (e.time >= curWallTime) break; - expired.emplace_back(std::move(e.cb)); + const ccd_periodic_callback cb = std::move(e.cb); h.pop(); - } - /* Now execute those heap entries. This must be - separated from the removal phase because executing - an entry may change the heap. - */ - for (const ccd_periodic_callback & cb : expired) - { int old = CmiSwitchToPE(cb.pe); (*(cb.fn))(cb.arg, curWallTime); int unused = CmiSwitchToPE(old); From 9f557efadbad8c0547ba2502687a25fbd39a5357 Mon Sep 17 00:00:00 2001 From: Evan Ramos Date: Wed, 21 Jun 2023 17:22:10 -0500 Subject: [PATCH 093/155] update-hwloc.sh: Improve documentation and script robustness I re-imported the last hwloc import (v2.4.1) to validate this commit. --- contrib/update-hwloc.sh | 169 ++++++++++++++++++++++------------------ 1 file changed, 95 insertions(+), 74 deletions(-) diff --git a/contrib/update-hwloc.sh b/contrib/update-hwloc.sh index 2292e1dce5..d74496fa3e 100755 --- a/contrib/update-hwloc.sh +++ b/contrib/update-hwloc.sh @@ -1,22 +1,98 @@ #!/bin/bash +# This script updates Charm's in-tree hwloc and trims the contents for efficiency. +# File Manifests + +# Directories that can have all contents removed, except for an empty automake stub. +DIST_SUBDIRS=( + utils + tests + doc + contrib/completion + contrib/hwloc-ps.www + contrib/misc + contrib/systemd + contrib/windows +) + +# Directories that are removed by the above, but also need an empty automake stub. +DIST_SUBDIRS_AUTOMAKE=( + doc/examples + utils/hwloc + utils/hwloc/test-hwloc-dump-hwdata + utils/lstopo + utils/netloc/infiniband + utils/netloc/draw + utils/netloc/scotch + utils/netloc/mpi + tests/hwloc + tests/hwloc/linux + tests/hwloc/linux/allowed + tests/hwloc/linux/gather + tests/hwloc/xml + tests/hwloc/ports + tests/hwloc/rename + tests/hwloc/x86 + tests/hwloc/x86+linux + tests/netloc +) + +# Directories that can simply be removed. +EXTRA_DIST=( +) + +# Files that need a zero-byte stub to be present for autotools to succeed. +DIST_STUB=( + doc/doxygen-config.cfg.in + tests/hwloc/linux/allowed/test-topology.sh.in + tests/hwloc/linux/gather/test-gather-topology.sh.in + tests/hwloc/linux/test-topology.sh.in + tests/hwloc/x86/test-topology.sh.in + tests/hwloc/x86+linux/test-topology.sh.in + tests/hwloc/xml/test-topology.sh.in + tests/hwloc/wrapper.sh.in + utils/hwloc/hwloc-compress-dir.in + utils/hwloc/hwloc-gather-topology.in + utils/hwloc/test-hwloc-annotate.sh.in + utils/hwloc/test-hwloc-calc.sh.in + utils/hwloc/test-hwloc-compress-dir.sh.in + utils/hwloc/test-hwloc-diffpatch.sh.in + utils/hwloc/test-hwloc-distrib.sh.in + utils/hwloc/test-hwloc-info.sh.in + utils/hwloc/test-fake-plugin.sh.in + utils/hwloc/test-parsing-flags.sh.in + utils/hwloc/test-hwloc-dump-hwdata/test-hwloc-dump-hwdata.sh.in + utils/lstopo/test-lstopo.sh.in + utils/lstopo/test-lstopo-shmem.sh.in + utils/netloc/infiniband/netloc_ib_gather_raw.in + contrib/windows/test-windows-version.sh.in + tests/netloc/tests.sh.in + utils/lstopo/lstopo-windows.c + utils/lstopo/lstopo-android.c +) + + +# Update Procedure + +ME="$(basename "$0")" + +# Validate inputs if [[ -z "$1" ]]; then - echo "$0" '' + echo "$ME" '' exit 0 fi git diff --quiet --exit-code HEAD if [[ $? != 0 ]]; then - echo 'Error: Git repository is not clean.' + echo "$ME: Error: Git repository is not clean." exit 1 fi +# Get the absolute path of the tarball now so it is valid after we chdir get_abs_filename() { echo "$(cd "$(dirname "$1")" && pwd)/$(basename "$1")" } - -# Get the absolute path of the tarball now so it is valid after we chdir input=$(get_abs_filename "$1") pushd $(dirname "$0") > /dev/null @@ -31,83 +107,28 @@ if [ "$extension" = "gz" ]; then elif [ "$extension" = "bz2" ]; then tar -xjf "$input" --strip-components=1 else - echo "Error: Unexpected file type." + echo "$ME: Error: Unexpected file type." exit 1 fi # Strip out data unused by embedded builds to save the git repository and gathertree some work -DIST_SUBDIRS=( \ - utils \ - tests \ - doc \ - contrib/completion \ - contrib/hwloc-ps.www \ - contrib/misc \ - contrib/systemd \ - contrib/windows \ - doc/examples \ - utils/hwloc \ - utils/hwloc/test-hwloc-dump-hwdata \ - utils/lstopo \ - utils/netloc/infiniband \ - utils/netloc/draw \ - utils/netloc/scotch \ - utils/netloc/mpi \ - tests/hwloc \ - tests/hwloc/linux \ - tests/hwloc/linux/allowed \ - tests/hwloc/linux/gather \ - tests/hwloc/xml \ - tests/hwloc/ports \ - tests/hwloc/rename \ - tests/hwloc/x86 \ - tests/hwloc/x86+linux \ - tests/netloc \ -) -EXTRA_DIST=( \ - contrib/completion \ -) for i in "${DIST_SUBDIRS[@]}" "${EXTRA_DIST[@]}"; do - rm -rf "$i" + echo "$ME: Removing $i" + rm -r "$i" done # Create stub automake files because the disabling is a configure-time option, so automake always checks them -for i in "${DIST_SUBDIRS[@]}"; do +for i in "${DIST_SUBDIRS[@]}" "${DIST_SUBDIRS_AUTOMAKE[@]}"; do + stub="$i/Makefile.in" + echo "$ME: Creating stub $stub" mkdir -p "$i" - touch "$i/Makefile.am" + touch "$stub" done rm -f "configure" "Makefile.in" "include/Makefile.in" "src/Makefile.in" -# Stubs for autoreconf -DIST_STUB=( \ - contrib/windows/test-windows-version.sh.am \ - doc/doxygen-config.cfg.am \ - tests/hwloc/wrapper.sh.am \ - tests/hwloc/linux/test-topology.sh.am \ - tests/hwloc/linux/allowed/test-topology.sh.am \ - tests/hwloc/linux/gather/test-gather-topology.sh.am \ - tests/hwloc/x86+linux/test-topology.sh.am \ - tests/hwloc/x86/test-topology.sh.am \ - tests/hwloc/xml/test-topology.sh.am \ - tests/netloc/tests.sh.am \ - utils/hwloc/hwloc-compress-dir.am \ - utils/hwloc/hwloc-gather-topology.am \ - utils/hwloc/test-hwloc-annotate.sh.am \ - utils/hwloc/test-hwloc-calc.sh.am \ - utils/hwloc/test-hwloc-compress-dir.sh.am \ - utils/hwloc/test-hwloc-diffpatch.sh.am \ - utils/hwloc/test-hwloc-distrib.sh.am \ - utils/hwloc/test-hwloc-info.sh.am \ - utils/hwloc/test-fake-plugin.sh.am \ - utils/hwloc/test-hwloc-dump-hwdata/test-hwloc-dump-hwdata.sh.am \ - utils/hwloc/test-parsing-flags.sh.am \ - utils/lstopo/test-lstopo.sh.am \ - utils/lstopo/test-lstopo-shmem.sh.am \ - utils/lstopo/lstopo-windows.c \ - utils/lstopo/lstopo-android.c \ - utils/netloc/infiniband/netloc_ib_gather_raw.am \ -) +# Create stubs for autoreconf for i in "${DIST_STUB[@]}"; do + echo "$ME: Creating stub $i" touch "$i" done @@ -116,18 +137,18 @@ autoreconf -ivf ret="$?" rm -rf autom4te.cache/ if [[ $ret != 0 ]]; then - echo "$0 needs to be updated for this hwloc version." + echo "$ME: Error: Please update the script's manifests for this hwloc version." exit 1 fi find . -name '*~' -delete cd .. git add -f hwloc -git commit -m "EDIT THIS COMMIT" +git commit -m "hwloc: Update to v[EDIT THIS COMMIT]" popd > /dev/null -echo 'Done. Please:' -echo '1. Review the git history of contrib/hwloc for patches that should be cherry-picked and squashed.' -echo '2. In contrib/hwloc, run: autoreconf -ivf && rm -rf autom4te.cache/ && find . -name "*~" -delete' -echo '3. Verify that an all-test build with --build-shared -charm-shared completes successfully.' +echo "$ME: Done. Please:" +echo ' 1. Review the git history of hwloc/ for patches that should be cherry-picked and squashed.' +echo ' 2. In hwloc/, run: autoreconf -ivf && rm -rf autom4te.cache/ && find . -name "*~" -delete' +echo ' 3. Verify that an all-test build with --build-shared -charm-shared completes successfully.' From f180b22e3abae5b29651cd6e88fffc948df30ffe Mon Sep 17 00:00:00 2001 From: Evan Ramos Date: Wed, 21 Jun 2023 17:49:02 -0500 Subject: [PATCH 094/155] update-hwloc.sh: Update manifests for v2.8.0 --- contrib/update-hwloc.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contrib/update-hwloc.sh b/contrib/update-hwloc.sh index d74496fa3e..9954f0ca55 100755 --- a/contrib/update-hwloc.sh +++ b/contrib/update-hwloc.sh @@ -39,6 +39,7 @@ DIST_SUBDIRS_AUTOMAKE=( # Directories that can simply be removed. EXTRA_DIST=( + contrib/windows-cmake ) # Files that need a zero-byte stub to be present for autotools to succeed. @@ -59,13 +60,13 @@ DIST_STUB=( utils/hwloc/test-hwloc-diffpatch.sh.in utils/hwloc/test-hwloc-distrib.sh.in utils/hwloc/test-hwloc-info.sh.in + utils/hwloc/test-build-custom-topology.sh.in utils/hwloc/test-fake-plugin.sh.in utils/hwloc/test-parsing-flags.sh.in utils/hwloc/test-hwloc-dump-hwdata/test-hwloc-dump-hwdata.sh.in utils/lstopo/test-lstopo.sh.in utils/lstopo/test-lstopo-shmem.sh.in utils/netloc/infiniband/netloc_ib_gather_raw.in - contrib/windows/test-windows-version.sh.in tests/netloc/tests.sh.in utils/lstopo/lstopo-windows.c utils/lstopo/lstopo-android.c From b0877979ae480a6564d3dddacb39065867897a7a Mon Sep 17 00:00:00 2001 From: Evan Ramos Date: Wed, 21 Jun 2023 18:09:12 -0500 Subject: [PATCH 095/155] hwloc: Update to v2.8.0 --- contrib/hwloc/Makefile.am | 3 +- contrib/hwloc/Makefile.in | 266 +- contrib/hwloc/NEWS | 165 +- contrib/hwloc/README | 2 +- contrib/hwloc/VERSION | 8 +- contrib/hwloc/aclocal.m4 | 70 +- contrib/hwloc/config/ar-lib | 2 +- contrib/hwloc/config/compile | 2 +- contrib/hwloc/config/config.guess | 1272 +- contrib/hwloc/config/config.sub | 111 +- contrib/hwloc/config/depcomp | 2 +- contrib/hwloc/config/hwloc.m4 | 734 +- .../hwloc/config/hwloc_check_attributes.m4 | 59 +- .../hwloc/config/hwloc_check_visibility.m4 | 4 +- contrib/hwloc/config/hwloc_internal.m4 | 114 +- contrib/hwloc/config/libtool.m4 | 31 +- contrib/hwloc/config/ltmain.sh | 217 +- contrib/hwloc/config/missing | 2 +- contrib/hwloc/config/test-driver | 11 +- contrib/hwloc/configure | 19360 +++++++++------- contrib/hwloc/configure.ac | 94 +- contrib/hwloc/contrib/completion/Makefile.in | 542 - .../hwloc/contrib/hwloc-ps.www/Makefile.am | 0 .../hwloc/contrib/hwloc-ps.www/Makefile.in | 542 - contrib/hwloc/contrib/misc/Makefile.am | 0 contrib/hwloc/contrib/misc/Makefile.in | 542 - contrib/hwloc/contrib/systemd/Makefile.am | 0 contrib/hwloc/contrib/systemd/Makefile.in | 542 - contrib/hwloc/contrib/windows/Makefile.am | 0 contrib/hwloc/contrib/windows/Makefile.in | 542 - .../windows/test-windows-version.sh.am | 0 .../windows/test-windows-version.sh.in | 542 - contrib/hwloc/doc/Makefile.am | 0 contrib/hwloc/doc/Makefile.in | 542 - contrib/hwloc/doc/doxygen-config.cfg.am | 0 contrib/hwloc/doc/doxygen-config.cfg.in | 542 - contrib/hwloc/doc/examples/Makefile.am | 0 contrib/hwloc/doc/examples/Makefile.in | 542 - contrib/hwloc/hwloc/Makefile.am | 57 +- contrib/hwloc/hwloc/Makefile.in | 255 +- contrib/hwloc/hwloc/components.c | 93 +- contrib/hwloc/hwloc/cpukinds.c | 50 +- contrib/hwloc/hwloc/distances.c | 722 +- contrib/hwloc/hwloc/dolib.c | 47 - contrib/hwloc/hwloc/hwloc2.dtd | 3 +- contrib/hwloc/hwloc/memattrs.c | 245 +- contrib/hwloc/hwloc/pci-common.c | 156 +- contrib/hwloc/hwloc/topology-aix.c | 5 +- contrib/hwloc/hwloc/topology-cuda.c | 13 +- contrib/hwloc/hwloc/topology-darwin.c | 690 +- contrib/hwloc/hwloc/topology-freebsd.c | 6 +- contrib/hwloc/hwloc/topology-gl.c | 3 +- contrib/hwloc/hwloc/topology-levelzero.c | 583 + contrib/hwloc/hwloc/topology-linux.c | 1038 +- contrib/hwloc/hwloc/topology-nvml.c | 287 +- contrib/hwloc/hwloc/topology-opencl.c | 18 +- contrib/hwloc/hwloc/topology-pci.c | 10 +- contrib/hwloc/hwloc/topology-rsmi.c | 155 +- contrib/hwloc/hwloc/topology-solaris.c | 33 +- contrib/hwloc/hwloc/topology-synthetic.c | 28 +- contrib/hwloc/hwloc/topology-windows.c | 422 +- contrib/hwloc/hwloc/topology-x86.c | 123 +- contrib/hwloc/hwloc/topology-xml.c | 62 +- contrib/hwloc/hwloc/topology.c | 200 +- contrib/hwloc/hwloc/traversal.c | 107 +- contrib/hwloc/include/Makefile.am | 9 +- contrib/hwloc/include/Makefile.in | 60 +- contrib/hwloc/include/hwloc.h | 162 +- .../hwloc/include/hwloc/autogen/config.h.in | 11 +- contrib/hwloc/include/hwloc/cpukinds.h | 27 +- contrib/hwloc/include/hwloc/cuda.h | 16 +- contrib/hwloc/include/hwloc/cudart.h | 12 +- contrib/hwloc/include/hwloc/deprecated.h | 11 +- contrib/hwloc/include/hwloc/distances.h | 200 +- contrib/hwloc/include/hwloc/gl.h | 15 +- contrib/hwloc/include/hwloc/helper.h | 45 +- contrib/hwloc/include/hwloc/levelzero.h | 157 + contrib/hwloc/include/hwloc/linux.h | 9 +- contrib/hwloc/include/hwloc/memattrs.h | 54 +- contrib/hwloc/include/hwloc/nvml.h | 12 +- contrib/hwloc/include/hwloc/opencl.h | 11 +- .../hwloc/include/hwloc/openfabrics-verbs.h | 14 +- contrib/hwloc/include/hwloc/plugins.h | 103 +- contrib/hwloc/include/hwloc/rename.h | 49 +- contrib/hwloc/include/hwloc/rsmi.h | 14 +- contrib/hwloc/include/hwloc/windows.h | 76 + .../hwloc/include/private/autogen/config.h.in | 151 +- .../include/private/internal-components.h | 3 +- contrib/hwloc/include/private/misc.h | 2 +- contrib/hwloc/include/private/private.h | 19 +- contrib/hwloc/include/private/windows.h | 30 + contrib/hwloc/netloc/Makefile.in | 35 +- contrib/hwloc/tests/Makefile.am | 0 contrib/hwloc/tests/Makefile.in | 542 - contrib/hwloc/tests/hwloc/Makefile.am | 0 contrib/hwloc/tests/hwloc/Makefile.in | 542 - contrib/hwloc/tests/hwloc/linux/Makefile.am | 0 contrib/hwloc/tests/hwloc/linux/Makefile.in | 542 - .../tests/hwloc/linux/allowed/Makefile.am | 0 .../tests/hwloc/linux/allowed/Makefile.in | 542 - .../hwloc/linux/allowed/test-topology.sh.am | 0 .../hwloc/linux/allowed/test-topology.sh.in | 542 - .../tests/hwloc/linux/gather/Makefile.am | 0 .../tests/hwloc/linux/gather/Makefile.in | 542 - .../linux/gather/test-gather-topology.sh.am | 0 .../linux/gather/test-gather-topology.sh.in | 542 - .../tests/hwloc/linux/test-topology.sh.am | 0 .../tests/hwloc/linux/test-topology.sh.in | 542 - contrib/hwloc/tests/hwloc/ports/Makefile.am | 0 contrib/hwloc/tests/hwloc/ports/Makefile.in | 547 - contrib/hwloc/tests/hwloc/rename/Makefile.am | 0 contrib/hwloc/tests/hwloc/rename/Makefile.in | 542 - contrib/hwloc/tests/hwloc/wrapper.sh.am | 0 contrib/hwloc/tests/hwloc/wrapper.sh.in | 542 - .../hwloc/tests/hwloc/x86+linux/Makefile.am | 0 .../hwloc/tests/hwloc/x86+linux/Makefile.in | 542 - .../tests/hwloc/x86+linux/test-topology.sh.am | 0 .../tests/hwloc/x86+linux/test-topology.sh.in | 542 - contrib/hwloc/tests/hwloc/x86/Makefile.am | 0 contrib/hwloc/tests/hwloc/x86/Makefile.in | 542 - .../hwloc/tests/hwloc/x86/test-topology.sh.am | 0 .../hwloc/tests/hwloc/x86/test-topology.sh.in | 542 - contrib/hwloc/tests/hwloc/xml/Makefile.am | 0 contrib/hwloc/tests/hwloc/xml/Makefile.in | 542 - .../hwloc/tests/hwloc/xml/test-topology.sh.am | 0 .../hwloc/tests/hwloc/xml/test-topology.sh.in | 542 - contrib/hwloc/tests/netloc/Makefile.am | 0 contrib/hwloc/tests/netloc/Makefile.in | 542 - contrib/hwloc/tests/netloc/tests.sh.am | 0 contrib/hwloc/tests/netloc/tests.sh.in | 542 - contrib/hwloc/utils/Makefile.am | 0 contrib/hwloc/utils/Makefile.in | 542 - contrib/hwloc/utils/hwloc/Makefile.am | 0 contrib/hwloc/utils/hwloc/Makefile.in | 542 - .../hwloc/utils/hwloc/hwloc-compress-dir.am | 0 .../hwloc/utils/hwloc/hwloc-compress-dir.in | 542 - .../utils/hwloc/hwloc-gather-topology.am | 0 .../utils/hwloc/hwloc-gather-topology.in | 542 - .../hwloc/test-build-custom-topology.sh.in} | 0 .../hwloc/utils/hwloc/test-fake-plugin.sh.am | 0 .../hwloc/utils/hwloc/test-fake-plugin.sh.in | 542 - .../utils/hwloc/test-hwloc-annotate.sh.am | 0 .../utils/hwloc/test-hwloc-annotate.sh.in | 542 - .../hwloc/utils/hwloc/test-hwloc-calc.sh.am | 0 .../hwloc/utils/hwloc/test-hwloc-calc.sh.in | 542 - .../utils/hwloc/test-hwloc-compress-dir.sh.am | 0 .../utils/hwloc/test-hwloc-compress-dir.sh.in | 543 - .../utils/hwloc/test-hwloc-diffpatch.sh.am | 0 .../utils/hwloc/test-hwloc-diffpatch.sh.in | 542 - .../utils/hwloc/test-hwloc-distrib.sh.am | 0 .../utils/hwloc/test-hwloc-distrib.sh.in | 542 - .../hwloc/test-hwloc-dump-hwdata/Makefile.am | 0 .../hwloc/test-hwloc-dump-hwdata/Makefile.in | 542 - .../test-hwloc-dump-hwdata.sh.am | 0 .../test-hwloc-dump-hwdata.sh.in | 543 - .../hwloc/utils/hwloc/test-hwloc-info.sh.am | 0 .../hwloc/utils/hwloc/test-hwloc-info.sh.in | 542 - .../utils/hwloc/test-parsing-flags.sh.am | 0 .../utils/hwloc/test-parsing-flags.sh.in | 542 - contrib/hwloc/utils/lstopo/Makefile.am | 0 contrib/hwloc/utils/lstopo/Makefile.in | 543 - .../utils/lstopo/test-lstopo-shmem.sh.am | 0 .../utils/lstopo/test-lstopo-shmem.sh.in | 543 - contrib/hwloc/utils/lstopo/test-lstopo.sh.am | 0 contrib/hwloc/utils/lstopo/test-lstopo.sh.in | 543 - contrib/hwloc/utils/netloc/draw/Makefile.am | 0 contrib/hwloc/utils/netloc/draw/Makefile.in | 542 - .../hwloc/utils/netloc/infiniband/Makefile.am | 0 .../hwloc/utils/netloc/infiniband/Makefile.in | 542 - .../netloc/infiniband/netloc_ib_gather_raw.am | 0 .../netloc/infiniband/netloc_ib_gather_raw.in | 542 - contrib/hwloc/utils/netloc/mpi/Makefile.am | 0 contrib/hwloc/utils/netloc/mpi/Makefile.in | 542 - contrib/hwloc/utils/netloc/scotch/Makefile.am | 0 contrib/hwloc/utils/netloc/scotch/Makefile.in | 542 - 175 files changed, 18919 insertions(+), 37438 deletions(-) mode change 100644 => 100755 contrib/hwloc/config/ltmain.sh delete mode 100644 contrib/hwloc/contrib/hwloc-ps.www/Makefile.am delete mode 100644 contrib/hwloc/contrib/misc/Makefile.am delete mode 100644 contrib/hwloc/contrib/systemd/Makefile.am delete mode 100644 contrib/hwloc/contrib/windows/Makefile.am delete mode 100644 contrib/hwloc/contrib/windows/test-windows-version.sh.am delete mode 100644 contrib/hwloc/contrib/windows/test-windows-version.sh.in delete mode 100644 contrib/hwloc/doc/Makefile.am delete mode 100644 contrib/hwloc/doc/doxygen-config.cfg.am delete mode 100644 contrib/hwloc/doc/examples/Makefile.am delete mode 100644 contrib/hwloc/hwloc/dolib.c create mode 100644 contrib/hwloc/hwloc/topology-levelzero.c create mode 100644 contrib/hwloc/include/hwloc/levelzero.h create mode 100644 contrib/hwloc/include/hwloc/windows.h create mode 100644 contrib/hwloc/include/private/windows.h delete mode 100644 contrib/hwloc/tests/Makefile.am delete mode 100644 contrib/hwloc/tests/hwloc/Makefile.am delete mode 100644 contrib/hwloc/tests/hwloc/linux/Makefile.am delete mode 100644 contrib/hwloc/tests/hwloc/linux/allowed/Makefile.am delete mode 100644 contrib/hwloc/tests/hwloc/linux/allowed/test-topology.sh.am delete mode 100644 contrib/hwloc/tests/hwloc/linux/gather/Makefile.am delete mode 100644 contrib/hwloc/tests/hwloc/linux/gather/test-gather-topology.sh.am delete mode 100644 contrib/hwloc/tests/hwloc/linux/test-topology.sh.am delete mode 100644 contrib/hwloc/tests/hwloc/ports/Makefile.am delete mode 100644 contrib/hwloc/tests/hwloc/rename/Makefile.am delete mode 100644 contrib/hwloc/tests/hwloc/wrapper.sh.am delete mode 100644 contrib/hwloc/tests/hwloc/x86+linux/Makefile.am delete mode 100644 contrib/hwloc/tests/hwloc/x86+linux/test-topology.sh.am delete mode 100644 contrib/hwloc/tests/hwloc/x86/Makefile.am delete mode 100644 contrib/hwloc/tests/hwloc/x86/test-topology.sh.am delete mode 100644 contrib/hwloc/tests/hwloc/xml/Makefile.am delete mode 100644 contrib/hwloc/tests/hwloc/xml/test-topology.sh.am delete mode 100644 contrib/hwloc/tests/netloc/Makefile.am delete mode 100644 contrib/hwloc/tests/netloc/tests.sh.am delete mode 100644 contrib/hwloc/utils/Makefile.am delete mode 100644 contrib/hwloc/utils/hwloc/Makefile.am delete mode 100644 contrib/hwloc/utils/hwloc/hwloc-compress-dir.am delete mode 100644 contrib/hwloc/utils/hwloc/hwloc-gather-topology.am rename contrib/hwloc/{contrib/completion/Makefile.am => utils/hwloc/test-build-custom-topology.sh.in} (100%) delete mode 100644 contrib/hwloc/utils/hwloc/test-fake-plugin.sh.am delete mode 100644 contrib/hwloc/utils/hwloc/test-hwloc-annotate.sh.am delete mode 100644 contrib/hwloc/utils/hwloc/test-hwloc-calc.sh.am delete mode 100644 contrib/hwloc/utils/hwloc/test-hwloc-compress-dir.sh.am delete mode 100644 contrib/hwloc/utils/hwloc/test-hwloc-diffpatch.sh.am delete mode 100644 contrib/hwloc/utils/hwloc/test-hwloc-distrib.sh.am delete mode 100644 contrib/hwloc/utils/hwloc/test-hwloc-dump-hwdata/Makefile.am delete mode 100644 contrib/hwloc/utils/hwloc/test-hwloc-dump-hwdata/test-hwloc-dump-hwdata.sh.am delete mode 100644 contrib/hwloc/utils/hwloc/test-hwloc-info.sh.am delete mode 100644 contrib/hwloc/utils/hwloc/test-parsing-flags.sh.am delete mode 100644 contrib/hwloc/utils/lstopo/Makefile.am delete mode 100644 contrib/hwloc/utils/lstopo/test-lstopo-shmem.sh.am delete mode 100644 contrib/hwloc/utils/lstopo/test-lstopo.sh.am delete mode 100644 contrib/hwloc/utils/netloc/draw/Makefile.am delete mode 100644 contrib/hwloc/utils/netloc/infiniband/Makefile.am delete mode 100644 contrib/hwloc/utils/netloc/infiniband/netloc_ib_gather_raw.am delete mode 100644 contrib/hwloc/utils/netloc/mpi/Makefile.am delete mode 100644 contrib/hwloc/utils/netloc/scotch/Makefile.am diff --git a/contrib/hwloc/Makefile.am b/contrib/hwloc/Makefile.am index 85e1fb8d89..1996b4becd 100644 --- a/contrib/hwloc/Makefile.am +++ b/contrib/hwloc/Makefile.am @@ -1,4 +1,4 @@ -# Copyright © 2009-2020 Inria. All rights reserved. +# Copyright © 2009-2021 Inria. All rights reserved. # Copyright © 2009 Université Bordeaux # Copyright © 2009-2014 Cisco Systems, Inc. All rights reserved. # See COPYING in top-level directory. @@ -34,6 +34,7 @@ endif DIST_SUBDIRS = $(SUBDIRS) if HWLOC_BUILD_STANDALONE DIST_SUBDIRS += contrib/windows +EXTRA_DIST += contrib/windows-cmake if !BUILD_NETLOC DIST_SUBDIRS += netloc endif diff --git a/contrib/hwloc/Makefile.in b/contrib/hwloc/Makefile.in index f98a6be4e9..00f0c85cab 100644 --- a/contrib/hwloc/Makefile.in +++ b/contrib/hwloc/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.3 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -14,7 +14,7 @@ @SET_MAKE@ -# Copyright © 2009-2020 Inria. All rights reserved. +# Copyright © 2009-2021 Inria. All rights reserved. # Copyright © 2009 Université Bordeaux # Copyright © 2009-2014 Cisco Systems, Inc. All rights reserved. # See COPYING in top-level directory. @@ -102,12 +102,13 @@ target_triplet = @target@ @HWLOC_BUILD_STANDALONE_TRUE@ contrib/completion contrib/misc \ @HWLOC_BUILD_STANDALONE_TRUE@ contrib/hwloc-ps.www doc @HWLOC_BUILD_STANDALONE_TRUE@am__append_3 = contrib/windows -@BUILD_NETLOC_FALSE@@HWLOC_BUILD_STANDALONE_TRUE@am__append_4 = netloc +@HWLOC_BUILD_STANDALONE_TRUE@am__append_4 = contrib/windows-cmake +@BUILD_NETLOC_FALSE@@HWLOC_BUILD_STANDALONE_TRUE@am__append_5 = netloc # JMS Need to compare hwloc.pc and netloc.pc -- I think netloc.pc is # missing some things. # pkgconfig_DATA += netloc.pc Disabled until the netloc API is public -@BUILD_NETLOC_TRUE@@HWLOC_BUILD_STANDALONE_TRUE@am__append_5 = netloc.pc -@BUILD_NETLOCSCOTCH_TRUE@@BUILD_NETLOC_TRUE@@HWLOC_BUILD_STANDALONE_TRUE@am__append_6 = netlocscotch.pc +@BUILD_NETLOC_TRUE@@HWLOC_BUILD_STANDALONE_TRUE@am__append_6 = netloc.pc +@BUILD_NETLOCSCOTCH_TRUE@@BUILD_NETLOC_TRUE@@HWLOC_BUILD_STANDALONE_TRUE@am__append_7 = netlocscotch.pc subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/hwloc.m4 \ @@ -133,7 +134,57 @@ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/include/private/autogen/config.h \ $(top_builddir)/include/hwloc/autogen/config.h -CONFIG_CLEAN_FILES = hwloc.pc netloc.pc netlocscotch.pc +CONFIG_CLEAN_FILES = doc/Makefile doc/examples/Makefile \ + doc/doxygen-config.cfg utils/Makefile utils/hwloc/Makefile \ + utils/lstopo/Makefile hwloc.pc \ + utils/netloc/infiniband/Makefile utils/netloc/draw/Makefile \ + utils/netloc/scotch/Makefile utils/netloc/mpi/Makefile \ + netloc.pc netlocscotch.pc tests/Makefile tests/hwloc/Makefile \ + tests/hwloc/linux/Makefile tests/hwloc/linux/allowed/Makefile \ + tests/hwloc/linux/gather/Makefile tests/hwloc/x86/Makefile \ + tests/hwloc/x86+linux/Makefile tests/hwloc/xml/Makefile \ + tests/hwloc/ports/Makefile tests/hwloc/rename/Makefile \ + tests/hwloc/linux/allowed/test-topology.sh \ + tests/hwloc/linux/gather/test-gather-topology.sh \ + tests/hwloc/linux/test-topology.sh \ + tests/hwloc/x86/test-topology.sh \ + tests/hwloc/x86+linux/test-topology.sh \ + tests/hwloc/xml/test-topology.sh tests/hwloc/wrapper.sh \ + utils/hwloc/hwloc-compress-dir \ + utils/hwloc/hwloc-gather-topology \ + utils/hwloc/test-hwloc-annotate.sh \ + utils/hwloc/test-hwloc-calc.sh \ + utils/hwloc/test-hwloc-compress-dir.sh \ + utils/hwloc/test-hwloc-diffpatch.sh \ + utils/hwloc/test-hwloc-distrib.sh \ + utils/hwloc/test-hwloc-info.sh \ + utils/hwloc/test-build-custom-topology.sh \ + utils/hwloc/test-fake-plugin.sh \ + utils/hwloc/test-parsing-flags.sh \ + utils/hwloc/test-hwloc-dump-hwdata/Makefile \ + utils/hwloc/test-hwloc-dump-hwdata/test-hwloc-dump-hwdata.sh \ + utils/lstopo/test-lstopo.sh utils/lstopo/test-lstopo-shmem.sh \ + utils/netloc/infiniband/netloc_ib_gather_raw \ + contrib/hwloc-ps.www/Makefile contrib/systemd/Makefile \ + contrib/completion/Makefile contrib/misc/Makefile \ + contrib/windows/Makefile tests/netloc/Makefile \ + tests/netloc/tests.sh tests/hwloc/ports/topology-solaris.c \ + tests/hwloc/ports/topology-solaris-chiptype.c \ + tests/hwloc/ports/topology-aix.c \ + tests/hwloc/ports/topology-windows.c \ + tests/hwloc/ports/topology-darwin.c \ + tests/hwloc/ports/topology-freebsd.c \ + tests/hwloc/ports/topology-netbsd.c \ + tests/hwloc/ports/topology-hpux.c \ + tests/hwloc/ports/topology-bgq.c \ + tests/hwloc/ports/topology-opencl.c \ + tests/hwloc/ports/topology-cuda.c \ + tests/hwloc/ports/topology-nvml.c \ + tests/hwloc/ports/topology-rsmi.c \ + tests/hwloc/ports/topology-levelzero.c \ + tests/hwloc/ports/topology-gl.c \ + tests/hwloc/ports/lstopo-windows.c \ + tests/hwloc/ports/lstopo-android.c CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) @@ -218,9 +269,6 @@ am__define_uniq_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)/hwloc.pc.in \ $(srcdir)/netloc.pc.in $(srcdir)/netlocscotch.pc.in \ $(top_srcdir)/./config/ar-lib $(top_srcdir)/./config/compile \ @@ -229,11 +277,63 @@ am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/hwloc.pc.in \ $(top_srcdir)/./config/install-sh \ $(top_srcdir)/./config/ltmain.sh \ $(top_srcdir)/./config/missing \ + $(top_srcdir)/contrib/completion/Makefile.in \ + $(top_srcdir)/contrib/hwloc-ps.www/Makefile.in \ + $(top_srcdir)/contrib/misc/Makefile.in \ + $(top_srcdir)/contrib/systemd/Makefile.in \ + $(top_srcdir)/contrib/windows/Makefile.in \ + $(top_srcdir)/doc/Makefile.in \ + $(top_srcdir)/doc/doxygen-config.cfg.in \ + $(top_srcdir)/doc/examples/Makefile.in \ $(top_srcdir)/include/hwloc/autogen/config.h.in \ $(top_srcdir)/include/private/autogen/config.h.in \ - ./config/ar-lib ./config/compile ./config/config.guess \ - ./config/config.sub ./config/install-sh ./config/ltmain.sh \ - ./config/missing AUTHORS COPYING NEWS README + $(top_srcdir)/tests/Makefile.in \ + $(top_srcdir)/tests/hwloc/Makefile.in \ + $(top_srcdir)/tests/hwloc/linux/Makefile.in \ + $(top_srcdir)/tests/hwloc/linux/allowed/Makefile.in \ + $(top_srcdir)/tests/hwloc/linux/allowed/test-topology.sh.in \ + $(top_srcdir)/tests/hwloc/linux/gather/Makefile.in \ + $(top_srcdir)/tests/hwloc/linux/gather/test-gather-topology.sh.in \ + $(top_srcdir)/tests/hwloc/linux/test-topology.sh.in \ + $(top_srcdir)/tests/hwloc/ports/Makefile.in \ + $(top_srcdir)/tests/hwloc/rename/Makefile.in \ + $(top_srcdir)/tests/hwloc/wrapper.sh.in \ + $(top_srcdir)/tests/hwloc/x86+linux/Makefile.in \ + $(top_srcdir)/tests/hwloc/x86+linux/test-topology.sh.in \ + $(top_srcdir)/tests/hwloc/x86/Makefile.in \ + $(top_srcdir)/tests/hwloc/x86/test-topology.sh.in \ + $(top_srcdir)/tests/hwloc/xml/Makefile.in \ + $(top_srcdir)/tests/hwloc/xml/test-topology.sh.in \ + $(top_srcdir)/tests/netloc/Makefile.in \ + $(top_srcdir)/tests/netloc/tests.sh.in \ + $(top_srcdir)/utils/Makefile.in \ + $(top_srcdir)/utils/hwloc/Makefile.in \ + $(top_srcdir)/utils/hwloc/hwloc-compress-dir.in \ + $(top_srcdir)/utils/hwloc/hwloc-gather-topology.in \ + $(top_srcdir)/utils/hwloc/test-build-custom-topology.sh.in \ + $(top_srcdir)/utils/hwloc/test-fake-plugin.sh.in \ + $(top_srcdir)/utils/hwloc/test-hwloc-annotate.sh.in \ + $(top_srcdir)/utils/hwloc/test-hwloc-calc.sh.in \ + $(top_srcdir)/utils/hwloc/test-hwloc-compress-dir.sh.in \ + $(top_srcdir)/utils/hwloc/test-hwloc-diffpatch.sh.in \ + $(top_srcdir)/utils/hwloc/test-hwloc-distrib.sh.in \ + $(top_srcdir)/utils/hwloc/test-hwloc-dump-hwdata/Makefile.in \ + $(top_srcdir)/utils/hwloc/test-hwloc-dump-hwdata/test-hwloc-dump-hwdata.sh.in \ + $(top_srcdir)/utils/hwloc/test-hwloc-info.sh.in \ + $(top_srcdir)/utils/hwloc/test-parsing-flags.sh.in \ + $(top_srcdir)/utils/lstopo/Makefile.in \ + $(top_srcdir)/utils/lstopo/lstopo-android.c \ + $(top_srcdir)/utils/lstopo/lstopo-windows.c \ + $(top_srcdir)/utils/lstopo/test-lstopo-shmem.sh.in \ + $(top_srcdir)/utils/lstopo/test-lstopo.sh.in \ + $(top_srcdir)/utils/netloc/draw/Makefile.in \ + $(top_srcdir)/utils/netloc/infiniband/Makefile.in \ + $(top_srcdir)/utils/netloc/infiniband/netloc_ib_gather_raw.in \ + $(top_srcdir)/utils/netloc/mpi/Makefile.in \ + $(top_srcdir)/utils/netloc/scotch/Makefile.in ./config/ar-lib \ + ./config/compile ./config/config.guess ./config/config.sub \ + ./config/install-sh ./config/ltmain.sh ./config/missing \ + AUTHORS COPYING NEWS README DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) @@ -282,6 +382,7 @@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ +ARCHIVEMOUNT = @ARCHIVEMOUNT@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -291,11 +392,13 @@ BASH = @BASH@ BUNZIPP = @BUNZIPP@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ -CC_FOR_BUILD = @CC_FOR_BUILD@ CFLAGS = @CFLAGS@ CONFIGURE_DEPENDENCIES = @CONFIGURE_DEPENDENCIES@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ +CUDA_VERSION = @CUDA_VERSION@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ @@ -313,6 +416,7 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EPSTOPDF = @EPSTOPDF@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FIG2DEV = @FIG2DEV@ @@ -322,7 +426,15 @@ HWLOC_CAIRO_CFLAGS = @HWLOC_CAIRO_CFLAGS@ HWLOC_CAIRO_LIBS = @HWLOC_CAIRO_LIBS@ HWLOC_CFLAGS = @HWLOC_CFLAGS@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ +HWLOC_CUDART_CFLAGS = @HWLOC_CUDART_CFLAGS@ +HWLOC_CUDART_CPPFLAGS = @HWLOC_CUDART_CPPFLAGS@ +HWLOC_CUDART_LDFLAGS = @HWLOC_CUDART_LDFLAGS@ +HWLOC_CUDART_LIBS = @HWLOC_CUDART_LIBS@ +HWLOC_CUDA_CFLAGS = @HWLOC_CUDA_CFLAGS@ +HWLOC_CUDA_CPPFLAGS = @HWLOC_CUDA_CPPFLAGS@ +HWLOC_CUDA_LDFLAGS = @HWLOC_CUDA_LDFLAGS@ HWLOC_CUDA_LIBS = @HWLOC_CUDA_LIBS@ +HWLOC_DARWIN_LDFLAGS = @HWLOC_DARWIN_LDFLAGS@ HWLOC_DIFF_U = @HWLOC_DIFF_U@ HWLOC_DIFF_W = @HWLOC_DIFF_W@ HWLOC_DL_LIBS = @HWLOC_DL_LIBS@ @@ -332,11 +444,17 @@ HWLOC_EMBEDDED_LDADD = @HWLOC_EMBEDDED_LDADD@ HWLOC_EMBEDDED_LDFLAGS = @HWLOC_EMBEDDED_LDFLAGS@ HWLOC_EMBEDDED_LIBS = @HWLOC_EMBEDDED_LIBS@ HWLOC_GL_LIBS = @HWLOC_GL_LIBS@ +HWLOC_HAVE_LEVELZERO = @HWLOC_HAVE_LEVELZERO@ HWLOC_HAVE_LIBXML2 = @HWLOC_HAVE_LIBXML2@ +HWLOC_HAVE_LINUX = @HWLOC_HAVE_LINUX@ HWLOC_HAVE_NVML = @HWLOC_HAVE_NVML@ HWLOC_HAVE_OPENCL = @HWLOC_HAVE_OPENCL@ HWLOC_HAVE_RSMI = @HWLOC_HAVE_RSMI@ +HWLOC_HAVE_X86_CPUID = @HWLOC_HAVE_X86_CPUID@ +HWLOC_IBVERBS_LIBS = @HWLOC_IBVERBS_LIBS@ HWLOC_LDFLAGS = @HWLOC_LDFLAGS@ +HWLOC_LEVELZERO_CFLAGS = @HWLOC_LEVELZERO_CFLAGS@ +HWLOC_LEVELZERO_LIBS = @HWLOC_LEVELZERO_LIBS@ HWLOC_LIBS = @HWLOC_LIBS@ HWLOC_LIBS_PRIVATE = @HWLOC_LIBS_PRIVATE@ HWLOC_LIBXML2_CFLAGS = @HWLOC_LIBXML2_CFLAGS@ @@ -346,8 +464,10 @@ HWLOC_MS_LIB = @HWLOC_MS_LIB@ HWLOC_MS_LIB_ARCH = @HWLOC_MS_LIB_ARCH@ HWLOC_NUMA_CFLAGS = @HWLOC_NUMA_CFLAGS@ HWLOC_NUMA_LIBS = @HWLOC_NUMA_LIBS@ +HWLOC_NVML_CPPFLAGS = @HWLOC_NVML_CPPFLAGS@ +HWLOC_NVML_LDFLAGS = @HWLOC_NVML_LDFLAGS@ HWLOC_NVML_LIBS = @HWLOC_NVML_LIBS@ -HWLOC_OPENCL_CFLAGS = @HWLOC_OPENCL_CFLAGS@ +HWLOC_OPENCL_CPPFLAGS = @HWLOC_OPENCL_CPPFLAGS@ HWLOC_OPENCL_LDFLAGS = @HWLOC_OPENCL_LDFLAGS@ HWLOC_OPENCL_LIBS = @HWLOC_OPENCL_LIBS@ HWLOC_PCIACCESS_CFLAGS = @HWLOC_PCIACCESS_CFLAGS@ @@ -357,6 +477,8 @@ HWLOC_PLUGINS_PATH = @HWLOC_PLUGINS_PATH@ HWLOC_PS_LIBS = @HWLOC_PS_LIBS@ HWLOC_RELEASE_DATE = @HWLOC_RELEASE_DATE@ HWLOC_REQUIRES = @HWLOC_REQUIRES@ +HWLOC_RSMI_CPPFLAGS = @HWLOC_RSMI_CPPFLAGS@ +HWLOC_RSMI_LDFLAGS = @HWLOC_RSMI_LDFLAGS@ HWLOC_RSMI_LIBS = @HWLOC_RSMI_LIBS@ HWLOC_TERMCAP_LIBS = @HWLOC_TERMCAP_LIBS@ HWLOC_VERSION = @HWLOC_VERSION@ @@ -414,6 +536,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PDFLATEX = @PDFLATEX@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ +ROCM_VERSION = @ROCM_VERSION@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ @@ -462,6 +585,7 @@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ +libhwloc_so_name = @libhwloc_so_name@ libhwloc_so_version = @libhwloc_so_version@ libnetloc_so_version = @libnetloc_so_version@ localedir = @localedir@ @@ -498,17 +622,18 @@ ACLOCAL_AMFLAGS = -I ./config # EXTRA_DIST = README VERSION COPYING AUTHORS \ config/hwloc_get_version.sh config/distscript.sh \ - config/libtool-big-sur-fixup.patch $(am__append_5) + config/libtool-big-sur-fixup.patch $(am__append_4) \ + $(am__append_6) SUBDIRS = include hwloc $(am__append_1) $(am__append_2) # Do not let automake automatically add the non-standalone dirs to the # distribution tarball if we're building in embedded mode. -DIST_SUBDIRS = $(SUBDIRS) $(am__append_3) $(am__append_4) +DIST_SUBDIRS = $(SUBDIRS) $(am__append_3) $(am__append_5) # Only install the pkg file if we're building in standalone mode (and not on Windows) @HWLOC_BUILD_STANDALONE_TRUE@hwlocpkgconfigdir = $(libdir)/pkgconfig @HWLOC_BUILD_STANDALONE_TRUE@hwlocpkgconfig_DATA = hwloc.pc \ -@HWLOC_BUILD_STANDALONE_TRUE@ $(am__append_6) +@HWLOC_BUILD_STANDALONE_TRUE@ $(am__append_7) # Only install the valgrind suppressions file if we're building in # standalone mode @@ -572,12 +697,112 @@ include/hwloc/autogen/stamp-h2: $(top_srcdir)/include/hwloc/autogen/config.h.in distclean-hdr: -rm -f include/private/autogen/config.h include/private/autogen/stamp-h1 include/hwloc/autogen/config.h include/hwloc/autogen/stamp-h2 +doc/Makefile: $(top_builddir)/config.status $(top_srcdir)/doc/Makefile.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +doc/examples/Makefile: $(top_builddir)/config.status $(top_srcdir)/doc/examples/Makefile.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +doc/doxygen-config.cfg: $(top_builddir)/config.status $(top_srcdir)/doc/doxygen-config.cfg.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +utils/Makefile: $(top_builddir)/config.status $(top_srcdir)/utils/Makefile.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +utils/hwloc/Makefile: $(top_builddir)/config.status $(top_srcdir)/utils/hwloc/Makefile.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +utils/lstopo/Makefile: $(top_builddir)/config.status $(top_srcdir)/utils/lstopo/Makefile.in + cd $(top_builddir) && $(SHELL) ./config.status $@ hwloc.pc: $(top_builddir)/config.status $(srcdir)/hwloc.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ +utils/netloc/infiniband/Makefile: $(top_builddir)/config.status $(top_srcdir)/utils/netloc/infiniband/Makefile.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +utils/netloc/draw/Makefile: $(top_builddir)/config.status $(top_srcdir)/utils/netloc/draw/Makefile.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +utils/netloc/scotch/Makefile: $(top_builddir)/config.status $(top_srcdir)/utils/netloc/scotch/Makefile.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +utils/netloc/mpi/Makefile: $(top_builddir)/config.status $(top_srcdir)/utils/netloc/mpi/Makefile.in + cd $(top_builddir) && $(SHELL) ./config.status $@ netloc.pc: $(top_builddir)/config.status $(srcdir)/netloc.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ netlocscotch.pc: $(top_builddir)/config.status $(srcdir)/netlocscotch.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ +tests/Makefile: $(top_builddir)/config.status $(top_srcdir)/tests/Makefile.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +tests/hwloc/Makefile: $(top_builddir)/config.status $(top_srcdir)/tests/hwloc/Makefile.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +tests/hwloc/linux/Makefile: $(top_builddir)/config.status $(top_srcdir)/tests/hwloc/linux/Makefile.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +tests/hwloc/linux/allowed/Makefile: $(top_builddir)/config.status $(top_srcdir)/tests/hwloc/linux/allowed/Makefile.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +tests/hwloc/linux/gather/Makefile: $(top_builddir)/config.status $(top_srcdir)/tests/hwloc/linux/gather/Makefile.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +tests/hwloc/x86/Makefile: $(top_builddir)/config.status $(top_srcdir)/tests/hwloc/x86/Makefile.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +tests/hwloc/x86+linux/Makefile: $(top_builddir)/config.status $(top_srcdir)/tests/hwloc/x86+linux/Makefile.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +tests/hwloc/xml/Makefile: $(top_builddir)/config.status $(top_srcdir)/tests/hwloc/xml/Makefile.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +tests/hwloc/ports/Makefile: $(top_builddir)/config.status $(top_srcdir)/tests/hwloc/ports/Makefile.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +tests/hwloc/rename/Makefile: $(top_builddir)/config.status $(top_srcdir)/tests/hwloc/rename/Makefile.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +tests/hwloc/linux/allowed/test-topology.sh: $(top_builddir)/config.status $(top_srcdir)/tests/hwloc/linux/allowed/test-topology.sh.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +tests/hwloc/linux/gather/test-gather-topology.sh: $(top_builddir)/config.status $(top_srcdir)/tests/hwloc/linux/gather/test-gather-topology.sh.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +tests/hwloc/linux/test-topology.sh: $(top_builddir)/config.status $(top_srcdir)/tests/hwloc/linux/test-topology.sh.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +tests/hwloc/x86/test-topology.sh: $(top_builddir)/config.status $(top_srcdir)/tests/hwloc/x86/test-topology.sh.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +tests/hwloc/x86+linux/test-topology.sh: $(top_builddir)/config.status $(top_srcdir)/tests/hwloc/x86+linux/test-topology.sh.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +tests/hwloc/xml/test-topology.sh: $(top_builddir)/config.status $(top_srcdir)/tests/hwloc/xml/test-topology.sh.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +tests/hwloc/wrapper.sh: $(top_builddir)/config.status $(top_srcdir)/tests/hwloc/wrapper.sh.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +utils/hwloc/hwloc-compress-dir: $(top_builddir)/config.status $(top_srcdir)/utils/hwloc/hwloc-compress-dir.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +utils/hwloc/hwloc-gather-topology: $(top_builddir)/config.status $(top_srcdir)/utils/hwloc/hwloc-gather-topology.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +utils/hwloc/test-hwloc-annotate.sh: $(top_builddir)/config.status $(top_srcdir)/utils/hwloc/test-hwloc-annotate.sh.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +utils/hwloc/test-hwloc-calc.sh: $(top_builddir)/config.status $(top_srcdir)/utils/hwloc/test-hwloc-calc.sh.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +utils/hwloc/test-hwloc-compress-dir.sh: $(top_builddir)/config.status $(top_srcdir)/utils/hwloc/test-hwloc-compress-dir.sh.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +utils/hwloc/test-hwloc-diffpatch.sh: $(top_builddir)/config.status $(top_srcdir)/utils/hwloc/test-hwloc-diffpatch.sh.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +utils/hwloc/test-hwloc-distrib.sh: $(top_builddir)/config.status $(top_srcdir)/utils/hwloc/test-hwloc-distrib.sh.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +utils/hwloc/test-hwloc-info.sh: $(top_builddir)/config.status $(top_srcdir)/utils/hwloc/test-hwloc-info.sh.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +utils/hwloc/test-build-custom-topology.sh: $(top_builddir)/config.status $(top_srcdir)/utils/hwloc/test-build-custom-topology.sh.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +utils/hwloc/test-fake-plugin.sh: $(top_builddir)/config.status $(top_srcdir)/utils/hwloc/test-fake-plugin.sh.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +utils/hwloc/test-parsing-flags.sh: $(top_builddir)/config.status $(top_srcdir)/utils/hwloc/test-parsing-flags.sh.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +utils/hwloc/test-hwloc-dump-hwdata/Makefile: $(top_builddir)/config.status $(top_srcdir)/utils/hwloc/test-hwloc-dump-hwdata/Makefile.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +utils/hwloc/test-hwloc-dump-hwdata/test-hwloc-dump-hwdata.sh: $(top_builddir)/config.status $(top_srcdir)/utils/hwloc/test-hwloc-dump-hwdata/test-hwloc-dump-hwdata.sh.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +utils/lstopo/test-lstopo.sh: $(top_builddir)/config.status $(top_srcdir)/utils/lstopo/test-lstopo.sh.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +utils/lstopo/test-lstopo-shmem.sh: $(top_builddir)/config.status $(top_srcdir)/utils/lstopo/test-lstopo-shmem.sh.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +utils/netloc/infiniband/netloc_ib_gather_raw: $(top_builddir)/config.status $(top_srcdir)/utils/netloc/infiniband/netloc_ib_gather_raw.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +contrib/hwloc-ps.www/Makefile: $(top_builddir)/config.status $(top_srcdir)/contrib/hwloc-ps.www/Makefile.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +contrib/systemd/Makefile: $(top_builddir)/config.status $(top_srcdir)/contrib/systemd/Makefile.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +contrib/completion/Makefile: $(top_builddir)/config.status $(top_srcdir)/contrib/completion/Makefile.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +contrib/misc/Makefile: $(top_builddir)/config.status $(top_srcdir)/contrib/misc/Makefile.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +contrib/windows/Makefile: $(top_builddir)/config.status $(top_srcdir)/contrib/windows/Makefile.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +tests/netloc/Makefile: $(top_builddir)/config.status $(top_srcdir)/tests/netloc/Makefile.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +tests/netloc/tests.sh: $(top_builddir)/config.status $(top_srcdir)/tests/netloc/tests.sh.in + cd $(top_builddir) && $(SHELL) ./config.status $@ mostlyclean-libtool: -rm -f *.lo @@ -735,7 +960,6 @@ cscopelist-am: $(am__tagged_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 @@ -973,10 +1197,10 @@ distclean-generic: maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -@HWLOC_BUILD_STANDALONE_FALSE@uninstall-local: -@HWLOC_HAVE_WINDOWS_FALSE@uninstall-local: @HWLOC_BUILD_STANDALONE_FALSE@install-data-local: @HWLOC_HAVE_WINDOWS_FALSE@install-data-local: +@HWLOC_BUILD_STANDALONE_FALSE@uninstall-local: +@HWLOC_HAVE_WINDOWS_FALSE@uninstall-local: clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am diff --git a/contrib/hwloc/NEWS b/contrib/hwloc/NEWS index 386a34f2ea..d40a8951f1 100644 --- a/contrib/hwloc/NEWS +++ b/contrib/hwloc/NEWS @@ -1,5 +1,5 @@ Copyright © 2009 CNRS -Copyright © 2009-2021 Inria. All rights reserved. +Copyright © 2009-2022 Inria. All rights reserved. Copyright © 2009-2013 Université Bordeaux Copyright © 2009-2011 Cisco Systems, Inc. All rights reserved. Copyright © 2020 Hewlett Packard Enterprise. All rights reserved. @@ -17,6 +17,169 @@ bug fixes (and other actions) for each version of hwloc since version 0.9. +Version 2.8.0 +------------- +* API + + Add HWLOC_TOPOLOGY_FLAG_NO_DISTANCES, _NO_MEMATTRS and _NO_CPUKINDS + to reduce the overhead when unneeded. + + Add separate Read/Write Bandwidth/Latency memory attributes and + implement them on Linux. +* Backends + + NUMA nodes may now have a subtype such as DRAM, HBM, SPM, or NVM + on heterogeneous memory platforms on Linux. + - Add DAXType and DAXParent attributes on Linux to tell where a + DAX device or its corresponding NUMA node come from (SPM for + Specific-Purpose or NVM for Non-Volatile Memory). + + Detect heterogeneous caches in hybrid CPUs on MacOS X, + thanks to Paul Bone for the help. + + Max frequencies are not ignored in Linux cpukinds anymore (they were + ignored in hwloc 2.7.0), but they may be slightly adjusted to avoid + reporting hybrid CPUs because Intel Turbo Boost Max 3.0. + - See the documentation of environment variable HWLOC_CPUKINDS_MAXFREQ. + + Hardwire the PCI locality of HPE Cray EX235a nodes. +* Tools + + lstopo and other tools may now load Linux and x86 cpuid topology files + from a tarball. + + lstopo may now replace the P# and L# index prefixes with custom strings + thanks to --os-index-prefix and --logical-index-prefix options. +* Misc + + Add --disable-readme to avoid regenerating the top-level hwloc README + file from the documentation. + + +Version 2.7.1 +------------- +* Workaround crashes when virtual machines report incoherent x86 CPUID + information about numbers of cores and threads. + Thanks to Peter Bense for the report. +* Use setenv() instead of putenv() when trying to force enable oneAPI L0 + support, to avoid issues with applications that touch the environment, + thanks to Josh Hursey for the patch. +* Add some warnings at the end of configure when GPU libraries are + missing on the system or their path is missing in the environment. + + +Version 2.7.0 +------------- +* Backends + + Add support for NUMA nodes and caches with more than 64 PUs across + multiple processor groups on Windows 11 and Windows Server 2022. + + Group objects are not created for Windows processor groups anymore, + except if HWLOC_WINDOWS_PROCESSOR_GROUP_OBJS=1 in the environment. + + Expose "Cluster" group objects on Linux kernel 5.16+ for CPUs + that share some internal cache or bus. This can be equivalent + to the L2 Cache level on some platforms (e.g. x86) or a specific + level between L2 and L3 on others (e.g. ARM Kungpeng 920). + Thanks to Jonathan Cameron for the help. + - HWLOC_DONT_MERGE_CLUSTER_GROUPS=1 may be set in the environment + to prevent these groups from being merged with identical caches, etc. + + Improve the oneAPI LevelZero backend: + - Expose subdevices such as "ze0.1" inside root OS devices ("ze0") + when the hardware contains multiple subdevices. + - Add many new attributes to describe device type, and the + numbers of slices, subslices, execution units and threads. + - Expose the memory information as LevelZeroHBM/DDR/MemorySize infos. + + Ignore the max frequencies of cores in Linux cpukinds when the + base frequencies are available (to avoid exposing hybrid CPUs + when Intel Turbo Boost Max 3.0 gives slightly different max + frequencies to CPU cores). + - May be reverted by setting HWLOC_CPUKINDS_MAXFREQ=1 in the environment. +* Tools + + Add --grey and --palette options to switch lstopo to greyscale or + white-background-only graphics, or to tune individual colors. +* Build + + Windows CMake builds now support non-MSVC compilers, detect several + features at build time, can build/run tests, etc. + Thanks to Michael Hirsch and Alexander Neumann . + + +Version 2.6.0 +------------- +* Backends + + Expose two cpukinds for energy-efficient cores (icestorm) and + high-performance cores (firestorm) on Apple M1 on Mac OS X. + + Use sysfs CPU "capacity" to rank hybrid cores by efficiency + on Linux when available (mostly on recent ARM platforms for now). + + Improve HWLOC_MEMBIND_BIND (without the STRICT flag) on Linux kernel + >= 5.15: If more than one node is given, the kernel may now use all + of them instead of only the first one before falling back to others. + + Expose cache os_index when available on Linux, it may be needed + when using resctrl to configure cache partitioning, memory bandwidth + monitoring, etc. + + Add a "XGMIHops" distances matrix in the RSMI backend for AMD GPU + interconnected through XGMI links. + + Expose AMD GPU memory information (VRAM and GTT) in the RSMI backend. + + Add OS devices such as "bxi0" for Atos/Bull BXI HCAs on Linux. +* Tools + + lstopo has a better placement algorithm with respect to I/O + objects, see --children-order in the manpage for details. + + hwloc-annotate may now change object subtypes and cache or memory + sizes. +* Build + + Allow to specify the ROCm installation for building the RSMI backend: + - Use a custom installation path if specified with --with-rocm=. + - Use /opt/rocm- if specified with --with-rocm-version= + or the ROCM_VERSION environment variable. + - Try /opt/rocm if it exists. + - See "How do I enable ROCm SMI and select which version to use?" + in the FAQ for details. + + Add a CMakeLists for Windows under contrib/windows-cmake/ . +* Documentation + + Add FAQ entry "How do I create a custom heterogeneous and + asymmetric topology?" + + +Version 2.5.0 +------------- +* API + + Add hwloc/windows.h to query Windows processor groups. + + Add hwloc_get_obj_with_same_locality() to convert between objects + with same locality, for instance NUMA nodes and Packages, + or OS devices within a PCI device. + + Add hwloc_distances_transform() to modify distances structures. + - hwloc-annotate and lstopo have new distances-transform options. + + hwloc_distances_add() is replaced with _add_create() followed by + _add_values() and _add_commit(). See hwloc/distances.h for details. + + Add topology flags to mitigate binding modifications during + hwloc discovery, especially on Windows: + - HWLOC_TOPOLOGY_FLAG_RESTRICT_TO_CPUBINDING and _MEMBINDING + restrict discovery to PUs and NUMA nodes inside the binding. + - HWLOC_TOPOLOGY_FLAG_DONT_CHANGE_BINDING prevents from ever + changing the binding during discovery. +* Backends + + Add a levelzero backend for oneAPI L0 devices, exposed as OS devices + of subtype "LevelZero" and name such as "ze0". + - Add hwloc/levelzero.h for interoperability between converting + between L0 API devices and hwloc cpusets or OS devices. + + Expose NEC Vector Engine cards on Linux as OS devices of subtype + "VectorEngine" and name "ve0", etc. + Thanks to Anara Kozhokanova, Tim Cramer and Erich Focht for the help. + + Add a NVLinkBandwidth distances structure between NVIDIA GPUs + (and POWER processor or NVSwitches) in the NVML backend, + and a XGMIBandwidth distances structure between AMD GPUs + in the RSMI backends. + - See "Topology Attributes: Distances, Memory Attributes and CPU Kinds" + in the documentation for details about these new distances. + + Add support for NUMA node 0 being offline in Linux, thanks to Jirka Hladky. +* Build + + Add --with-cuda-version= or look at the CUDA_VERSION + environment variable to find the appropriate CUDA pkg-config files. + Thanks to Stephen Herbein for the suggestion. + - Also add --with-cuda= to specify the CUDA installation path + manually (and its NVML and OpenCL components). + Thanks to Andrea Bocci for the suggestion. + - See "How do I enable CUDA and select which CUDA version to use?" + in the FAQ for details. +* Tools + + lstopo now has a --windows-processor-groups option on Windows. + + hwloc-ps now has a --short-name option to avoid long/truncated + command path. + + hwloc-ps now has a --single-ancestor option to return a single + (possibly too large) object where a process is bound. + + hwloc-ps --pid-cmd may now query environment variables, + including MPI-specific variables to find out process ranks. + + Version 2.4.1 ------------- * Fix AMD OpenCL device locality when PCI bus or device number >= 128. diff --git a/contrib/hwloc/README b/contrib/hwloc/README index 932d6d09d7..43210e636c 100644 --- a/contrib/hwloc/README +++ b/contrib/hwloc/README @@ -78,7 +78,7 @@ debug and report issues. Questions may be sent to the users or developers mailing lists (https:// www.open-mpi.org/community/lists/hwloc.php). -There is also a #hwloc IRC channel on Freenode (irc.freenode.net). +There is also a #hwloc IRC channel on Libera Chat (irc.libera.chat). diff --git a/contrib/hwloc/VERSION b/contrib/hwloc/VERSION index 2f16300342..684b477d24 100644 --- a/contrib/hwloc/VERSION +++ b/contrib/hwloc/VERSION @@ -8,8 +8,8 @@ # Please update HWLOC_VERSION* in contrib/windows/hwloc_config.h too. major=2 -minor=4 -release=1 +minor=8 +release=0 # 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 @@ -22,7 +22,7 @@ greek= # The date when this release was created -date="Feb 11, 2021" +date="Jun 29, 2022" # If snapshot=1, then use the value from snapshot_version as the # entire hwloc version (i.e., ignore major, minor, release, and @@ -41,7 +41,7 @@ snapshot_version=${major}.${minor}.${release}${greek}-git # 2. Version numbers are described in the Libtool current:revision:age # format. -libhwloc_so_version=19:1:4 +libhwloc_so_version=21:0:6 libnetloc_so_version=0:0:0 # Please also update the lines in contrib/windows/libhwloc.vcxproj diff --git a/contrib/hwloc/aclocal.m4 b/contrib/hwloc/aclocal.m4 index 1a6d040011..008d0b2eeb 100644 --- a/contrib/hwloc/aclocal.m4 +++ b/contrib/hwloc/aclocal.m4 @@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.16.3 -*- Autoconf -*- +# generated automatically by aclocal 1.16.5 -*- Autoconf -*- -# Copyright (C) 1996-2020 Free Software Foundation, Inc. +# Copyright (C) 1996-2021 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -14,13 +14,13 @@ 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. +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.71],, +[m4_warning([this file was generated for autoconf 2.71. 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. +# Copyright (C) 2002-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -35,7 +35,7 @@ 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.3], [], +m4_if([$1], [1.16.5], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -51,12 +51,12 @@ m4_define([_AM_AUTOCONF_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.3])dnl +[AM_AUTOMAKE_VERSION([1.16.5])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) -# Copyright (C) 2011-2020 Free Software Foundation, Inc. +# Copyright (C) 2011-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -118,7 +118,7 @@ AC_SUBST([AR])dnl # AM_AUX_DIR_EXPAND -*- Autoconf -*- -# Copyright (C) 2001-2020 Free Software Foundation, Inc. +# Copyright (C) 2001-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -170,7 +170,7 @@ am_aux_dir=`cd "$ac_aux_dir" && pwd` # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997-2020 Free Software Foundation, Inc. +# Copyright (C) 1997-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -201,7 +201,7 @@ AC_CONFIG_COMMANDS_PRE( Usually this means the macro was only invoked conditionally.]]) fi])]) -# Copyright (C) 1999-2020 Free Software Foundation, Inc. +# Copyright (C) 1999-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -392,7 +392,7 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl # Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999-2020 Free Software Foundation, Inc. +# Copyright (C) 1999-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -460,7 +460,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996-2020 Free Software Foundation, Inc. +# Copyright (C) 1996-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -488,6 +488,10 @@ m4_defn([AC_PROG_CC]) # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.65])dnl +m4_ifdef([_$0_ALREADY_INIT], + [m4_fatal([$0 expanded multiple times +]m4_defn([_$0_ALREADY_INIT]))], + [m4_define([_$0_ALREADY_INIT], m4_expansion_stack)])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 @@ -524,7 +528,7 @@ m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl [_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]), + m4_ifset([AC_PACKAGE_NAME], [ok]):m4_ifset([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 @@ -576,6 +580,20 @@ AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], [m4_define([AC_PROG_OBJCXX], m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl ]) +# Variables for tags utilities; see am/tags.am +if test -z "$CTAGS"; then + CTAGS=ctags +fi +AC_SUBST([CTAGS]) +if test -z "$ETAGS"; then + ETAGS=etags +fi +AC_SUBST([ETAGS]) +if test -z "$CSCOPE"; then + CSCOPE=cscope +fi +AC_SUBST([CSCOPE]) + 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 @@ -657,7 +675,7 @@ for _am_header in $config_headers :; do done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001-2020 Free Software Foundation, Inc. +# Copyright (C) 2001-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -678,7 +696,7 @@ if test x"${install_sh+set}" != xset; then fi AC_SUBST([install_sh])]) -# Copyright (C) 2003-2020 Free Software Foundation, Inc. +# Copyright (C) 2003-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -699,7 +717,7 @@ AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001-2020 Free Software Foundation, Inc. +# Copyright (C) 2001-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -742,7 +760,7 @@ AC_SUBST([am__quote])]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997-2020 Free Software Foundation, Inc. +# Copyright (C) 1997-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -776,7 +794,7 @@ fi # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001-2020 Free Software Foundation, Inc. +# Copyright (C) 2001-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -805,7 +823,7 @@ AC_DEFUN([_AM_SET_OPTIONS], AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) -# Copyright (C) 1999-2020 Free Software Foundation, Inc. +# Copyright (C) 1999-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -852,7 +870,7 @@ 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. +# Copyright (C) 2001-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -871,7 +889,7 @@ AC_DEFUN([AM_RUN_LOG], # Check to make sure that the build environment is sane. -*- Autoconf -*- -# Copyright (C) 1996-2020 Free Software Foundation, Inc. +# Copyright (C) 1996-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -952,7 +970,7 @@ AC_CONFIG_COMMANDS_PRE( rm -f conftest.file ]) -# Copyright (C) 2009-2020 Free Software Foundation, Inc. +# Copyright (C) 2009-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1012,7 +1030,7 @@ AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) -# Copyright (C) 2001-2020 Free Software Foundation, Inc. +# Copyright (C) 2001-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1040,7 +1058,7 @@ fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# Copyright (C) 2006-2020 Free Software Foundation, Inc. +# Copyright (C) 2006-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1059,7 +1077,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004-2020 Free Software Foundation, Inc. +# Copyright (C) 2004-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff --git a/contrib/hwloc/config/ar-lib b/contrib/hwloc/config/ar-lib index 1e9388e2ae..c349042c3f 100755 --- a/contrib/hwloc/config/ar-lib +++ b/contrib/hwloc/config/ar-lib @@ -4,7 +4,7 @@ me=ar-lib scriptversion=2019-07-04.01; # UTC -# Copyright (C) 2010-2020 Free Software Foundation, Inc. +# Copyright (C) 2010-2021 Free Software Foundation, Inc. # Written by Peter Rosin . # # This program is free software; you can redistribute it and/or modify diff --git a/contrib/hwloc/config/compile b/contrib/hwloc/config/compile index 23fcba0113..df363c8fbf 100755 --- a/contrib/hwloc/config/compile +++ b/contrib/hwloc/config/compile @@ -3,7 +3,7 @@ scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1999-2020 Free Software Foundation, Inc. +# Copyright (C) 1999-2021 Free Software Foundation, Inc. # Written by Tom Tromey . # # This program is free software; you can redistribute it and/or modify diff --git a/contrib/hwloc/config/config.guess b/contrib/hwloc/config/config.guess index 0fc11edb2d..7f76b6228f 100755 --- a/contrib/hwloc/config/config.guess +++ b/contrib/hwloc/config/config.guess @@ -1,12 +1,14 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright 1992-2020 Free Software Foundation, Inc. +# Copyright 1992-2022 Free Software Foundation, Inc. -timestamp='2020-11-07' +# shellcheck disable=SC2006,SC2268 # see below for rationale + +timestamp='2022-01-09' # 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 +# 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 @@ -27,12 +29,20 @@ timestamp='2020-11-07' # 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/gitweb/?p=config.git;a=blob_plain;f=config.guess +# https://git.savannah.gnu.org/cgit/config.git/plain/config.guess # # Please send patches to . -me=$(echo "$0" | sed -e 's,.*/,,') +# The "shellcheck disable" line above the timestamp inhibits complaints +# about features and limitations of the classic Bourne shell that were +# superseded or lifted in POSIX. However, this script identifies a wide +# variety of pre-POSIX systems that do not have POSIX shells at all, and +# even some reasonably current systems (Solaris 10 as case-in-point) still +# have a pre-POSIX /bin/sh. + + +me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] @@ -50,7 +60,7 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright 1992-2020 Free Software Foundation, Inc. +Copyright 1992-2022 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." @@ -84,6 +94,9 @@ if test $# != 0; then exit 1 fi +# Just in case it came from the environment. +GUESS= + # 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 @@ -102,8 +115,8 @@ 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" ; } || + # shellcheck disable=SC2039,SC3028 + { 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 ; } @@ -112,7 +125,7 @@ set_cc_for_build() { ,,) 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" + CC_FOR_BUILD=$driver break fi done @@ -131,16 +144,14 @@ 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 +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 +case $UNAME_SYSTEM in Linux|GNU|GNU/*) - # If the system lacks a compiler, then just pick glibc. - # We could probably try harder. - LIBC=gnu + LIBC=unknown set_cc_for_build cat <<-EOF > "$dummy.c" @@ -149,22 +160,37 @@ Linux|GNU|GNU/*) 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 - #else - LIBC=gnu #endif #endif EOF - eval "$($CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g')" + cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` + eval "$cc_set_libc" + + # 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 +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*, @@ -176,12 +202,11 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". - sysctl="sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=$( (uname -p 2>/dev/null || \ - "/sbin/$sysctl" 2>/dev/null || \ - "/usr/sbin/$sysctl" 2>/dev/null || \ - echo unknown)) - case "$UNAME_MACHINE_ARCH" in + 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 ;; @@ -189,15 +214,15 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in 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 + 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 ;; + *) 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 + case $UNAME_MACHINE_ARCH in earm*) os=netbsdelf ;; @@ -218,10 +243,10 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in ;; esac # Determine ABI tags. - case "$UNAME_MACHINE_ARCH" in + case $UNAME_MACHINE_ARCH in earm*) expr='s/^earmv[0-9]/-eabi/;s/eb$//' - abi=$(echo "$UNAME_MACHINE_ARCH" | sed -e "$expr") + abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"` ;; esac # The OS release @@ -229,76 +254,82 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in # 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 + case $UNAME_VERSION in Debian*) release='-gnu' ;; *) - release=$(echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2) + 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 ;; + GUESS=$machine-${os}${release}${abi-} + ;; *:Bitrig:*:*) - UNAME_MACHINE_ARCH=$(arch | sed 's/Bitrig.//') - echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE" - exit ;; + UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` + GUESS=$UNAME_MACHINE_ARCH-unknown-bitrig$UNAME_RELEASE + ;; *:OpenBSD:*:*) - UNAME_MACHINE_ARCH=$(arch | sed 's/OpenBSD.//') - echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE" - exit ;; + UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` + GUESS=$UNAME_MACHINE_ARCH-unknown-openbsd$UNAME_RELEASE + ;; + *:SecBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/SecBSD.//'` + GUESS=$UNAME_MACHINE_ARCH-unknown-secbsd$UNAME_RELEASE + ;; *:LibertyBSD:*:*) - UNAME_MACHINE_ARCH=$(arch | sed 's/^.*BSD\.//') - echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE" - exit ;; + UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` + GUESS=$UNAME_MACHINE_ARCH-unknown-libertybsd$UNAME_RELEASE + ;; *:MidnightBSD:*:*) - echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-unknown-midnightbsd$UNAME_RELEASE + ;; *:ekkoBSD:*:*) - echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-unknown-ekkobsd$UNAME_RELEASE + ;; *:SolidBSD:*:*) - echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-unknown-solidbsd$UNAME_RELEASE + ;; *:OS108:*:*) - echo "$UNAME_MACHINE"-unknown-os108_"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-unknown-os108_$UNAME_RELEASE + ;; macppc:MirBSD:*:*) - echo powerpc-unknown-mirbsd"$UNAME_RELEASE" - exit ;; + GUESS=powerpc-unknown-mirbsd$UNAME_RELEASE + ;; *:MirBSD:*:*) - echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-unknown-mirbsd$UNAME_RELEASE + ;; *:Sortix:*:*) - echo "$UNAME_MACHINE"-unknown-sortix - exit ;; + GUESS=$UNAME_MACHINE-unknown-sortix + ;; *:Twizzler:*:*) - echo "$UNAME_MACHINE"-unknown-twizzler - exit ;; + GUESS=$UNAME_MACHINE-unknown-twizzler + ;; *:Redox:*:*) - echo "$UNAME_MACHINE"-unknown-redox - exit ;; + GUESS=$UNAME_MACHINE-unknown-redox + ;; mips:OSF1:*.*) - echo mips-dec-osf1 - exit ;; + GUESS=mips-dec-osf1 + ;; alpha:OSF1:*:*) + # Reset EXIT trap before exiting to avoid spurious non-zero exit code. + trap '' 0 case $UNAME_RELEASE in *4.0) - UNAME_RELEASE=$(/usr/sbin/sizer -v | awk '{print $3}') + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) - UNAME_RELEASE=$(/usr/sbin/sizer -v | awk '{print $4}') + 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 + 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)") @@ -335,68 +366,69 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in # 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 ;; + OSF_REL=`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` + GUESS=$UNAME_MACHINE-dec-osf$OSF_REL + ;; Amiga*:UNIX_System_V:4.0:*) - echo m68k-unknown-sysv4 - exit ;; + GUESS=m68k-unknown-sysv4 + ;; *:[Aa]miga[Oo][Ss]:*:*) - echo "$UNAME_MACHINE"-unknown-amigaos - exit ;; + GUESS=$UNAME_MACHINE-unknown-amigaos + ;; *:[Mm]orph[Oo][Ss]:*:*) - echo "$UNAME_MACHINE"-unknown-morphos - exit ;; + GUESS=$UNAME_MACHINE-unknown-morphos + ;; *:OS/390:*:*) - echo i370-ibm-openedition - exit ;; + GUESS=i370-ibm-openedition + ;; *:z/VM:*:*) - echo s390-ibm-zvmoe - exit ;; + GUESS=s390-ibm-zvmoe + ;; *:OS400:*:*) - echo powerpc-ibm-os400 - exit ;; + GUESS=powerpc-ibm-os400 + ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix"$UNAME_RELEASE" - exit ;; + GUESS=arm-acorn-riscix$UNAME_RELEASE + ;; arm*:riscos:*:*|arm*:RISCOS:*:*) - echo arm-unknown-riscos - exit ;; + GUESS=arm-unknown-riscos + ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp - exit ;; + GUESS=hppa1.1-hitachi-hiuxmpp + ;; 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 ;; + case `(/bin/universe) 2>/dev/null` in + att) GUESS=pyramid-pyramid-sysv3 ;; + *) GUESS=pyramid-pyramid-bsd ;; + esac + ;; NILE*:*:*:dcosx) - echo pyramid-pyramid-svr4 - exit ;; + GUESS=pyramid-pyramid-svr4 + ;; DRS?6000:unix:4.0:6*) - echo sparc-icl-nx6 - exit ;; + GUESS=sparc-icl-nx6 + ;; 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 ;; + case `/usr/bin/uname -p` in + sparc) GUESS=sparc-icl-nx7 ;; + esac + ;; s390x:SunOS:*:*) - echo "$UNAME_MACHINE"-ibm-solaris2"$(echo "$UNAME_RELEASE" | sed -e 's/[^.]*//')" - exit ;; + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=$UNAME_MACHINE-ibm-solaris2$SUN_REL + ;; sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//')" - exit ;; + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=sparc-hal-solaris2$SUN_REL + ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2"$(echo "$UNAME_RELEASE" | sed -e 's/[^.]*//')" - exit ;; + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=sparc-sun-solaris2$SUN_REL + ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) - echo i386-pc-auroraux"$UNAME_RELEASE" - exit ;; + GUESS=i386-pc-auroraux$UNAME_RELEASE + ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) set_cc_for_build SUN_ARCH=i386 @@ -405,47 +437,50 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in # 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) | \ + (CCOPTS="" $CC_FOR_BUILD -m64 -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 ;; + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=$SUN_ARCH-pc-solaris2$SUN_REL + ;; 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 ;; + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=sparc-sun-solaris3$SUN_REL + ;; sun4*:SunOS:*:*) - case "$(/usr/bin/arch -k)" in + case `/usr/bin/arch -k` in Series*|S4*) - UNAME_RELEASE=$(uname -v) + 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 ;; + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/'` + GUESS=sparc-sun-sunos$SUN_REL + ;; sun3*:SunOS:*:*) - echo m68k-sun-sunos"$UNAME_RELEASE" - exit ;; + GUESS=m68k-sun-sunos$UNAME_RELEASE + ;; sun*:*:4.2BSD:*) - UNAME_RELEASE=$( (sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null) + 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 + case `/bin/arch` in sun3) - echo m68k-sun-sunos"$UNAME_RELEASE" + GUESS=m68k-sun-sunos$UNAME_RELEASE ;; sun4) - echo sparc-sun-sunos"$UNAME_RELEASE" + GUESS=sparc-sun-sunos$UNAME_RELEASE ;; esac - exit ;; + ;; aushp:SunOS:*:*) - echo sparc-auspex-sunos"$UNAME_RELEASE" - exit ;; + GUESS=sparc-auspex-sunos$UNAME_RELEASE + ;; # 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 @@ -455,41 +490,41 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in # 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 ;; + GUESS=m68k-atari-mint$UNAME_RELEASE + ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint"$UNAME_RELEASE" - exit ;; + GUESS=m68k-atari-mint$UNAME_RELEASE + ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint"$UNAME_RELEASE" - exit ;; + GUESS=m68k-atari-mint$UNAME_RELEASE + ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint"$UNAME_RELEASE" - exit ;; + GUESS=m68k-milan-mint$UNAME_RELEASE + ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint"$UNAME_RELEASE" - exit ;; + GUESS=m68k-hades-mint$UNAME_RELEASE + ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint"$UNAME_RELEASE" - exit ;; + GUESS=m68k-unknown-mint$UNAME_RELEASE + ;; m68k:machten:*:*) - echo m68k-apple-machten"$UNAME_RELEASE" - exit ;; + GUESS=m68k-apple-machten$UNAME_RELEASE + ;; powerpc:machten:*:*) - echo powerpc-apple-machten"$UNAME_RELEASE" - exit ;; + GUESS=powerpc-apple-machten$UNAME_RELEASE + ;; RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 - exit ;; + GUESS=mips-dec-mach_bsd4.3 + ;; RISC*:ULTRIX:*:*) - echo mips-dec-ultrix"$UNAME_RELEASE" - exit ;; + GUESS=mips-dec-ultrix$UNAME_RELEASE + ;; VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix"$UNAME_RELEASE" - exit ;; + GUESS=vax-dec-ultrix$UNAME_RELEASE + ;; 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix"$UNAME_RELEASE" - exit ;; + GUESS=clipper-intergraph-clix$UNAME_RELEASE + ;; mips:*:*:UMIPS | mips:*:*:RISCos) set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" @@ -514,78 +549,79 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in } EOF $CC_FOR_BUILD -o "$dummy" "$dummy.c" && - dummyarg=$(echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p') && - SYSTEM_NAME=$("$dummy" "$dummyarg") && + 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 ;; + GUESS=mips-mips-riscos$UNAME_RELEASE + ;; Motorola:PowerMAX_OS:*:*) - echo powerpc-motorola-powermax - exit ;; + GUESS=powerpc-motorola-powermax + ;; Motorola:*:4.3:PL8-*) - echo powerpc-harris-powermax - exit ;; + GUESS=powerpc-harris-powermax + ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) - echo powerpc-harris-powermax - exit ;; + GUESS=powerpc-harris-powermax + ;; Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix - exit ;; + GUESS=powerpc-harris-powerunix + ;; m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 - exit ;; + GUESS=m88k-harris-cxux7 + ;; m88k:*:4*:R4*) - echo m88k-motorola-sysv4 - exit ;; + GUESS=m88k-motorola-sysv4 + ;; m88k:*:3*:R3*) - echo m88k-motorola-sysv3 - exit ;; + GUESS=m88k-motorola-sysv3 + ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=$(/usr/bin/uname -p) + 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" + GUESS=m88k-dg-dgux$UNAME_RELEASE else - echo m88k-dg-dguxbcs"$UNAME_RELEASE" + GUESS=m88k-dg-dguxbcs$UNAME_RELEASE fi else - echo i586-dg-dgux"$UNAME_RELEASE" + GUESS=i586-dg-dgux$UNAME_RELEASE fi - exit ;; + ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 - exit ;; + GUESS=m88k-dolphin-sysv3 + ;; M88*:*:R3*:*) # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 - exit ;; + GUESS=m88k-motorola-sysv3 + ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 - exit ;; + GUESS=m88k-tektronix-sysv3 + ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - echo m68k-tektronix-bsd - exit ;; + GUESS=m68k-tektronix-bsd + ;; *:IRIX*:*:*) - echo mips-sgi-irix"$(echo "$UNAME_RELEASE"|sed -e 's/-/_/g')" - exit ;; + IRIX_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/g'` + GUESS=mips-sgi-irix$IRIX_REL + ;; ????????: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 ' + GUESS=romp-ibm-aix # uname -m gives an 8 hex-code CPU id + ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) - echo i386-ibm-aix - exit ;; + GUESS=i386-ibm-aix + ;; ia64:AIX:*:*) if test -x /usr/bin/oslevel ; then - IBM_REV=$(/usr/bin/oslevel) + IBM_REV=`/usr/bin/oslevel` else - IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" + IBM_REV=$UNAME_VERSION.$UNAME_RELEASE fi - echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV" - exit ;; + GUESS=$UNAME_MACHINE-ibm-aix$IBM_REV + ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then set_cc_for_build @@ -600,68 +636,68 @@ EOF exit(0); } EOF - if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=$("$dummy") + if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` then - echo "$SYSTEM_NAME" + GUESS=$SYSTEM_NAME else - echo rs6000-ibm-aix3.2.5 + GUESS=rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 + GUESS=rs6000-ibm-aix3.2.4 else - echo rs6000-ibm-aix3.2 + GUESS=rs6000-ibm-aix3.2 fi - exit ;; + ;; *:AIX:*:[4567]) - IBM_CPU_ID=$(/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }') + 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/) + 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" + IBM_REV=$UNAME_VERSION.$UNAME_RELEASE fi - echo "$IBM_ARCH"-ibm-aix"$IBM_REV" - exit ;; + GUESS=$IBM_ARCH-ibm-aix$IBM_REV + ;; *:AIX:*:*) - echo rs6000-ibm-aix - exit ;; + GUESS=rs6000-ibm-aix + ;; ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*) - echo romp-ibm-bsd4.4 - exit ;; + GUESS=romp-ibm-bsd4.4 + ;; 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 + GUESS=romp-ibm-bsd$UNAME_RELEASE # 4.3 with uname added to + ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) - echo rs6000-bull-bosx - exit ;; + GUESS=rs6000-bull-bosx + ;; DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 - exit ;; + GUESS=m68k-bull-sysv3 + ;; 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd - exit ;; + GUESS=m68k-hp-bsd + ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 - exit ;; + GUESS=m68k-hp-bsd4.4 + ;; 9000/[34678]??:HP-UX:*:*) - HPUX_REV=$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//') - case "$UNAME_MACHINE" in + 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 + 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 + case $sc_kernel_bits in 32) HP_ARCH=hppa2.0n ;; 64) HP_ARCH=hppa2.0w ;; '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 @@ -703,7 +739,7 @@ EOF exit (0); } EOF - (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=$("$dummy") + (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac @@ -728,12 +764,12 @@ EOF HP_ARCH=hppa64 fi fi - echo "$HP_ARCH"-hp-hpux"$HPUX_REV" - exit ;; + GUESS=$HP_ARCH-hp-hpux$HPUX_REV + ;; ia64:HP-UX:*:*) - HPUX_REV=$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//') - echo ia64-hp-hpux"$HPUX_REV" - exit ;; + HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'` + GUESS=ia64-hp-hpux$HPUX_REV + ;; 3050*:HI-UX:*:*) set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" @@ -761,38 +797,38 @@ EOF exit (0); } EOF - $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=$("$dummy") && + $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` && { echo "$SYSTEM_NAME"; exit; } - echo unknown-hitachi-hiuxwe2 - exit ;; + GUESS=unknown-hitachi-hiuxwe2 + ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*) - echo hppa1.1-hp-bsd - exit ;; + GUESS=hppa1.1-hp-bsd + ;; 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd - exit ;; + GUESS=hppa1.0-hp-bsd + ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) - echo hppa1.0-hp-mpeix - exit ;; + GUESS=hppa1.0-hp-mpeix + ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*) - echo hppa1.1-hp-osf - exit ;; + GUESS=hppa1.1-hp-osf + ;; hp8??:OSF1:*:*) - echo hppa1.0-hp-osf - exit ;; + GUESS=hppa1.0-hp-osf + ;; i*86:OSF1:*:*) if test -x /usr/sbin/sysversion ; then - echo "$UNAME_MACHINE"-unknown-osf1mk + GUESS=$UNAME_MACHINE-unknown-osf1mk else - echo "$UNAME_MACHINE"-unknown-osf1 + GUESS=$UNAME_MACHINE-unknown-osf1 fi - exit ;; + ;; parisc*:Lites*:*:*) - echo hppa1.1-hp-lites - exit ;; + GUESS=hppa1.1-hp-lites + ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd - exit ;; + GUESS=c1-convex-bsd + ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd @@ -800,17 +836,18 @@ EOF fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd - exit ;; + GUESS=c34-convex-bsd + ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd - exit ;; + GUESS=c38-convex-bsd + ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd - exit ;; + GUESS=c4-convex-bsd + ;; CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' - exit ;; + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` + GUESS=ymp-cray-unicos$CRAY_REL + ;; CRAY*[A-Z]90:*:*:*) echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ @@ -818,114 +855,129 @@ EOF -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) - echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' - exit ;; + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` + GUESS=t90-cray-unicos$CRAY_REL + ;; CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' - exit ;; + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` + GUESS=alphaev5-cray-unicosmk$CRAY_REL + ;; CRAY*SV1:*:*:*) - echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' - exit ;; + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` + GUESS=sv1-cray-unicos$CRAY_REL + ;; *:UNICOS/mp:*:*) - echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' - exit ;; + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` + GUESS=craynv-cray-unicosmp$CRAY_REL + ;; 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 ;; + 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/ /_/'` + GUESS=${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL} + ;; 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 ;; + FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` + FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` + GUESS=sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL} + ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-pc-bsdi$UNAME_RELEASE + ;; sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi"$UNAME_RELEASE" - exit ;; + GUESS=sparc-unknown-bsdi$UNAME_RELEASE + ;; *:BSD/OS:*:*) - echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-unknown-bsdi$UNAME_RELEASE + ;; arm:FreeBSD:*:*) - UNAME_PROCESSOR=$(uname -p) + 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 + FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` + GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabi else - echo "${UNAME_PROCESSOR}"-unknown-freebsd"$(echo ${UNAME_RELEASE}|sed -e 's/[-(].*//')"-gnueabihf + FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` + GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabihf fi - exit ;; + ;; *:FreeBSD:*:*) - UNAME_PROCESSOR=$(/usr/bin/uname -p) - case "$UNAME_PROCESSOR" in + 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 ;; + FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` + GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL + ;; i*:CYGWIN*:*) - echo "$UNAME_MACHINE"-pc-cygwin - exit ;; + GUESS=$UNAME_MACHINE-pc-cygwin + ;; *:MINGW64*:*) - echo "$UNAME_MACHINE"-pc-mingw64 - exit ;; + GUESS=$UNAME_MACHINE-pc-mingw64 + ;; *:MINGW*:*) - echo "$UNAME_MACHINE"-pc-mingw32 - exit ;; + GUESS=$UNAME_MACHINE-pc-mingw32 + ;; *:MSYS*:*) - echo "$UNAME_MACHINE"-pc-msys - exit ;; + GUESS=$UNAME_MACHINE-pc-msys + ;; i*:PW*:*) - echo "$UNAME_MACHINE"-pc-pw32 - exit ;; + GUESS=$UNAME_MACHINE-pc-pw32 + ;; + *:SerenityOS:*:*) + GUESS=$UNAME_MACHINE-pc-serenity + ;; *:Interix*:*) - case "$UNAME_MACHINE" in + case $UNAME_MACHINE in x86) - echo i586-pc-interix"$UNAME_RELEASE" - exit ;; + GUESS=i586-pc-interix$UNAME_RELEASE + ;; authenticamd | genuineintel | EM64T) - echo x86_64-unknown-interix"$UNAME_RELEASE" - exit ;; + GUESS=x86_64-unknown-interix$UNAME_RELEASE + ;; IA64) - echo ia64-unknown-interix"$UNAME_RELEASE" - exit ;; + GUESS=ia64-unknown-interix$UNAME_RELEASE + ;; esac ;; i*:UWIN*:*) - echo "$UNAME_MACHINE"-pc-uwin - exit ;; + GUESS=$UNAME_MACHINE-pc-uwin + ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) - echo x86_64-pc-cygwin - exit ;; + GUESS=x86_64-pc-cygwin + ;; prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//')" - exit ;; + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=powerpcle-unknown-solaris2$SUN_REL + ;; *:GNU:*:*) # the GNU system - echo "$(echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,')-unknown-$LIBC$(echo "$UNAME_RELEASE"|sed -e 's,/.*$,,')" - exit ;; + GNU_ARCH=`echo "$UNAME_MACHINE" | sed -e 's,[-/].*$,,'` + GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's,/.*$,,'` + GUESS=$GNU_ARCH-unknown-$LIBC$GNU_REL + ;; *: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 ;; + GNU_SYS=`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"` + GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` + GUESS=$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC + ;; *:Minix:*:*) - echo "$UNAME_MACHINE"-unknown-minix - exit ;; + GUESS=$UNAME_MACHINE-unknown-minix + ;; aarch64:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; alpha:Linux:*:*) - case $(sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null) in + 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 ;; @@ -936,60 +988,63 @@ EOF 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 ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + arc:Linux:*:* | arceb:Linux:*:* | arc32:Linux:*:* | arc64:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; 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" + GUESS=$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 + GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabi else - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf + GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabihf fi fi - exit ;; + ;; avr32*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; cris:Linux:*:*) - echo "$UNAME_MACHINE"-axis-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-axis-linux-$LIBC + ;; crisv32:Linux:*:*) - echo "$UNAME_MACHINE"-axis-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-axis-linux-$LIBC + ;; e2k:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; frv:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; hexagon:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; i*86:Linux:*:*) - echo "$UNAME_MACHINE"-pc-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-pc-linux-$LIBC + ;; ia64:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; k1om:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + loongarch32:Linux:*:* | loongarch64:Linux:*:* | loongarchx32:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; m32r*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; m68*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; mips:Linux:*:* | mips64:Linux:*:*) set_cc_for_build IS_GLIBC=0 @@ -1034,65 +1089,66 @@ EOF #endif #endif EOF - eval "$($CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI')" + cc_set_vars=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'` + eval "$cc_set_vars" test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; } ;; mips64el:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; openrisc*:Linux:*:*) - echo or1k-unknown-linux-"$LIBC" - exit ;; + GUESS=or1k-unknown-linux-$LIBC + ;; or32:Linux:*:* | or1k*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; padre:Linux:*:*) - echo sparc-unknown-linux-"$LIBC" - exit ;; + GUESS=sparc-unknown-linux-$LIBC + ;; parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-"$LIBC" - exit ;; + GUESS=hppa64-unknown-linux-$LIBC + ;; 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" ;; + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in + PA7*) GUESS=hppa1.1-unknown-linux-$LIBC ;; + PA8*) GUESS=hppa2.0-unknown-linux-$LIBC ;; + *) GUESS=hppa-unknown-linux-$LIBC ;; esac - exit ;; + ;; ppc64:Linux:*:*) - echo powerpc64-unknown-linux-"$LIBC" - exit ;; + GUESS=powerpc64-unknown-linux-$LIBC + ;; ppc:Linux:*:*) - echo powerpc-unknown-linux-"$LIBC" - exit ;; + GUESS=powerpc-unknown-linux-$LIBC + ;; ppc64le:Linux:*:*) - echo powerpc64le-unknown-linux-"$LIBC" - exit ;; + GUESS=powerpc64le-unknown-linux-$LIBC + ;; ppcle:Linux:*:*) - echo powerpcle-unknown-linux-"$LIBC" - exit ;; - riscv32:Linux:*:* | riscv64:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=powerpcle-unknown-linux-$LIBC + ;; + riscv32:Linux:*:* | riscv32be:Linux:*:* | riscv64:Linux:*:* | riscv64be:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; s390:Linux:*:* | s390x:Linux:*:*) - echo "$UNAME_MACHINE"-ibm-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-ibm-linux-$LIBC + ;; sh64*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; sh*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; sparc:Linux:*:* | sparc64:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; tile*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; vax:Linux:*:*) - echo "$UNAME_MACHINE"-dec-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-dec-linux-$LIBC + ;; x86_64:Linux:*:*) set_cc_for_build LIBCABI=$LIBC @@ -1101,71 +1157,71 @@ EOF (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_X32 >/dev/null then - LIBCABI="$LIBC"x32 + LIBCABI=${LIBC}x32 fi fi - echo "$UNAME_MACHINE"-pc-linux-"$LIBCABI" - exit ;; + GUESS=$UNAME_MACHINE-pc-linux-$LIBCABI + ;; xtensa*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; 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 ;; + GUESS=i386-sequent-sysv4 + ;; 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 ;; + GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION + ;; 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 ;; + GUESS=$UNAME_MACHINE-pc-os2-emx + ;; i*86:XTS-300:*:STOP) - echo "$UNAME_MACHINE"-unknown-stop - exit ;; + GUESS=$UNAME_MACHINE-unknown-stop + ;; i*86:atheos:*:*) - echo "$UNAME_MACHINE"-unknown-atheos - exit ;; + GUESS=$UNAME_MACHINE-unknown-atheos + ;; i*86:syllable:*:*) - echo "$UNAME_MACHINE"-pc-syllable - exit ;; + GUESS=$UNAME_MACHINE-pc-syllable + ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) - echo i386-unknown-lynxos"$UNAME_RELEASE" - exit ;; + GUESS=i386-unknown-lynxos$UNAME_RELEASE + ;; i*86:*DOS:*:*) - echo "$UNAME_MACHINE"-pc-msdosdjgpp - exit ;; + GUESS=$UNAME_MACHINE-pc-msdosdjgpp + ;; i*86:*:4.*:*) - UNAME_REL=$(echo "$UNAME_RELEASE" | sed 's/\/MP$//') + 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" + GUESS=$UNAME_MACHINE-univel-sysv$UNAME_REL else - echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL" + GUESS=$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 + 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 ;; + GUESS=$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} + ;; 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/.*= //')) + 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 @@ -1173,11 +1229,11 @@ EOF && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 - echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL" + GUESS=$UNAME_MACHINE-pc-sco$UNAME_REL else - echo "$UNAME_MACHINE"-pc-sysv32 + GUESS=$UNAME_MACHINE-pc-sysv32 fi - exit ;; + ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about @@ -1185,37 +1241,37 @@ EOF # 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 ;; + GUESS=i586-pc-msdosdjgpp + ;; Intel:Mach:3*:*) - echo i386-pc-mach3 - exit ;; + GUESS=i386-pc-mach3 + ;; paragon:*:*:*) - echo i860-intel-osf1 - exit ;; + GUESS=i860-intel-osf1 + ;; 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 + GUESS=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 + GUESS=i860-unknown-sysv$UNAME_RELEASE # Unknown i860-SVR4 fi - exit ;; + ;; mini*:CTIX:SYS*5:*) # "miniframe" - echo m68010-convergent-sysv - exit ;; + GUESS=m68010-convergent-sysv + ;; mc68k:UNIX:SYSTEM5:3.51m) - echo m68k-convergent-sysv - exit ;; + GUESS=m68k-convergent-sysv + ;; M680?0:D-NIX:5.3:*) - echo m68k-diab-dnix - exit ;; + GUESS=m68k-diab-dnix + ;; 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) + && 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 \ @@ -1226,7 +1282,7 @@ EOF 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) + && 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 \ @@ -1234,118 +1290,118 @@ EOF /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 ;; + GUESS=m68k-unknown-lynxos$UNAME_RELEASE + ;; mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 - exit ;; + GUESS=m68k-atari-sysv4 + ;; TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos"$UNAME_RELEASE" - exit ;; + GUESS=sparc-unknown-lynxos$UNAME_RELEASE + ;; rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos"$UNAME_RELEASE" - exit ;; + GUESS=rs6000-unknown-lynxos$UNAME_RELEASE + ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) - echo powerpc-unknown-lynxos"$UNAME_RELEASE" - exit ;; + GUESS=powerpc-unknown-lynxos$UNAME_RELEASE + ;; SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv"$UNAME_RELEASE" - exit ;; + GUESS=mips-dde-sysv$UNAME_RELEASE + ;; RM*:ReliantUNIX-*:*:*) - echo mips-sni-sysv4 - exit ;; + GUESS=mips-sni-sysv4 + ;; RM*:SINIX-*:*:*) - echo mips-sni-sysv4 - exit ;; + GUESS=mips-sni-sysv4 + ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then - UNAME_MACHINE=$( (uname -p) 2>/dev/null) - echo "$UNAME_MACHINE"-sni-sysv4 + UNAME_MACHINE=`(uname -p) 2>/dev/null` + GUESS=$UNAME_MACHINE-sni-sysv4 else - echo ns32k-sni-sysv + GUESS=ns32k-sni-sysv fi - exit ;; + ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says - echo i586-unisys-sysv4 - exit ;; + GUESS=i586-unisys-sysv4 + ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm - echo hppa1.1-stratus-sysv4 - exit ;; + GUESS=hppa1.1-stratus-sysv4 + ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 - exit ;; + GUESS=i860-stratus-sysv4 + ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. - echo "$UNAME_MACHINE"-stratus-vos - exit ;; + GUESS=$UNAME_MACHINE-stratus-vos + ;; *:VOS:*:*) # From Paul.Green@stratus.com. - echo hppa1.1-stratus-vos - exit ;; + GUESS=hppa1.1-stratus-vos + ;; mc68*:A/UX:*:*) - echo m68k-apple-aux"$UNAME_RELEASE" - exit ;; + GUESS=m68k-apple-aux$UNAME_RELEASE + ;; news*:NEWS-OS:6*:*) - echo mips-sony-newsos6 - exit ;; + GUESS=mips-sony-newsos6 + ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if test -d /usr/nec; then - echo mips-nec-sysv"$UNAME_RELEASE" + GUESS=mips-nec-sysv$UNAME_RELEASE else - echo mips-unknown-sysv"$UNAME_RELEASE" + GUESS=mips-unknown-sysv$UNAME_RELEASE fi - exit ;; + ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos - exit ;; + GUESS=powerpc-be-beos + ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - echo powerpc-apple-beos - exit ;; + GUESS=powerpc-apple-beos + ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos - exit ;; + GUESS=i586-pc-beos + ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. - echo i586-pc-haiku - exit ;; + GUESS=i586-pc-haiku + ;; x86_64:Haiku:*:*) - echo x86_64-unknown-haiku - exit ;; + GUESS=x86_64-unknown-haiku + ;; SX-4:SUPER-UX:*:*) - echo sx4-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=sx4-nec-superux$UNAME_RELEASE + ;; SX-5:SUPER-UX:*:*) - echo sx5-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=sx5-nec-superux$UNAME_RELEASE + ;; SX-6:SUPER-UX:*:*) - echo sx6-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=sx6-nec-superux$UNAME_RELEASE + ;; SX-7:SUPER-UX:*:*) - echo sx7-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=sx7-nec-superux$UNAME_RELEASE + ;; SX-8:SUPER-UX:*:*) - echo sx8-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=sx8-nec-superux$UNAME_RELEASE + ;; SX-8R:SUPER-UX:*:*) - echo sx8r-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=sx8r-nec-superux$UNAME_RELEASE + ;; SX-ACE:SUPER-UX:*:*) - echo sxace-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=sxace-nec-superux$UNAME_RELEASE + ;; Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody"$UNAME_RELEASE" - exit ;; + GUESS=powerpc-apple-rhapsody$UNAME_RELEASE + ;; *:Rhapsody:*:*) - echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-apple-rhapsody$UNAME_RELEASE + ;; arm64:Darwin:*:*) - echo aarch64-apple-darwin"$UNAME_RELEASE" - exit ;; + GUESS=aarch64-apple-darwin$UNAME_RELEASE + ;; *:Darwin:*:*) - UNAME_PROCESSOR=$(uname -p) + UNAME_PROCESSOR=`uname -p` case $UNAME_PROCESSOR in unknown) UNAME_PROCESSOR=powerpc ;; esac @@ -1379,109 +1435,119 @@ EOF # uname -m returns i386 or x86_64 UNAME_PROCESSOR=$UNAME_MACHINE fi - echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_PROCESSOR-apple-darwin$UNAME_RELEASE + ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) - UNAME_PROCESSOR=$(uname -p) + 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 ;; + GUESS=$UNAME_PROCESSOR-$UNAME_MACHINE-nto-qnx$UNAME_RELEASE + ;; *:QNX:*:4*) - echo i386-pc-qnx - exit ;; + GUESS=i386-pc-qnx + ;; NEO-*:NONSTOP_KERNEL:*:*) - echo neo-tandem-nsk"$UNAME_RELEASE" - exit ;; + GUESS=neo-tandem-nsk$UNAME_RELEASE + ;; NSE-*:NONSTOP_KERNEL:*:*) - echo nse-tandem-nsk"$UNAME_RELEASE" - exit ;; + GUESS=nse-tandem-nsk$UNAME_RELEASE + ;; NSR-*:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk"$UNAME_RELEASE" - exit ;; + GUESS=nsr-tandem-nsk$UNAME_RELEASE + ;; NSV-*:NONSTOP_KERNEL:*:*) - echo nsv-tandem-nsk"$UNAME_RELEASE" - exit ;; + GUESS=nsv-tandem-nsk$UNAME_RELEASE + ;; NSX-*:NONSTOP_KERNEL:*:*) - echo nsx-tandem-nsk"$UNAME_RELEASE" - exit ;; + GUESS=nsx-tandem-nsk$UNAME_RELEASE + ;; *:NonStop-UX:*:*) - echo mips-compaq-nonstopux - exit ;; + GUESS=mips-compaq-nonstopux + ;; BS2000:POSIX*:*:*) - echo bs2000-siemens-sysv - exit ;; + GUESS=bs2000-siemens-sysv + ;; DS/*:UNIX_System_V:*:*) - echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-$UNAME_SYSTEM-$UNAME_RELEASE + ;; *: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 + if test "${cputype-}" = 386; then UNAME_MACHINE=i386 - else - UNAME_MACHINE="$cputype" + elif test "x${cputype-}" != x; then + UNAME_MACHINE=$cputype fi - echo "$UNAME_MACHINE"-unknown-plan9 - exit ;; + GUESS=$UNAME_MACHINE-unknown-plan9 + ;; *:TOPS-10:*:*) - echo pdp10-unknown-tops10 - exit ;; + GUESS=pdp10-unknown-tops10 + ;; *:TENEX:*:*) - echo pdp10-unknown-tenex - exit ;; + GUESS=pdp10-unknown-tenex + ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) - echo pdp10-dec-tops20 - exit ;; + GUESS=pdp10-dec-tops20 + ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) - echo pdp10-xkl-tops20 - exit ;; + GUESS=pdp10-xkl-tops20 + ;; *:TOPS-20:*:*) - echo pdp10-unknown-tops20 - exit ;; + GUESS=pdp10-unknown-tops20 + ;; *:ITS:*:*) - echo pdp10-unknown-its - exit ;; + GUESS=pdp10-unknown-its + ;; SEI:*:*:SEIUX) - echo mips-sei-seiux"$UNAME_RELEASE" - exit ;; + GUESS=mips-sei-seiux$UNAME_RELEASE + ;; *:DragonFly:*:*) - echo "$UNAME_MACHINE"-unknown-dragonfly"$(echo "$UNAME_RELEASE"|sed -e 's/[-(].*//')" - exit ;; + DRAGONFLY_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` + GUESS=$UNAME_MACHINE-unknown-dragonfly$DRAGONFLY_REL + ;; *:*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 ;; + UNAME_MACHINE=`(uname -p) 2>/dev/null` + case $UNAME_MACHINE in + A*) GUESS=alpha-dec-vms ;; + I*) GUESS=ia64-dec-vms ;; + V*) GUESS=vax-dec-vms ;; esac ;; *:XENIX:*:SysV) - echo i386-pc-xenix - exit ;; + GUESS=i386-pc-xenix + ;; i*86:skyos:*:*) - echo "$UNAME_MACHINE"-pc-skyos"$(echo "$UNAME_RELEASE" | sed -e 's/ .*$//')" - exit ;; + SKYOS_REL=`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'` + GUESS=$UNAME_MACHINE-pc-skyos$SKYOS_REL + ;; i*86:rdos:*:*) - echo "$UNAME_MACHINE"-pc-rdos - exit ;; - i*86:AROS:*:*) - echo "$UNAME_MACHINE"-pc-aros - exit ;; + GUESS=$UNAME_MACHINE-pc-rdos + ;; + i*86:Fiwix:*:*) + GUESS=$UNAME_MACHINE-pc-fiwix + ;; + *:AROS:*:*) + GUESS=$UNAME_MACHINE-unknown-aros + ;; x86_64:VMkernel:*:*) - echo "$UNAME_MACHINE"-unknown-esx - exit ;; + GUESS=$UNAME_MACHINE-unknown-esx + ;; amd64:Isilon\ OneFS:*:*) - echo x86_64-unknown-onefs - exit ;; + GUESS=x86_64-unknown-onefs + ;; *:Unleashed:*:*) - echo "$UNAME_MACHINE"-unknown-unleashed"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE + ;; esac +# Do we have a guess based on uname results? +if test "x$GUESS" != x; then + echo "$GUESS" + exit +fi + # No uname command or uname output not recognized. set_cc_for_build cat > "$dummy.c" </dev/null); + 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 @@ -1613,7 +1679,7 @@ main () } EOF -$CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=$($dummy) && +$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. @@ -1621,7 +1687,7 @@ test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; } echo "$0: unable to guess system type" >&2 -case "$UNAME_MACHINE:$UNAME_SYSTEM" in +case $UNAME_MACHINE:$UNAME_SYSTEM in mips:Linux | mips64:Linux) # If we got here on MIPS GNU/Linux, output extra information. cat >&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) +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) -/bin/uname -X = $( (/bin/uname -X) 2>/dev/null) +/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) +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" diff --git a/contrib/hwloc/config/config.sub b/contrib/hwloc/config/config.sub index c874b7a9df..dba16e84c7 100755 --- a/contrib/hwloc/config/config.sub +++ b/contrib/hwloc/config/config.sub @@ -1,12 +1,14 @@ #! /bin/sh # Configuration validation subroutine script. -# Copyright 1992-2020 Free Software Foundation, Inc. +# Copyright 1992-2022 Free Software Foundation, Inc. -timestamp='2020-11-07' +# shellcheck disable=SC2006,SC2268 # see below for rationale + +timestamp='2022-01-03' # 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 +# 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 @@ -33,7 +35,7 @@ timestamp='2020-11-07' # 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/gitweb/?p=config.git;a=blob_plain;f=config.sub +# 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 @@ -50,7 +52,14 @@ timestamp='2020-11-07' # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. -me=$(echo "$0" | sed -e 's,.*/,,') +# The "shellcheck disable" line above the timestamp inhibits complaints +# about features and limitations of the classic Bourne shell that were +# superseded or lifted in POSIX. However, this script identifies a wide +# variety of pre-POSIX systems that do not have POSIX shells at all, and +# even some reasonably current systems (Solaris 10 as case-in-point) still +# have a pre-POSIX /bin/sh. + +me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS @@ -67,7 +76,7 @@ Report bugs and patches to ." version="\ GNU config.sub ($timestamp) -Copyright 1992-2020 Free Software Foundation, Inc. +Copyright 1992-2022 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." @@ -112,9 +121,11 @@ esac # Split fields of configuration type # shellcheck disable=SC2162 +saved_IFS=$IFS IFS="-" read field1 field2 field3 field4 <&2 @@ -1749,6 +1784,8 @@ case $kernel-$os in ;; kfreebsd*-gnu* | kopensolaris*-gnu*) ;; + vxworks-simlinux | vxworks-simwindows | vxworks-spe) + ;; nto-qnx*) ;; os2-emx) diff --git a/contrib/hwloc/config/depcomp b/contrib/hwloc/config/depcomp index 6b391623c4..715e34311e 100755 --- a/contrib/hwloc/config/depcomp +++ b/contrib/hwloc/config/depcomp @@ -3,7 +3,7 @@ scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1999-2020 Free Software Foundation, Inc. +# Copyright (C) 1999-2021 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 diff --git a/contrib/hwloc/config/hwloc.m4 b/contrib/hwloc/config/hwloc.m4 index bda026b5da..8f568ea129 100644 --- a/contrib/hwloc/config/hwloc.m4 +++ b/contrib/hwloc/config/hwloc.m4 @@ -1,6 +1,6 @@ dnl -*- Autoconf -*- dnl -dnl Copyright © 2009-2020 Inria. All rights reserved. +dnl Copyright © 2009-2022 Inria. All rights reserved. dnl Copyright © 2009-2012, 2015-2017, 2020 Université Bordeaux dnl Copyright © 2004-2005 The Trustees of Indiana University and Indiana dnl University Research and Technology @@ -13,7 +13,7 @@ dnl Copyright © 2006-2017 Cisco Systems, Inc. All rights reserved. dnl Copyright © 2012 Blue Brain Project, BBP/EPFL. All rights reserved. dnl Copyright © 2012 Oracle and/or its affiliates. All rights reserved. dnl Copyright © 2012 Los Alamos National Security, LLC. All rights reserved. -dnl Copyright © 2020 IBM Corporation. All rights reserved. +dnl Copyright © 2020-2022 IBM Corporation. All rights reserved. dnl See COPYING in top-level directory. # Main hwloc m4 macro, to be invoked by the user @@ -162,14 +162,14 @@ EOF]) [AC_DEFINE([HWLOC_SYM_TRANSFORM], [0])], [AC_DEFINE([HWLOC_SYM_TRANSFORM], [1])]) - # Disabled for Charm++ due to https://github.com/UIUC-PPL/charm/issues/2606 # hwloc 2.0+ requires a C99 compliant compiler - #AC_PROG_CC_C99 - # The result of AC_PROG_CC_C99 is stored in ac_cv_prog_cc_c99 - #if test "x$ac_cv_prog_cc_c99" = xno ; then - # AC_MSG_WARN([hwloc requires a C99 compiler]) - # AC_MSG_ERROR([Aborting.]) - #fi + # AC_PROG_CC_C99 obsolete, detected inside AC_PROG_CC, since autoconf 2.70 + m4_version_prereq([2.70], [], [AC_PROG_CC_C99]) + # The C99 result of AC_PROG_CC>=2.70 or AC_PROG_CC_C99 is stored in ac_cv_prog_cc_c99 + if test "x$ac_cv_prog_cc_c99" = xno ; then + AC_MSG_WARN([hwloc requires a C99 compiler]) + AC_MSG_ERROR([Aborting.]) + fi # GCC specifics. _HWLOC_C_COMPILER_VENDOR([hwloc_c_vendor]) @@ -216,6 +216,7 @@ EOF]) ;; *-*-linux*) AC_DEFINE(HWLOC_LINUX_SYS, 1, [Define to 1 on Linux]) + AC_SUBST(HWLOC_HAVE_LINUX, 1) hwloc_linux=yes AC_MSG_RESULT([Linux]) hwloc_components="$hwloc_components linux" @@ -484,7 +485,6 @@ EOF]) CACHE_DESCRIPTOR, LOGICAL_PROCESSOR_RELATIONSHIP, RelationProcessorPackage, - SYSTEM_LOGICAL_PROCESSOR_INFORMATION, GROUP_AFFINITY, PROCESSOR_RELATIONSHIP, NUMA_NODE_RELATIONSHIP, @@ -506,7 +506,6 @@ EOF]) AC_CHECK_LIB([user32], [PostQuitMessage], [hwloc_have_user32="yes"]) AC_PATH_PROGS([HWLOC_MS_LIB], [lib]) - AC_ARG_VAR([HWLOC_MS_LIB], [Path to Microsoft's Visual Studio `lib' tool]) echo "**** end of Windows-specific checks" echo @@ -549,6 +548,46 @@ EOF]) echo fi + if test x$hwloc_darwin = xyes; then + echo + echo "**** Darwin-specific checks" + + AC_MSG_CHECKING([for the Foundation framework]) + tmp_save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -framework Foundation" + AC_LINK_IFELSE([ + AC_LANG_PROGRAM([ +#include + ], [ +return CFDictionaryGetTypeID(); + ])], + [AC_MSG_RESULT(yes) + HWLOC_DARWIN_LDFLAGS="$HWLOC_DARWIN_LDFLAGS -framework Foundation" + AC_DEFINE(HWLOC_HAVE_DARWIN_FOUNDATION, 1, `Define to 1 if you have the Foundation Darwin framework')], + [AC_MSG_RESULT(no)]) + LDFLAGS="$tmp_save_LDFLAGS" + + AC_MSG_CHECKING([for the IOKit framework]) + tmp_save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -framework IOKit" + AC_LINK_IFELSE([ + AC_LANG_PROGRAM([ +#include + ], [ +io_registry_entry_t service = IORegistryGetRootEntry(kIOMasterPortDefault); + ])], + [AC_MSG_RESULT(yes) + HWLOC_DARWIN_LDFLAGS="$HWLOC_DARWIN_LDFLAGS -framework IOKit" + AC_DEFINE(HWLOC_HAVE_DARWIN_IOKIT, 1, `Define to 1 if you have the IOKit Darwin framework')], + [AC_MSG_RESULT(no)]) + LDFLAGS="$tmp_save_LDFLAGS" + + AC_SUBST(HWLOC_DARWIN_LDFLAGS) + + echo "**** end of Darwin-specific checks" + echo + fi + if test x$hwloc_linux = xyes; then echo echo "**** Linux-specific checks" @@ -669,25 +708,29 @@ EOF]) # "sysctlbyname" might still be available in libc (which autoconf # checks for), they might not be actually usable. AC_MSG_CHECKING([for sysctl]) - AC_TRY_LINK([ - #include - #include - #include - ], - [return sysctl(NULL,0,NULL,NULL,NULL,0);], - [AC_DEFINE([HAVE_SYSCTL],[1],[Define to '1' if sysctl is present and usable]) - AC_MSG_RESULT(yes)], - [AC_MSG_RESULT(no)]) + AC_LINK_IFELSE([ + AC_LANG_PROGRAM([ + #include + #include + #include + ], [ + return sysctl(NULL,0,NULL,NULL,NULL,0); + ])], + [AC_DEFINE([HAVE_SYSCTL],[1],[Define to '1' if sysctl is present and usable]) + AC_MSG_RESULT(yes)], + [AC_MSG_RESULT(no)]) AC_MSG_CHECKING([for sysctlbyname]) - AC_TRY_LINK([ - #include - #include - #include - ], - [return sysctlbyname(NULL,NULL,NULL,NULL,0);], - [AC_DEFINE([HAVE_SYSCTLBYNAME],[1],[Define to '1' if sysctlbyname is present and usable]) - AC_MSG_RESULT(yes)], - [AC_MSG_RESULT(no)]) + AC_LINK_IFELSE([ + AC_LANG_PROGRAM([ + #include + #include + #include + ], [ + return sysctlbyname(NULL,NULL,NULL,NULL,0); + ])], + [AC_DEFINE([HAVE_SYSCTLBYNAME],[1],[Define to '1' if sysctlbyname is present and usable]) + AC_MSG_RESULT(yes)], + [AC_MSG_RESULT(no)]) fi AC_CHECK_DECLS([pthread_setaffinity_np],,[:],[[ @@ -723,9 +766,9 @@ EOF]) _SC_PAGE_SIZE, _SC_LARGE_PAGESIZE],,[:],[[#include ]]) - AC_HAVE_HEADERS([mach/mach_init.h]) - AC_HAVE_HEADERS([mach_init.h]) - AC_HAVE_HEADERS([mach/mach_host.h], [ + AC_CHECK_HEADERS([mach/mach_init.h]) + AC_CHECK_HEADERS([mach_init.h]) + AC_CHECK_HEADERS([mach/mach_host.h], [ AC_CHECK_FUNCS([host_info]) ]) @@ -772,29 +815,31 @@ return 0; AC_CHECK_DECLS([getexecname], [], [], [AC_INCLUDES_DEFAULT]) # program_invocation_name and __progname may be available but not exported in headers AC_MSG_CHECKING([for program_invocation_name]) - AC_TRY_LINK([ - #ifndef _GNU_SOURCE - # define _GNU_SOURCE - #endif - #include - #include - extern char *program_invocation_name; - ],[ - return printf("%s\n", program_invocation_name); - ], - [AC_DEFINE([HAVE_PROGRAM_INVOCATION_NAME], [1], [Define to '1' if program_invocation_name is present and usable]) - AC_MSG_RESULT([yes]) - ],[AC_MSG_RESULT([no])]) + AC_LINK_IFELSE([ + AC_LANG_PROGRAM([ + #ifndef _GNU_SOURCE + # define _GNU_SOURCE + #endif + #include + #include + extern char *program_invocation_name; + ], [ + return printf("%s\n", program_invocation_name); + ])], + [AC_DEFINE([HAVE_PROGRAM_INVOCATION_NAME], [1], [Define to '1' if program_invocation_name is present and usable]) + AC_MSG_RESULT([yes]) + ], [AC_MSG_RESULT([no])]) AC_MSG_CHECKING([for __progname]) - AC_TRY_LINK([ - #include - extern char *__progname; - ],[ - return printf("%s\n", __progname); - ], - [AC_DEFINE([HAVE___PROGNAME], [1], [Define to '1' if __progname is present and usable]) - AC_MSG_RESULT([yes]) - ],[AC_MSG_RESULT([no])]) + AC_LINK_IFELSE([ + AC_LANG_PROGRAM([ + #include + extern char *__progname; + ], [ + return printf("%s\n", __progname); + ])], + [AC_DEFINE([HAVE___PROGNAME], [1], [Define to '1' if __progname is present and usable]) + AC_MSG_RESULT([yes]) + ],[AC_MSG_RESULT([no])]) case ${target} in *-*-mingw*|*-*-cygwin*) @@ -873,6 +918,32 @@ return 0; AC_CHECK_HEADERS([sys/utsname.h]) AC_CHECK_FUNCS([uname]) + # Components and pciaccess require pthread_mutex, see if it needs -lpthread + hwloc_pthread_mutex_happy=no + # Try without explicit -lpthread first + AC_CHECK_FUNC([pthread_mutex_lock], + [hwloc_pthread_mutex_happy=yes + HWLOC_LIBS_PRIVATE="$HWLOC_LIBS_PRIVATE -lpthread" + ], + [AC_MSG_NOTICE([trying again with -lpthread ...]) + # Try again with explicit -lpthread + $as_unset ac_cv_func_pthread_mutex_lock + tmp_save_LIBS=$LIBS + LIBS="$LIBS -lpthread" + AC_CHECK_FUNC([pthread_mutex_lock], + [hwloc_pthread_mutex_happy=yes + HWLOC_LIBS="$HWLOC_LIBS -lpthread" + ]) + LIBS="$tmp_save_LIBS" + ]) + AS_IF([test "x$hwloc_pthread_mutex_happy" = "xyes"], + [AC_DEFINE([HWLOC_HAVE_PTHREAD_MUTEX], 1, [Define to 1 if pthread mutexes are available])]) + + AS_IF([test "x$hwloc_pthread_mutex_happy" != xyes -a "x$hwloc_windows" != xyes], + [AC_MSG_WARN([pthread_mutex_lock not available, required for thread-safe initialization on non-Windows platforms.]) + AC_MSG_WARN([Please report this to the hwloc-devel mailing list.]) + AC_MSG_ERROR([Cannot continue])]) + dnl Don't check for valgrind in embedded mode because this may conflict dnl with the embedder projects also checking for it. dnl We only use Valgrind to nicely disable the x86 backend with a warning, @@ -897,6 +968,9 @@ return 0; # with our BSD license. hwloc_pciaccess_happy=no if test "x$enable_io" != xno && test "x$enable_pci" != xno; then + echo + echo "**** pciaccess configuration" + hwloc_pciaccess_happy=yes HWLOC_PKG_CHECK_MODULES([PCIACCESS], [pciaccess], [pci_slot_match_iterator_create], [pciaccess.h], [:], [hwloc_pciaccess_happy=no]) @@ -910,13 +984,17 @@ return 0; [AC_CHECK_HEADER([pciaccess.h], [AC_CHECK_LIB([pciaccess], [pci_slot_match_iterator_create], [hwloc_pciaccess_happy=yes - HWLOC_PCIACCESS_LIBS="-lpciaccess"]) + HWLOC_PCIACCESS_LIBS="-lpciaccess" + AC_SUBST(HWLOC_PCIACCESS_LIBS) + ]) ]) ]) AS_IF([test "$hwloc_pciaccess_happy" = "yes"], [hwloc_components="$hwloc_components pci" hwloc_pci_component_maybeplugin=1]) + + echo "**** end of pciaccess configuration" fi # If we asked for pci support but couldn't deliver, fail AS_IF([test "$enable_pci" = "yes" -a "$hwloc_pciaccess_happy" = "no"], @@ -925,124 +1003,240 @@ return 0; AC_MSG_ERROR([Cannot continue])]) # don't add LIBS/CFLAGS/REQUIRES yet, depends on plugins - # OpenCL support - hwloc_opencl_happy=no - if test "x$enable_io" != xno && test "x$enable_opencl" != "xno"; then - hwloc_opencl_happy=yes - case ${target} in - *-*-darwin*) - # On Darwin, only use the OpenCL framework - AC_CHECK_HEADERS([OpenCL/cl_ext.h], [ - AC_MSG_CHECKING([for the OpenCL framework]) - tmp_save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -framework OpenCL" - AC_LINK_IFELSE([ - AC_LANG_PROGRAM([[ -#include - ]], [[ -return clGetDeviceIDs(0, 0, 0, NULL, NULL); - ]])], - [AC_MSG_RESULT(yes) - HWLOC_OPENCL_LDFLAGS="-framework OpenCL"], - [AC_MSG_RESULT(no) - hwloc_opencl_happy=no]) - LDFLAGS="$tmp_save_LDFLAGS" - ], [hwloc_opencl_happy=no]) - ;; - *) - # On Others, look for OpenCL at normal locations - AC_CHECK_HEADERS([CL/cl_ext.h], [ - AC_CHECK_LIB([OpenCL], [clGetDeviceIDs], [HWLOC_OPENCL_LIBS="-lOpenCL"], [hwloc_opencl_happy=no]) - ], [hwloc_opencl_happy=no]) - ;; - esac - fi - AC_SUBST(HWLOC_OPENCL_CFLAGS) - AC_SUBST(HWLOC_OPENCL_LIBS) - AC_SUBST(HWLOC_OPENCL_LDFLAGS) - # If we asked for opencl support but couldn't deliver, fail - AS_IF([test "$enable_opencl" = "yes" -a "$hwloc_opencl_happy" = "no"], - [AC_MSG_WARN([Specified --enable-opencl switch, but could not]) - AC_MSG_WARN([find appropriate support]) - AC_MSG_ERROR([Cannot continue])]) - if test "x$hwloc_opencl_happy" = "xyes"; then - AC_DEFINE([HWLOC_HAVE_OPENCL], [1], [Define to 1 if you have the `OpenCL' library.]) - AC_SUBST([HWLOC_HAVE_OPENCL], [1]) - hwloc_components="$hwloc_components opencl" - hwloc_opencl_component_maybeplugin=1 - else - AC_SUBST([HWLOC_HAVE_OPENCL], [0]) + if test "x$enable_io" != xno && test "x$enable_opencl" != xno -o "x$enable_cuda" != xno -o "x$enable_nvml" != xno; then + echo + echo "**** NVIDIA-common configuration" + + # Try to find CUDA pkg-config using a specific CUDA version + # Use --with-cuda-version first, or $CUDA_VERSION + cuda_version=$CUDA_VERSION + if test "x$with_cuda_version" != xno -a "x$with_cuda_version" != x; then + cuda_version=$with_cuda_version + fi + if test x$cuda_version != x; then + AC_MSG_CHECKING([if cuda-$cuda_version.pc exists]) + HWLOC_PKG_CHECK_EXISTS([cuda-$cuda_version], [ + cudapc=cuda-$cuda_version + AC_MSG_RESULT(yes) + _HWLOC_PKG_CONFIG(cuda_includedir, [variable=includedir], $cudapc) + _HWLOC_PKG_CONFIG(cuda_libdir, [variable=libdir], $cudapc) + ], [AC_MSG_RESULT(no)]) + AC_MSG_CHECKING([if cudart-$cuda_version.pc exists]) + HWLOC_PKG_CHECK_EXISTS([cudart-$cuda_version], [ + cudartpc=cudart-$cuda_version + AC_MSG_RESULT(yes) + ], [AC_MSG_RESULT(no)]) + fi + + # OpenCL/NVML/CUDA may use CUDA directories, define common directories + # libnvidia-ml.so (and libcuda.so for tests) is under stubs + # when the driver isn't installed on the build machine. + # hwloc programs will fail to link if libnvidia-ml.so.1 is not available there too. + if test "x$with_cuda" != xno -a "x$with_cuda" != x; then + AC_MSG_NOTICE([using custom CUDA install path $with_cuda ...]) + if test "x${ac_cv_sizeof_void_p}" = x4; then + HWLOC_CUDA_COMMON_LDFLAGS="-L$with_cuda/lib/ -L$with_cuda/lib/stubs/" + else + HWLOC_CUDA_COMMON_LDFLAGS="-L$with_cuda/lib64/ -L$with_cuda/lib64/stubs/" + fi + HWLOC_CUDA_COMMON_CPPFLAGS="-I$with_cuda/include/" + + else if test x$HWLOC_pkg_cv_cuda_includedir != x -a x$HWLOC_pkg_cv_cuda_libdir != x; then + # or use cuda libdir/includedir from cuda.pc above + AC_MSG_NOTICE([using CUDA libdir and includedir from ${cudapc}.pc ...]) + HWLOC_CUDA_COMMON_LDFLAGS="-L$HWLOC_pkg_cv_cuda_libdir -L$HWLOC_pkg_cv_cuda_libdir/stubs/" + HWLOC_CUDA_COMMON_CPPFLAGS="-I$HWLOC_pkg_cv_cuda_includedir" + + else if test -f /usr/local/cuda/include/cuda.h; then + # or try the default /usr/local/cuda + AC_MSG_NOTICE([using default CUDA install path /usr/local/cuda ...]) + HWLOC_CUDA_COMMON_LDFLAGS="-L/usr/local/cuda/lib64/ -L/usr/local/cuda/lib64/stubs/" + HWLOC_CUDA_COMMON_CPPFLAGS="-I/usr/local/cuda/include/" + fi fi fi + + AC_MSG_NOTICE([common CUDA/OpenCL/NVML CPPFLAGS: $HWLOC_CUDA_COMMON_CPPFLAGS]) + AC_MSG_NOTICE([common CUDA/OpenCL/NVML LDFLAGS: $HWLOC_CUDA_COMMON_LDFLAGS]) + + echo "**** end of NVIDIA-common configuration" fi - # don't add LIBS/CFLAGS/REQUIRES yet, depends on plugins # CUDA support hwloc_have_cuda=no hwloc_have_cudart=no if test "x$enable_io" != xno && test "x$enable_cuda" != "xno"; then - AC_CHECK_HEADERS([cuda.h], [ - AC_MSG_CHECKING(if CUDA_VERSION >= 3020) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ + echo + echo "**** CUDA configuration" + + # Look for CUDA first, for our test only + if test "x$cudapc" != x; then + HWLOC_PKG_CHECK_MODULES([CUDA], [$cudapc], [cuInit], [cuda.h], [hwloc_have_cuda=yes]) + else + HWLOC_CUDA_CPPFLAGS="$HWLOC_CUDA_COMMON_CPPFLAGS" + HWLOC_CUDA_LDFLAGS="$HWLOC_CUDA_COMMON_LDFLAGS" + tmp_save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $HWLOC_CUDA_CPPFLAGS" + tmp_save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $HWLOC_CUDA_LDFLAGS" + AC_CHECK_HEADERS([cuda.h], [ + AC_MSG_CHECKING(if CUDA_VERSION >= 3020) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include #ifndef CUDA_VERSION #error CUDA_VERSION undefined #elif CUDA_VERSION < 3020 #error CUDA_VERSION too old #endif]], [[int i = 3;]])], - [AC_MSG_RESULT(yes) - AC_CHECK_LIB([cuda], [cuInit], - [AC_DEFINE([HAVE_CUDA], 1, [Define to 1 if we have -lcuda]) - hwloc_have_cuda=yes])], - [AC_MSG_RESULT(no)])]) - - AC_CHECK_HEADERS([cuda_runtime_api.h], [ - AC_MSG_CHECKING(if CUDART_VERSION >= 3020) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ + [AC_MSG_RESULT(yes) + AC_CHECK_LIB([cuda], [cuInit], [ + HWLOC_CUDA_LIBS="-lcuda" + hwloc_have_cuda=yes + ]) + ], + [AC_MSG_RESULT(no)])]) + CPPFLAGS="$tmp_save_CPPFLAGS" + LDFLAGS="$tmp_save_LDFLAGS" + fi + if test x$hwloc_have_cuda = xyes; then + AC_SUBST(HWLOC_CUDA_CPPFLAGS) + AC_SUBST(HWLOC_CUDA_CFLAGS) + AC_SUBST(HWLOC_CUDA_LIBS) + AC_SUBST(HWLOC_CUDA_LDFLAGS) + AC_DEFINE([HAVE_CUDA], 1, [Define to 1 if we have -lcuda]) + fi + + # Look for CUDART now, for library and tests + if test "x$cudartpc" != x; then + HWLOC_PKG_CHECK_MODULES([CUDART], [$cudartpc], [cudaGetDeviceProperties], [cuda_runtime_api.h], [ + hwloc_have_cudart=yes + HWLOC_CUDART_REQUIRES=$cudartpc + ]) + else + HWLOC_CUDART_CPPFLAGS="$HWLOC_CUDA_COMMON_CPPFLAGS" + HWLOC_CUDART_LDFLAGS="$HWLOC_CUDA_COMMON_LDFLAGS" + tmp_save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $HWLOC_CUDART_CPPFLAGS" + tmp_save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $HWLOC_CUDART_LDFLAGS" + AC_CHECK_HEADERS([cuda_runtime_api.h], [ + AC_MSG_CHECKING(if CUDART_VERSION >= 3020) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include #ifndef CUDART_VERSION #error CUDART_VERSION undefined #elif CUDART_VERSION < 3020 #error CUDART_VERSION too old #endif]], [[int i = 3;]])], - [AC_MSG_RESULT(yes) - AC_CHECK_LIB([cudart], [cudaGetDeviceProperties], [ - HWLOC_CUDA_LIBS="-lcudart" - AC_SUBST(HWLOC_CUDA_LIBS) - hwloc_have_cudart=yes - AC_DEFINE([HWLOC_HAVE_CUDART], [1], [Define to 1 if you have the `cudart' SDK.]) + [AC_MSG_RESULT(yes) + AC_CHECK_LIB([cudart], [cudaGetDeviceProperties], [ + HWLOC_CUDART_LIBS="-lcudart" + hwloc_have_cudart=yes + ]) ]) ]) - ]) + CPPFLAGS="$tmp_save_CPPFLAGS" + LDFLAGS="$tmp_save_LDFLAGS" + fi + if test x$hwloc_have_cudart = xyes; then + AC_MSG_CHECKING([whether a program linked with -lcudart can run]) + tmp_save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $HWLOC_CUDART_LDFLAGS" + tmp_save_LIBS="$LIBS" + LIBS="$LIBS $HWLOC_CUDART_LIBS" + AC_RUN_IFELSE([ + AC_LANG_PROGRAM([[ +#include +int cudaGetDeviceCount(int *); +]], [[ +int n; +cudaGetDeviceCount(&n); /* may fail if using stubs, but we're looking for libcudart load error instead only */ +return 0; +]] + )], + [AC_MSG_RESULT([yes]) + hwloc_cuda_warning=no], + [AC_MSG_RESULT([no]) + hwloc_cuda_warning=yes], + [AC_MSG_RESULT([don't know (cross-compiling)])]) + LDFLAGS="$tmp_save_LDFLAGS" + LIBS="$tmp_save_LIBS" + AC_SUBST(HWLOC_CUDART_CPPFLAGS) + AC_SUBST(HWLOC_CUDART_CFLAGS) + AC_SUBST(HWLOC_CUDART_LIBS) + AC_SUBST(HWLOC_CUDART_LDFLAGS) + AC_DEFINE([HWLOC_HAVE_CUDART], [1], [Define to 1 if you have the `cudart' SDK.]) + fi AS_IF([test "$enable_cuda" = "yes" -a "$hwloc_have_cudart" = "no"], [AC_MSG_WARN([Specified --enable-cuda switch, but could not]) AC_MSG_WARN([find appropriate support]) AC_MSG_ERROR([Cannot continue])]) + AS_IF([test "x$with_cuda_version" != x -a "$hwloc_have_cudart" = "no"], + [AC_MSG_WARN([Specified --with-cuda-version switch, but could not]) + AC_MSG_WARN([find appropriate support]) + AC_MSG_ERROR([Cannot continue])]) if test "x$hwloc_have_cudart" = "xyes"; then hwloc_components="$hwloc_components cuda" hwloc_cuda_component_maybeplugin=1 fi + + echo "**** end of CUDA configuration" fi # don't add LIBS/CFLAGS yet, depends on plugins # NVML support hwloc_nvml_happy=no + hwloc_nvml_warning=no if test "x$enable_io" != xno && test "x$enable_nvml" != "xno"; then - hwloc_nvml_happy=yes - AC_CHECK_HEADERS([nvml.h], [ - AC_CHECK_LIB([nvidia-ml], [nvmlInit], [HWLOC_NVML_LIBS="-lnvidia-ml"], [hwloc_nvml_happy=no]) - ], [hwloc_nvml_happy=no]) - fi - if test "x$hwloc_nvml_happy" = "xyes"; then - tmp_save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $HWLOC_NVML_CFLAGS" + echo + echo "**** NVML configuration" + + hwloc_nvml_happy=yes + HWLOC_NVML_CPPFLAGS="$HWLOC_CUDA_COMMON_CPPFLAGS" + HWLOC_NVML_LDFLAGS="$HWLOC_CUDA_COMMON_LDFLAGS" + tmp_save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $HWLOC_NVML_CPPFLAGS" + tmp_save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $HWLOC_NVML_LDFLAGS" tmp_save_LIBS="$LIBS" - LIBS="$LIBS $HWLOC_NVML_LIBS" - AC_CHECK_DECLS([nvmlDeviceGetMaxPcieLinkGeneration],,[:],[[#include ]]) - CFLAGS="$tmp_save_CFLAGS" + AC_CHECK_HEADERS([nvml.h], [ + AC_CHECK_LIB([nvidia-ml], + [nvmlInit], + [AC_MSG_CHECKING([whether a program linked with -lnvidia-ml can run]) + HWLOC_NVML_LIBS="-lnvidia-ml" + LIBS="$LIBS $HWLOC_NVML_LIBS" + AC_RUN_IFELSE([ + AC_LANG_PROGRAM([[ +#include +char nvmlInit (); +]], [[ + return nvmlInit (); +]] + )], + [AC_MSG_RESULT([yes]) + hwloc_nvml_warning=no], + [AC_MSG_RESULT([no]) + hwloc_nvml_warning=yes], + [AC_MSG_RESULT([don't know (cross-compiling)]) + hwloc_nvml_happy=maybe])], + [hwloc_nvml_happy=no]) + ], [hwloc_nvml_happy=no]) LIBS="$tmp_save_LIBS" + CPPFLAGS="$tmp_save_CPPFLAGS" + LDFLAGS="$tmp_save_LDFLAGS" + + if test "x$hwloc_nvml_happy" = "xyes"; then + tmp_save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $HWLOC_NVML_CPPFLAGS" + AC_CHECK_DECLS([nvmlDeviceGetMaxPcieLinkGeneration],,[:],[[#include ]]) + CPPFLAGS="$tmp_save_CPPFLAGS" + fi + + echo "**** end of NVML configuration" fi AC_SUBST(HWLOC_NVML_LIBS) + AC_SUBST(HWLOC_NVML_LDFLAGS) + AC_SUBST(HWLOC_NVML_CPPFLAGS) # If we asked for nvml support but couldn't deliver, fail AS_IF([test "$enable_nvml" = "yes" -a "$hwloc_nvml_happy" = "no"], [AC_MSG_WARN([Specified --enable-nvml switch, but could not]) @@ -1061,11 +1255,67 @@ return clGetDeviceIDs(0, 0, 0, NULL, NULL); # RSMI support, rocm_smi64 is just library name and not related to 32/64 bits hwloc_rsmi_happy=no if test "x$enable_io" != xno && test "x$enable_rsmi" != "xno"; then + echo + echo "**** RSMI configuration" + + # Try to find the ROCm default path a specific ROCm version + # Use --with-rocm-version first, or $CUDA_VERSION + rocm_version=$ROCM_VERSION + if test "x$with_rocm_version" != xno -a "x$with_rocm_version" != x; then + rocm_version=$with_rocm_version + fi + if test "x$with_rocm" != x -a "x$with_rocm" != xyes; then + rocm_dir=$with_rocm + AC_MSG_NOTICE([using custom ROCm install path $rocm_dir ...]) + else if test "x$rocm_version" != x; then + rocm_dir=/opt/rocm-${rocm_version} + AC_MSG_NOTICE([assuming ROCm $rocm_version is installed in $rocm_dir ...]) + else if test -d /opt/rocm; then + rocm_dir=/opt/rocm + AC_MSG_NOTICE([using standard ROCm install path $rocm_dir ...]) + else + AC_MSG_NOTICE([assuming ROCm is installed in standard directories ...]) + fi fi fi + if test "x$rocm_dir" != x; then + HWLOC_RSMI_CPPFLAGS="-I$rocm_dir/rocm_smi/include/" + HWLOC_RSMI_LDFLAGS="-L$rocm_dir/rocm_smi/lib/" + fi + hwloc_rsmi_happy=yes + CPPFLAGS_save="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $HWLOC_RSMI_CPPFLAGS" AC_CHECK_HEADERS([rocm_smi/rocm_smi.h], [ - AC_CHECK_LIB([rocm_smi64], [rsmi_init], [HWLOC_RSMI_LIBS="-lrocm_smi64"], [hwloc_rsmi_happy=no]) - ], [hwloc_rsmi_happy=no]) + LDFLAGS_save="$LDFLAGS" + LDFLAGS="$LDFLAGS $HWLOC_RSMI_LDFLAGS" + LIBS_save="$LIBS" + AC_CHECK_LIB([rocm_smi64], + [rsmi_init], + [AC_MSG_CHECKING([whether a program linked with -lrocm_smi64 can run]) + HWLOC_RSMI_LIBS="-lrocm_smi64" + LIBS="$LIBS $HWLOC_RSMI_LIBS" + AC_RUN_IFELSE([ + AC_LANG_PROGRAM([[ +#include +char rsmi_init(int); +]], [[ +return rsmi_init(0); +]] + )], + [AC_MSG_RESULT([yes]) + hwloc_rsmi_warning=no], + [AC_MSG_RESULT([no]) + hwloc_rsmi_warning=yes], + [AC_MSG_RESULT([don't know (cross-compiling)])])], + [hwloc_rsmi_happy=no]) + LDFLAGS="$LDFLAGS_save" + LIBS="$LIBS_save" + ], [hwloc_rsmi_happy=no]) + CPPFLAGS="$CPPFLAGS_save" + + echo "**** end of RSMI configuration" fi + AC_SUBST(HWLOC_RSMI_CPPFLAGS) + AC_SUBST(HWLOC_RSMI_LDFLAGS) AC_SUBST(HWLOC_RSMI_LIBS) # If we asked for rsmi support but couldn't deliver, fail AS_IF([test "$enable_rsmi" = "yes" -a "$hwloc_rsmi_happy" = "no"], @@ -1082,9 +1332,123 @@ return clGetDeviceIDs(0, 0, 0, NULL, NULL); fi # don't add LIBS/CFLAGS/REQUIRES yet, depends on plugins + # OpenCL support + hwloc_opencl_happy=no + if test "x$enable_io" != xno && test "x$enable_opencl" != "xno"; then + echo + echo "**** OpenCL configuration" + + hwloc_opencl_happy=yes + case ${target} in + *-*-darwin*) + # On Darwin, only use the OpenCL framework + AC_CHECK_HEADERS([OpenCL/cl_ext.h], [ + AC_MSG_CHECKING([for the OpenCL framework]) + tmp_save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -framework OpenCL" + AC_LINK_IFELSE([ + AC_LANG_PROGRAM([[ +#include + ]], [[ +return clGetDeviceIDs(0, 0, 0, NULL, NULL); + ]])], + [AC_MSG_RESULT(yes) + HWLOC_OPENCL_LDFLAGS="-framework OpenCL"], + [AC_MSG_RESULT(no) + hwloc_opencl_happy=no]) + LDFLAGS="$tmp_save_LDFLAGS" + ], [hwloc_opencl_happy=no]) + ;; + *) + # On Others, look for OpenCL at normal locations + HWLOC_OPENCL_CPPFLAGS="$HWLOC_CUDA_COMMON_CPPFLAGS" + HWLOC_OPENCL_LDFLAGS="$HWLOC_CUDA_COMMON_LDFLAGS" + if test "x$rocm_dir" != x; then + HWLOC_OPENCL_CPPFLAGS="$HWLOC_OPENCL_CPPFLAGS -I$rocm_dir/opencl/include/" + HWLOC_OPENCL_LDFLAGS="$HWLOC_OPENCL_LDFLAGS -L$rocm_dir/opencl/lib/" + fi + tmp_save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $HWLOC_OPENCL_CPPFLAGS" + tmp_save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $HWLOC_OPENCL_LDFLAGS" + AC_CHECK_HEADERS([CL/cl_ext.h], [ + AC_CHECK_LIB([OpenCL], [clGetDeviceIDs], [HWLOC_OPENCL_LIBS="-lOpenCL"], [hwloc_opencl_happy=no]) + ], [hwloc_opencl_happy=no]) + CPPFLAGS="$tmp_save_CPPFLAGS" + LDFLAGS="$tmp_save_LDFLAGS" + ;; + esac + + echo "**** end of OpenCL configuration" + fi + AC_SUBST(HWLOC_OPENCL_CPPFLAGS) + AC_SUBST(HWLOC_OPENCL_LIBS) + AC_SUBST(HWLOC_OPENCL_LDFLAGS) + # If we asked for opencl support but couldn't deliver, fail + AS_IF([test "$enable_opencl" = "yes" -a "$hwloc_opencl_happy" = "no"], + [AC_MSG_WARN([Specified --enable-opencl switch, but could not]) + AC_MSG_WARN([find appropriate support]) + AC_MSG_ERROR([Cannot continue])]) + if test "x$hwloc_opencl_happy" = "xyes"; then + AC_DEFINE([HWLOC_HAVE_OPENCL], [1], [Define to 1 if you have the `OpenCL' library.]) + AC_SUBST([HWLOC_HAVE_OPENCL], [1]) + hwloc_components="$hwloc_components opencl" + hwloc_opencl_component_maybeplugin=1 + else + AC_SUBST([HWLOC_HAVE_OPENCL], [0]) + fi + # don't add LIBS/CFLAGS/REQUIRES yet, depends on plugins + + # LevelZero support + hwloc_levelzero_happy=no + if test "x$enable_io" != xno && test "x$enable_levelzero" != "xno"; then + echo + echo "**** LevelZero configuration" + + HWLOC_PKG_CHECK_MODULES([LEVELZERO], [libze_loader], [zesDevicePciGetProperties], [level_zero/zes_api.h], + [hwloc_levelzero_happy=yes + HWLOC_LEVELZERO_REQUIRES=libze_loader + AC_CHECK_LIB([ze_loader], [zeDevicePciGetPropertiesExt], [AC_DEFINE(HWLOC_HAVE_ZEDEVICEPCIGETPROPERTIESEXT, 1, [Define to 1 if zeDevicePciGetPropertiesExt is available])]) + ], [hwloc_levelzero_happy=no]) + if test x$hwloc_levelzero_happy = xno; then + hwloc_levelzero_happy=yes + AC_CHECK_HEADERS([level_zero/ze_api.h], [ + AC_CHECK_LIB([ze_loader], [zeInit], [ + AC_CHECK_HEADERS([level_zero/zes_api.h], [ + AC_CHECK_LIB([ze_loader], + [zesDevicePciGetProperties], + [HWLOC_LEVELZERO_LIBS="-lze_loader" + AC_CHECK_LIB([ze_loader], [zeDevicePciGetPropertiesExt], [AC_DEFINE(HWLOC_HAVE_ZEDEVICEPCIGETPROPERTIESEXT, 1, [Define to 1 if zeDevicePciGetPropertiesExt is available])]) + ], [hwloc_levelzero_happy=no]) + ], [hwloc_levelzero_happy=no]) + ], [hwloc_levelzero_happy=no]) + ], [hwloc_levelzero_happy=no]) + fi + + echo "**** end of LevelZero configuration" + fi + AC_SUBST(HWLOC_LEVELZERO_LIBS) + # If we asked for LevelZero support but couldn't deliver, fail + AS_IF([test "$enable_levelzero" = "yes" -a "$hwloc_levelzero_happy" = "no"], + [AC_MSG_WARN([Specified --enable-levelzero switch, but could not]) + AC_MSG_WARN([find appropriate support]) + AC_MSG_ERROR([Cannot continue])]) + if test "x$hwloc_levelzero_happy" = "xyes"; then + AC_DEFINE([HWLOC_HAVE_LEVELZERO], [1], [Define to 1 if you have the `LevelZero' library.]) + AC_SUBST([HWLOC_HAVE_LEVELZERO], [1]) + hwloc_components="$hwloc_components levelzero" + hwloc_levelzero_component_maybeplugin=1 + else + AC_SUBST([HWLOC_HAVE_LEVELZERO], [0]) + fi + # don't add LIBS/CFLAGS/REQUIRES yet, depends on plugins + # GL Support hwloc_gl_happy=no if test "x$enable_io" != xno && test "x$enable_gl" != "xno"; then + echo + echo "**** NVIDIA GL configuration" + hwloc_gl_happy=yes # some X11 support (less then lstopo in hwloc_internal.m4) @@ -1127,15 +1491,22 @@ return clGetDeviceIDs(0, 0, 0, NULL, NULL); AC_MSG_ERROR([Cannot continue]) ]) fi + + echo "**** end of NVIDIA GL configuration" fi # don't add LIBS/CFLAGS yet, depends on plugins # libxml2 support hwloc_libxml2_happy= if test "x$enable_libxml2" != "xno"; then + echo + echo "**** libxml2 configuration" + HWLOC_PKG_CHECK_MODULES([LIBXML2], [libxml-2.0], [xmlNewDoc], [libxml/parser.h], [hwloc_libxml2_happy=yes], [hwloc_libxml2_happy=no]) + + echo "**** end of libxml2 configuration" fi if test "x$hwloc_libxml2_happy" = "xyes"; then HWLOC_LIBXML2_REQUIRES="libxml-2.0" @@ -1154,6 +1525,9 @@ return clGetDeviceIDs(0, 0, 0, NULL, NULL); # Try to compile the x86 cpuid inlines if test "x$enable_cpuid" != "xno"; then + echo + echo "**** x86 CPUID configuration" + AC_MSG_CHECKING([for x86 cpuid]) old_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -I$HWLOC_top_srcdir/include" @@ -1186,43 +1560,22 @@ return clGetDeviceIDs(0, 0, 0, NULL, NULL); ]])], [AC_MSG_RESULT([yes]) AC_DEFINE(HWLOC_HAVE_X86_CPUID, 1, [Define to 1 if you have x86 cpuid]) + AC_SUBST(HWLOC_HAVE_X86_CPUID, 1) hwloc_have_x86_cpuid=yes], [AC_MSG_RESULT([no])]) if test "x$hwloc_have_x86_cpuid" = xyes; then hwloc_components="$hwloc_components x86" fi CPPFLAGS="$old_CPPFLAGS" - fi - # Components require pthread_mutex, see if it needs -lpthread - hwloc_pthread_mutex_happy=no - # Try without explicit -lpthread first - AC_CHECK_FUNC([pthread_mutex_lock], - [hwloc_pthread_mutex_happy=yes - HWLOC_LIBS_PRIVATE="$HWLOC_LIBS_PRIVATE -lpthread" - ], - [AC_MSG_CHECKING([for pthread_mutex_lock with -lpthread]) - # Try again with explicit -lpthread, but don't use AC_CHECK_FUNC to avoid the cache - tmp_save_LIBS=$LIBS - LIBS="$LIBS -lpthread" - AC_LINK_IFELSE([AC_LANG_CALL([], [pthread_mutex_lock])], - [hwloc_pthread_mutex_happy=yes - HWLOC_LIBS="$HWLOC_LIBS -lpthread" - ]) - AC_MSG_RESULT([$hwloc_pthread_mutex_happy]) - LIBS="$tmp_save_LIBS" - ]) - AS_IF([test "x$hwloc_pthread_mutex_happy" = "xyes"], - [AC_DEFINE([HWLOC_HAVE_PTHREAD_MUTEX], 1, [Define to 1 if pthread mutexes are available])]) - - AS_IF([test "x$hwloc_pthread_mutex_happy" != xyes -a "x$hwloc_windows" != xyes], - [AC_MSG_WARN([pthread_mutex_lock not available, required for thread-safe initialization on non-Windows platforms.]) - AC_MSG_WARN([Please report this to the hwloc-devel mailing list.]) - AC_MSG_ERROR([Cannot continue])]) + echo "**** end of x86 CPUID configuration" + fi # # Now enable registration of listed components # + echo + echo "**** component and plugin-specific configuration" # Plugin support AC_MSG_CHECKING([if plugin support is enabled]) @@ -1296,11 +1649,7 @@ return clGetDeviceIDs(0, 0, 0, NULL, NULL); AC_DEFINE([HWLOC_HAVE_PLUGINS], 1, [Define to 1 if the hwloc library should support dynamically-loaded plugins]) fi - AC_ARG_WITH([hwloc-plugins-path], - AC_HELP_STRING([--with-hwloc-plugins-path=dir:...], - [Colon-separated list of plugin directories. Default: "$prefix/lib/hwloc". Plugins will be installed in the first directory. They will be loaded from all of them, in order.]), - [HWLOC_PLUGINS_PATH="$with_hwloc_plugins_path"], - [HWLOC_PLUGINS_PATH="\$(libdir)/hwloc"]) + # HWLOC_PLUGINS_PATH is defined in AC_ARG_WITH([hwloc-plugins-path]...) AC_SUBST(HWLOC_PLUGINS_PATH) HWLOC_PLUGINS_DIR=`echo "$HWLOC_PLUGINS_PATH" | cut -d: -f1` AC_SUBST(HWLOC_PLUGINS_DIR) @@ -1326,33 +1675,54 @@ return clGetDeviceIDs(0, 0, 0, NULL, NULL); AS_IF([test "$hwloc_pci_component" = "static"], [HWLOC_LIBS="$HWLOC_LIBS $HWLOC_PCIACCESS_LIBS" - HWLOC_CFLAGS="$HWLOC_CFLAGS $HWLOC_PCIACCESS_CFLAGS" - HWLOC_REQUIRES="$HWLOC_PCIACCESS_REQUIRES $HWLOC_REQUIRES"]) + HWLOC_LDFLAGS="$HWLOC_LDFLAGS $HWLOC_PCIACCESS_LDFLAGS" + HWLOC_CFLAGS="$HWLOC_CFLAGS $HWLOC_PCIACCESS_CPPFLAGS $HWLOC_PCIACCESS_CFLAGS" + HWLOC_REQUIRES="$HWLOC_PCIACCESS_REQUIRES $HWLOC_REQUIRES" + AC_DEFINE([HWLOC_PCI_COMPONENT_BUILTIN], 1, [Define if the PCI component is built statically inside libhwloc])]) AS_IF([test "$hwloc_opencl_component" = "static"], [HWLOC_LIBS="$HWLOC_LIBS $HWLOC_OPENCL_LIBS" HWLOC_LDFLAGS="$HWLOC_LDFLAGS $HWLOC_OPENCL_LDFLAGS" - HWLOC_CFLAGS="$HWLOC_CFLAGS $HWLOC_OPENCL_CFLAGS" - HWLOC_REQUIRES="$HWLOC_OPENCL_REQUIRES $HWLOC_REQUIRES"]) + HWLOC_CFLAGS="$HWLOC_CFLAGS $HWLOC_OPENCL_CPPFLAGS $HWLOC_OPENCL_CFLAGS" + HWLOC_REQUIRES="$HWLOC_OPENCL_REQUIRES $HWLOC_REQUIRES" + AC_DEFINE([HWLOC_OPENCL_COMPONENT_BUILTIN], 1, [Define if the OpenCL component is built statically inside libhwloc])]) AS_IF([test "$hwloc_cuda_component" = "static"], - [HWLOC_LIBS="$HWLOC_LIBS $HWLOC_CUDA_LIBS" - HWLOC_CFLAGS="$HWLOC_CFLAGS $HWLOC_CUDA_CFLAGS" - HWLOC_REQUIRES="$HWLOC_CUDA_REQUIRES $HWLOC_REQUIRES"]) + [HWLOC_LIBS="$HWLOC_LIBS $HWLOC_CUDART_LIBS" + HWLOC_LDFLAGS="$HWLOC_LDFLAGS $HWLOC_CUDART_LDFLAGS" + HWLOC_CFLAGS="$HWLOC_CFLAGS $HWLOC_CUDART_CPPFLAGS $HWLOC_CUDART_CFLAGS" + HWLOC_REQUIRES="$HWLOC_CUDART_REQUIRES $HWLOC_REQUIRES" + AC_DEFINE([HWLOC_CUDA_COMPONENT_BUILTIN], 1, [Define if the CUDA component is built statically inside libhwloc])]) AS_IF([test "$hwloc_nvml_component" = "static"], [HWLOC_LIBS="$HWLOC_LIBS $HWLOC_NVML_LIBS" - HWLOC_CFLAGS="$HWLOC_CFLAGS $HWLOC_NVML_CFLAGS" - HWLOC_REQUIRES="$HWLOC_NVML_REQUIRES $HWLOC_REQUIRES"]) + HWLOC_LDFLAGS="$HWLOC_LDFLAGS $HWLOC_NVML_LDFLAGS" + HWLOC_CFLAGS="$HWLOC_CFLAGS $HWLOC_NVML_CPPFLAGS $HWLOC_NVML_CFLAGS" + HWLOC_REQUIRES="$HWLOC_NVML_REQUIRES $HWLOC_REQUIRES" + AC_DEFINE([HWLOC_NVML_COMPONENT_BUILTIN], 1, [Define if the NVML component is built statically inside libhwloc])]) AS_IF([test "$hwloc_rsmi_component" = "static"], [HWLOC_LIBS="$HWLOC_LIBS $HWLOC_RSMI_LIBS" - HWLOC_CFLAGS="$HWLOC_CFLAGS $HWLOC_RSMI_CFLAGS" - HWLOC_REQUIRES="$HWLOC_RSMI_REQUIRES $HWLOC_REQUIRES"]) + HWLOC_LDFLAGS="$HWLOC_LDFLAGS $HWLOC_RSMI_LDFLAGS" + HWLOC_CFLAGS="$HWLOC_CFLAGS $HWLOC_RSMI_CPPFLAGS $HWLOC_RSMI_CFLAGS" + HWLOC_REQUIRES="$HWLOC_RSMI_REQUIRES $HWLOC_REQUIRES" + AC_DEFINE([HWLOC_RSMI_COMPONENT_BUILTIN], 1, [Define if the RSMI component is built statically inside libhwloc])]) + AS_IF([test "$hwloc_levelzero_component" = "static"], + [HWLOC_LIBS="$HWLOC_LIBS $HWLOC_LEVELZERO_LIBS" + HWLOC_LDFLAGS="$HWLOC_LDFLAGS $HWLOC_LEVELZERO_LDFLAGS" + HWLOC_CFLAGS="$HWLOC_CFLAGS $HWLOC_LEVELZERO_CPPFLAGS $HWLOC_LEVELZERO_CFLAGS" + HWLOC_REQUIRES="$HWLOC_LEVELZERO_REQUIRES $HWLOC_REQUIRES" + AC_DEFINE([HWLOC_LEVELZERO_COMPONENT_BUILTIN], 1, [Define if the LevelZero component is built statically inside libhwloc])]) AS_IF([test "$hwloc_gl_component" = "static"], [HWLOC_LIBS="$HWLOC_LIBS $HWLOC_GL_LIBS" - HWLOC_CFLAGS="$HWLOC_CFLAGS $HWLOC_GL_CFLAGS" - HWLOC_REQUIRES="$HWLOC_GL_REQUIRES $HWLOC_REQUIRES"]) + HWLOC_LDFLAGS="$HWLOC_LDFLAGS $HWLOC_GL_LDFLAGS" + HWLOC_CFLAGS="$HWLOC_CFLAGS $HWLOC_GL_CPPFLAGS $HWLOC_GL_CFLAGS" + HWLOC_REQUIRES="$HWLOC_GL_REQUIRES $HWLOC_REQUIRES" + AC_DEFINE([HWLOC_GL_COMPONENT_BUILTIN], 1, [Define if the GL component is built statically inside libhwloc])]) AS_IF([test "$hwloc_xml_libxml_component" = "static"], [HWLOC_LIBS="$HWLOC_LIBS $HWLOC_LIBXML2_LIBS" - HWLOC_CFLAGS="$HWLOC_CFLAGS $HWLOC_LIBXML2_CFLAGS" - HWLOC_REQUIRES="$HWLOC_LIBXML2_REQUIRES $HWLOC_REQUIRES"]) + HWLOC_LDFLAGS="$HWLOC_LDFLAGS $HWLOC_LIBXML2_LDFLAGS" + HWLOC_CFLAGS="$HWLOC_CFLAGS $HWLOC_LIBXML2_CPPFLAGS $HWLOC_LIBXML2_CFLAGS" + HWLOC_REQUIRES="$HWLOC_LIBXML2_REQUIRES $HWLOC_REQUIRES" + AC_DEFINE([HWLOC_XML_LIBXML_COMPONENT_BUILTIN], 1, [Define if the libxml XML component is built statically inside libhwloc])]) + + echo "**** end of component and plugin configuration" # # Setup HWLOC's C, CPP, and LD flags, and LIBS @@ -1438,6 +1808,7 @@ AC_DEFUN([HWLOC_DO_AM_CONDITIONALS],[ AM_CONDITIONAL([HWLOC_HAVE_OPENCL], [test "$hwloc_opencl_happy" = "yes"]) AM_CONDITIONAL([HWLOC_HAVE_NVML], [test "$hwloc_nvml_happy" = "yes"]) AM_CONDITIONAL([HWLOC_HAVE_RSMI], [test "$hwloc_rsmi_happy" = "yes"]) + AM_CONDITIONAL([HWLOC_HAVE_LEVELZERO], [test "$hwloc_levelzero_happy" = "yes"]) AM_CONDITIONAL([HWLOC_HAVE_BUNZIPP], [test "x$BUNZIPP" != "xfalse"]) AM_CONDITIONAL([HWLOC_HAVE_USER32], [test "x$hwloc_have_user32" = "xyes"]) @@ -1473,6 +1844,7 @@ AC_DEFUN([HWLOC_DO_AM_CONDITIONALS],[ AM_CONDITIONAL([HWLOC_CUDA_BUILD_STATIC], [test "x$hwloc_cuda_component" = "xstatic"]) AM_CONDITIONAL([HWLOC_NVML_BUILD_STATIC], [test "x$hwloc_nvml_component" = "xstatic"]) AM_CONDITIONAL([HWLOC_RSMI_BUILD_STATIC], [test "x$hwloc_rsmi_component" = "xstatic"]) + AM_CONDITIONAL([HWLOC_LEVELZERO_BUILD_STATIC], [test "x$hwloc_levelzero_component" = "xstatic"]) AM_CONDITIONAL([HWLOC_GL_BUILD_STATIC], [test "x$hwloc_gl_component" = "xstatic"]) AM_CONDITIONAL([HWLOC_XML_LIBXML_BUILD_STATIC], [test "x$hwloc_xml_libxml_component" = "xstatic"]) diff --git a/contrib/hwloc/config/hwloc_check_attributes.m4 b/contrib/hwloc/config/hwloc_check_attributes.m4 index 96348e819e..5062beb4dd 100644 --- a/contrib/hwloc/config/hwloc_check_attributes.m4 +++ b/contrib/hwloc/config/hwloc_check_attributes.m4 @@ -10,7 +10,7 @@ # Copyright © 2004-2005 The Regents of the University of California. # All rights reserved. # and renamed for hwloc: -# Copyright © 2009 Inria. All rights reserved. +# Copyright © 2009-2021 Inria. All rights reserved. # Copyright © 2009 Université Bordeaux # Copyright © 2010 Cisco Systems, Inc. All rights reserved. # See COPYING in top-level directory. @@ -96,7 +96,8 @@ AC_DEFUN([_HWLOC_CHECK_SPECIFIC_ATTRIBUTE], [ # # Try to compile using the C compiler # - AC_TRY_COMPILE([$2],[], + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([$2], [])], [ # # In case we did succeed: Fine, but was this due to the @@ -118,11 +119,14 @@ AC_DEFUN([_HWLOC_CHECK_SPECIFIC_ATTRIBUTE], [ CFLAGS_safe=$CFLAGS CFLAGS="$CFLAGS [$4]" - AC_TRY_COMPILE([$3], - [ - int i=4711; - i=usage(&i); - ], + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [$3], + [ + int i=4711; + i=usage(&i); + ]) + ], [hwloc_cv___attribute__[$1]=0], [ # @@ -175,28 +179,34 @@ AC_DEFUN([_HWLOC_CHECK_ATTRIBUTES], [ AC_MSG_CHECKING(for __attribute__) AC_CACHE_VAL(hwloc_cv___attribute__, [ - AC_TRY_COMPILE( - [#include - /* Check for the longest available __attribute__ (since gcc-2.3) */ - struct foo { + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [ + #include + ], [ + /* Check for the longest available __attribute__ (since gcc-2.3) */ + struct foo { char a; int x[2] __attribute__ ((__packed__)); - }; - ], + }; + ])], [], [hwloc_cv___attribute__=1], [hwloc_cv___attribute__=0], ) if test "$hwloc_cv___attribute__" = "1" ; then - AC_TRY_COMPILE( - [#include - /* Check for the longest available __attribute__ (since gcc-2.3) */ - struct foo { + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [ + #include + ], [ + /* Check for the longest available __attribute__ (since gcc-2.3) */ + struct foo { char a; int x[2] __attribute__ ((__packed__)); - }; - ], + }; + ])], [], [hwloc_cv___attribute__=1], [hwloc_cv___attribute__=0], @@ -217,6 +227,7 @@ AC_DEFUN([_HWLOC_CHECK_ATTRIBUTES], [ hwloc_cv___attribute__cold=0 hwloc_cv___attribute__const=0 hwloc_cv___attribute__deprecated=0 + hwloc_cv___attribute__constructor=0 hwloc_cv___attribute__format=0 hwloc_cv___attribute__hot=0 hwloc_cv___attribute__malloc=0 @@ -271,6 +282,14 @@ AC_DEFUN([_HWLOC_CHECK_ATTRIBUTES], [ [], []) + _HWLOC_CHECK_SPECIFIC_ATTRIBUTE([constructor], + [ + void foo(void) __attribute__ ((__constructor__)); + void foo(void) { return; } + ], + [], + []) + HWLOC_ATTRIBUTE_CFLAGS= case "$hwloc_c_vendor" in @@ -504,6 +523,8 @@ AC_DEFUN([_HWLOC_CHECK_ATTRIBUTES], [ [Whether your compiler has __attribute__ const or not]) AC_DEFINE_UNQUOTED(HWLOC_HAVE_ATTRIBUTE_DEPRECATED, [$hwloc_cv___attribute__deprecated], [Whether your compiler has __attribute__ deprecated or not]) + AC_DEFINE_UNQUOTED(HWLOC_HAVE_ATTRIBUTE_CONSTRUCTOR, [$hwloc_cv___attribute__constructor], + [Whether your compiler has __attribute__ constructor or not]) AC_DEFINE_UNQUOTED(HWLOC_HAVE_ATTRIBUTE_FORMAT, [$hwloc_cv___attribute__format], [Whether your compiler has __attribute__ format or not]) AC_DEFINE_UNQUOTED(HWLOC_HAVE_ATTRIBUTE_HOT, [$hwloc_cv___attribute__hot], diff --git a/contrib/hwloc/config/hwloc_check_visibility.m4 b/contrib/hwloc/config/hwloc_check_visibility.m4 index 885fe3d8df..8ba2d391c9 100644 --- a/contrib/hwloc/config/hwloc_check_visibility.m4 +++ b/contrib/hwloc/config/hwloc_check_visibility.m4 @@ -11,7 +11,7 @@ # All rights reserved. # Copyright © 2006-2007 Cisco Systems, Inc. All rights reserved. # and renamed/modified for hwloc: -# Copyright © 2009 Inria. All rights reserved. +# Copyright © 2009-2021 Inria. All rights reserved. # Copyright © 2009-2010 Université Bordeaux # Copyright © 2010-2012 Cisco Systems, Inc. All rights reserved. # See COPYING in top-level directory. @@ -63,7 +63,7 @@ AC_DEFUN([_HWLOC_CHECK_VISIBILITY],[ # Check if the compiler has support for visibility, like some # versions of gcc, icc, Sun Studio cc. AC_ARG_ENABLE(visibility, - AC_HELP_STRING([--enable-visibility], + AS_HELP_STRING([--enable-visibility], [enable visibility feature of certain compilers/linkers (default: enabled on platforms that support it)])) case ${target} in diff --git a/contrib/hwloc/config/hwloc_internal.m4 b/contrib/hwloc/config/hwloc_internal.m4 index bebe2e8142..d83855768d 100644 --- a/contrib/hwloc/config/hwloc_internal.m4 +++ b/contrib/hwloc/config/hwloc_internal.m4 @@ -1,6 +1,6 @@ dnl -*- Autoconf -*- dnl -dnl Copyright © 2010-2020 Inria. All rights reserved. +dnl Copyright © 2010-2022 Inria. All rights reserved. dnl Copyright © 2009, 2011 Université Bordeaux dnl Copyright © 2004-2005 The Trustees of Indiana University and Indiana dnl University Research and Technology @@ -26,27 +26,35 @@ AC_DEFUN([HWLOC_BUILD_STANDALONE],[ AC_DEFUN([HWLOC_DEFINE_ARGS],[ # Embedded mode, or standalone? AC_ARG_ENABLE([embedded-mode], - AC_HELP_STRING([--enable-embedded-mode], + AS_HELP_STRING([--enable-embedded-mode], [Using --enable-embedded-mode puts the HWLOC into "embedded" mode. The default is --disable-embedded-mode, meaning that the HWLOC is in "standalone" mode.])) # Change the symbol prefix? AC_ARG_WITH([hwloc-symbol-prefix], - AC_HELP_STRING([--with-hwloc-symbol-prefix=STRING], - [STRING can be any valid C symbol name. It will be prefixed to all public HWLOC symbols. Default: "hwloc_"])) + AS_HELP_STRING([--with-hwloc-symbol-prefix=STRING], + [STRING can be any valid C symbol name. It will be prefixed to all public HWLOC symbols. Default: "" (no prefix)])) + + # For the windows build + AC_ARG_VAR([HWLOC_MS_LIB], [Path to Microsoft's Visual Studio `lib' tool]) # Debug mode? AC_ARG_ENABLE([debug], - AC_HELP_STRING([--enable-debug], + AS_HELP_STRING([--enable-debug], [Using --enable-debug enables various hwloc maintainer-level debugging controls. This option is not recomended for end users.])) # Doxygen? AC_ARG_ENABLE([doxygen], - [AC_HELP_STRING([--enable-doxygen], + [AS_HELP_STRING([--enable-doxygen], [enable support for building Doxygen documentation (note that this option is ONLY relevant in developer builds; Doxygen documentation is pre-built for tarball builds and this option is therefore ignored)])]) + # Building the README + AC_ARG_ENABLE([readme], + [AS_HELP_STRING([--disable-readme], + [disable the updating of the top-level README file from the HTML documentation index])]) + # Picky? AC_ARG_ENABLE(picky, - AC_HELP_STRING([--disable-picky], + AS_HELP_STRING([--disable-picky], [When in developer checkouts of hwloc and compiling with gcc, the default is to enable maximum compiler pickyness. Using --disable-picky or --enable-picky overrides any default setting])) # Cairo? @@ -67,7 +75,7 @@ AC_DEFUN([HWLOC_DEFINE_ARGS],[ # I/O? AC_ARG_ENABLE([io], AS_HELP_STRING([--disable-io], - [Disable I/O discovery build entirely (PCI, LinuxIO, CUDA, OpenCL, NVML, RSMI, GL) instead of only disabling it at runtime by default])) + [Disable I/O discovery build entirely (PCI, LinuxIO, CUDA, OpenCL, NVML, RSMI, LevelZero, GL) instead of only disabling it at runtime by default])) # PCI? AC_ARG_ENABLE([pci], @@ -93,10 +101,34 @@ AC_DEFUN([HWLOC_DEFINE_ARGS],[ AS_HELP_STRING([--disable-nvml], [Disable the NVML device discovery build (instead of only disabling NVML at runtime by default)])) + # CUDA version (for using its pkg-config cuda-x.y.pc) + AC_ARG_WITH([cuda-version], + AS_HELP_STRING([--with-cuda-version=], + [Specify the CUDA version (e.g. 11.2) for selecting the appropriate pkg-config file])) + AC_ARG_VAR([CUDA_VERSION], [The CUDA version (e.g. 11.2) for selecting the appropriate pkg-config file]) + # CUDA install path (and NVML and OpenCL) + AC_ARG_WITH([cuda], + AS_HELP_STRING([--with-cuda=], + [Specify the CUDA installation directory, used for NVIDIA NVML and OpenCL too. If a non-existent directory is given, all dependencies installed by CUDA are disabled (CUDA, NVML and NVIDIA OpenCL).])) + # RSMI? AC_ARG_ENABLE([rsmi], AS_HELP_STRING([--disable-rsmi], [Disable the ROCm SMI device discovery])) + # ROCm version (for selecting /opt/rocm-x.y/) + AC_ARG_WITH([rocm-version], + AS_HELP_STRING([--with-rocm-version=], + [Specify the ROCm version (e.g. 4.2.0) for selecting the default ROCm installation path (e.g. /opt/rocm-4.2.0)])) + AC_ARG_VAR([ROCM_VERSION], [The ROCm version (e.g. 4.2.0) for selecting the default ROCm installation path (e.g. /opt/rocm-4.2.0)]) + # ROCm install path + AC_ARG_WITH([rocm], + AS_HELP_STRING([--with-rocm=], + [Specify the ROCm installation directory])) + + # LevelZero + AC_ARG_ENABLE([levelzero], + AS_HELP_STRING([--disable-levelzero], + [Disable the oneAPI Level Zero device discovery])) # GL/Display AC_ARG_ENABLE([gl], @@ -113,15 +145,21 @@ AC_DEFUN([HWLOC_DEFINE_ARGS],[ AS_HELP_STRING([--enable-plugins=name,...], [Build the given components as dynamically-loaded plugins])) + AC_ARG_WITH([hwloc-plugins-path], + AS_HELP_STRING([--with-hwloc-plugins-path=dir:...], + [Colon-separated list of plugin directories. Default: "$prefix/lib/hwloc". Plugins will be installed in the first directory. They will be loaded from all of them, in order.]), + [HWLOC_PLUGINS_PATH="$with_hwloc_plugins_path"], + [HWLOC_PLUGINS_PATH="\$(libdir)/hwloc"]) + # Look for dlopen # Not --disable-dlopen because $enable_dlopen is already used/set AC_ARG_ENABLE([plugin-dlopen], - AC_HELP_STRING([--disable-plugin-dlopen], + AS_HELP_STRING([--disable-plugin-dlopen], [Do not use dlopen for loading plugins.])) # Look for ltdl # Not --disable-ltdl for consistency wrt dlopen above AC_ARG_ENABLE([plugin-ltdl], - AC_HELP_STRING([--disable-plugin-ltdl], + AS_HELP_STRING([--disable-plugin-ltdl], [Do not use ltdl for loading plugins.])) ])dnl @@ -129,7 +167,7 @@ AC_DEFUN([HWLOC_DEFINE_ARGS],[ #----------------------------------------------------------------------- dnl We only build documentation if this is a developer checkout. -dnl Distribution tarballs just install pre-built docuemntation that was +dnl Distribution tarballs just install pre-built documentation that was dnl included in the tarball. # Probably only ever invoked by hwloc's configure.ac @@ -180,21 +218,27 @@ EOF AC_REQUIRE([AC_PROG_SED]) - # Making the top-level README requires w3m or lynx. - AC_ARG_VAR([W3M], [Location of the w3m program (required to building the top-level hwloc README file)]) - AC_PATH_TOOL([W3M], [w3m]) - AC_ARG_VAR([LYNX], [Location of the lynx program (required to building the top-level hwloc README file)]) - AC_PATH_TOOL([LYNX], [lynx]) - - AC_MSG_CHECKING([if can build top-level README]) - AS_IF([test "x$W3M" != "x"], - [hwloc_generate_readme=yes - HWLOC_W3_GENERATOR=$W3M], - [AS_IF([test "x$LYNX" != "x"], - [hwloc_generate_readme=yes - HWLOC_W3_GENERATOR="$LYNX -dump -nolist"], - [hwloc_generate_readme=no])]) - AC_SUBST(HWLOC_W3_GENERATOR) + AS_IF([test "x$enable_readme" != xno], [ + # Making the top-level README requires w3m or lynx. + AC_ARG_VAR([W3M], [Location of the w3m program (required to building the top-level hwloc README file)]) + AC_PATH_TOOL([W3M], [w3m]) + AC_ARG_VAR([LYNX], [Location of the lynx program (required to building the top-level hwloc README file)]) + AC_PATH_TOOL([LYNX], [lynx]) + + AC_MSG_CHECKING([if can build top-level README]) + AS_IF([test "x$W3M" != "x"], + [hwloc_generate_readme=yes + HWLOC_W3_GENERATOR=$W3M], + [AS_IF([test "x$LYNX" != "x"], + [hwloc_generate_readme=yes + HWLOC_W3_GENERATOR="$LYNX -dump -nolist"], + [hwloc_generate_readme=no])]) + AC_SUBST(HWLOC_W3_GENERATOR) + AC_MSG_RESULT([$hwloc_generate_readme]) + ], [ + hwloc_generate_readme=no + ]) + AC_MSG_CHECKING([if will build top-level README]) AC_MSG_RESULT([$hwloc_generate_readme]) # If any one of the above tools is missing, we will refuse to make dist. @@ -321,7 +365,7 @@ EOF chosen_curses="" for curses in ncurses curses do - for lib in "" -ltermcap -l${curses}w -l$curses -ltinfo + for lib in "" -l${curses}w -l$curses -ltinfo -ltermcap do AC_MSG_CHECKING(termcap support using $curses and $lib) LIBS="$hwloc_old_LIBS $lib" @@ -366,6 +410,12 @@ EOF AC_CHECK_FUNCS([clock_gettime]) ]) + AC_ARG_VAR([ARCHIVEMOUNT], [Location of the archivemount program (for loading archive topology in tools)]) + AC_PATH_TOOL([ARCHIVEMOUNT], [archivemount]) + if test "x$ARCHIVEMOUNT" != x; then + AC_DEFINE_UNQUOTED([HWLOC_ARCHIVEMOUNT_PATH], ["$ARCHIVEMOUNT"], [Define to the location of the archivemount program]) + fi + # Only generate this if we're building the utilities # Even the netloc library Makefile is here because # we don't embed libnetloc yet, it's useless without tools @@ -419,7 +469,10 @@ EOF AC_CHECK_HEADERS([infiniband/verbs.h], [ AC_CHECK_LIB([ibverbs], [ibv_open_device], [AC_DEFINE([HAVE_LIBIBVERBS], 1, [Define to 1 if we have -libverbs]) - hwloc_have_libibverbs=yes]) + hwloc_have_libibverbs=yes + HWLOC_IBVERBS_LIBS=-libverbs + AC_SUBST(HWLOC_IBVERBS_LIBS) + ]) ]) AC_CHECK_PROGS(XMLLINT, [xmllint]) @@ -468,6 +521,7 @@ int foo(void) { hwloc_config_prefix[utils/hwloc/test-hwloc-diffpatch.sh] hwloc_config_prefix[utils/hwloc/test-hwloc-distrib.sh] hwloc_config_prefix[utils/hwloc/test-hwloc-info.sh] + hwloc_config_prefix[utils/hwloc/test-build-custom-topology.sh] hwloc_config_prefix[utils/hwloc/test-fake-plugin.sh] hwloc_config_prefix[utils/hwloc/test-parsing-flags.sh] hwloc_config_prefix[utils/hwloc/test-hwloc-dump-hwdata/Makefile] @@ -480,7 +534,6 @@ int foo(void) { hwloc_config_prefix[contrib/completion/Makefile] hwloc_config_prefix[contrib/misc/Makefile] hwloc_config_prefix[contrib/windows/Makefile] - hwloc_config_prefix[contrib/windows/test-windows-version.sh] hwloc_config_prefix[tests/netloc/Makefile] hwloc_config_prefix[tests/netloc/tests.sh] ) @@ -501,13 +554,13 @@ int foo(void) { hwloc_config_prefix[utils/hwloc/test-hwloc-diffpatch.sh] \ hwloc_config_prefix[utils/hwloc/test-hwloc-distrib.sh] \ hwloc_config_prefix[utils/hwloc/test-hwloc-info.sh] \ + hwloc_config_prefix[utils/hwloc/test-build-custom-topology.sh] \ hwloc_config_prefix[utils/hwloc/test-fake-plugin.sh] \ hwloc_config_prefix[utils/hwloc/test-parsing-flags.sh] \ hwloc_config_prefix[utils/hwloc/test-hwloc-dump-hwdata/test-hwloc-dump-hwdata.sh] \ hwloc_config_prefix[utils/lstopo/test-lstopo.sh] \ hwloc_config_prefix[utils/lstopo/test-lstopo-shmem.sh] \ hwloc_config_prefix[utils/netloc/infiniband/netloc_ib_gather_raw] \ - hwloc_config_prefix[contrib/windows/test-windows-version.sh] \ hwloc_config_prefix[tests/netloc/tests.sh]) # These links are only needed in standalone mode. It would @@ -530,6 +583,7 @@ int foo(void) { hwloc_config_prefix[tests/hwloc/ports/topology-cuda.c]:hwloc_config_prefix[hwloc/topology-cuda.c] hwloc_config_prefix[tests/hwloc/ports/topology-nvml.c]:hwloc_config_prefix[hwloc/topology-nvml.c] hwloc_config_prefix[tests/hwloc/ports/topology-rsmi.c]:hwloc_config_prefix[hwloc/topology-rsmi.c] + hwloc_config_prefix[tests/hwloc/ports/topology-levelzero.c]:hwloc_config_prefix[hwloc/topology-levelzero.c] hwloc_config_prefix[tests/hwloc/ports/topology-gl.c]:hwloc_config_prefix[hwloc/topology-gl.c] hwloc_config_prefix[tests/hwloc/ports/lstopo-windows.c]:hwloc_config_prefix[utils/lstopo/lstopo-windows.c] hwloc_config_prefix[tests/hwloc/ports/lstopo-android.c]:hwloc_config_prefix[utils/lstopo/lstopo-android.c]) diff --git a/contrib/hwloc/config/libtool.m4 b/contrib/hwloc/config/libtool.m4 index ee80844b61..c4c02946de 100644 --- a/contrib/hwloc/config/libtool.m4 +++ b/contrib/hwloc/config/libtool.m4 @@ -1041,8 +1041,8 @@ int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD - echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD - $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD + echo "$AR cr libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD + $AR cr libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD cat > conftest.c << _LT_EOF @@ -1071,11 +1071,11 @@ _LT_EOF # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) + 10.0,*86*-darwin8*|10.0,*-darwin[[912]]*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 10.[[012]][[,.]]*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - 10.*) + 10.*|11.*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ;; @@ -1492,7 +1492,7 @@ need_locks=$enable_libtool_lock m4_defun([_LT_PROG_AR], [AC_CHECK_TOOLS(AR, [ar], false) : ${AR=ar} -: ${AR_FLAGS=cru} +: ${AR_FLAGS=cr} _LT_DECL([], [AR], [1], [The archiver]) _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) @@ -4063,7 +4063,8 @@ _LT_EOF if AC_TRY_EVAL(ac_compile); then # Now try to grab the symbols. nlist=conftest.nm - if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then + $ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&AS_MESSAGE_LOG_FD + if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&AS_MESSAGE_LOG_FD && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" @@ -4703,6 +4704,12 @@ m4_if([$1], [CXX], [ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; + # flang / f18. f95 an alias for gfortran or flang on Debian + flang* | f18* | f95*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) @@ -6438,7 +6445,7 @@ if test yes != "$_lt_caught_CXX_error"; then # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' else GXX=no @@ -6813,7 +6820,7 @@ if test yes != "$_lt_caught_CXX_error"; then # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes = "$GXX"; then @@ -6878,7 +6885,7 @@ if test yes != "$_lt_caught_CXX_error"; then # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes = "$GXX"; then @@ -7217,7 +7224,7 @@ if test yes != "$_lt_caught_CXX_error"; then # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' else # FIXME: insert proper C++ library support @@ -7301,7 +7308,7 @@ if test yes != "$_lt_caught_CXX_error"; then # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' else # g++ 2.7 appears to require '-G' NOT '-shared' on this # platform. @@ -7312,7 +7319,7 @@ if test yes != "$_lt_caught_CXX_error"; then # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' diff --git a/contrib/hwloc/config/ltmain.sh b/contrib/hwloc/config/ltmain.sh old mode 100644 new mode 100755 index a736cf9942..540a92ab54 --- a/contrib/hwloc/config/ltmain.sh +++ b/contrib/hwloc/config/ltmain.sh @@ -31,7 +31,7 @@ PROGRAM=libtool PACKAGE=libtool -VERSION="2.4.6 Debian-2.4.6-2" +VERSION="2.4.6 Debian-2.4.6-15build2" package_revision=2.4.6 @@ -387,7 +387,7 @@ EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. # putting '$debug_cmd' at the start of all your functions, you can get # bash to show function call trace with: # -# debug_cmd='eval echo "${FUNCNAME[0]} $*" >&2' bash your-script-name +# debug_cmd='echo "${FUNCNAME[0]} $*" >&2' bash your-script-name debug_cmd=${debug_cmd-":"} exit_cmd=: @@ -1370,7 +1370,7 @@ func_lt_ver () #! /bin/sh # Set a version string for this script. -scriptversion=2014-01-07.03; # UTC +scriptversion=2015-10-07.11; # UTC # A portable, pluggable option parser for Bourne shell. # Written by Gary V. Vaughan, 2010 @@ -1530,6 +1530,8 @@ func_run_hooks () { $debug_cmd + _G_rc_run_hooks=false + case " $hookable_fns " in *" $1 "*) ;; *) func_fatal_error "'$1' does not support hook funcions.n" ;; @@ -1538,16 +1540,16 @@ func_run_hooks () eval _G_hook_fns=\$$1_hooks; shift for _G_hook in $_G_hook_fns; do - eval $_G_hook '"$@"' - - # store returned options list back into positional - # parameters for next 'cmd' execution. - eval _G_hook_result=\$${_G_hook}_result - eval set dummy "$_G_hook_result"; shift + if eval $_G_hook '"$@"'; then + # store returned options list back into positional + # parameters for next 'cmd' execution. + eval _G_hook_result=\$${_G_hook}_result + eval set dummy "$_G_hook_result"; shift + _G_rc_run_hooks=: + fi done - func_quote_for_eval ${1+"$@"} - func_run_hooks_result=$func_quote_for_eval_result + $_G_rc_run_hooks && func_run_hooks_result=$_G_hook_result } @@ -1557,10 +1559,16 @@ func_run_hooks () ## --------------- ## # In order to add your own option parsing hooks, you must accept the -# full positional parameter list in your hook function, remove any -# options that you action, and then pass back the remaining unprocessed +# full positional parameter list in your hook function, you may remove/edit +# any options that you action, and then pass back the remaining unprocessed # options in '_result', escaped suitably for -# 'eval'. Like this: +# 'eval'. In this case you also must return $EXIT_SUCCESS to let the +# hook's caller know that it should pay attention to +# '_result'. Returning $EXIT_FAILURE signalizes that +# arguments are left untouched by the hook and therefore caller will ignore the +# result variable. +# +# Like this: # # my_options_prep () # { @@ -1570,9 +1578,11 @@ func_run_hooks () # usage_message=$usage_message' # -s, --silent don'\''t print informational messages # ' -# -# func_quote_for_eval ${1+"$@"} -# my_options_prep_result=$func_quote_for_eval_result +# # No change in '$@' (ignored completely by this hook). There is +# # no need to do the equivalent (but slower) action: +# # func_quote_for_eval ${1+"$@"} +# # my_options_prep_result=$func_quote_for_eval_result +# false # } # func_add_hook func_options_prep my_options_prep # @@ -1581,25 +1591,37 @@ func_run_hooks () # { # $debug_cmd # +# args_changed=false +# # # Note that for efficiency, we parse as many options as we can # # recognise in a loop before passing the remainder back to the # # caller on the first unrecognised argument we encounter. # while test $# -gt 0; do # opt=$1; shift # case $opt in -# --silent|-s) opt_silent=: ;; +# --silent|-s) opt_silent=: +# args_changed=: +# ;; # # Separate non-argument short options: # -s*) func_split_short_opt "$_G_opt" # set dummy "$func_split_short_opt_name" \ # "-$func_split_short_opt_arg" ${1+"$@"} # shift +# args_changed=: # ;; -# *) set dummy "$_G_opt" "$*"; shift; break ;; +# *) # Make sure the first unrecognised option "$_G_opt" +# # is added back to "$@", we could need that later +# # if $args_changed is true. +# set dummy "$_G_opt" ${1+"$@"}; shift; break ;; # esac # done # -# func_quote_for_eval ${1+"$@"} -# my_silent_option_result=$func_quote_for_eval_result +# if $args_changed; then +# func_quote_for_eval ${1+"$@"} +# my_silent_option_result=$func_quote_for_eval_result +# fi +# +# $args_changed # } # func_add_hook func_parse_options my_silent_option # @@ -1611,16 +1633,32 @@ func_run_hooks () # $opt_silent && $opt_verbose && func_fatal_help "\ # '--silent' and '--verbose' options are mutually exclusive." # -# func_quote_for_eval ${1+"$@"} -# my_option_validation_result=$func_quote_for_eval_result +# false # } # func_add_hook func_validate_options my_option_validation # -# You'll alse need to manually amend $usage_message to reflect the extra +# You'll also need to manually amend $usage_message to reflect the extra # options you parse. It's preferable to append if you can, so that # multiple option parsing hooks can be added safely. +# func_options_finish [ARG]... +# ---------------------------- +# Finishing the option parse loop (call 'func_options' hooks ATM). +func_options_finish () +{ + $debug_cmd + + _G_func_options_finish_exit=false + if func_run_hooks func_options ${1+"$@"}; then + func_options_finish_result=$func_run_hooks_result + _G_func_options_finish_exit=: + fi + + $_G_func_options_finish_exit +} + + # func_options [ARG]... # --------------------- # All the functions called inside func_options are hookable. See the @@ -1630,17 +1668,28 @@ func_options () { $debug_cmd - func_options_prep ${1+"$@"} - eval func_parse_options \ - ${func_options_prep_result+"$func_options_prep_result"} - eval func_validate_options \ - ${func_parse_options_result+"$func_parse_options_result"} + _G_rc_options=false - eval func_run_hooks func_options \ - ${func_validate_options_result+"$func_validate_options_result"} + for my_func in options_prep parse_options validate_options options_finish + do + if eval func_$my_func '${1+"$@"}'; then + eval _G_res_var='$'"func_${my_func}_result" + eval set dummy "$_G_res_var" ; shift + _G_rc_options=: + fi + done + + # Save modified positional parameters for caller. As a top-level + # options-parser function we always need to set the 'func_options_result' + # variable (regardless the $_G_rc_options value). + if $_G_rc_options; then + func_options_result=$_G_res_var + else + func_quote_for_eval ${1+"$@"} + func_options_result=$func_quote_for_eval_result + fi - # save modified positional parameters for caller - func_options_result=$func_run_hooks_result + $_G_rc_options } @@ -1649,9 +1698,9 @@ func_options () # All initialisations required before starting the option parse loop. # Note that when calling hook functions, we pass through the list of # positional parameters. If a hook function modifies that list, and -# needs to propogate that back to rest of this script, then the complete +# needs to propagate that back to rest of this script, then the complete # modified list must be put in 'func_run_hooks_result' before -# returning. +# returning $EXIT_SUCCESS (otherwise $EXIT_FAILURE is returned). func_hookable func_options_prep func_options_prep () { @@ -1661,10 +1710,14 @@ func_options_prep () opt_verbose=false opt_warning_types= - func_run_hooks func_options_prep ${1+"$@"} + _G_rc_options_prep=false + if func_run_hooks func_options_prep ${1+"$@"}; then + _G_rc_options_prep=: + # save modified positional parameters for caller + func_options_prep_result=$func_run_hooks_result + fi - # save modified positional parameters for caller - func_options_prep_result=$func_run_hooks_result + $_G_rc_options_prep } @@ -1678,18 +1731,20 @@ func_parse_options () func_parse_options_result= + _G_rc_parse_options=false # this just eases exit handling while test $# -gt 0; do # Defer to hook functions for initial option parsing, so they # get priority in the event of reusing an option name. - func_run_hooks func_parse_options ${1+"$@"} - - # Adjust func_parse_options positional parameters to match - eval set dummy "$func_run_hooks_result"; shift + if func_run_hooks func_parse_options ${1+"$@"}; then + eval set dummy "$func_run_hooks_result"; shift + _G_rc_parse_options=: + fi # Break out of the loop if we already parsed every option. test $# -gt 0 || break + _G_match_parse_options=: _G_opt=$1 shift case $_G_opt in @@ -1704,7 +1759,10 @@ func_parse_options () ;; --warnings|--warning|-W) - test $# = 0 && func_missing_arg $_G_opt && break + if test $# = 0 && func_missing_arg $_G_opt; then + _G_rc_parse_options=: + break + fi case " $warning_categories $1" in *" $1 "*) # trailing space prevents matching last $1 above @@ -1757,15 +1815,25 @@ func_parse_options () shift ;; - --) break ;; + --) _G_rc_parse_options=: ; break ;; -*) func_fatal_help "unrecognised option: '$_G_opt'" ;; - *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; + *) set dummy "$_G_opt" ${1+"$@"}; shift + _G_match_parse_options=false + break + ;; esac + + $_G_match_parse_options && _G_rc_parse_options=: done - # save modified positional parameters for caller - func_quote_for_eval ${1+"$@"} - func_parse_options_result=$func_quote_for_eval_result + + if $_G_rc_parse_options; then + # save modified positional parameters for caller + func_quote_for_eval ${1+"$@"} + func_parse_options_result=$func_quote_for_eval_result + fi + + $_G_rc_parse_options } @@ -1778,16 +1846,21 @@ func_validate_options () { $debug_cmd + _G_rc_validate_options=false + # Display all warnings if -W was not given. test -n "$opt_warning_types" || opt_warning_types=" $warning_categories" - func_run_hooks func_validate_options ${1+"$@"} + if func_run_hooks func_validate_options ${1+"$@"}; then + # save modified positional parameters for caller + func_validate_options_result=$func_run_hooks_result + _G_rc_validate_options=: + fi # Bail if the options were screwed! $exit_cmd $EXIT_FAILURE - # save modified positional parameters for caller - func_validate_options_result=$func_run_hooks_result + $_G_rc_validate_options } @@ -2068,7 +2141,7 @@ include the following information: compiler: $LTCC compiler flags: $LTCFLAGS linker: $LD (gnu? $with_gnu_ld) - version: $progname $scriptversion Debian-2.4.6-2 + version: $progname $scriptversion Debian-2.4.6-15build2 automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q` autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q` @@ -2270,6 +2343,8 @@ libtool_options_prep () nonopt= preserve_args= + _G_rc_lt_options_prep=: + # Shorthand for --mode=foo, only valid as the first argument case $1 in clean|clea|cle|cl) @@ -2293,11 +2368,18 @@ libtool_options_prep () uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) shift; set dummy --mode uninstall ${1+"$@"}; shift ;; + *) + _G_rc_lt_options_prep=false + ;; esac - # Pass back the list of options. - func_quote_for_eval ${1+"$@"} - libtool_options_prep_result=$func_quote_for_eval_result + if $_G_rc_lt_options_prep; then + # Pass back the list of options. + func_quote_for_eval ${1+"$@"} + libtool_options_prep_result=$func_quote_for_eval_result + fi + + $_G_rc_lt_options_prep } func_add_hook func_options_prep libtool_options_prep @@ -2309,9 +2391,12 @@ libtool_parse_options () { $debug_cmd + _G_rc_lt_parse_options=false + # Perform our own loop to consume as many options as possible in # each iteration. while test $# -gt 0; do + _G_match_lt_parse_options=: _G_opt=$1 shift case $_G_opt in @@ -2386,15 +2471,22 @@ libtool_parse_options () func_append preserve_args " $_G_opt" ;; - # An option not handled by this hook function: - *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; + # An option not handled by this hook function: + *) set dummy "$_G_opt" ${1+"$@"} ; shift + _G_match_lt_parse_options=false + break + ;; esac + $_G_match_lt_parse_options && _G_rc_lt_parse_options=: done + if $_G_rc_lt_parse_options; then + # save modified positional parameters for caller + func_quote_for_eval ${1+"$@"} + libtool_parse_options_result=$func_quote_for_eval_result + fi - # save modified positional parameters for caller - func_quote_for_eval ${1+"$@"} - libtool_parse_options_result=$func_quote_for_eval_result + $_G_rc_lt_parse_options } func_add_hook func_parse_options libtool_parse_options @@ -7275,10 +7367,13 @@ func_mode_link () # -specs=* GCC specs files # -stdlib=* select c++ std lib with clang # -fsanitize=* Clang/GCC memory and address sanitizer + # -fuse-ld=* Linker select flags for GCC + # -static-* direct GCC to link specific libraries statically + # -fcilkplus Cilk Plus language extension features for C/C++ -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \ - -specs=*|-fsanitize=*) + -specs=*|-fsanitize=*|-fuse-ld=*|-static-*|-fcilkplus) func_quote_for_eval "$arg" arg=$func_quote_for_eval_result func_append compile_command " $arg" diff --git a/contrib/hwloc/config/missing b/contrib/hwloc/config/missing index 8d0eaad250..1fe1611f18 100755 --- a/contrib/hwloc/config/missing +++ b/contrib/hwloc/config/missing @@ -3,7 +3,7 @@ scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1996-2020 Free Software Foundation, Inc. +# Copyright (C) 1996-2021 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify diff --git a/contrib/hwloc/config/test-driver b/contrib/hwloc/config/test-driver index 9759384aa7..be73b80adf 100755 --- a/contrib/hwloc/config/test-driver +++ b/contrib/hwloc/config/test-driver @@ -3,7 +3,7 @@ scriptversion=2018-03-07.03; # UTC -# Copyright (C) 2011-2020 Free Software Foundation, Inc. +# Copyright (C) 2011-2021 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 @@ -105,8 +105,11 @@ trap "st=130; $do_exit" 2 trap "st=141; $do_exit" 13 trap "st=143; $do_exit" 15 -# Test script is run here. -"$@" >$log_file 2>&1 +# Test script is run here. We create the file first, then append to it, +# to ameliorate tests themselves also writing to the log file. Our tests +# don't, but others can (automake bug#35762). +: >"$log_file" +"$@" >>"$log_file" 2>&1 estatus=$? if test $enable_hard_errors = no && test $estatus -eq 99; then @@ -128,7 +131,7 @@ esac # know whether the test passed or failed simply by looking at the '.log' # file, without the need of also peaking into the corresponding '.trs' # file (automake bug#11814). -echo "$res $test_name (exit status: $estatus)" >>$log_file +echo "$res $test_name (exit status: $estatus)" >>"$log_file" # Report outcome to console. echo "${col}${res}${std}: $test_name" diff --git a/contrib/hwloc/configure b/contrib/hwloc/configure index 2cb411f62b..2b0b841f8e 100755 --- a/contrib/hwloc/configure +++ b/contrib/hwloc/configure @@ -1,11 +1,12 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for hwloc 2.4.1. +# Generated by GNU Autoconf 2.71 for hwloc 2.8.0. # # Report bugs to . # # -# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. +# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation, +# Inc. # # # This configure script is free software; the Free Software Foundation @@ -16,14 +17,16 @@ # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : +as_nop=: +if test ${ZSH_VERSION+y} && (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 +else $as_nop case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( @@ -33,46 +36,46 @@ esac fi + +# Reset variables that may have inherited troublesome values from +# the environment. + +# IFS needs to be set, to space, tab, and newline, in precisely that order. +# (If _AS_PATH_WALK were called with IFS unset, it would have the +# side effect of setting IFS to empty, thus disabling word splitting.) +# Quoting is to prevent editors from complaining about space-tab. 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 +IFS=" "" $as_nl" + +PS1='$ ' +PS2='> ' +PS4='+ ' + +# Ensure predictable behavior from utilities with locale-dependent output. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# We cannot yet rely on "unset" to work, but we need these variables +# to be unset--not just set to an empty or harmless value--now, to +# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct +# also avoids known problems related to "unset" and subshell syntax +# in other old shells (e.g. bash 2.01 and pdksh 5.2.14). +for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH +do eval test \${$as_var+y} \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done + +# Ensure that fds 0, 1, and 2 are open. +if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi +if (exec 3>&2) ; then :; else exec 2>/dev/null; fi # The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then +if ${PATH_SEPARATOR+false} :; 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 || @@ -81,13 +84,6 @@ if test "${PATH_SEPARATOR+set}" != set; then 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 #(( @@ -96,8 +92,12 @@ case $0 in #(( 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 + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + test -r "$as_dir$0" && as_myself=$as_dir$0 && break done IFS=$as_save_IFS @@ -109,30 +109,10 @@ 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 + printf "%s\n" "$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. @@ -154,20 +134,22 @@ 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 +printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 +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 : + as_bourne_compatible="as_nop=: +if test \${ZSH_VERSION+y} && (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 +else \$as_nop case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( @@ -187,18 +169,20 @@ 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 : +if ( set x; as_fn_ret_success y && test x = \"\$1\" ) +then : -else +else \$as_nop exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 +blah=\$(echo \$(echo blah)) +test x\"\$blah\" = xblah || 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 test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' @@ -206,31 +190,40 @@ test \$(( 1 + 1 )) = 2 || exit 1 ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ - || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1" - if (eval "$as_required") 2>/dev/null; then : + || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1 +test \$(( 1 + 1 )) = 2 || exit 1" + if (eval "$as_required") 2>/dev/null +then : as_have_required=yes -else +else $as_nop as_have_required=no fi - if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null +then : -else +else $as_nop 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=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac 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 + 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 : + as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 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 : + if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null +then : break 2 fi fi @@ -238,14 +231,21 @@ fi 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 $as_found +then : + +else $as_nop + if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null +then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi +fi - if test "x$CONFIG_SHELL" != x; then : + 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 @@ -263,18 +263,19 @@ 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 +printf "%s\n" "$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." + if test x$as_have_required = xno +then : + printf "%s\n" "$0: This script requires a shell more modern than all" + printf "%s\n" "$0: the shells that I found on your system." + if test ${ZSH_VERSION+y} ; then + printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should" + printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later." else - $as_echo "$0: Please tell bug-autoconf@gnu.org and + printf "%s\n" "$0: Please tell bug-autoconf@gnu.org and $0: https://github.com/open-mpi/hwloc/issues about your $0: system, including any error possibly output before this $0: message. Then install a modern shell, or manually run @@ -302,6 +303,7 @@ as_fn_unset () } as_unset=as_fn_unset + # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. @@ -319,6 +321,14 @@ as_fn_exit () as_fn_set_status $1 exit $1 } # as_fn_exit +# as_fn_nop +# --------- +# Do nothing but, unlike ":", preserve the value of $?. +as_fn_nop () +{ + return $? +} +as_nop=as_fn_nop # as_fn_mkdir_p # ------------- @@ -333,7 +343,7 @@ as_fn_mkdir_p () as_dirs= while :; do case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" @@ -342,7 +352,7 @@ $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" | +printf "%s\n" X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -381,12 +391,13 @@ as_fn_executable_p () # 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 : +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 +else $as_nop as_fn_append () { eval $1=\$$1\$2 @@ -398,18 +409,27 @@ fi # as_fn_append # 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 : +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null +then : eval 'as_fn_arith () { as_val=$(( $* )) }' -else +else $as_nop as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith +# as_fn_nop +# --------- +# Do nothing but, unlike ":", preserve the value of $?. +as_fn_nop () +{ + return $? +} +as_nop=as_fn_nop # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- @@ -421,9 +441,9 @@ 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 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - $as_echo "$as_me: error: $2" >&2 + printf "%s\n" "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error @@ -450,7 +470,7 @@ as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | +printf "%s\n" X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -494,7 +514,7 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits 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; } + { printf "%s\n" "$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 @@ -508,6 +528,10 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits exit } + +# Determine whether it's possible to make 'echo' print without a newline. +# These variables are no longer used directly by Autoconf, but are AC_SUBSTed +# for compatibility with existing Makefiles. ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) @@ -521,6 +545,13 @@ case `echo -n x` in #((((( ECHO_N='-n';; esac +# For backward compatibility with old third-party macros, we provide +# the shell variables $as_echo and $as_echo_n. New code should use +# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. +as_echo='printf %s\n' +as_echo_n='printf %s' + + rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file @@ -590,47 +621,43 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='hwloc' PACKAGE_TARNAME='hwloc' -PACKAGE_VERSION='2.4.1' -PACKAGE_STRING='hwloc 2.4.1' +PACKAGE_VERSION='2.8.0' +PACKAGE_STRING='hwloc 2.8.0' PACKAGE_BUGREPORT='https://github.com/open-mpi/hwloc/issues' PACKAGE_URL='' # Factoring default headers for most tests. ac_includes_default="\ -#include -#ifdef HAVE_SYS_TYPES_H -# include -#endif -#ifdef HAVE_SYS_STAT_H -# include +#include +#ifdef HAVE_STDIO_H +# include #endif -#ifdef STDC_HEADERS +#ifdef HAVE_STDLIB_H # 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_STRINGS_H +# include +#endif +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_SYS_STAT_H +# include +#endif #ifdef HAVE_UNISTD_H # include #endif" +ac_header_c_list= ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS @@ -649,6 +676,8 @@ HWLOC_XML_LIBXML_BUILD_STATIC_FALSE HWLOC_XML_LIBXML_BUILD_STATIC_TRUE HWLOC_GL_BUILD_STATIC_FALSE HWLOC_GL_BUILD_STATIC_TRUE +HWLOC_LEVELZERO_BUILD_STATIC_FALSE +HWLOC_LEVELZERO_BUILD_STATIC_TRUE HWLOC_RSMI_BUILD_STATIC_FALSE HWLOC_RSMI_BUILD_STATIC_TRUE HWLOC_NVML_BUILD_STATIC_FALSE @@ -703,6 +732,8 @@ HWLOC_HAVE_USER32_FALSE HWLOC_HAVE_USER32_TRUE HWLOC_HAVE_BUNZIPP_FALSE HWLOC_HAVE_BUNZIPP_TRUE +HWLOC_HAVE_LEVELZERO_FALSE +HWLOC_HAVE_LEVELZERO_TRUE HWLOC_HAVE_RSMI_FALSE HWLOC_HAVE_RSMI_TRUE HWLOC_HAVE_NVML_FALSE @@ -739,8 +770,10 @@ HWLOC_BUILD_STANDALONE_FALSE HWLOC_BUILD_STANDALONE_TRUE BUNZIPP XMLLINT +HWLOC_IBVERBS_LIBS HWLOC_NUMA_LIBS HWLOC_NUMA_CFLAGS +ARCHIVEMOUNT HWLOC_PS_LIBS HWLOC_DIFF_W HWLOC_DIFF_U @@ -790,6 +823,7 @@ HWLOC_PLUGINS_DIR HWLOC_PLUGINS_PATH HWLOC_LTDL_LIBS HWLOC_DL_LIBS +HWLOC_HAVE_X86_CPUID HWLOC_HAVE_LIBXML2 HWLOC_LIBXML2_LIBS HWLOC_LIBXML2_CFLAGS @@ -798,28 +832,47 @@ X_EXTRA_LIBS X_LIBS X_PRE_LIBS X_CFLAGS +CPP XMKMF +HWLOC_HAVE_LEVELZERO +HWLOC_LEVELZERO_LIBS +HWLOC_LEVELZERO_CFLAGS +HWLOC_HAVE_OPENCL +HWLOC_OPENCL_LDFLAGS +HWLOC_OPENCL_LIBS +HWLOC_OPENCL_CPPFLAGS HWLOC_HAVE_RSMI HWLOC_RSMI_LIBS +HWLOC_RSMI_LDFLAGS +HWLOC_RSMI_CPPFLAGS HWLOC_HAVE_NVML +HWLOC_NVML_CPPFLAGS +HWLOC_NVML_LDFLAGS HWLOC_NVML_LIBS +HWLOC_CUDART_LDFLAGS +HWLOC_CUDART_CPPFLAGS +HWLOC_CUDART_LIBS +HWLOC_CUDART_CFLAGS +HWLOC_CUDA_LDFLAGS +HWLOC_CUDA_CPPFLAGS HWLOC_CUDA_LIBS -HWLOC_HAVE_OPENCL -HWLOC_OPENCL_LDFLAGS -HWLOC_OPENCL_LIBS -HWLOC_OPENCL_CFLAGS +HWLOC_CUDA_CFLAGS HWLOC_PCIACCESS_LIBS HWLOC_PCIACCESS_CFLAGS PKG_CONFIG BASH -HWLOC_MS_LIB +HWLOC_DARWIN_LDFLAGS HWLOC_MS_LIB_ARCH +HWLOC_HAVE_LINUX HWLOC_RELEASE_DATE HWLOC_VERSION HWLOC_top_srcdir HWLOC_top_builddir +libhwloc_so_name libhwloc_so_version -CC_FOR_BUILD +ROCM_VERSION +CUDA_VERSION +HWLOC_MS_LIB CXXCPP am__fastdepCXX_FALSE am__fastdepCXX_TRUE @@ -841,6 +894,8 @@ ac_ct_DUMPBIN DUMPBIN LD FGREP +EGREP +GREP SED LIBTOOL OBJDUMP @@ -848,9 +903,6 @@ DLLTOOL AS ac_ct_AR AR -EGREP -GREP -CPP am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE @@ -871,6 +923,9 @@ AM_BACKSLASH AM_DEFAULT_VERBOSITY AM_DEFAULT_V AM_V +CSCOPE +ETAGS +CTAGS am__untar am__tar AMTAR @@ -963,6 +1018,7 @@ enable_embedded_mode with_hwloc_symbol_prefix enable_debug enable_doxygen +enable_readme enable_picky enable_cairo enable_cpuid @@ -973,15 +1029,20 @@ enable_32bits_pci_domain enable_opencl enable_cuda enable_nvml +with_cuda_version +with_cuda enable_rsmi +with_rocm_version +with_rocm +enable_levelzero enable_gl enable_libudev enable_plugins +with_hwloc_plugins_path enable_plugin_dlopen enable_plugin_ltdl enable_visibility with_x -with_hwloc_plugins_path enable_netloc ' ac_precious_vars='build_alias @@ -992,18 +1053,25 @@ CFLAGS LDFLAGS LIBS CPPFLAGS -CPP LT_SYS_LIBRARY_PATH CXX CXXFLAGS CCC CXXCPP -CC_FOR_BUILD HWLOC_MS_LIB +CUDA_VERSION +ROCM_VERSION PKG_CONFIG HWLOC_PCIACCESS_CFLAGS HWLOC_PCIACCESS_LIBS +HWLOC_CUDA_CFLAGS +HWLOC_CUDA_LIBS +HWLOC_CUDART_CFLAGS +HWLOC_CUDART_LIBS +HWLOC_LEVELZERO_CFLAGS +HWLOC_LEVELZERO_LIBS XMKMF +CPP HWLOC_LIBXML2_CFLAGS HWLOC_LIBXML2_LIBS DOXYGEN @@ -1017,6 +1085,7 @@ LYNX HWLOC_CAIRO_CFLAGS HWLOC_CAIRO_LIBS DIFF +ARCHIVEMOUNT HWLOC_NUMA_CFLAGS HWLOC_NUMA_LIBS' @@ -1087,8 +1156,6 @@ do *) ac_optarg=yes ;; esac - # Accept the important Cygnus configure options, so we can diagnose typos. - case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; @@ -1129,9 +1196,9 @@ do 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" + as_fn_error $? "invalid feature name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" @@ -1155,9 +1222,9 @@ do 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" + as_fn_error $? "invalid feature name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" @@ -1368,9 +1435,9 @@ do 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" + as_fn_error $? "invalid package name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" @@ -1384,9 +1451,9 @@ do 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" + as_fn_error $? "invalid package name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" @@ -1430,9 +1497,9 @@ Try \`$0 --help' for more information" *) # FIXME: should be removed in autoconf 3.0. - $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + printf "%s\n" "$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 + printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; @@ -1448,7 +1515,7 @@ 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 ;; + *) printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi @@ -1512,7 +1579,7 @@ $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" | +printf "%s\n" X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -1569,7 +1636,7 @@ 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 hwloc 2.4.1 to adapt to many kinds of systems. +\`configure' configures hwloc 2.8.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1645,7 +1712,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of hwloc 2.4.1:";; + short | recursive ) echo "Configuration of hwloc 2.8.0:";; esac cat <<\_ACEOF @@ -1675,6 +1742,8 @@ Optional Features: (note that this option is ONLY relevant in developer builds; Doxygen documentation is pre-built for tarball builds and this option is therefore ignored) + --disable-readme disable the updating of the top-level README file + from the HTML documentation index --disable-picky When in developer checkouts of hwloc and compiling with gcc, the default is to enable maximum compiler pickyness. Using --disable-picky or --enable-picky @@ -1685,8 +1754,8 @@ Optional Features: --disable-libxml2 Do not use libxml2 for XML support, use a custom minimalistic support --disable-io Disable I/O discovery build entirely (PCI, LinuxIO, - CUDA, OpenCL, NVML, RSMI, GL) instead of only - disabling it at runtime by default + CUDA, OpenCL, NVML, RSMI, LevelZero, GL) instead of + only disabling it at runtime by default --disable-pci Disable the PCI device discovery build (instead of only disabling PCI at runtime by default) --enable-32bits-pci-domain @@ -1701,6 +1770,7 @@ Optional Features: --disable-nvml Disable the NVML device discovery build (instead of only disabling NVML at runtime by default) --disable-rsmi Disable the ROCm SMI device discovery + --disable-levelzero Disable the oneAPI Level Zero device discovery --disable-gl Disable the GL display device discovery (instead of only disabling GL at runtime by default) --disable-libudev Disable the Linux libudev @@ -1731,14 +1801,26 @@ Optional Packages: compiler's sysroot if not specified). --with-hwloc-symbol-prefix=STRING STRING can be any valid C symbol name. It will be - prefixed to all public HWLOC symbols. Default: - "hwloc_" - --with-x use the X Window System + prefixed to all public HWLOC symbols. Default: "" + (no prefix) + --with-cuda-version= + Specify the CUDA version (e.g. 11.2) for selecting + the appropriate pkg-config file + --with-cuda= Specify the CUDA installation directory, used for + NVIDIA NVML and OpenCL too. If a non-existent + directory is given, all dependencies installed by + CUDA are disabled (CUDA, NVML and NVIDIA OpenCL). + --with-rocm-version= + Specify the ROCm version (e.g. 4.2.0) for selecting + the default ROCm installation path (e.g. + /opt/rocm-4.2.0) + --with-rocm= Specify the ROCm installation directory --with-hwloc-plugins-path=dir:... Colon-separated list of plugin directories. Default: "$prefix/lib/hwloc". Plugins will be installed in the first directory. They will be loaded from all of them, in order. + --with-x use the X Window System Some influential environment variables: CC C compiler command @@ -1748,22 +1830,38 @@ Some influential environment variables: 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 LT_SYS_LIBRARY_PATH User-defined run-time library search path. CXX C++ compiler command CXXFLAGS C++ compiler flags CXXCPP C++ preprocessor - CC_FOR_BUILD - build system C compiler HWLOC_MS_LIB Path to Microsoft's Visual Studio `lib' tool + CUDA_VERSION + The CUDA version (e.g. 11.2) for selecting the appropriate + pkg-config file + ROCM_VERSION + The ROCm version (e.g. 4.2.0) for selecting the default ROCm + installation path (e.g. /opt/rocm-4.2.0) PKG_CONFIG path to pkg-config utility HWLOC_PCIACCESS_CFLAGS C compiler flags for PCIACCESS, overriding pkg-config HWLOC_PCIACCESS_LIBS linker flags for PCIACCESS, overriding pkg-config + HWLOC_CUDA_CFLAGS + C compiler flags for CUDA, overriding pkg-config + HWLOC_CUDA_LIBS + linker flags for CUDA, overriding pkg-config + HWLOC_CUDART_CFLAGS + C compiler flags for CUDART, overriding pkg-config + HWLOC_CUDART_LIBS + linker flags for CUDART, overriding pkg-config + HWLOC_LEVELZERO_CFLAGS + C compiler flags for LEVELZERO, overriding pkg-config + HWLOC_LEVELZERO_LIBS + linker flags for LEVELZERO, overriding pkg-config XMKMF Path to xmkmf, Makefile generator for X Window System + CPP C preprocessor HWLOC_LIBXML2_CFLAGS C compiler flags for LIBXML2, overriding pkg-config HWLOC_LIBXML2_LIBS @@ -1789,6 +1887,9 @@ Some influential environment variables: HWLOC_CAIRO_LIBS linker flags for CAIRO, overriding pkg-config DIFF diff tool + ARCHIVEMOUNT + Location of the archivemount program (for loading archive + topology in tools) HWLOC_NUMA_CFLAGS C compiler flags for NUMA, overriding pkg-config HWLOC_NUMA_LIBS @@ -1813,9 +1914,9 @@ if test "$ac_init_help" = "recursive"; then case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + ac_dir_suffix=/`printf "%s\n" "$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|/||'` + ac_top_builddir_sub=`printf "%s\n" "$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/ ;; @@ -1843,7 +1944,8 @@ esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } - # Check for guested configure. + # Check for configure.gnu first; this name is used for a wrapper for + # Metaconfig's "Configure" on case-insensitive file systems. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive @@ -1851,7 +1953,7 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix echo && $SHELL "$ac_srcdir/configure" --help=recursive else - $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done @@ -1860,10 +1962,10 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -hwloc configure 2.4.1 -generated by GNU Autoconf 2.69 +hwloc configure 2.8.0 +generated by GNU Autoconf 2.71 -Copyright (C) 2012 Free Software Foundation, Inc. +Copyright (C) 2021 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1880,14 +1982,14 @@ fi ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext + rm -f conftest.$ac_objext conftest.beam 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 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -1895,14 +1997,15 @@ $as_echo "$ac_try_echo"; } >&5 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$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 : + } && test -s conftest.$ac_objext +then : ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 +else $as_nop + printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -1912,176 +2015,6 @@ fi } # 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_check_header_mongrel LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists, giving a warning if it cannot be compiled using -# the include files in INCLUDES and setting the cache variable VAR -# accordingly. -ac_fn_c_check_header_mongrel () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if eval \${$3+:} false; then : - { $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 -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://github.com/open-mpi/hwloc/issues ## -## ------------------------------------------------------- ##" - ) | 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_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 @@ -2089,26 +2022,28 @@ fi 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 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +printf %s "checking for $2... " >&6; } +if eval test \${$3+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : eval "$3=yes" -else +else $as_nop eval "$3=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile @@ -2119,14 +2054,14 @@ $as_echo "$ac_res" >&6; } 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 + rm -f conftest.$ac_objext conftest.beam 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 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -2134,17 +2069,18 @@ $as_echo "$ac_try_echo"; } >&5 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$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 : + } +then : ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 +else $as_nop + printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -2165,11 +2101,12 @@ fi 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 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +printf %s "checking for $2... " >&6; } +if eval test \${$3+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. @@ -2177,16 +2114,9 @@ else #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 + which can conflict with char $2 (); below. */ +#include #undef $2 /* Override any GCC internal prototype to avoid an error. @@ -2204,24 +2134,25 @@ choke me #endif int -main () +main (void) { return $2 (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : eval "$3=yes" -else +else $as_nop eval "$3=no" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ 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; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func @@ -2232,14 +2163,14 @@ $as_echo "$ac_res" >&6; } ac_fn_cxx_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext + rm -f conftest.$ac_objext conftest.beam 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 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -2247,14 +2178,15 @@ $as_echo "$ac_try_echo"; } >&5 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$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 : + } && test -s conftest.$ac_objext +then : ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 +else $as_nop + printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -2276,7 +2208,7 @@ case "(($ac_try" in *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -2284,14 +2216,15 @@ $as_echo "$ac_try_echo"; } >&5 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$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 : + } +then : ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 +else $as_nop + printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -2307,14 +2240,14 @@ fi 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 + rm -f conftest.$ac_objext conftest.beam 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 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -2322,17 +2255,18 @@ $as_echo "$ac_try_echo"; } >&5 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$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 : + } +then : ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 +else $as_nop + printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -2347,6 +2281,49 @@ fi } # ac_fn_cxx_try_link +# ac_fn_c_try_run LINENO +# ---------------------- +# Try to run 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\"" +printf "%s\n" "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + printf "%s\n" "$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\"" +printf "%s\n" "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; } +then : + ac_retval=0 +else $as_nop + printf "%s\n" "$as_me: program exited with status $ac_status" >&5 + printf "%s\n" "$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_compute_int LINENO EXPR VAR INCLUDES # -------------------------------------------- # Tries to find the compile-time value of EXPR in a program that includes @@ -2361,7 +2338,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int -main () +main (void) { static int test_array [1 - 2 * !(($2) >= 0)]; test_array [0] = 0; @@ -2371,14 +2348,15 @@ return test_array [0]; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +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 () +main (void) { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; test_array [0] = 0; @@ -2388,9 +2366,10 @@ return test_array [0]; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_hi=$ac_mid; break -else +else $as_nop as_fn_arith $ac_mid + 1 && ac_lo=$as_val if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= @@ -2398,14 +2377,14 @@ else fi as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done -else +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int -main () +main (void) { static int test_array [1 - 2 * !(($2) < 0)]; test_array [0] = 0; @@ -2415,14 +2394,15 @@ return test_array [0]; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +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 () +main (void) { static int test_array [1 - 2 * !(($2) >= $ac_mid)]; test_array [0] = 0; @@ -2432,9 +2412,10 @@ return test_array [0]; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_lo=$ac_mid; break -else +else $as_nop as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= @@ -2442,14 +2423,14 @@ else fi as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done -else +else $as_nop ac_lo= ac_hi= fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam 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 @@ -2457,7 +2438,7 @@ while test "x$ac_lo" != "x$ac_hi"; do /* end confdefs.h. */ $4 int -main () +main (void) { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; test_array [0] = 0; @@ -2467,12 +2448,13 @@ return test_array [0]; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_hi=$ac_mid -else +else $as_nop as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done case $ac_lo in #(( ?*) eval "$3=\$ac_lo"; ac_retval=0 ;; @@ -2482,12 +2464,12 @@ esac cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 -static long int longval () { return $2; } -static unsigned long int ulongval () { return $2; } +static long int longval (void) { return $2; } +static unsigned long int ulongval (void) { return $2; } #include #include int -main () +main (void) { FILE *f = fopen ("conftest.val", "w"); @@ -2515,9 +2497,10 @@ main () return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : +if ac_fn_c_try_run "$LINENO" +then : echo >>conftest.val; read $3 &5 +printf %s "checking whether $as_decl_name is declared... " >&6; } +if eval test \${$3+y} +then : + printf %s "(cached) " >&6 +else $as_nop as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 -$as_echo_n "checking whether $as_decl_name is declared... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else + eval ac_save_FLAGS=\$$6 + as_fn_append $6 " $5" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int -main () +main (void) { #ifndef $as_decl_name #ifdef __cplusplus @@ -2562,19 +2548,22 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : eval "$3=yes" -else +else $as_nop eval "$3=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + eval $6=\$ac_save_FLAGS + fi eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno -} # ac_fn_c_check_decl +} # ac_fn_check_decl # ac_fn_c_check_type LINENO TYPE VAR INCLUDES # ------------------------------------------- @@ -2583,17 +2572,18 @@ $as_echo "$ac_res" >&6; } 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 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +printf %s "checking for $2... " >&6; } +if eval test \${$3+y} +then : + printf %s "(cached) " >&6 +else $as_nop eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int -main () +main (void) { if (sizeof ($2)) return 0; @@ -2601,12 +2591,13 @@ if (sizeof ($2)) return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int -main () +main (void) { if (sizeof (($2))) return 0; @@ -2614,29 +2605,88 @@ if (sizeof (($2))) return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : -else +else $as_nop eval "$3=yes" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_type -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 hwloc $as_me 2.4.1, which was -generated by GNU Autoconf 2.69. Invocation command line was +# 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\"" +printf "%s\n" "$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 + printf "%s\n" "$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_nop + printf "%s\n" "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - $ $0 $@ + 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_configure_args_raw= +for ac_arg +do + case $ac_arg in + *\'*) + ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + as_fn_append ac_configure_args_raw " '$ac_arg'" +done + +case $ac_configure_args_raw in + *$as_nl*) + ac_safe_unquote= ;; + *) + ac_unsafe_z='|&;<>()$`\\"*?[ '' ' # This string ends in space, tab. + ac_unsafe_a="$ac_unsafe_z#~" + ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g" + ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;; +esac + +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 hwloc $as_me 2.8.0, which was +generated by GNU Autoconf 2.71. Invocation command line was + + $ $0$ac_configure_args_raw _ACEOF exec 5>>config.log @@ -2669,8 +2719,12 @@ 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" + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + printf "%s\n" "PATH: $as_dir" done IFS=$as_save_IFS @@ -2705,7 +2759,7 @@ do | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) - ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; @@ -2740,11 +2794,13 @@ done # 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=$? + # Sanitize IFS. + IFS=" "" $as_nl" # Save into config.log some information that might help in debugging. { echo - $as_echo "## ---------------- ## + printf "%s\n" "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo @@ -2755,8 +2811,8 @@ trap 'exit_status=$? 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;} ;; + *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( @@ -2780,7 +2836,7 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; ) echo - $as_echo "## ----------------- ## + printf "%s\n" "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo @@ -2788,14 +2844,14 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - $as_echo "$ac_var='\''$ac_val'\''" + printf "%s\n" "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then - $as_echo "## ------------------- ## + printf "%s\n" "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo @@ -2803,15 +2859,15 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - $as_echo "$ac_var='\''$ac_val'\''" + printf "%s\n" "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then - $as_echo "## ----------- ## + printf "%s\n" "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo @@ -2819,8 +2875,8 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; echo fi test "$ac_signal" != 0 && - $as_echo "$as_me: caught signal $ac_signal" - $as_echo "$as_me: exit $exit_status" + printf "%s\n" "$as_me: caught signal $ac_signal" + printf "%s\n" "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && @@ -2834,63 +2890,48 @@ 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 +printf "%s\n" "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. -cat >>confdefs.h <<_ACEOF -#define PACKAGE_NAME "$PACKAGE_NAME" -_ACEOF +printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define PACKAGE_TARNAME "$PACKAGE_TARNAME" -_ACEOF +printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define PACKAGE_VERSION "$PACKAGE_VERSION" -_ACEOF +printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define PACKAGE_STRING "$PACKAGE_STRING" -_ACEOF +printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -_ACEOF +printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define PACKAGE_URL "$PACKAGE_URL" -_ACEOF +printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h # 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 + ac_site_files="$CONFIG_SITE" elif test "x$prefix" != xNONE; then - ac_site_file1=$prefix/share/config.site - ac_site_file2=$prefix/etc/config.site + ac_site_files="$prefix/share/config.site $prefix/etc/config.site" else - ac_site_file1=$ac_default_prefix/share/config.site - ac_site_file2=$ac_default_prefix/etc/config.site + ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi -for ac_site_file in "$ac_site_file1" "$ac_site_file2" + +for ac_site_file in $ac_site_files 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;} + case $ac_site_file in #( + */*) : + ;; #( + *) : + ac_site_file=./$ac_site_file ;; +esac + if test -f "$ac_site_file" && test -r "$ac_site_file"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 +printf "%s\n" "$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;} + || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$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 @@ -2900,272 +2941,890 @@ 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;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 +printf "%s\n" "$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;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 +printf "%s\n" "$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. ## -## -------------------- ## +as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H" +# Test code for whether the C compiler supports C89 (global declarations) +ac_c_conftest_c89_globals=' +/* Does the compiler advertise C89 conformance? + Do not test the value of __STDC__, because some compilers set it to 0 + while being otherwise adequately conformant. */ +#if !defined __STDC__ +# error "Compiler does not advertise C89 conformance" +#endif -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 +#include +#include +struct stat; +/* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */ +struct buf { int x; }; +struct buf * (*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 do not provoke an error unfortunately, instead are silently treated + as an "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 is necessary to write \x00 == 0 to get something + that is 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]; -ac_aux_dir= -for ac_dir in ./config "$srcdir"/./config; 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 \"$srcdir\"/./config" "$LINENO" 5 -fi +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int), + int, int);' -# 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. +# Test code for whether the C compiler supports C89 (body of main). +ac_c_conftest_c89_main=' +ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]); +' +# Test code for whether the C compiler supports C99 (global declarations) +ac_c_conftest_c99_globals=' +// Does the compiler advertise C99 conformance? +#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L +# error "Compiler does not advertise C99 conformance" +#endif -# Note that this directory must *exactly* match what was specified via -# -I in ACLOCAL_AMFLAGS in the top-level Makefile.am. +#include +extern int puts (const char *); +extern int printf (const char *, ...); +extern int dprintf (int, const char *, ...); +extern void *malloc (size_t); + +// Check varargs macros. These examples are taken from C99 6.10.3.5. +// dprintf is used instead of fprintf to avoid needing to declare +// FILE and stderr. +#define debug(...) dprintf (2, __VA_ARGS__) +#define showlist(...) puts (#__VA_ARGS__) +#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) +static void +test_varargs_macros (void) +{ + int x = 1234; + int y = 5678; + debug ("Flag"); + debug ("X = %d\n", x); + showlist (The first, second, and third items.); + report (x>y, "x is %d but y is %d", x, y); +} +// Check long long types. +#define BIG64 18446744073709551615ull +#define BIG32 4294967295ul +#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) +#if !BIG_OK + #error "your preprocessor is broken" +#endif +#if BIG_OK +#else + #error "your preprocessor is broken" +#endif +static long long int bignum = -9223372036854775807LL; +static unsigned long long int ubignum = BIG64; -cat </dev/null 2>&1 || - as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 +typedef const char *ccp; -{ $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 +static inline int +test_restrict (ccp restrict text) +{ + // See if C++-style comments work. + // Iterate through items via the restricted pointer. + // Also check for declarations in for loops. + for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i) + continue; + return 0; +} -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 +// Check varargs and va_copy. +static bool +test_varargs (const char *format, ...) +{ + va_list args; + va_start (args, format); + va_list args_copy; + va_copy (args_copy, args); + const char *str = ""; + int number = 0; + float fnumber = 0; -{ $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 + while (*format) + { + switch (*format++) + { + case '\''s'\'': // string + str = va_arg (args_copy, const char *); + break; + case '\''d'\'': // int + number = va_arg (args_copy, int); + break; + case '\''f'\'': // float + fnumber = va_arg (args_copy, double); + break; + default: + break; + } + } + va_end (args_copy); + va_end (args); -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 + return *str && number && fnumber; +} +' +# Test code for whether the C compiler supports C99 (body of main). +ac_c_conftest_c99_main=' + // Check bool. + _Bool success = false; + success |= (argc != 0); + + // Check restrict. + if (test_restrict ("String literal") == 0) + success = true; + char *restrict newvar = "Another string"; + + // Check varargs. + success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234); + test_varargs_macros (); + + // Check flexible array members. + struct incomplete_array *ia = + malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); + ia->datasize = 10; + for (int i = 0; i < ia->datasize; ++i) + ia->data[i] = i * 1.234; + + // Check named initializers. + struct named_init ni = { + .number = 34, + .name = L"Test wide string", + .average = 543.34343, + }; + + ni.number = 58; + + int dynamic_array[ni.number]; + dynamic_array[0] = argv[0][0]; + dynamic_array[ni.number - 1] = 543; + + // work around unused variable warnings + ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\'' + || dynamic_array[ni.number - 1] != 543); +' -{ $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 +# Test code for whether the C compiler supports C11 (global declarations) +ac_c_conftest_c11_globals=' +// Does the compiler advertise C11 conformance? +#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L +# error "Compiler does not advertise C11 conformance" +#endif -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 +// Check _Alignas. +char _Alignas (double) aligned_as_double; +char _Alignas (0) no_special_alignment; +extern char aligned_as_int; +char _Alignas (0) _Alignas (int) aligned_as_int; +// Check _Alignof. +enum +{ + int_alignment = _Alignof (int), + int_array_alignment = _Alignof (int[100]), + char_alignment = _Alignof (char) +}; +_Static_assert (0 < -_Alignof (int), "_Alignof is signed"); -# 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}- +// Check _Noreturn. +int _Noreturn does_not_return (void) { for (;;) continue; } -# Init automake -am__api_version='1.16' +// Check _Static_assert. +struct test_static_assert +{ + int x; + _Static_assert (sizeof (int) <= sizeof (long int), + "_Static_assert does not work in struct"); + long int y; +}; -# 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. +// Check UTF-8 literals. +#define u8 syntax error! +char const utf8_literal[] = u8"happens to be ASCII" "another string"; + +// Check duplicate typedefs. +typedef long *long_ptr; +typedef long int *long_ptr; +typedef long_ptr long_ptr; + +// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1. +struct anonymous +{ + union { + struct { int i; int j; }; + struct { int k; long int l; } w; + }; + int m; +} v1; +' + +# Test code for whether the C compiler supports C11 (body of main). +ac_c_conftest_c11_main=' + _Static_assert ((offsetof (struct anonymous, i) + == offsetof (struct anonymous, w.k)), + "Anonymous union alignment botch"); + v1.i = 2; + v1.w.k = 5; + ok |= v1.i != 5; +' + +# Test code for whether the C compiler supports C11 (complete). +ac_c_conftest_c11_program="${ac_c_conftest_c89_globals} +${ac_c_conftest_c99_globals} +${ac_c_conftest_c11_globals} + +int +main (int argc, char **argv) +{ + int ok = 0; + ${ac_c_conftest_c89_main} + ${ac_c_conftest_c99_main} + ${ac_c_conftest_c11_main} + return ok; +} +" + +# Test code for whether the C compiler supports C99 (complete). +ac_c_conftest_c99_program="${ac_c_conftest_c89_globals} +${ac_c_conftest_c99_globals} + +int +main (int argc, char **argv) +{ + int ok = 0; + ${ac_c_conftest_c89_main} + ${ac_c_conftest_c99_main} + return ok; +} +" + +# Test code for whether the C compiler supports C89 (complete). +ac_c_conftest_c89_program="${ac_c_conftest_c89_globals} + +int +main (int argc, char **argv) +{ + int ok = 0; + ${ac_c_conftest_c89_main} + return ok; +} +" + +as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H" +as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H" +as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H" +as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H" +as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H" +as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H" +as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H" +as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H" +as_fn_append ac_header_c_list " wchar.h wchar_h HAVE_WCHAR_H" +as_fn_append ac_header_c_list " minix/config.h minix_config_h HAVE_MINIX_CONFIG_H" +# Test code for whether the C++ compiler supports C++98 (global declarations) +ac_cxx_conftest_cxx98_globals=' +// Does the compiler advertise C++98 conformance? +#if !defined __cplusplus || __cplusplus < 199711L +# error "Compiler does not advertise C++98 conformance" +#endif + +// These inclusions are to reject old compilers that +// lack the unsuffixed header files. +#include +#include + +// and are *not* freestanding headers in C++98. +extern void assert (int); +namespace std { + extern int strcmp (const char *, const char *); +} + +// Namespaces, exceptions, and templates were all added after "C++ 2.0". +using std::exception; +using std::strcmp; + +namespace { + +void test_exception_syntax() +{ + try { + throw "test"; + } catch (const char *s) { + // Extra parentheses suppress a warning when building autoconf itself, + // due to lint rules shared with more typical C programs. + assert (!(strcmp) (s, "test")); + } +} + +template struct test_template +{ + T const val; + explicit test_template(T t) : val(t) {} + template T add(U u) { return static_cast(u) + val; } +}; + +} // anonymous namespace +' + +# Test code for whether the C++ compiler supports C++98 (body of main) +ac_cxx_conftest_cxx98_main=' + assert (argc); + assert (! argv[0]); +{ + test_exception_syntax (); + test_template tt (2.0); + assert (tt.add (4) == 6.0); + assert (true && !false); +} +' + +# Test code for whether the C++ compiler supports C++11 (global declarations) +ac_cxx_conftest_cxx11_globals=' +// Does the compiler advertise C++ 2011 conformance? +#if !defined __cplusplus || __cplusplus < 201103L +# error "Compiler does not advertise C++11 conformance" +#endif + +namespace cxx11test +{ + constexpr int get_val() { return 20; } + + struct testinit + { + int i; + double d; + }; + + class delegate + { + public: + delegate(int n) : n(n) {} + delegate(): delegate(2354) {} + + virtual int getval() { return this->n; }; + protected: + int n; + }; + + class overridden : public delegate + { + public: + overridden(int n): delegate(n) {} + virtual int getval() override final { return this->n * 2; } + }; + + class nocopy + { + public: + nocopy(int i): i(i) {} + nocopy() = default; + nocopy(const nocopy&) = delete; + nocopy & operator=(const nocopy&) = delete; + private: + int i; + }; + + // for testing lambda expressions + template Ret eval(Fn f, Ret v) + { + return f(v); + } + + // for testing variadic templates and trailing return types + template auto sum(V first) -> V + { + return first; + } + template auto sum(V first, Args... rest) -> V + { + return first + sum(rest...); + } +} +' + +# Test code for whether the C++ compiler supports C++11 (body of main) +ac_cxx_conftest_cxx11_main=' +{ + // Test auto and decltype + auto a1 = 6538; + auto a2 = 48573953.4; + auto a3 = "String literal"; + + int total = 0; + for (auto i = a3; *i; ++i) { total += *i; } + + decltype(a2) a4 = 34895.034; +} +{ + // Test constexpr + short sa[cxx11test::get_val()] = { 0 }; +} +{ + // Test initializer lists + cxx11test::testinit il = { 4323, 435234.23544 }; +} +{ + // Test range-based for + int array[] = {9, 7, 13, 15, 4, 18, 12, 10, 5, 3, + 14, 19, 17, 8, 6, 20, 16, 2, 11, 1}; + for (auto &x : array) { x += 23; } +} +{ + // Test lambda expressions + using cxx11test::eval; + assert (eval ([](int x) { return x*2; }, 21) == 42); + double d = 2.0; + assert (eval ([&](double x) { return d += x; }, 3.0) == 5.0); + assert (d == 5.0); + assert (eval ([=](double x) mutable { return d += x; }, 4.0) == 9.0); + assert (d == 5.0); +} +{ + // Test use of variadic templates + using cxx11test::sum; + auto a = sum(1); + auto b = sum(1, 2); + auto c = sum(1.0, 2.0, 3.0); +} +{ + // Test constructor delegation + cxx11test::delegate d1; + cxx11test::delegate d2(); + cxx11test::delegate d3(45); +} +{ + // Test override and final + cxx11test::overridden o1(55464); +} +{ + // Test nullptr + char *c = nullptr; +} +{ + // Test template brackets + test_template<::test_template> v(test_template(12)); +} +{ + // Unicode literals + char const *utf8 = u8"UTF-8 string \u2500"; + char16_t const *utf16 = u"UTF-8 string \u2500"; + char32_t const *utf32 = U"UTF-32 string \u2500"; +} +' + +# Test code for whether the C compiler supports C++11 (complete). +ac_cxx_conftest_cxx11_program="${ac_cxx_conftest_cxx98_globals} +${ac_cxx_conftest_cxx11_globals} + +int +main (int argc, char **argv) +{ + int ok = 0; + ${ac_cxx_conftest_cxx98_main} + ${ac_cxx_conftest_cxx11_main} + return ok; +} +" + +# Test code for whether the C compiler supports C++98 (complete). +ac_cxx_conftest_cxx98_program="${ac_cxx_conftest_cxx98_globals} +int +main (int argc, char **argv) +{ + int ok = 0; + ${ac_cxx_conftest_cxx98_main} + return ok; +} +" + + +# Auxiliary files required by this configure script. +ac_aux_files="ltmain.sh ar-lib compile missing install-sh config.guess config.sub" + +# Locations in which to look for auxiliary files. +ac_aux_dir_candidates="${srcdir}/./config" + +# Search for a directory containing all of the required auxiliary files, +# $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates. +# If we don't find one directory that contains all the files we need, +# we report the set of missing files from the *first* directory in +# $ac_aux_dir_candidates and give up. +ac_missing_aux_files="" +ac_first_candidate=: +printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false +for as_dir in $ac_aux_dir_candidates +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + as_found=: + + printf "%s\n" "$as_me:${as_lineno-$LINENO}: trying $as_dir" >&5 + ac_aux_dir_found=yes + ac_install_sh= + for ac_aux in $ac_aux_files + do + # As a special case, if "install-sh" is required, that requirement + # can be satisfied by any of "install-sh", "install.sh", or "shtool", + # and $ac_install_sh is set appropriately for whichever one is found. + if test x"$ac_aux" = x"install-sh" + then + if test -f "${as_dir}install-sh"; then + printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install-sh found" >&5 + ac_install_sh="${as_dir}install-sh -c" + elif test -f "${as_dir}install.sh"; then + printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install.sh found" >&5 + ac_install_sh="${as_dir}install.sh -c" + elif test -f "${as_dir}shtool"; then + printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}shtool found" >&5 + ac_install_sh="${as_dir}shtool install -c" + else + ac_aux_dir_found=no + if $ac_first_candidate; then + ac_missing_aux_files="${ac_missing_aux_files} install-sh" + else + break + fi + fi + else + if test -f "${as_dir}${ac_aux}"; then + printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}${ac_aux} found" >&5 + else + ac_aux_dir_found=no + if $ac_first_candidate; then + ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}" + else + break + fi + fi + fi + done + if test "$ac_aux_dir_found" = yes; then + ac_aux_dir="$as_dir" + break + fi + ac_first_candidate=false + + as_found=false +done +IFS=$as_save_IFS +if $as_found +then : + +else $as_nop + as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$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. +if test -f "${ac_aux_dir}config.guess"; then + ac_config_guess="$SHELL ${ac_aux_dir}config.guess" +fi +if test -f "${ac_aux_dir}config.sub"; then + ac_config_sub="$SHELL ${ac_aux_dir}config.sub" +fi +if test -f "$ac_aux_dir/configure"; then + ac_configure="$SHELL ${ac_aux_dir}configure" +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,) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 +printf "%s\n" "$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 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 +printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + ac_cache_corrupted=: + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + eval $ac_var=\$ac_old_val + fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 +printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 +printf "%s\n" "$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=`printf "%s\n" "$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 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 +printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;} + as_fn_error $? "run \`${MAKE-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 + + + + +# Note that this directory must *exactly* match what was specified via +# -I in ACLOCAL_AMFLAGS in the top-level Makefile.am. + + +cat </dev/null 2>&1 || + as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5 + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 +printf %s "checking build system type... " >&6; } +if test ${ac_cv_build+y} +then : + printf %s "(cached) " >&6 +else $as_nop + 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 +printf "%s\n" "$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 + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 +printf %s "checking host system type... " >&6; } +if test ${ac_cv_host+y} +then : + printf %s "(cached) " >&6 +else $as_nop + 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 +printf "%s\n" "$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 + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 +printf %s "checking target system type... " >&6; } +if test ${ac_cv_target+y} +then : + printf %s "(cached) " >&6 +else $as_nop + 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 +printf "%s\n" "$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}- + +# Init automake +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; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 +printf %s "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 +if test ${ac_cv_path_install+y} +then : + printf %s "(cached) " >&6 +else $as_nop 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]/* | \ + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + # Account for fact that we put trailing slashes in our PATH walk. +case $as_dir in #(( + ./ | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; @@ -3175,13 +3834,13 @@ case $as_dir/ in #(( # 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 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 + 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 + 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 @@ -3189,12 +3848,12 @@ case $as_dir/ in #(( 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" && + 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" + ac_cv_path_install="$as_dir$ac_prog$ac_exec_ext -c" break 3 fi fi @@ -3210,7 +3869,7 @@ IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi - if test "${ac_cv_path_install+set}" = set; then + if test ${ac_cv_path_install+y}; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a @@ -3220,8 +3879,8 @@ fi INSTALL=$ac_install_sh fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 -$as_echo "$INSTALL" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 +printf "%s\n" "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. @@ -3231,8 +3890,8 @@ 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; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 +printf %s "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=' @@ -3286,8 +3945,8 @@ 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; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "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= @@ -3306,12 +3965,14 @@ test "$program_suffix" != NONE && # 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"` +program_transform_name=`printf "%s\n" "$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 + + if test x"${MISSING+set}" != xset; then MISSING="\${SHELL} '$am_aux_dir/missing'" fi # Use eval to expand $SHELL @@ -3319,8 +3980,8 @@ 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;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 +printf "%s\n" "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi if test x"${install_sh+set}" != xset; then @@ -3340,11 +4001,12 @@ 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_STRIP+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else @@ -3352,11 +4014,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + 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 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3367,11 +4033,11 @@ 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; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +printf "%s\n" "$STRIP" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -3380,11 +4046,12 @@ 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_STRIP+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else @@ -3392,11 +4059,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + 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 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3407,11 +4078,11 @@ 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; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 +printf "%s\n" "$ac_ct_STRIP" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then @@ -3419,8 +4090,8 @@ fi 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;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP @@ -3432,25 +4103,31 @@ 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; } + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a race-free mkdir -p" >&5 +printf %s "checking for a race-free mkdir -p... " >&6; } if test -z "$MKDIR_P"; then - if ${ac_cv_path_mkdir+:} false; then : - $as_echo_n "(cached) " >&6 -else + if test ${ac_cv_path_mkdir+y} +then : + printf %s "(cached) " >&6 +else $as_nop 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=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac 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) '* | \ + 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 ('*'coreutils) '* | \ + 'BusyBox '* | \ 'mkdir (fileutils) '4.1*) - ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext + ac_cv_path_mkdir=$as_dir$ac_prog$ac_exec_ext break 3;; esac done @@ -3461,7 +4138,7 @@ IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version - if test "${ac_cv_path_mkdir+set}" = set; then + if test ${ac_cv_path_mkdir+y}; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a @@ -3471,18 +4148,19 @@ fi MKDIR_P="$ac_install_sh -d" fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 -$as_echo "$MKDIR_P" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 +printf "%s\n" "$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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_AWK+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else @@ -3490,11 +4168,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + 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 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3505,24 +4187,25 @@ 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; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 +printf "%s\n" "$AWK" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "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; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +printf %s "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 +ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if eval test \${ac_cv_prog_make_${ac_make}_set+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @@ -3538,12 +4221,12 @@ 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; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } SET_MAKE= else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi @@ -3557,7 +4240,8 @@ fi rmdir .tst 2>/dev/null # Check whether --enable-silent-rules was given. -if test "${enable_silent_rules+set}" = set; then : +if test ${enable_silent_rules+y} +then : enableval=$enable_silent_rules; fi @@ -3567,12 +4251,13 @@ case $enable_silent_rules in # ((( *) 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)) +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 +printf %s "checking whether $am_make supports nested variables... " >&6; } +if test ${am_cv_make_support_nested_variables+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if printf "%s\n" 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 @@ -3584,8 +4269,8 @@ 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; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 +printf "%s\n" "$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)' @@ -3617,17 +4302,13 @@ fi # Define the identity of the package. PACKAGE='hwloc' - VERSION='2.4.1' + VERSION='2.8.0' -cat >>confdefs.h <<_ACEOF -#define PACKAGE "$PACKAGE" -_ACEOF +printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define VERSION "$VERSION" -_ACEOF +printf "%s\n" "#define VERSION \"$VERSION\"" >>confdefs.h # Some tools Automake needs. @@ -3673,29 +4354,29 @@ _am_tools='gnutar plaintar pax cpio none' # (that is, avoid stderr redirection). am_uid=`id -u || echo unknown` am_gid=`id -g || echo unknown` - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UID '$am_uid' is supported by ustar format" >&5 -$as_echo_n "checking whether UID '$am_uid' is supported by ustar format... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether UID '$am_uid' is supported by ustar format" >&5 +printf %s "checking whether UID '$am_uid' is supported by ustar format... " >&6; } if test $am_uid -le $am_max_uid; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } _am_tools=none fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether GID '$am_gid' is supported by ustar format" >&5 -$as_echo_n "checking whether GID '$am_gid' is supported by ustar format... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether GID '$am_gid' is supported by ustar format" >&5 +printf %s "checking whether GID '$am_gid' is supported by ustar format... " >&6; } if test $am_gid -le $am_max_gid; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } _am_tools=none fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to create a ustar tar archive" >&5 -$as_echo_n "checking how to create a ustar tar archive... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to create a ustar tar archive" >&5 +printf %s "checking how to create a ustar tar archive... " >&6; } # 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. @@ -3770,18 +4451,33 @@ $as_echo_n "checking how to create a ustar tar archive... " >&6; } done rm -rf conftest.dir - if ${am_cv_prog_tar_ustar+:} false; then : - $as_echo_n "(cached) " >&6 -else + if test ${am_cv_prog_tar_ustar+y} +then : + printf %s "(cached) " >&6 +else $as_nop am_cv_prog_tar_ustar=$_am_tool fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_tar_ustar" >&5 -$as_echo "$am_cv_prog_tar_ustar" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_tar_ustar" >&5 +printf "%s\n" "$am_cv_prog_tar_ustar" >&6; } + +# Variables for tags utilities; see am/tags.am +if test -z "$CTAGS"; then + CTAGS=ctags +fi + +if test -z "$ETAGS"; then + ETAGS=etags +fi + +if test -z "$CSCOPE"; then + CSCOPE=cscope +fi + # POSIX will say in a future version that running "rm -f" with no argument @@ -3827,7 +4523,8 @@ END fi # Check whether --enable-silent-rules was given. -if test "${enable_silent_rules+set}" = set; then : +if test ${enable_silent_rules+y} +then : enableval=$enable_silent_rules; fi @@ -3837,12 +4534,13 @@ case $enable_silent_rules in # ((( *) AM_DEFAULT_VERBOSITY=0;; 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)) +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 +printf %s "checking whether $am_make supports nested variables... " >&6; } +if test ${am_cv_make_support_nested_variables+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if printf "%s\n" 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 @@ -3854,8 +4552,8 @@ 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; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 +printf "%s\n" "$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)' @@ -3872,12 +4570,21 @@ 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 + + + + + + + + + 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; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5 +printf %s "checking whether ${MAKE-make} supports the include directive... " >&6; } cat > confinc.mk << 'END' am__doit: @echo this is the am__doit target >confinc.out @@ -3913,11 +4620,12 @@ esac fi done rm -f confinc.* confmf.* -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5 -$as_echo "${_am_result}" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5 +printf "%s\n" "${_am_result}" >&6; } # Check whether --enable-dependency-tracking was given. -if test "${enable_dependency_tracking+set}" = set; then : +if test ${enable_dependency_tracking+y} +then : enableval=$enable_dependency_tracking; fi @@ -3943,11 +4651,12 @@ 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -3955,11 +4664,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + 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 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3970,11 +4683,11 @@ 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; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -3983,11 +4696,12 @@ 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else @@ -3995,11 +4709,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + 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 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4010,11 +4728,11 @@ 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; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +printf "%s\n" "$ac_ct_CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_ct_CC" = x; then @@ -4022,8 +4740,8 @@ fi 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;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC @@ -4036,11 +4754,12 @@ 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -4048,11 +4767,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + 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 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4063,11 +4786,11 @@ 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; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -4076,11 +4799,12 @@ 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -4089,15 +4813,19 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac 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 + 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 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4113,18 +4841,18 @@ if test $ac_prog_rejected = yes; then # 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+' '}$@" + 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; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -4135,11 +4863,12 @@ if test -z "$CC"; then 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -4147,11 +4876,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + 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 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4162,11 +4895,11 @@ 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; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -4179,11 +4912,12 @@ if test -z "$CC"; then 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else @@ -4191,11 +4925,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + 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 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4206,11 +4944,11 @@ 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; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +printf "%s\n" "$ac_ct_CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -4222,8 +4960,8 @@ done 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;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC @@ -4231,25 +4969,129 @@ esac fi fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args. +set dummy ${ac_tool_prefix}clang; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop + 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 + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + 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}clang" + printf "%s\n" "$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 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +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;} +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "clang", so it can be a program name with args. +set dummy clang; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop + 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 + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + 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="clang" + printf "%s\n" "$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 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +printf "%s\n" "$ac_ct_CC" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$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 + +fi + + +test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$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 +printf "%s\n" "$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 +for ac_option in --version -v -V -qversion -version; 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 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -4259,7 +5101,7 @@ $as_echo "$ac_try_echo"; } >&5 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done @@ -4267,7 +5109,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; @@ -4279,9 +5121,9 @@ 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[^ ]*//'` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 +printf %s "checking whether the C compiler works... " >&6; } +ac_link_default=`printf "%s\n" "$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.*" @@ -4302,11 +5144,12 @@ case "(($ac_try" in *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$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 : + printf "%s\n" "$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, @@ -4323,7 +5166,7 @@ do # certainly right. break;; *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi @@ -4339,44 +5182,46 @@ do done test "$ac_cv_exeext" = no && ac_cv_exeext= -else +else $as_nop 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 +if test -z "$ac_file" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +printf "%s\n" "$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;} +{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$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; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 +printf %s "checking for C compiler default output file name... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +printf "%s\n" "$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; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 +printf %s "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 +printf "%s\n" "$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 : + printf "%s\n" "$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 @@ -4390,15 +5235,15 @@ for ac_file in conftest.exe conftest conftest.*; do * ) 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;} +else $as_nop + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$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; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 +printf "%s\n" "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext @@ -4407,7 +5252,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main () +main (void) { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; @@ -4419,8 +5264,8 @@ _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; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +printf %s "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in @@ -4428,10 +5273,10 @@ case "(($ac_try" in *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in @@ -4439,39 +5284,40 @@ $as_echo "$ac_try_echo"; } >&5 *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$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. + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "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; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +printf "%s\n" "$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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 +printf %s "checking for suffix of object files... " >&6; } +if test ${ac_cv_objext+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; @@ -4485,11 +5331,12 @@ case "(($ac_try" in *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$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 : + printf "%s\n" "$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 @@ -4498,31 +5345,32 @@ $as_echo "$ac_try_echo"; } >&5 break;; esac done -else - $as_echo "$as_me: failed program was:" >&5 +else $as_nop + printf "%s\n" "$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;} +{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$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; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 +printf "%s\n" "$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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5 +printf %s "checking whether the compiler supports GNU C... " >&6; } +if test ${ac_cv_c_compiler_gnu+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { #ifndef __GNUC__ choke me @@ -4532,29 +5380,33 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_compiler_gnu=yes -else +else $as_nop ac_compiler_gnu=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam 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; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; } +ac_compiler_gnu=$ac_cv_c_compiler_gnu + if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi -ac_test_CFLAGS=${CFLAGS+set} +ac_test_CFLAGS=${CFLAGS+y} 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +printf %s "checking whether $CC accepts -g... " >&6; } +if test ${ac_cv_prog_cc_g+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no @@ -4563,159 +5415,212 @@ else /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_cv_prog_cc_g=yes -else +else $as_nop CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : -else +else $as_nop ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +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 +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +printf "%s\n" "$ac_cv_prog_cc_g" >&6; } +if test $ac_test_CFLAGS; 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 +ac_prog_cc_stdc=no +if test x$ac_prog_cc_stdc = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5 +printf %s "checking for $CC option to enable C11 features... " >&6; } +if test ${ac_cv_prog_cc_c11+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_prog_cc_c11=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_c_conftest_c11_program +_ACEOF +for ac_arg in '' -std=gnu11 +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_prog_cc_c11=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam + test "x$ac_cv_prog_cc_c11" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC +fi + +if test "x$ac_cv_prog_cc_c11" = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +printf "%s\n" "unsupported" >&6; } +else $as_nop + if test "x$ac_cv_prog_cc_c11" = x +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +printf "%s\n" "none needed" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 +printf "%s\n" "$ac_cv_prog_cc_c11" >&6; } + CC="$CC $ac_cv_prog_cc_c11" +fi + ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11 + ac_prog_cc_stdc=c11 +fi +fi +if test x$ac_prog_cc_stdc = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5 +printf %s "checking for $CC option to enable C99 features... " >&6; } +if test ${ac_cv_prog_cc_c99+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_prog_cc_c99=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_c_conftest_c99_program +_ACEOF +for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99= +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_prog_cc_c99=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam + test "x$ac_cv_prog_cc_c99" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC 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 + +if test "x$ac_cv_prog_cc_c99" = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +printf "%s\n" "unsupported" >&6; } +else $as_nop + if test "x$ac_cv_prog_cc_c99" = x +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +printf "%s\n" "none needed" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 +printf "%s\n" "$ac_cv_prog_cc_c99" >&6; } + CC="$CC $ac_cv_prog_cc_c99" +fi + ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 + ac_prog_cc_stdc=c99 +fi +fi +if test x$ac_prog_cc_stdc = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5 +printf %s "checking for $CC option to enable C89 features... " >&6; } +if test ${ac_cv_prog_cc_c89+y} +then : + printf %s "(cached) " >&6 +else $as_nop 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; -} +$ac_c_conftest_c89_program _ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +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 : + if ac_fn_c_try_compile "$LINENO" +then : ac_cv_prog_cc_c89=$ac_arg fi -rm -f core conftest.err conftest.$ac_objext +rm -f core conftest.err conftest.$ac_objext conftest.beam 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 : +if test "x$ac_cv_prog_cc_c89" = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +printf "%s\n" "unsupported" >&6; } +else $as_nop + if test "x$ac_cv_prog_cc_c89" = x +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +printf "%s\n" "none needed" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +printf "%s\n" "$ac_cv_prog_cc_c89" >&6; } + CC="$CC $ac_cv_prog_cc_c89" +fi + ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 + ac_prog_cc_stdc=c89 +fi fi ac_ext=c @@ -4724,21 +5629,23 @@ 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_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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 +printf %s "checking whether $CC understands -c and -o together... " >&6; } +if test ${am_cv_prog_cc_c_o+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; @@ -4766,8 +5673,8 @@ _ACEOF 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; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 +printf "%s\n" "$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. @@ -4785,11 +5692,12 @@ 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +printf %s "checking dependency style of $depcc... " >&6; } +if test ${am_cv_CC_dependencies_compiler_type+y} +then : + printf %s "(cached) " >&6 +else $as_nop 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 @@ -4896,8 +5804,8 @@ else 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; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 +printf "%s\n" "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if @@ -4912,463 +5820,175 @@ 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 +ac_header= ac_cache= +for ac_item in $ac_header_c_list 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 - + if test $ac_cache; then + ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default" + if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then + printf "%s\n" "#define $ac_item 1" >> confdefs.h + fi + ac_header= ac_cache= + elif test $ac_header; then + ac_cache=$ac_item + else + ac_header=$ac_item + fi 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 -{ $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 +if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes +then : - $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 +printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h - 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 + + + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 +printf %s "checking whether it is safe to define __EXTENSIONS__... " >&6; } +if test ${ac_cv_safe_to_define___extensions__+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include -#include -#include +# define __EXTENSIONS__ 1 + $ac_includes_default int -main () +main (void) { ; 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 +if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_safe_to_define___extensions__=yes +else $as_nop + ac_cv_safe_to_define___extensions__=no fi -rm -f conftest* - +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 +printf "%s\n" "$ac_cv_safe_to_define___extensions__" >&6; } -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5 +printf %s "checking whether _XOPEN_SOURCE should be defined... " >&6; } +if test ${ac_cv_should_define__xopen_source+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_should_define__xopen_source=no + if test $ac_cv_header_wchar_h = yes +then : 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* + #include + mbstate_t x; +int +main (void) +{ -fi + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : -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 +else $as_nop 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))) + #define _XOPEN_SOURCE 500 + #include + mbstate_t x; int -main () +main (void) { - 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 +if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_should_define__xopen_source=yes fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi - +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5 +printf "%s\n" "$ac_cv_should_define__xopen_source" >&6; } -fi + printf "%s\n" "#define _ALL_SOURCE 1" >>confdefs.h -# 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 + printf "%s\n" "#define _DARWIN_C_SOURCE 1" >>confdefs.h -fi + printf "%s\n" "#define _GNU_SOURCE 1" >>confdefs.h -done + printf "%s\n" "#define _HPUX_ALT_XOPEN_SOCKET_API 1" >>confdefs.h + printf "%s\n" "#define _NETBSD_SOURCE 1" >>confdefs.h + printf "%s\n" "#define _OPENBSD_SOURCE 1" >>confdefs.h - ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" -if test "x$ac_cv_header_minix_config_h" = xyes; then : - MINIX=yes -else - MINIX= -fi + printf "%s\n" "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h + printf "%s\n" "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h - if test "$MINIX" = yes; then + printf "%s\n" "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h -$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h + printf "%s\n" "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h + printf "%s\n" "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h -$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h + printf "%s\n" "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h + printf "%s\n" "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h -$as_echo "#define _MINIX 1" >>confdefs.h + printf "%s\n" "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h - fi + printf "%s\n" "#define _TANDEM_SOURCE 1" >>confdefs.h + if test $ac_cv_header_minix_config_h = yes +then : + MINIX=yes + printf "%s\n" "#define _MINIX 1" >>confdefs.h - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 -$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } -if ${ac_cv_safe_to_define___extensions__+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + printf "%s\n" "#define _POSIX_SOURCE 1" >>confdefs.h -# define __EXTENSIONS__ 1 - $ac_includes_default -int -main () -{ + printf "%s\n" "#define _POSIX_1_SOURCE 2" >>confdefs.h - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_safe_to_define___extensions__=yes -else - ac_cv_safe_to_define___extensions__=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else $as_nop + MINIX= fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 -$as_echo "$ac_cv_safe_to_define___extensions__" >&6; } - test $ac_cv_safe_to_define___extensions__ = yes && - $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h - - $as_echo "#define _ALL_SOURCE 1" >>confdefs.h + if test $ac_cv_safe_to_define___extensions__ = yes +then : + printf "%s\n" "#define __EXTENSIONS__ 1" >>confdefs.h - $as_echo "#define _GNU_SOURCE 1" >>confdefs.h - - $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h - - $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h +fi + if test $ac_cv_should_define__xopen_source = yes +then : + printf "%s\n" "#define _XOPEN_SOURCE 500" >>confdefs.h +fi #################################################################### @@ -5389,7 +6009,8 @@ $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } # Setup libtool, but disable F77, Java and Windows Resource # Compiler support -- we don't need that stuff. # Check whether --enable-shared was given. -if test "${enable_shared+set}" = set; then : +if test ${enable_shared+y} +then : enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; @@ -5407,7 +6028,7 @@ if test "${enable_shared+set}" = set; then : IFS=$lt_save_ifs ;; esac -else +else $as_nop enable_shared=yes fi @@ -5420,7 +6041,8 @@ fi # Check whether --enable-static was given. -if test "${enable_static+set}" = set; then : +if test ${enable_static+y} +then : enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; @@ -5438,7 +6060,7 @@ if test "${enable_static+set}" = set; then : IFS=$lt_save_ifs ;; esac -else +else $as_nop enable_static=no fi @@ -5453,16 +6075,18 @@ fi # This did not exist pre AM 1.11.x (where x is somewhere >0 and <3), # but it is necessary in AM 1.12.x. -if test -n "$ac_tool_prefix"; then + + if test -n "$ac_tool_prefix"; then for ac_prog in ar lib "link -lib" 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_AR+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_AR+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else @@ -5470,11 +6094,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_AR="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5485,11 +6113,11 @@ fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 -$as_echo "$AR" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +printf "%s\n" "$AR" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -5502,11 +6130,12 @@ if test -z "$AR"; then 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_AR+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_AR+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else @@ -5514,11 +6143,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5529,11 +6162,11 @@ fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 -$as_echo "$ac_ct_AR" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 +printf "%s\n" "$ac_ct_AR" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -5545,8 +6178,8 @@ done 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;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR @@ -5555,11 +6188,12 @@ fi : ${AR=ar} -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the archiver ($AR) interface" >&5 -$as_echo_n "checking the archiver ($AR) interface... " >&6; } -if ${am_cv_ar_interface+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the archiver ($AR) interface" >&5 +printf %s "checking the archiver ($AR) interface... " >&6; } +if test ${am_cv_ar_interface+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -5571,12 +6205,13 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu /* end confdefs.h. */ int some_variable = 0; _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5 (eval $am_ar_try) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test "$ac_status" -eq 0; then am_cv_ar_interface=ar @@ -5585,7 +6220,7 @@ if ac_fn_c_try_compile "$LINENO"; then : { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5 (eval $am_ar_try) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test "$ac_status" -eq 0; then am_cv_ar_interface=lib @@ -5596,7 +6231,7 @@ if ac_fn_c_try_compile "$LINENO"; then : rm -f conftest.lib libconftest.a fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -5604,8 +6239,8 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_ar_interface" >&5 -$as_echo "$am_cv_ar_interface" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_ar_interface" >&5 +printf "%s\n" "$am_cv_ar_interface" >&6; } case $am_cv_ar_interface in ar) @@ -5627,8 +6262,8 @@ esac case `pwd` in *\ * | *\ *) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 -$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 +printf "%s\n" "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; esac @@ -5648,6 +6283,7 @@ macro_revision='2.4.6' + ltmain=$ac_aux_dir/ltmain.sh # Backslashify metacharacters that are still active within @@ -5671,8 +6307,8 @@ ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 -$as_echo_n "checking how to print strings... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 +printf %s "checking how to print strings... " >&6; } # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then @@ -5698,12 +6334,12 @@ func_echo_all () } case $ECHO in - printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 -$as_echo "printf" >&6; } ;; - print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 -$as_echo "print -r" >&6; } ;; - *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 -$as_echo "cat" >&6; } ;; + printf*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: printf" >&5 +printf "%s\n" "printf" >&6; } ;; + print*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 +printf "%s\n" "print -r" >&6; } ;; + *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cat" >&5 +printf "%s\n" "cat" >&6; } ;; esac @@ -5719,11 +6355,12 @@ esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 -$as_echo_n "checking for a sed that does not truncate output... " >&6; } -if ${ac_cv_path_SED+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 +printf %s "checking for a sed that does not truncate output... " >&6; } +if test ${ac_cv_path_SED+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" @@ -5737,10 +6374,15 @@ else for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in sed gsed; do + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_prog in sed gsed + do for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" + ac_path_SED="$as_dir$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_SED" || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED @@ -5749,13 +6391,13 @@ case `"$ac_path_SED" --version 2>&1` in ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; *) ac_count=0 - $as_echo_n 0123456789 >"conftest.in" + printf %s 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" - $as_echo '' >> "conftest.nl" + printf "%s\n" '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "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 @@ -5783,8 +6425,8 @@ else fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 -$as_echo "$ac_cv_path_SED" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 +printf "%s\n" "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed @@ -5801,11 +6443,154 @@ Xsed="$SED -e 1s/^X//" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 -$as_echo_n "checking for fgrep... " >&6; } -if ${ac_cv_path_FGREP+:} false; then : - $as_echo_n "(cached) " >&6 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 +printf %s "checking for grep that handles long lines and -e... " >&6; } +if test ${ac_cv_path_GREP+y} +then : + printf %s "(cached) " >&6 +else $as_nop + 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 + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + 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 + printf %s 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + printf "%s\n" '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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 +printf "%s\n" "$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 +printf %s "checking for egrep... " >&6; } +if test ${ac_cv_path_EGREP+y} +then : + printf %s "(cached) " >&6 +else $as_nop + 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 + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + 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 + printf %s 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + printf "%s\n" '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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 +printf "%s\n" "$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 +printf %s "checking for fgrep... " >&6; } +if test ${ac_cv_path_FGREP+y} +then : + printf %s "(cached) " >&6 +else $as_nop if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 then ac_cv_path_FGREP="$GREP -F" else @@ -5816,10 +6601,15 @@ else 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 fgrep; do + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_prog in fgrep + do for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" + ac_path_FGREP="$as_dir$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_FGREP" || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP @@ -5828,13 +6618,13 @@ case `"$ac_path_FGREP" --version 2>&1` in ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; *) ac_count=0 - $as_echo_n 0123456789 >"conftest.in" + printf %s 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" - $as_echo 'FGREP' >> "conftest.nl" + printf "%s\n" 'FGREP' >> "conftest.nl" "$ac_path_FGREP" FGREP < "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 @@ -5863,8 +6653,8 @@ fi fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 -$as_echo "$ac_cv_path_FGREP" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 +printf "%s\n" "$ac_cv_path_FGREP" >&6; } FGREP="$ac_cv_path_FGREP" @@ -5889,17 +6679,18 @@ test -z "$GREP" && GREP=grep # Check whether --with-gnu-ld was given. -if test "${with_gnu_ld+set}" = set; then : +if test ${with_gnu_ld+y} +then : withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes -else +else $as_nop with_gnu_ld=no fi ac_prog=ld if test yes = "$GCC"; then # Check if gcc -print-prog-name=ld gives a path. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 -$as_echo_n "checking for ld used by $CC... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 +printf %s "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return, which upsets mingw @@ -5928,15 +6719,16 @@ $as_echo_n "checking for ld used by $CC... " >&6; } ;; esac elif test yes = "$with_gnu_ld"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 -$as_echo_n "checking for GNU ld... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 +printf %s "checking for GNU ld... " >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 -$as_echo_n "checking for non-GNU ld... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 +printf %s "checking for non-GNU ld... " >&6; } fi -if ${lt_cv_path_LD+:} false; then : - $as_echo_n "(cached) " >&6 -else +if test ${lt_cv_path_LD+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -z "$LD"; then lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do @@ -5965,18 +6757,19 @@ fi LD=$lt_cv_path_LD if test -n "$LD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 -$as_echo "$LD" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 +printf "%s\n" "$LD" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 -$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } -if ${lt_cv_prog_gnu_ld+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 +printf %s "checking if the linker ($LD) is GNU ld... " >&6; } +if test ${lt_cv_prog_gnu_ld+y} +then : + printf %s "(cached) " >&6 +else $as_nop # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &1 &5 -$as_echo "$lt_cv_prog_gnu_ld" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5 +printf "%s\n" "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld @@ -5999,11 +6792,12 @@ with_gnu_ld=$lt_cv_prog_gnu_ld -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 -$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } -if ${lt_cv_path_NM+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 +printf %s "checking for BSD- or MS-compatible name lister (nm)... " >&6; } +if test ${lt_cv_path_NM+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM=$NM @@ -6053,8 +6847,8 @@ else : ${lt_cv_path_NM=no} fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 -$as_echo "$lt_cv_path_NM" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 +printf "%s\n" "$lt_cv_path_NM" >&6; } if test no != "$lt_cv_path_NM"; then NM=$lt_cv_path_NM else @@ -6067,11 +6861,12 @@ else 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_DUMPBIN+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_DUMPBIN+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$DUMPBIN"; then ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. else @@ -6079,11 +6874,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6094,11 +6893,11 @@ fi fi DUMPBIN=$ac_cv_prog_DUMPBIN if test -n "$DUMPBIN"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 -$as_echo "$DUMPBIN" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 +printf "%s\n" "$DUMPBIN" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -6111,11 +6910,12 @@ if test -z "$DUMPBIN"; then 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_DUMPBIN+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_DUMPBIN+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_DUMPBIN"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. else @@ -6123,11 +6923,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6138,11 +6942,11 @@ fi fi ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN if test -n "$ac_ct_DUMPBIN"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 -$as_echo "$ac_ct_DUMPBIN" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 +printf "%s\n" "$ac_ct_DUMPBIN" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -6154,8 +6958,8 @@ done 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;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DUMPBIN=$ac_ct_DUMPBIN @@ -6183,11 +6987,12 @@ test -z "$NM" && NM=nm -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 -$as_echo_n "checking the name lister ($NM) interface... " >&6; } -if ${lt_cv_nm_interface+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 +printf %s "checking the name lister ($NM) interface... " >&6; } +if test ${lt_cv_nm_interface+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) @@ -6203,26 +7008,27 @@ else fi rm -f conftest* fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 -$as_echo "$lt_cv_nm_interface" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 +printf "%s\n" "$lt_cv_nm_interface" >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 -$as_echo_n "checking whether ln -s works... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 +printf %s "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; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 -$as_echo "no, using $LN_S" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 +printf "%s\n" "no, using $LN_S" >&6; } fi # find the maximum length of command line arguments -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 -$as_echo_n "checking the maximum length of command line arguments... " >&6; } -if ${lt_cv_sys_max_cmd_len+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 +printf %s "checking the maximum length of command line arguments... " >&6; } +if test ${lt_cv_sys_max_cmd_len+y} +then : + printf %s "(cached) " >&6 +else $as_nop i=0 teststring=ABCD @@ -6349,11 +7155,11 @@ else fi if test -n "$lt_cv_sys_max_cmd_len"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 -$as_echo "$lt_cv_sys_max_cmd_len" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 +printf "%s\n" "$lt_cv_sys_max_cmd_len" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 -$as_echo "none" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none" >&5 +printf "%s\n" "none" >&6; } fi max_cmd_len=$lt_cv_sys_max_cmd_len @@ -6397,11 +7203,12 @@ esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 -$as_echo_n "checking how to convert $build file names to $host format... " >&6; } -if ${lt_cv_to_host_file_cmd+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 +printf %s "checking how to convert $build file names to $host format... " >&6; } +if test ${lt_cv_to_host_file_cmd+y} +then : + printf %s "(cached) " >&6 +else $as_nop case $host in *-*-mingw* ) case $build in @@ -6437,18 +7244,19 @@ esac fi to_host_file_cmd=$lt_cv_to_host_file_cmd -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 -$as_echo "$lt_cv_to_host_file_cmd" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 +printf "%s\n" "$lt_cv_to_host_file_cmd" >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 -$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } -if ${lt_cv_to_tool_file_cmd+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 +printf %s "checking how to convert $build file names to toolchain format... " >&6; } +if test ${lt_cv_to_tool_file_cmd+y} +then : + printf %s "(cached) " >&6 +else $as_nop #assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in @@ -6464,22 +7272,23 @@ esac fi to_tool_file_cmd=$lt_cv_to_tool_file_cmd -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 -$as_echo "$lt_cv_to_tool_file_cmd" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 +printf "%s\n" "$lt_cv_to_tool_file_cmd" >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 -$as_echo_n "checking for $LD option to reload object files... " >&6; } -if ${lt_cv_ld_reload_flag+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 +printf %s "checking for $LD option to reload object files... " >&6; } +if test ${lt_cv_ld_reload_flag+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_ld_reload_flag='-r' fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 -$as_echo "$lt_cv_ld_reload_flag" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 +printf "%s\n" "$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; @@ -6512,11 +7321,12 @@ esac if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; 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_OBJDUMP+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_OBJDUMP+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else @@ -6524,11 +7334,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6539,11 +7353,11 @@ fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 -$as_echo "$OBJDUMP" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 +printf "%s\n" "$OBJDUMP" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -6552,11 +7366,12 @@ if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; 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_OBJDUMP+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_OBJDUMP+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else @@ -6564,11 +7379,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJDUMP="objdump" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6579,11 +7398,11 @@ fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 -$as_echo "$ac_ct_OBJDUMP" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 +printf "%s\n" "$ac_ct_OBJDUMP" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then @@ -6591,8 +7410,8 @@ fi 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;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP @@ -6608,11 +7427,12 @@ test -z "$OBJDUMP" && OBJDUMP=objdump -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 -$as_echo_n "checking how to recognize dependent libraries... " >&6; } -if ${lt_cv_deplibs_check_method+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 +printf %s "checking how to recognize dependent libraries... " >&6; } +if test ${lt_cv_deplibs_check_method+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' @@ -6808,8 +7628,8 @@ os2*) esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 -$as_echo "$lt_cv_deplibs_check_method" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 +printf "%s\n" "$lt_cv_deplibs_check_method" >&6; } file_magic_glob= want_nocaseglob=no @@ -6853,11 +7673,12 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; 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_DLLTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_DLLTOOL+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$DLLTOOL"; then ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else @@ -6865,11 +7686,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6880,11 +7705,11 @@ fi fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 -$as_echo "$DLLTOOL" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 +printf "%s\n" "$DLLTOOL" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -6893,11 +7718,12 @@ if test -z "$ac_cv_prog_DLLTOOL"; then ac_ct_DLLTOOL=$DLLTOOL # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; 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_DLLTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_DLLTOOL+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_DLLTOOL"; then ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. else @@ -6905,11 +7731,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6920,11 +7750,11 @@ fi fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 -$as_echo "$ac_ct_DLLTOOL" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 +printf "%s\n" "$ac_ct_DLLTOOL" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then @@ -6932,8 +7762,8 @@ fi 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;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DLLTOOL=$ac_ct_DLLTOOL @@ -6950,11 +7780,12 @@ test -z "$DLLTOOL" && DLLTOOL=dlltool -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 -$as_echo_n "checking how to associate runtime and link libraries... " >&6; } -if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 +printf %s "checking how to associate runtime and link libraries... " >&6; } +if test ${lt_cv_sharedlib_from_linklib_cmd+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in @@ -6977,8 +7808,8 @@ cygwin* | mingw* | pw32* | cegcc*) esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 -$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 +printf "%s\n" "$lt_cv_sharedlib_from_linklib_cmd" >&6; } sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO @@ -6993,11 +7824,12 @@ if test -n "$ac_tool_prefix"; then 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_AR+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_AR+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else @@ -7005,11 +7837,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_AR="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -7020,11 +7856,11 @@ fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 -$as_echo "$AR" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +printf "%s\n" "$AR" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -7037,11 +7873,12 @@ if test -z "$AR"; then 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_AR+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_AR+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else @@ -7049,11 +7886,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -7064,11 +7905,11 @@ fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 -$as_echo "$ac_ct_AR" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 +printf "%s\n" "$ac_ct_AR" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -7080,8 +7921,8 @@ done 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;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR @@ -7089,7 +7930,7 @@ esac fi : ${AR=ar} -: ${AR_FLAGS=cru} +: ${AR_FLAGS=cr} @@ -7101,30 +7942,32 @@ fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 -$as_echo_n "checking for archiver @FILE support... " >&6; } -if ${lt_cv_ar_at_file+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 +printf %s "checking for archiver @FILE support... " >&6; } +if test ${lt_cv_ar_at_file+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_ar_at_file=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test 0 -eq "$ac_status"; then # Ensure the archiver fails upon bogus file names. @@ -7132,7 +7975,7 @@ if ac_fn_c_try_compile "$LINENO"; then : { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test 0 -ne "$ac_status"; then lt_cv_ar_at_file=@ @@ -7141,11 +7984,11 @@ if ac_fn_c_try_compile "$LINENO"; then : rm -f conftest.* libconftest.a fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 -$as_echo "$lt_cv_ar_at_file" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 +printf "%s\n" "$lt_cv_ar_at_file" >&6; } if test no = "$lt_cv_ar_at_file"; then archiver_list_spec= @@ -7162,11 +8005,12 @@ fi 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_STRIP+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else @@ -7174,11 +8018,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + 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 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -7189,11 +8037,11 @@ 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; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +printf "%s\n" "$STRIP" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -7202,11 +8050,12 @@ 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_STRIP+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else @@ -7214,11 +8063,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + 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 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -7229,11 +8082,11 @@ 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; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 +printf "%s\n" "$ac_ct_STRIP" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then @@ -7241,8 +8094,8 @@ fi 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;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP @@ -7261,11 +8114,12 @@ test -z "$STRIP" && STRIP=: if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; 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_RANLIB+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_RANLIB+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else @@ -7273,11 +8127,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -7288,11 +8146,11 @@ fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 -$as_echo "$RANLIB" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 +printf "%s\n" "$RANLIB" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -7301,11 +8159,12 @@ if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; 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_RANLIB+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_RANLIB+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else @@ -7313,11 +8172,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -7328,11 +8191,11 @@ fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 -$as_echo "$ac_ct_RANLIB" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 +printf "%s\n" "$ac_ct_RANLIB" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then @@ -7340,8 +8203,8 @@ fi 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;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB @@ -7430,11 +8293,12 @@ compiler=$CC # Check for command to grab the raw symbol name followed by C symbol from nm. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 -$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } -if ${lt_cv_sys_global_symbol_pipe+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 +printf %s "checking command to parse $NM output from $compiler object... " >&6; } +if test ${lt_cv_sys_global_symbol_pipe+y} +then : + printf %s "(cached) " >&6 +else $as_nop # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] @@ -7586,15 +8450,12 @@ _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 - (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s "$nlist"; then + $ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&5 + if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&5 && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" @@ -7662,7 +8523,7 @@ _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest$ac_exeext; then pipe_works=yes fi @@ -7697,11 +8558,11 @@ if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 -$as_echo "failed" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5 +printf "%s\n" "failed" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 -$as_echo "ok" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ok" >&5 +printf "%s\n" "ok" >&6; } fi # Response file support. @@ -7747,13 +8608,14 @@ fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 -$as_echo_n "checking for sysroot... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 +printf %s "checking for sysroot... " >&6; } # Check whether --with-sysroot was given. -if test "${with_sysroot+set}" = set; then : +if test ${with_sysroot+y} +then : withval=$with_sysroot; -else +else $as_nop with_sysroot=no fi @@ -7771,24 +8633,25 @@ case $with_sysroot in #( no|'') ;; #( *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5 -$as_echo "$with_sysroot" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5 +printf "%s\n" "$with_sysroot" >&6; } as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 ;; esac - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 -$as_echo "${lt_sysroot:-no}" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 +printf "%s\n" "${lt_sysroot:-no}" >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5 -$as_echo_n "checking for a working dd... " >&6; } -if ${ac_cv_path_lt_DD+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5 +printf %s "checking for a working dd... " >&6; } +if test ${ac_cv_path_lt_DD+y} +then : + printf %s "(cached) " >&6 +else $as_nop printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i : ${lt_DD:=$DD} @@ -7799,10 +8662,15 @@ if test -z "$lt_DD"; then for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in dd; do + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_prog in dd + do for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext" + ac_path_lt_DD="$as_dir$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_lt_DD" || continue if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ @@ -7822,15 +8690,16 @@ fi rm -f conftest.i conftest2.i conftest.out fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5 -$as_echo "$ac_cv_path_lt_DD" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5 +printf "%s\n" "$ac_cv_path_lt_DD" >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5 -$as_echo_n "checking how to truncate binary pipes... " >&6; } -if ${lt_cv_truncate_bin+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5 +printf %s "checking how to truncate binary pipes... " >&6; } +if test ${lt_cv_truncate_bin+y} +then : + printf %s "(cached) " >&6 +else $as_nop printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i lt_cv_truncate_bin= @@ -7841,8 +8710,8 @@ fi rm -f conftest.i conftest2.i conftest.out test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5 -$as_echo "$lt_cv_truncate_bin" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5 +printf "%s\n" "$lt_cv_truncate_bin" >&6; } @@ -7865,7 +8734,8 @@ func_cc_basename () } # Check whether --enable-libtool-lock was given. -if test "${enable_libtool_lock+set}" = set; then : +if test ${enable_libtool_lock+y} +then : enableval=$enable_libtool_lock; fi @@ -7881,7 +8751,7 @@ ia64-*-hpux*) if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) @@ -7901,7 +8771,7 @@ ia64-*-hpux*) if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then if test yes = "$lt_cv_prog_gnu_ld"; then case `/usr/bin/file conftest.$ac_objext` in @@ -7939,7 +8809,7 @@ mips64*-*linux*) if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then emul=elf case `/usr/bin/file conftest.$ac_objext` in @@ -7980,7 +8850,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *32-bit*) @@ -8043,11 +8913,12 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -belf" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 -$as_echo_n "checking whether the C compiler needs -belf... " >&6; } -if ${lt_cv_cc_needs_belf+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 +printf %s "checking whether the C compiler needs -belf... " >&6; } +if test ${lt_cv_cc_needs_belf+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -8058,19 +8929,20 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : lt_cv_cc_needs_belf=yes -else +else $as_nop lt_cv_cc_needs_belf=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -8079,8 +8951,8 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 -$as_echo "$lt_cv_cc_needs_belf" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 +printf "%s\n" "$lt_cv_cc_needs_belf" >&6; } if test yes != "$lt_cv_cc_needs_belf"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS=$SAVE_CFLAGS @@ -8093,7 +8965,7 @@ $as_echo "$lt_cv_cc_needs_belf" >&6; } if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *64-bit*) @@ -8130,11 +9002,12 @@ need_locks=$enable_libtool_lock if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. set dummy ${ac_tool_prefix}mt; 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_MANIFEST_TOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_MANIFEST_TOOL+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$MANIFEST_TOOL"; then ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. else @@ -8142,11 +9015,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -8157,11 +9034,11 @@ fi fi MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL if test -n "$MANIFEST_TOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 -$as_echo "$MANIFEST_TOOL" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 +printf "%s\n" "$MANIFEST_TOOL" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -8170,11 +9047,12 @@ if test -z "$ac_cv_prog_MANIFEST_TOOL"; then ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL # Extract the first word of "mt", so it can be a program name with args. set dummy mt; 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_MANIFEST_TOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_MANIFEST_TOOL+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_MANIFEST_TOOL"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. else @@ -8182,11 +9060,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -8197,11 +9079,11 @@ fi fi ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL if test -n "$ac_ct_MANIFEST_TOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 -$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 +printf "%s\n" "$ac_ct_MANIFEST_TOOL" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_ct_MANIFEST_TOOL" = x; then @@ -8209,8 +9091,8 @@ fi 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;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL @@ -8220,11 +9102,12 @@ else fi test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 -$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } -if ${lt_cv_path_mainfest_tool+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 +printf %s "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } +if test ${lt_cv_path_mainfest_tool+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out @@ -8234,8 +9117,8 @@ else fi rm -f conftest* fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 -$as_echo "$lt_cv_path_mainfest_tool" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 +printf "%s\n" "$lt_cv_path_mainfest_tool" >&6; } if test yes != "$lt_cv_path_mainfest_tool"; then MANIFEST_TOOL=: fi @@ -8250,11 +9133,12 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. set dummy ${ac_tool_prefix}dsymutil; 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_DSYMUTIL+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_DSYMUTIL+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$DSYMUTIL"; then ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. else @@ -8262,11 +9146,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -8277,11 +9165,11 @@ fi fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 -$as_echo "$DSYMUTIL" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 +printf "%s\n" "$DSYMUTIL" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -8290,11 +9178,12 @@ if test -z "$ac_cv_prog_DSYMUTIL"; then ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; 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_DSYMUTIL+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_DSYMUTIL+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_DSYMUTIL"; then ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. else @@ -8302,11 +9191,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -8317,11 +9210,11 @@ fi fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 -$as_echo "$ac_ct_DSYMUTIL" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 +printf "%s\n" "$ac_ct_DSYMUTIL" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_ct_DSYMUTIL" = x; then @@ -8329,8 +9222,8 @@ fi 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;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DSYMUTIL=$ac_ct_DSYMUTIL @@ -8342,11 +9235,12 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. set dummy ${ac_tool_prefix}nmedit; 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_NMEDIT+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_NMEDIT+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$NMEDIT"; then ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. else @@ -8354,11 +9248,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -8369,11 +9267,11 @@ fi fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 -$as_echo "$NMEDIT" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 +printf "%s\n" "$NMEDIT" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -8382,11 +9280,12 @@ if test -z "$ac_cv_prog_NMEDIT"; then ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; 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_NMEDIT+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_NMEDIT+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_NMEDIT"; then ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. else @@ -8394,11 +9293,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_NMEDIT="nmedit" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -8409,11 +9312,11 @@ fi fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 -$as_echo "$ac_ct_NMEDIT" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 +printf "%s\n" "$ac_ct_NMEDIT" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_ct_NMEDIT" = x; then @@ -8421,8 +9324,8 @@ fi 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;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac NMEDIT=$ac_ct_NMEDIT @@ -8434,11 +9337,12 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. set dummy ${ac_tool_prefix}lipo; 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_LIPO+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_LIPO+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$LIPO"; then ac_cv_prog_LIPO="$LIPO" # Let the user override the test. else @@ -8446,11 +9350,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -8461,11 +9369,11 @@ fi fi LIPO=$ac_cv_prog_LIPO if test -n "$LIPO"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 -$as_echo "$LIPO" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 +printf "%s\n" "$LIPO" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -8474,11 +9382,12 @@ if test -z "$ac_cv_prog_LIPO"; then ac_ct_LIPO=$LIPO # Extract the first word of "lipo", so it can be a program name with args. set dummy lipo; 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_LIPO+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_LIPO+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_LIPO"; then ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. else @@ -8486,11 +9395,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_LIPO="lipo" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -8501,11 +9414,11 @@ fi fi ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO if test -n "$ac_ct_LIPO"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 -$as_echo "$ac_ct_LIPO" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 +printf "%s\n" "$ac_ct_LIPO" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_ct_LIPO" = x; then @@ -8513,8 +9426,8 @@ fi 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;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac LIPO=$ac_ct_LIPO @@ -8526,11 +9439,12 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. set dummy ${ac_tool_prefix}otool; 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_OTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_OTOOL+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$OTOOL"; then ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. else @@ -8538,11 +9452,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -8553,11 +9471,11 @@ fi fi OTOOL=$ac_cv_prog_OTOOL if test -n "$OTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 -$as_echo "$OTOOL" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 +printf "%s\n" "$OTOOL" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -8566,11 +9484,12 @@ if test -z "$ac_cv_prog_OTOOL"; then ac_ct_OTOOL=$OTOOL # Extract the first word of "otool", so it can be a program name with args. set dummy otool; 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_OTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_OTOOL+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_OTOOL"; then ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. else @@ -8578,11 +9497,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL="otool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -8593,11 +9516,11 @@ fi fi ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL if test -n "$ac_ct_OTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 -$as_echo "$ac_ct_OTOOL" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 +printf "%s\n" "$ac_ct_OTOOL" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_ct_OTOOL" = x; then @@ -8605,8 +9528,8 @@ fi 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;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL=$ac_ct_OTOOL @@ -8618,11 +9541,12 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. set dummy ${ac_tool_prefix}otool64; 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_OTOOL64+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_OTOOL64+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$OTOOL64"; then ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. else @@ -8630,11 +9554,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -8645,11 +9573,11 @@ fi fi OTOOL64=$ac_cv_prog_OTOOL64 if test -n "$OTOOL64"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 -$as_echo "$OTOOL64" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 +printf "%s\n" "$OTOOL64" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -8658,11 +9586,12 @@ if test -z "$ac_cv_prog_OTOOL64"; then ac_ct_OTOOL64=$OTOOL64 # Extract the first word of "otool64", so it can be a program name with args. set dummy otool64; 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_OTOOL64+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_OTOOL64+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_OTOOL64"; then ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. else @@ -8670,11 +9599,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL64="otool64" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -8685,11 +9618,11 @@ fi fi ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 if test -n "$ac_ct_OTOOL64"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 -$as_echo "$ac_ct_OTOOL64" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 +printf "%s\n" "$ac_ct_OTOOL64" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_ct_OTOOL64" = x; then @@ -8697,8 +9630,8 @@ fi 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;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL64=$ac_ct_OTOOL64 @@ -8733,11 +9666,12 @@ fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 -$as_echo_n "checking for -single_module linker flag... " >&6; } -if ${lt_cv_apple_cc_single_mod+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 +printf %s "checking for -single_module linker flag... " >&6; } +if test ${lt_cv_apple_cc_single_mod+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_apple_cc_single_mod=no if test -z "$LT_MULTI_MODULE"; then # By default we will add the -single_module flag. You can override @@ -8766,14 +9700,15 @@ else rm -f conftest.* fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 -$as_echo "$lt_cv_apple_cc_single_mod" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 +printf "%s\n" "$lt_cv_apple_cc_single_mod" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 -$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } -if ${lt_cv_ld_exported_symbols_list+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 +printf %s "checking for -exported_symbols_list linker flag... " >&6; } +if test ${lt_cv_ld_exported_symbols_list+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym @@ -8782,39 +9717,41 @@ else /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : lt_cv_ld_exported_symbols_list=yes -else +else $as_nop lt_cv_ld_exported_symbols_list=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 -$as_echo "$lt_cv_ld_exported_symbols_list" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 +printf "%s\n" "$lt_cv_ld_exported_symbols_list" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 -$as_echo_n "checking for -force_load linker flag... " >&6; } -if ${lt_cv_ld_force_load+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 +printf %s "checking for -force_load linker flag... " >&6; } +if test ${lt_cv_ld_force_load+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 - echo "$AR cru libconftest.a conftest.o" >&5 - $AR cru libconftest.a conftest.o 2>&5 + echo "$AR cr libconftest.a conftest.o" >&5 + $AR cr libconftest.a conftest.o 2>&5 echo "$RANLIB libconftest.a" >&5 $RANLIB libconftest.a 2>&5 cat > conftest.c << _LT_EOF @@ -8834,8 +9771,8 @@ _LT_EOF rm -rf conftest.dSYM fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 -$as_echo "$lt_cv_ld_force_load" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 +printf "%s\n" "$lt_cv_ld_force_load" >&6; } case $host_os in rhapsody* | darwin1.[012]) _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; @@ -8846,11 +9783,11 @@ $as_echo "$lt_cv_ld_force_load" >&6; } # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[91]*) + 10.0,*86*-darwin8*|10.0,*-darwin[912]*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 10.[012][,.]*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - 10.*) + 10.*|11.*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ;; @@ -8906,19 +9843,14 @@ func_munge_path_list () esac } -for ac_header in dlfcn.h -do : - ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default +ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default " -if test "x$ac_cv_header_dlfcn_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_DLFCN_H 1 -_ACEOF +if test "x$ac_cv_header_dlfcn_h" = xyes +then : + printf "%s\n" "#define HAVE_DLFCN_H 1" >>confdefs.h fi -done - @@ -8932,11 +9864,12 @@ case $host in if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. set dummy ${ac_tool_prefix}as; 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_AS+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_AS+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$AS"; then ac_cv_prog_AS="$AS" # Let the user override the test. else @@ -8944,11 +9877,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_AS="${ac_tool_prefix}as" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -8959,11 +9896,11 @@ fi fi AS=$ac_cv_prog_AS if test -n "$AS"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5 -$as_echo "$AS" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AS" >&5 +printf "%s\n" "$AS" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -8972,11 +9909,12 @@ if test -z "$ac_cv_prog_AS"; then ac_ct_AS=$AS # Extract the first word of "as", so it can be a program name with args. set dummy as; 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_AS+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_AS+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_AS"; then ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test. else @@ -8984,11 +9922,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AS="as" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -8999,11 +9941,11 @@ fi fi ac_ct_AS=$ac_cv_prog_ac_ct_AS if test -n "$ac_ct_AS"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5 -$as_echo "$ac_ct_AS" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5 +printf "%s\n" "$ac_ct_AS" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_ct_AS" = x; then @@ -9011,8 +9953,8 @@ fi 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;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AS=$ac_ct_AS @@ -9024,11 +9966,12 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; 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_DLLTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_DLLTOOL+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$DLLTOOL"; then ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else @@ -9036,11 +9979,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -9051,11 +9998,11 @@ fi fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 -$as_echo "$DLLTOOL" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 +printf "%s\n" "$DLLTOOL" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -9064,11 +10011,12 @@ if test -z "$ac_cv_prog_DLLTOOL"; then ac_ct_DLLTOOL=$DLLTOOL # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; 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_DLLTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_DLLTOOL+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_DLLTOOL"; then ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. else @@ -9076,11 +10024,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -9091,11 +10043,11 @@ fi fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 -$as_echo "$ac_ct_DLLTOOL" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 +printf "%s\n" "$ac_ct_DLLTOOL" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then @@ -9103,8 +10055,8 @@ fi 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;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DLLTOOL=$ac_ct_DLLTOOL @@ -9116,11 +10068,12 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; 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_OBJDUMP+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_OBJDUMP+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else @@ -9128,11 +10081,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -9143,11 +10100,11 @@ fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 -$as_echo "$OBJDUMP" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 +printf "%s\n" "$OBJDUMP" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -9156,11 +10113,12 @@ if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; 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_OBJDUMP+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_OBJDUMP+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else @@ -9168,11 +10126,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJDUMP="objdump" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -9183,11 +10145,11 @@ fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 -$as_echo "$ac_ct_OBJDUMP" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 +printf "%s\n" "$ac_ct_OBJDUMP" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then @@ -9195,8 +10157,8 @@ fi 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;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP @@ -9234,7 +10196,8 @@ test -z "$OBJDUMP" && OBJDUMP=objdump # Check whether --with-pic was given. -if test "${with_pic+set}" = set; then : +if test ${with_pic+y} +then : withval=$with_pic; lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; @@ -9251,7 +10214,7 @@ if test "${with_pic+set}" = set; then : IFS=$lt_save_ifs ;; esac -else +else $as_nop pic_mode=default fi @@ -9263,7 +10226,8 @@ fi # Check whether --enable-fast-install was given. -if test "${enable_fast_install+set}" = set; then : +if test ${enable_fast_install+y} +then : enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; @@ -9281,7 +10245,7 @@ if test "${enable_fast_install+set}" = set; then : IFS=$lt_save_ifs ;; esac -else +else $as_nop enable_fast_install=yes fi @@ -9295,11 +10259,12 @@ fi shared_archive_member_spec= case $host,$enable_shared in power*-*-aix[5-9]*,yes) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5 -$as_echo_n "checking which variant of shared library versioning to provide... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5 +printf %s "checking which variant of shared library versioning to provide... " >&6; } # Check whether --with-aix-soname was given. -if test "${with_aix_soname+set}" = set; then : +if test ${with_aix_soname+y} +then : withval=$with_aix_soname; case $withval in aix|svr4|both) ;; @@ -9308,18 +10273,19 @@ if test "${with_aix_soname+set}" = set; then : ;; esac lt_cv_with_aix_soname=$with_aix_soname -else - if ${lt_cv_with_aix_soname+:} false; then : - $as_echo_n "(cached) " >&6 -else +else $as_nop + if test ${lt_cv_with_aix_soname+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_with_aix_soname=aix fi with_aix_soname=$lt_cv_with_aix_soname fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5 -$as_echo "$with_aix_soname" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5 +printf "%s\n" "$with_aix_soname" >&6; } if test aix != "$with_aix_soname"; then # For the AIX way of multilib, we name the shared archive member # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', @@ -9401,11 +10367,12 @@ if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 -$as_echo_n "checking for objdir... " >&6; } -if ${lt_cv_objdir+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 +printf %s "checking for objdir... " >&6; } +if test ${lt_cv_objdir+y} +then : + printf %s "(cached) " >&6 +else $as_nop rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then @@ -9416,17 +10383,15 @@ else fi rmdir .libs 2>/dev/null fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 -$as_echo "$lt_cv_objdir" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 +printf "%s\n" "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir -cat >>confdefs.h <<_ACEOF -#define LT_OBJDIR "$lt_cv_objdir/" -_ACEOF +printf "%s\n" "#define LT_OBJDIR \"$lt_cv_objdir/\"" >>confdefs.h @@ -9472,11 +10437,12 @@ test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 -$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } -if ${lt_cv_path_MAGIC_CMD+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 +printf %s "checking for ${ac_tool_prefix}file... " >&6; } +if test ${lt_cv_path_MAGIC_CMD+y} +then : + printf %s "(cached) " >&6 +else $as_nop case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. @@ -9525,11 +10491,11 @@ fi MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 -$as_echo "$MAGIC_CMD" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 +printf "%s\n" "$MAGIC_CMD" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -9538,11 +10504,12 @@ fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 -$as_echo_n "checking for file... " >&6; } -if ${lt_cv_path_MAGIC_CMD+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for file" >&5 +printf %s "checking for file... " >&6; } +if test ${lt_cv_path_MAGIC_CMD+y} +then : + printf %s "(cached) " >&6 +else $as_nop case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. @@ -9591,11 +10558,11 @@ fi MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 -$as_echo "$MAGIC_CMD" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 +printf "%s\n" "$MAGIC_CMD" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -9680,11 +10647,12 @@ if test yes = "$GCC"; then lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 -$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } -if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 +printf %s "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } +if test ${lt_cv_prog_compiler_rtti_exceptions+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext @@ -9715,8 +10683,8 @@ else $RM conftest* fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 -$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 +printf "%s\n" "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" @@ -9913,6 +10881,12 @@ lt_prog_compiler_static= lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; + # flang / f18. f95 an alias for gfortran or flang on Debian + flang* | f18* | f95*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fPIC' + lt_prog_compiler_static='-static' + ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) @@ -10073,26 +11047,28 @@ case $host_os in ;; esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } -if ${lt_cv_prog_compiler_pic+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +printf %s "checking for $compiler option to produce PIC... " >&6; } +if test ${lt_cv_prog_compiler_pic+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_prog_compiler_pic=$lt_prog_compiler_pic fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 -$as_echo "$lt_cv_prog_compiler_pic" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 +printf "%s\n" "$lt_cv_prog_compiler_pic" >&6; } lt_prog_compiler_pic=$lt_cv_prog_compiler_pic # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 -$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } -if ${lt_cv_prog_compiler_pic_works+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 +printf %s "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } +if test ${lt_cv_prog_compiler_pic_works+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext @@ -10123,8 +11099,8 @@ else $RM conftest* fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 -$as_echo "$lt_cv_prog_compiler_pic_works" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 +printf "%s\n" "$lt_cv_prog_compiler_pic_works" >&6; } if test yes = "$lt_cv_prog_compiler_pic_works"; then case $lt_prog_compiler_pic in @@ -10152,11 +11128,12 @@ fi # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if ${lt_cv_prog_compiler_static_works+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +printf %s "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } +if test ${lt_cv_prog_compiler_static_works+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_prog_compiler_static_works=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS $lt_tmp_static_flag" @@ -10180,8 +11157,8 @@ else LDFLAGS=$save_LDFLAGS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 -$as_echo "$lt_cv_prog_compiler_static_works" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 +printf "%s\n" "$lt_cv_prog_compiler_static_works" >&6; } if test yes = "$lt_cv_prog_compiler_static_works"; then : @@ -10195,11 +11172,12 @@ fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if ${lt_cv_prog_compiler_c_o+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if test ${lt_cv_prog_compiler_c_o+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest @@ -10242,19 +11220,20 @@ else $RM conftest* fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 -$as_echo "$lt_cv_prog_compiler_c_o" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 +printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if ${lt_cv_prog_compiler_c_o+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if test ${lt_cv_prog_compiler_c_o+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest @@ -10297,8 +11276,8 @@ else $RM conftest* fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 -$as_echo "$lt_cv_prog_compiler_c_o" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 +printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; } @@ -10306,19 +11285,19 @@ $as_echo "$lt_cv_prog_compiler_c_o" >&6; } hard_links=nottested if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then # do not overwrite the value of need_locks provided by the user - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 -$as_echo_n "checking if we can lock with hard links... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 +printf %s "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 -$as_echo "$hard_links" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 +printf "%s\n" "$hard_links" >&6; } if test no = "$hard_links"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 -$as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 +printf "%s\n" "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} need_locks=warn fi else @@ -10330,8 +11309,8 @@ fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +printf %s "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag= @@ -10889,21 +11868,23 @@ _LT_EOF if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else - if ${lt_cv_aix_libpath_+:} false; then : - $as_echo_n "(cached) " >&6 -else + if test ${lt_cv_aix_libpath_+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { @@ -10918,7 +11899,7 @@ if ac_fn_c_try_link "$LINENO"; then : lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=/usr/lib:/lib @@ -10942,21 +11923,23 @@ fi if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else - if ${lt_cv_aix_libpath_+:} false; then : - $as_echo_n "(cached) " >&6 -else + if test ${lt_cv_aix_libpath_+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { @@ -10971,7 +11954,7 @@ if ac_fn_c_try_link "$LINENO"; then : lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=/usr/lib:/lib @@ -11222,11 +12205,12 @@ fi # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 -$as_echo_n "checking if $CC understands -b... " >&6; } -if ${lt_cv_prog_compiler__b+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 +printf %s "checking if $CC understands -b... " >&6; } +if test ${lt_cv_prog_compiler__b+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_prog_compiler__b=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -b" @@ -11250,8 +12234,8 @@ else LDFLAGS=$save_LDFLAGS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 -$as_echo "$lt_cv_prog_compiler__b" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 +printf "%s\n" "$lt_cv_prog_compiler__b" >&6; } if test yes = "$lt_cv_prog_compiler__b"; then archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' @@ -11291,28 +12275,30 @@ fi # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 -$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } -if ${lt_cv_irix_exported_symbol+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 +printf %s "checking whether the $host_os linker accepts -exported_symbol... " >&6; } +if test ${lt_cv_irix_exported_symbol+y} +then : + printf %s "(cached) " >&6 +else $as_nop save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int foo (void) { return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : lt_cv_irix_exported_symbol=yes -else +else $as_nop lt_cv_irix_exported_symbol=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 -$as_echo "$lt_cv_irix_exported_symbol" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 +printf "%s\n" "$lt_cv_irix_exported_symbol" >&6; } if test yes = "$lt_cv_irix_exported_symbol"; then archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' fi @@ -11593,8 +12579,8 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; } fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 -$as_echo "$ld_shlibs" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 +printf "%s\n" "$ld_shlibs" >&6; } test no = "$ld_shlibs" && can_build_shared=no with_gnu_ld=$with_gnu_ld @@ -11630,18 +12616,19 @@ x|xyes) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 -$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } -if ${lt_cv_archive_cmds_need_lc+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 +printf %s "checking whether -lc should be explicitly linked in... " >&6; } +if test ${lt_cv_archive_cmds_need_lc+y} +then : + printf %s "(cached) " >&6 +else $as_nop $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest @@ -11659,7 +12646,7 @@ else if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc=no @@ -11673,8 +12660,8 @@ else $RM conftest* fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 -$as_echo "$lt_cv_archive_cmds_need_lc" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 +printf "%s\n" "$lt_cv_archive_cmds_need_lc" >&6; } archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc ;; esac @@ -11833,8 +12820,8 @@ esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 -$as_echo_n "checking dynamic linker characteristics... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 +printf %s "checking dynamic linker characteristics... " >&6; } if test yes = "$GCC"; then case $host_os in @@ -12395,9 +13382,10 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH - if ${lt_cv_shlibpath_overrides_runpath+:} false; then : - $as_echo_n "(cached) " >&6 -else + if test ${lt_cv_shlibpath_overrides_runpath+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir @@ -12407,19 +13395,21 @@ else /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : +if ac_fn_c_try_link "$LINENO" +then : + if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null +then : lt_cv_shlibpath_overrides_runpath=yes fi fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir @@ -12663,8 +13653,8 @@ uts4*) dynamic_linker=no ;; esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 -$as_echo "$dynamic_linker" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 +printf "%s\n" "$dynamic_linker" >&6; } test no = "$dynamic_linker" && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" @@ -12785,8 +13775,8 @@ configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 -$as_echo_n "checking how to hardcode library paths into programs... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 +printf %s "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || test -n "$runpath_var" || @@ -12810,8 +13800,8 @@ else # directories. hardcode_action=unsupported fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 -$as_echo "$hardcode_action" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 +printf "%s\n" "$hardcode_action" >&6; } if test relink = "$hardcode_action" || test yes = "$inherit_rpath"; then @@ -12855,11 +13845,12 @@ else darwin*) # if libdl is installed we need to link against it - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if ${ac_cv_lib_dl_dlopen+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +printf %s "checking for dlopen in -ldl... " >&6; } +if test ${ac_cv_lib_dl_dlopen+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -12868,32 +13859,31 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 dlopen (); int -main () +main (void) { return dlopen (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_dl_dlopen=yes -else +else $as_nop ac_cv_lib_dl_dlopen=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = xyes +then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl -else +else $as_nop lt_cv_dlopen=dyld lt_cv_dlopen_libs= @@ -12913,14 +13903,16 @@ fi *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" -if test "x$ac_cv_func_shl_load" = xyes; then : +if test "x$ac_cv_func_shl_load" = xyes +then : lt_cv_dlopen=shl_load -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 -$as_echo_n "checking for shl_load in -ldld... " >&6; } -if ${ac_cv_lib_dld_shl_load+:} false; then : - $as_echo_n "(cached) " >&6 -else +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 +printf %s "checking for shl_load in -ldld... " >&6; } +if test ${ac_cv_lib_dld_shl_load+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -12929,41 +13921,42 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 shl_load (); int -main () +main (void) { return shl_load (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_dld_shl_load=yes -else +else $as_nop ac_cv_lib_dld_shl_load=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 -$as_echo "$ac_cv_lib_dld_shl_load" >&6; } -if test "x$ac_cv_lib_dld_shl_load" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 +printf "%s\n" "$ac_cv_lib_dld_shl_load" >&6; } +if test "x$ac_cv_lib_dld_shl_load" = xyes +then : lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld -else +else $as_nop ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" -if test "x$ac_cv_func_dlopen" = xyes; then : +if test "x$ac_cv_func_dlopen" = xyes +then : lt_cv_dlopen=dlopen -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if ${ac_cv_lib_dl_dlopen+:} false; then : - $as_echo_n "(cached) " >&6 -else +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +printf %s "checking for dlopen in -ldl... " >&6; } +if test ${ac_cv_lib_dl_dlopen+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -12972,37 +13965,37 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 dlopen (); int -main () +main (void) { return dlopen (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_dl_dlopen=yes -else +else $as_nop ac_cv_lib_dl_dlopen=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = xyes +then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 -$as_echo_n "checking for dlopen in -lsvld... " >&6; } -if ${ac_cv_lib_svld_dlopen+:} false; then : - $as_echo_n "(cached) " >&6 -else +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 +printf %s "checking for dlopen in -lsvld... " >&6; } +if test ${ac_cv_lib_svld_dlopen+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -13011,37 +14004,37 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 dlopen (); int -main () +main (void) { return dlopen (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_svld_dlopen=yes -else +else $as_nop ac_cv_lib_svld_dlopen=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 -$as_echo "$ac_cv_lib_svld_dlopen" >&6; } -if test "x$ac_cv_lib_svld_dlopen" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 +printf "%s\n" "$ac_cv_lib_svld_dlopen" >&6; } +if test "x$ac_cv_lib_svld_dlopen" = xyes +then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 -$as_echo_n "checking for dld_link in -ldld... " >&6; } -if ${ac_cv_lib_dld_dld_link+:} false; then : - $as_echo_n "(cached) " >&6 -else +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 +printf %s "checking for dld_link in -ldld... " >&6; } +if test ${ac_cv_lib_dld_dld_link+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -13050,30 +14043,29 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 dld_link (); int -main () +main (void) { return dld_link (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_dld_dld_link=yes -else +else $as_nop ac_cv_lib_dld_dld_link=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 -$as_echo "$ac_cv_lib_dld_dld_link" >&6; } -if test "x$ac_cv_lib_dld_dld_link" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 +printf "%s\n" "$ac_cv_lib_dld_dld_link" >&6; } +if test "x$ac_cv_lib_dld_dld_link" = xyes +then : lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld fi @@ -13112,11 +14104,12 @@ fi save_LIBS=$LIBS LIBS="$lt_cv_dlopen_libs $LIBS" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 -$as_echo_n "checking whether a program can dlopen itself... " >&6; } -if ${lt_cv_dlopen_self+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 +printf %s "checking whether a program can dlopen itself... " >&6; } +if test ${lt_cv_dlopen_self+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test yes = "$cross_compiling"; then : lt_cv_dlopen_self=cross else @@ -13195,7 +14188,7 @@ _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? @@ -13213,16 +14206,17 @@ rm -fr conftest* fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 -$as_echo "$lt_cv_dlopen_self" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 +printf "%s\n" "$lt_cv_dlopen_self" >&6; } if test yes = "$lt_cv_dlopen_self"; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 -$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } -if ${lt_cv_dlopen_self_static+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 +printf %s "checking whether a statically linked program can dlopen itself... " >&6; } +if test ${lt_cv_dlopen_self_static+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test yes = "$cross_compiling"; then : lt_cv_dlopen_self_static=cross else @@ -13301,7 +14295,7 @@ _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? @@ -13319,8 +14313,8 @@ rm -fr conftest* fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 -$as_echo "$lt_cv_dlopen_self_static" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 +printf "%s\n" "$lt_cv_dlopen_self_static" >&6; } fi CPPFLAGS=$save_CPPFLAGS @@ -13358,13 +14352,13 @@ fi striplib= old_striplib= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 -$as_echo_n "checking whether stripping libraries is possible... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 +printf %s "checking whether stripping libraries is possible... " >&6; } if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in @@ -13372,16 +14366,16 @@ else if test -n "$STRIP"; then striplib="$STRIP -x" old_striplib="$STRIP -S" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi ;; *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } ;; esac fi @@ -13398,13 +14392,13 @@ fi # Report what library types will actually be built - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 -$as_echo_n "checking if libtool supports shared libraries... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 -$as_echo "$can_build_shared" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 +printf %s "checking if libtool supports shared libraries... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 +printf "%s\n" "$can_build_shared" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 -$as_echo_n "checking whether to build shared libraries... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 +printf %s "checking whether to build shared libraries... " >&6; } test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and @@ -13428,15 +14422,15 @@ $as_echo_n "checking whether to build shared libraries... " >&6; } fi ;; esac - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 -$as_echo "$enable_shared" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 +printf "%s\n" "$enable_shared" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 -$as_echo_n "checking whether to build static libraries... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 +printf %s "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || enable_static=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 -$as_echo "$enable_static" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 +printf "%s\n" "$enable_static" >&6; } @@ -13473,6 +14467,12 @@ CC=$lt_save_CC + + + + + + ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -13483,15 +14483,16 @@ if test -z "$CXX"; 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 + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC clang++ 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CXX+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else @@ -13499,11 +14500,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + 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 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -13514,11 +14519,11 @@ 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; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 +printf "%s\n" "$CXX" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -13527,15 +14532,16 @@ fi 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 + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC clang++ 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_CXX+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else @@ -13543,11 +14549,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + 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 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -13558,11 +14568,11 @@ 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; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 +printf "%s\n" "$ac_ct_CXX" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -13574,8 +14584,8 @@ done 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;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX @@ -13585,7 +14595,7 @@ fi fi fi # Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 +printf "%s\n" "$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 @@ -13595,7 +14605,7 @@ case "(($ac_try" in *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -13605,20 +14615,21 @@ $as_echo "$ac_try_echo"; } >&5 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C++" >&5 +printf %s "checking whether the compiler supports GNU C++... " >&6; } +if test ${ac_cv_cxx_compiler_gnu+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { #ifndef __GNUC__ choke me @@ -13628,29 +14639,33 @@ main () return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : +if ac_fn_cxx_try_compile "$LINENO" +then : ac_compiler_gnu=yes -else +else $as_nop ac_compiler_gnu=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam 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; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 +printf "%s\n" "$ac_cv_cxx_compiler_gnu" >&6; } +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + if test $ac_compiler_gnu = yes; then GXX=yes else GXX= fi -ac_test_CXXFLAGS=${CXXFLAGS+set} +ac_test_CXXFLAGS=${CXXFLAGS+y} 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 +printf %s "checking whether $CXX accepts -g... " >&6; } +if test ${ac_cv_prog_cxx_g+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no @@ -13659,57 +14674,60 @@ else /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : +if ac_fn_cxx_try_compile "$LINENO" +then : ac_cv_prog_cxx_g=yes -else +else $as_nop CXXFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : +if ac_fn_cxx_try_compile "$LINENO" +then : -else +else $as_nop ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : +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 +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 +printf "%s\n" "$ac_cv_prog_cxx_g" >&6; } +if test $ac_test_CXXFLAGS; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then @@ -13724,6 +14742,100 @@ else CXXFLAGS= fi fi +ac_prog_cxx_stdcxx=no +if test x$ac_prog_cxx_stdcxx = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CXX option to enable C++11 features" >&5 +printf %s "checking for $CXX option to enable C++11 features... " >&6; } +if test ${ac_cv_prog_cxx_11+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_prog_cxx_11=no +ac_save_CXX=$CXX +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_cxx_conftest_cxx11_program +_ACEOF +for ac_arg in '' -std=gnu++11 -std=gnu++0x -std=c++11 -std=c++0x -qlanglvl=extended0x -AA +do + CXX="$ac_save_CXX $ac_arg" + if ac_fn_cxx_try_compile "$LINENO" +then : + ac_cv_prog_cxx_cxx11=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam + test "x$ac_cv_prog_cxx_cxx11" != "xno" && break +done +rm -f conftest.$ac_ext +CXX=$ac_save_CXX +fi + +if test "x$ac_cv_prog_cxx_cxx11" = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +printf "%s\n" "unsupported" >&6; } +else $as_nop + if test "x$ac_cv_prog_cxx_cxx11" = x +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +printf "%s\n" "none needed" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_cxx11" >&5 +printf "%s\n" "$ac_cv_prog_cxx_cxx11" >&6; } + CXX="$CXX $ac_cv_prog_cxx_cxx11" +fi + ac_cv_prog_cxx_stdcxx=$ac_cv_prog_cxx_cxx11 + ac_prog_cxx_stdcxx=cxx11 +fi +fi +if test x$ac_prog_cxx_stdcxx = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CXX option to enable C++98 features" >&5 +printf %s "checking for $CXX option to enable C++98 features... " >&6; } +if test ${ac_cv_prog_cxx_98+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_prog_cxx_98=no +ac_save_CXX=$CXX +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_cxx_conftest_cxx98_program +_ACEOF +for ac_arg in '' -std=gnu++98 -std=c++98 -qlanglvl=extended -AA +do + CXX="$ac_save_CXX $ac_arg" + if ac_fn_cxx_try_compile "$LINENO" +then : + ac_cv_prog_cxx_cxx98=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam + test "x$ac_cv_prog_cxx_cxx98" != "xno" && break +done +rm -f conftest.$ac_ext +CXX=$ac_save_CXX +fi + +if test "x$ac_cv_prog_cxx_cxx98" = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +printf "%s\n" "unsupported" >&6; } +else $as_nop + if test "x$ac_cv_prog_cxx_cxx98" = x +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +printf "%s\n" "none needed" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_cxx98" >&5 +printf "%s\n" "$ac_cv_prog_cxx_cxx98" >&6; } + CXX="$CXX $ac_cv_prog_cxx_cxx98" +fi + ac_cv_prog_cxx_stdcxx=$ac_cv_prog_cxx_cxx98 + ac_prog_cxx_stdcxx=cxx98 +fi +fi + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -13732,11 +14844,12 @@ 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +printf %s "checking dependency style of $depcc... " >&6; } +if test ${am_cv_CXX_dependencies_compiler_type+y} +then : + printf %s "(cached) " >&6 +else $as_nop 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 @@ -13843,8 +14956,8 @@ else 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; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 +printf "%s\n" "$am_cv_CXX_dependencies_compiler_type" >&6; } CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type if @@ -13877,36 +14990,32 @@ 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; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 +printf %s "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" + if test ${ac_cv_prog_CXXCPP+y} +then : + printf %s "(cached) " >&6 +else $as_nop + # Double quotes because $CXX needs to be expanded + for CXXCPP in "$CXX -E" cpp /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 +#include Syntax error _ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : +if ac_fn_cxx_try_cpp "$LINENO" +then : -else +else $as_nop # Broken: fails on valid input. continue fi @@ -13918,10 +15027,11 @@ rm -f conftest.err conftest.i conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : +if ac_fn_cxx_try_cpp "$LINENO" +then : # Broken: success on invalid input. continue -else +else $as_nop # Passes both tests. ac_preproc_ok=: break @@ -13931,7 +15041,8 @@ 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 : +if $ac_preproc_ok +then : break fi @@ -13943,29 +15054,24 @@ fi else ac_cv_prog_CXXCPP=$CXXCPP fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 -$as_echo "$CXXCPP" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 +printf "%s\n" "$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 +#include Syntax error _ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : +if ac_fn_cxx_try_cpp "$LINENO" +then : -else +else $as_nop # Broken: fails on valid input. continue fi @@ -13977,10 +15083,11 @@ rm -f conftest.err conftest.i conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : +if ac_fn_cxx_try_cpp "$LINENO" +then : # Broken: success on invalid input. continue -else +else $as_nop # Passes both tests. ac_preproc_ok=: break @@ -13990,11 +15097,12 @@ 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 : +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;} +else $as_nop + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi @@ -14130,17 +15238,18 @@ cc_basename=$func_cc_basename_result # Check whether --with-gnu-ld was given. -if test "${with_gnu_ld+set}" = set; then : +if test ${with_gnu_ld+y} +then : withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes -else +else $as_nop with_gnu_ld=no fi ac_prog=ld if test yes = "$GCC"; then # Check if gcc -print-prog-name=ld gives a path. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 -$as_echo_n "checking for ld used by $CC... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 +printf %s "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return, which upsets mingw @@ -14169,15 +15278,16 @@ $as_echo_n "checking for ld used by $CC... " >&6; } ;; esac elif test yes = "$with_gnu_ld"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 -$as_echo_n "checking for GNU ld... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 +printf %s "checking for GNU ld... " >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 -$as_echo_n "checking for non-GNU ld... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 +printf %s "checking for non-GNU ld... " >&6; } fi -if ${lt_cv_path_LD+:} false; then : - $as_echo_n "(cached) " >&6 -else +if test ${lt_cv_path_LD+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -z "$LD"; then lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do @@ -14206,18 +15316,19 @@ fi LD=$lt_cv_path_LD if test -n "$LD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 -$as_echo "$LD" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 +printf "%s\n" "$LD" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 -$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } -if ${lt_cv_prog_gnu_ld+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 +printf %s "checking if the linker ($LD) is GNU ld... " >&6; } +if test ${lt_cv_prog_gnu_ld+y} +then : + printf %s "(cached) " >&6 +else $as_nop # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &1 &5 -$as_echo "$lt_cv_prog_gnu_ld" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5 +printf "%s\n" "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld @@ -14274,7 +15385,7 @@ with_gnu_ld=$lt_cv_prog_gnu_ld # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' else GXX=no @@ -14283,8 +15394,8 @@ with_gnu_ld=$lt_cv_prog_gnu_ld fi # PORTME: fill in a description of your system's C++ link characteristics - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +printf %s "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } ld_shlibs_CXX=yes case $host_os in aix3*) @@ -14422,21 +15533,23 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else - if ${lt_cv_aix_libpath__CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else + if test ${lt_cv_aix_libpath__CXX+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : +if ac_fn_cxx_try_link "$LINENO" +then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { @@ -14451,7 +15564,7 @@ if ac_fn_cxx_try_link "$LINENO"; then : lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX=/usr/lib:/lib @@ -14476,21 +15589,23 @@ fi if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else - if ${lt_cv_aix_libpath__CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else + if test ${lt_cv_aix_libpath__CXX+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : +if ac_fn_cxx_try_link "$LINENO" +then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { @@ -14505,7 +15620,7 @@ if ac_fn_cxx_try_link "$LINENO"; then : lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX=/usr/lib:/lib @@ -14766,7 +15881,7 @@ fi # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes = "$GXX"; then @@ -14831,7 +15946,7 @@ fi # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes = "$GXX"; then @@ -15170,7 +16285,7 @@ fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' else # FIXME: insert proper C++ library support @@ -15254,7 +16369,7 @@ fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' else # g++ 2.7 appears to require '-G' NOT '-shared' on this # platform. @@ -15265,7 +16380,7 @@ fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' fi hardcode_libdir_flag_spec_CXX='$wl-R $wl$libdir' @@ -15356,8 +16471,8 @@ fi ;; esac - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 -$as_echo "$ld_shlibs_CXX" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 +printf "%s\n" "$ld_shlibs_CXX" >&6; } test no = "$ld_shlibs_CXX" && can_build_shared=no GCC_CXX=$GXX @@ -15395,7 +16510,7 @@ esac if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Parse the compiler output and extract the necessary # objects, libraries and library flags. @@ -15876,26 +16991,28 @@ case $host_os in ;; esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } -if ${lt_cv_prog_compiler_pic_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +printf %s "checking for $compiler option to produce PIC... " >&6; } +if test ${lt_cv_prog_compiler_pic_CXX+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_prog_compiler_pic_CXX=$lt_prog_compiler_pic_CXX fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_CXX" >&5 -$as_echo "$lt_cv_prog_compiler_pic_CXX" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_CXX" >&5 +printf "%s\n" "$lt_cv_prog_compiler_pic_CXX" >&6; } lt_prog_compiler_pic_CXX=$lt_cv_prog_compiler_pic_CXX # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 -$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; } -if ${lt_cv_prog_compiler_pic_works_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 +printf %s "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; } +if test ${lt_cv_prog_compiler_pic_works_CXX+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_prog_compiler_pic_works_CXX=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext @@ -15926,8 +17043,8 @@ else $RM conftest* fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 -$as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 +printf "%s\n" "$lt_cv_prog_compiler_pic_works_CXX" >&6; } if test yes = "$lt_cv_prog_compiler_pic_works_CXX"; then case $lt_prog_compiler_pic_CXX in @@ -15949,11 +17066,12 @@ fi # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if ${lt_cv_prog_compiler_static_works_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +printf %s "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } +if test ${lt_cv_prog_compiler_static_works_CXX+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_prog_compiler_static_works_CXX=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS $lt_tmp_static_flag" @@ -15977,8 +17095,8 @@ else LDFLAGS=$save_LDFLAGS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5 -$as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5 +printf "%s\n" "$lt_cv_prog_compiler_static_works_CXX" >&6; } if test yes = "$lt_cv_prog_compiler_static_works_CXX"; then : @@ -15989,11 +17107,12 @@ fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if test ${lt_cv_prog_compiler_c_o_CXX+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_prog_compiler_c_o_CXX=no $RM -r conftest 2>/dev/null mkdir conftest @@ -16036,16 +17155,17 @@ else $RM conftest* fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 -$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 +printf "%s\n" "$lt_cv_prog_compiler_c_o_CXX" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if test ${lt_cv_prog_compiler_c_o_CXX+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_prog_compiler_c_o_CXX=no $RM -r conftest 2>/dev/null mkdir conftest @@ -16088,8 +17208,8 @@ else $RM conftest* fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 -$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 +printf "%s\n" "$lt_cv_prog_compiler_c_o_CXX" >&6; } @@ -16097,19 +17217,19 @@ $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } hard_links=nottested if test no = "$lt_cv_prog_compiler_c_o_CXX" && test no != "$need_locks"; then # do not overwrite the value of need_locks provided by the user - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 -$as_echo_n "checking if we can lock with hard links... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 +printf %s "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 -$as_echo "$hard_links" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 +printf "%s\n" "$hard_links" >&6; } if test no = "$hard_links"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 -$as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 +printf "%s\n" "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} need_locks=warn fi else @@ -16118,8 +17238,8 @@ fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +printf %s "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' @@ -16161,8 +17281,8 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie ;; esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 -$as_echo "$ld_shlibs_CXX" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 +printf "%s\n" "$ld_shlibs_CXX" >&6; } test no = "$ld_shlibs_CXX" && can_build_shared=no with_gnu_ld_CXX=$with_gnu_ld @@ -16189,18 +17309,19 @@ x|xyes) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 -$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } -if ${lt_cv_archive_cmds_need_lc_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 +printf %s "checking whether -lc should be explicitly linked in... " >&6; } +if test ${lt_cv_archive_cmds_need_lc_CXX+y} +then : + printf %s "(cached) " >&6 +else $as_nop $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest @@ -16218,7 +17339,7 @@ else if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc_CXX=no @@ -16232,8 +17353,8 @@ else $RM conftest* fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_CXX" >&5 -$as_echo "$lt_cv_archive_cmds_need_lc_CXX" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_CXX" >&5 +printf "%s\n" "$lt_cv_archive_cmds_need_lc_CXX" >&6; } archive_cmds_need_lc_CXX=$lt_cv_archive_cmds_need_lc_CXX ;; esac @@ -16302,8 +17423,8 @@ esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 -$as_echo_n "checking dynamic linker characteristics... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 +printf %s "checking dynamic linker characteristics... " >&6; } library_names_spec= libname_spec='lib$name' @@ -16791,9 +17912,10 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH - if ${lt_cv_shlibpath_overrides_runpath+:} false; then : - $as_echo_n "(cached) " >&6 -else + if test ${lt_cv_shlibpath_overrides_runpath+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir @@ -16803,19 +17925,21 @@ else /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : +if ac_fn_cxx_try_link "$LINENO" +then : + if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null +then : lt_cv_shlibpath_overrides_runpath=yes fi fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir @@ -17059,8 +18183,8 @@ uts4*) dynamic_linker=no ;; esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 -$as_echo "$dynamic_linker" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 +printf "%s\n" "$dynamic_linker" >&6; } test no = "$dynamic_linker" && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" @@ -17124,8 +18248,8 @@ configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 -$as_echo_n "checking how to hardcode library paths into programs... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 +printf %s "checking how to hardcode library paths into programs... " >&6; } hardcode_action_CXX= if test -n "$hardcode_libdir_flag_spec_CXX" || test -n "$runpath_var_CXX" || @@ -17149,8 +18273,8 @@ else # directories. hardcode_action_CXX=unsupported fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5 -$as_echo "$hardcode_action_CXX" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5 +printf "%s\n" "$hardcode_action_CXX" >&6; } if test relink = "$hardcode_action_CXX" || test yes = "$inherit_rpath_CXX"; then @@ -17203,11 +18327,12 @@ 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -17215,11 +18340,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + 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 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -17230,11 +18359,11 @@ 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; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -17243,11 +18372,12 @@ 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else @@ -17255,11 +18385,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + 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 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -17270,11 +18404,11 @@ 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; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +printf "%s\n" "$ac_ct_CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_ct_CC" = x; then @@ -17282,8 +18416,8 @@ fi 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;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC @@ -17296,11 +18430,12 @@ 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -17308,11 +18443,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + 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 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -17323,11 +18462,11 @@ 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; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -17336,11 +18475,12 @@ 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -17349,15 +18489,19 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac 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 + 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 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -17373,33 +18517,144 @@ if test $ac_prog_rejected = yes; then # 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+' '}$@" + ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop + 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 + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + 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" + printf "%s\n" "$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 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop + 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 + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + 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" + printf "%s\n" "$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 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +printf "%s\n" "$ac_ct_CC" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "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:) +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC 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 + # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args. +set dummy ${ac_tool_prefix}clang; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -17407,11 +18662,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac 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 + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}clang" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -17422,28 +18681,25 @@ 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; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi - test -n "$CC" && break - done fi -if test -z "$CC"; then +if test -z "$ac_cv_prog_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 + # Extract the first word of "clang", so it can be a program name with args. +set dummy clang; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else @@ -17451,11 +18707,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac 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 + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="clang" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -17466,50 +18726,48 @@ 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; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +printf "%s\n" "$ac_ct_CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "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;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$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 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;} +test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$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 +printf "%s\n" "$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 +for ac_option in --version -v -V -qversion -version; 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 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -17519,20 +18777,21 @@ $as_echo "$ac_try_echo"; } >&5 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5 +printf %s "checking whether the compiler supports GNU C... " >&6; } +if test ${ac_cv_c_compiler_gnu+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { #ifndef __GNUC__ choke me @@ -17542,29 +18801,33 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_compiler_gnu=yes -else +else $as_nop ac_compiler_gnu=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam 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; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; } +ac_compiler_gnu=$ac_cv_c_compiler_gnu + if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi -ac_test_CFLAGS=${CFLAGS+set} +ac_test_CFLAGS=${CFLAGS+y} 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +printf %s "checking whether $CC accepts -g... " >&6; } +if test ${ac_cv_prog_cc_g+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no @@ -17573,57 +18836,60 @@ else /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_cv_prog_cc_g=yes -else +else $as_nop CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : -else +else $as_nop ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +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 +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +printf "%s\n" "$ac_cv_prog_cc_g" >&6; } +if test $ac_test_CFLAGS; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then @@ -17638,94 +18904,144 @@ 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_prog_cc_stdc=no +if test x$ac_prog_cc_stdc = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5 +printf %s "checking for $CC option to enable C11 features... " >&6; } +if test ${ac_cv_prog_cc_c11+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_prog_cc_c11=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]; +$ac_c_conftest_c11_program +_ACEOF +for ac_arg in '' -std=gnu11 +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_prog_cc_c11=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam + test "x$ac_cv_prog_cc_c11" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC +fi -/* 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]; +if test "x$ac_cv_prog_cc_c11" = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +printf "%s\n" "unsupported" >&6; } +else $as_nop + if test "x$ac_cv_prog_cc_c11" = x +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +printf "%s\n" "none needed" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 +printf "%s\n" "$ac_cv_prog_cc_c11" >&6; } + CC="$CC $ac_cv_prog_cc_c11" +fi + ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11 + ac_prog_cc_stdc=c11 +fi +fi +if test x$ac_prog_cc_stdc = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5 +printf %s "checking for $CC option to enable C99 features... " >&6; } +if test ${ac_cv_prog_cc_c99+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_prog_cc_c99=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_c_conftest_c99_program +_ACEOF +for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99= +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_prog_cc_c99=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam + test "x$ac_cv_prog_cc_c99" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC +fi -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; -} +if test "x$ac_cv_prog_cc_c99" = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +printf "%s\n" "unsupported" >&6; } +else $as_nop + if test "x$ac_cv_prog_cc_c99" = x +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +printf "%s\n" "none needed" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 +printf "%s\n" "$ac_cv_prog_cc_c99" >&6; } + CC="$CC $ac_cv_prog_cc_c99" +fi + ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 + ac_prog_cc_stdc=c99 +fi +fi +if test x$ac_prog_cc_stdc = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5 +printf %s "checking for $CC option to enable C89 features... " >&6; } +if test ${ac_cv_prog_cc_c89+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_c_conftest_c89_program _ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +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 : + if ac_fn_c_try_compile "$LINENO" +then : ac_cv_prog_cc_c89=$ac_arg fi -rm -f core conftest.err conftest.$ac_objext +rm -f core conftest.err conftest.$ac_objext conftest.beam 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 : +if test "x$ac_cv_prog_cc_c89" = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +printf "%s\n" "unsupported" >&6; } +else $as_nop + if test "x$ac_cv_prog_cc_c89" = x +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +printf "%s\n" "none needed" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +printf "%s\n" "$ac_cv_prog_cc_c89" >&6; } + CC="$CC $ac_cv_prog_cc_c89" +fi + ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 + ac_prog_cc_stdc=c89 +fi fi ac_ext=c @@ -17734,21 +19050,23 @@ 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_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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 +printf %s "checking whether $CC understands -c and -o together... " >&6; } +if test ${am_cv_prog_cc_c_o+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; @@ -17776,8 +19094,8 @@ _ACEOF 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; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 +printf "%s\n" "$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. @@ -17795,11 +19113,12 @@ 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +printf %s "checking dependency style of $depcc... " >&6; } +if test ${am_cv_CC_dependencies_compiler_type+y} +then : + printf %s "(cached) " >&6 +else $as_nop 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 @@ -17906,8 +19225,8 @@ else 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; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 +printf "%s\n" "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if @@ -17922,15 +19241,9 @@ fi -CFLAGS=$CFLAGS_save - - -if test -z "$CC_FOR_BUILD"; then : - - CC_FOR_BUILD=$CC - +# AC_PROG_CC_C99 obsolete, detected inside AC_PROG_CC, since autoconf 2.70 -fi +CFLAGS=$CFLAGS_save #################################################################### # CLI arguments @@ -17940,7 +19253,8 @@ fi # Embedded mode, or standalone? # Check whether --enable-embedded-mode was given. -if test "${enable_embedded_mode+set}" = set; then : +if test ${enable_embedded_mode+y} +then : enableval=$enable_embedded_mode; fi @@ -17948,133 +19262,216 @@ fi # Change the symbol prefix? # Check whether --with-hwloc-symbol-prefix was given. -if test "${with_hwloc_symbol_prefix+set}" = set; then : +if test ${with_hwloc_symbol_prefix+y} +then : withval=$with_hwloc_symbol_prefix; fi + # For the windows build + + # Debug mode? # Check whether --enable-debug was given. -if test "${enable_debug+set}" = set; then : +if test ${enable_debug+y} +then : enableval=$enable_debug; fi # Doxygen? # Check whether --enable-doxygen was given. -if test "${enable_doxygen+set}" = set; then : +if test ${enable_doxygen+y} +then : enableval=$enable_doxygen; fi + # Building the README + # Check whether --enable-readme was given. +if test ${enable_readme+y} +then : + enableval=$enable_readme; +fi + + # Picky? # Check whether --enable-picky was given. -if test "${enable_picky+set}" = set; then : +if test ${enable_picky+y} +then : enableval=$enable_picky; fi # Cairo? # Check whether --enable-cairo was given. -if test "${enable_cairo+set}" = set; then : +if test ${enable_cairo+y} +then : enableval=$enable_cairo; fi # CPUID # Check whether --enable-cpuid was given. -if test "${enable_cpuid+set}" = set; then : +if test ${enable_cpuid+y} +then : enableval=$enable_cpuid; fi # XML using libxml2? # Check whether --enable-libxml2 was given. -if test "${enable_libxml2+set}" = set; then : +if test ${enable_libxml2+y} +then : enableval=$enable_libxml2; fi # I/O? # Check whether --enable-io was given. -if test "${enable_io+set}" = set; then : +if test ${enable_io+y} +then : enableval=$enable_io; fi # PCI? # Check whether --enable-pci was given. -if test "${enable_pci+set}" = set; then : +if test ${enable_pci+y} +then : enableval=$enable_pci; fi # 32bits_pci_domain? # Check whether --enable-32bits-pci-domain was given. -if test "${enable_32bits_pci_domain+set}" = set; then : +if test ${enable_32bits_pci_domain+y} +then : enableval=$enable_32bits_pci_domain; fi # OpenCL? # Check whether --enable-opencl was given. -if test "${enable_opencl+set}" = set; then : +if test ${enable_opencl+y} +then : enableval=$enable_opencl; fi # CUDA? # Check whether --enable-cuda was given. -if test "${enable_cuda+set}" = set; then : +if test ${enable_cuda+y} +then : enableval=$enable_cuda; fi # NVML? # Check whether --enable-nvml was given. -if test "${enable_nvml+set}" = set; then : +if test ${enable_nvml+y} +then : enableval=$enable_nvml; fi + # CUDA version (for using its pkg-config cuda-x.y.pc) + +# Check whether --with-cuda-version was given. +if test ${with_cuda_version+y} +then : + withval=$with_cuda_version; +fi + + + # CUDA install path (and NVML and OpenCL) + +# Check whether --with-cuda was given. +if test ${with_cuda+y} +then : + withval=$with_cuda; +fi + + # RSMI? # Check whether --enable-rsmi was given. -if test "${enable_rsmi+set}" = set; then : +if test ${enable_rsmi+y} +then : enableval=$enable_rsmi; fi + # ROCm version (for selecting /opt/rocm-x.y/) + +# Check whether --with-rocm-version was given. +if test ${with_rocm_version+y} +then : + withval=$with_rocm_version; +fi + + + # ROCm install path + +# Check whether --with-rocm was given. +if test ${with_rocm+y} +then : + withval=$with_rocm; +fi + + + # LevelZero + # Check whether --enable-levelzero was given. +if test ${enable_levelzero+y} +then : + enableval=$enable_levelzero; +fi + # GL/Display # Check whether --enable-gl was given. -if test "${enable_gl+set}" = set; then : +if test ${enable_gl+y} +then : enableval=$enable_gl; fi # LibUdev # Check whether --enable-libudev was given. -if test "${enable_libudev+set}" = set; then : +if test ${enable_libudev+y} +then : enableval=$enable_libudev; fi # Plugins # Check whether --enable-plugins was given. -if test "${enable_plugins+set}" = set; then : +if test ${enable_plugins+y} +then : enableval=$enable_plugins; fi + +# Check whether --with-hwloc-plugins-path was given. +if test ${with_hwloc_plugins_path+y} +then : + withval=$with_hwloc_plugins_path; HWLOC_PLUGINS_PATH="$with_hwloc_plugins_path" +else $as_nop + HWLOC_PLUGINS_PATH="\$(libdir)/hwloc" +fi + + # Look for dlopen # Not --disable-dlopen because $enable_dlopen is already used/set # Check whether --enable-plugin-dlopen was given. -if test "${enable_plugin_dlopen+set}" = set; then : +if test ${enable_plugin_dlopen+y} +then : enableval=$enable_plugin_dlopen; fi # Look for ltdl # Not --disable-ltdl for consistency wrt dlopen above # Check whether --enable-plugin-ltdl was given. -if test "${enable_plugin_ltdl+set}" = set; then : +if test ${enable_plugin_ltdl+y} +then : enableval=$enable_plugin_ltdl; fi @@ -18082,22 +19479,25 @@ fi # If debug mode, add -g -if test "$hwloc_debug" = "1"; then : +if test "$hwloc_debug" = "1" +then : CFLAGS="$CFLAGS -g" fi # If the user didn't specifically ask for embedding mode, default to # standalone mode -if test "$enable_embedded_mode" != "yes"; then : - if test ! -d "$srcdir/doc"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The hwloc source tree looks incomplete for a standalone" >&5 -$as_echo "$as_me: WARNING: The hwloc source tree looks incomplete for a standalone" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: build. Perhaps this hwloc tree is intended for an embedded" >&5 -$as_echo "$as_me: WARNING: build. Perhaps this hwloc tree is intended for an embedded" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: build? Try using the --enable-embedded-mode switch." >&5 -$as_echo "$as_me: WARNING: build? Try using the --enable-embedded-mode switch." >&2;} +if test "$enable_embedded_mode" != "yes" +then : + if test ! -d "$srcdir/doc" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: The hwloc source tree looks incomplete for a standalone" >&5 +printf "%s\n" "$as_me: WARNING: The hwloc source tree looks incomplete for a standalone" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: build. Perhaps this hwloc tree is intended for an embedded" >&5 +printf "%s\n" "$as_me: WARNING: build. Perhaps this hwloc tree is intended for an embedded" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: build? Try using the --enable-embedded-mode switch." >&5 +printf "%s\n" "$as_me: WARNING: build? Try using the --enable-embedded-mode switch." >&2;} as_fn_error $? "Cannot build standalone hwloc" "$LINENO" 5 -else +else $as_nop hwloc_mode=standalone @@ -18110,7 +19510,88 @@ fi + # Setup the hwloc core +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5 +printf %s "checking for $CC options needed to detect all undeclared functions... " >&6; } +if test ${ac_cv_c_undeclared_builtin_options+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_save_CFLAGS=$CFLAGS + ac_cv_c_undeclared_builtin_options='cannot detect' + for ac_arg in '' -fno-builtin; do + CFLAGS="$ac_save_CFLAGS $ac_arg" + # This test program should *not* compile successfully. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ +(void) strchr; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + +else $as_nop + # This test program should compile successfully. + # No library function is consistently available on + # freestanding implementations, so test against a dummy + # declaration. Include always-available headers on the + # off chance that they somehow elicit warnings. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include +extern void ac_decl (int, char *); + +int +main (void) +{ +(void) ac_decl (0, (char *) 0); + (void) ac_decl; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + if test x"$ac_arg" = x +then : + ac_cv_c_undeclared_builtin_options='none needed' +else $as_nop + ac_cv_c_undeclared_builtin_options=$ac_arg +fi + break +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + done + CFLAGS=$ac_save_CFLAGS + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_undeclared_builtin_options" >&5 +printf "%s\n" "$ac_cv_c_undeclared_builtin_options" >&6; } + case $ac_cv_c_undeclared_builtin_options in #( + 'cannot detect') : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot make $CC report undeclared builtins +See \`config.log' for more details" "$LINENO" 5; } ;; #( + 'none needed') : + ac_c_undeclared_builtin_options='' ;; #( + *) : + ac_c_undeclared_builtin_options=$ac_cv_c_undeclared_builtin_options ;; +esac + @@ -18118,11 +19599,12 @@ if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; 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_PKG_CONFIG+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_PKG_CONFIG+y} +then : + printf %s "(cached) " >&6 +else $as_nop case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. @@ -18132,11 +19614,15 @@ else for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac 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_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -18148,11 +19634,11 @@ esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +printf "%s\n" "$PKG_CONFIG" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -18161,11 +19647,12 @@ if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; 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_ac_pt_PKG_CONFIG+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_ac_pt_PKG_CONFIG+y} +then : + printf %s "(cached) " >&6 +else $as_nop case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. @@ -18175,65 +19662,203 @@ else for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac 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_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_ac_pt_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS - ;; -esac + ;; +esac +fi +ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG +if test -n "$ac_pt_PKG_CONFIG"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 +printf "%s\n" "$ac_pt_PKG_CONFIG" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + if test "x$ac_pt_PKG_CONFIG" = x; then + PKG_CONFIG="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + PKG_CONFIG=$ac_pt_PKG_CONFIG + fi +else + PKG_CONFIG="$ac_cv_path_PKG_CONFIG" +fi + +fi +if test -n "$PKG_CONFIG"; then + HWLOC_pkg_min_version=0.9.0 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $HWLOC_pkg_min_version" >&5 +printf %s "checking pkg-config is at least version $HWLOC_pkg_min_version... " >&6; } + if $PKG_CONFIG --atleast-pkgconfig-version $HWLOC_pkg_min_version; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + PKG_CONFIG="" + 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 +printf %s "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 test ${ac_cv_prog_CPP+y} +then : + printf %s "(cached) " >&6 +else $as_nop + # Double quotes because $CC needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" 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. + # 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. */ +#include + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO" +then : + +else $as_nop + # 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 $as_nop + # 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 -ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG -if test -n "$ac_pt_PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 -$as_echo "$ac_pt_PKG_CONFIG" >&6; } + CPP=$ac_cv_prog_CPP else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + ac_cv_prog_CPP=$CPP fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 +printf "%s\n" "$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. + # 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. */ +#include + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO" +then : - if test "x$ac_pt_PKG_CONFIG" = x; then - PKG_CONFIG="" - 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 - PKG_CONFIG=$ac_pt_PKG_CONFIG - fi -else - PKG_CONFIG="$ac_cv_path_PKG_CONFIG" +else $as_nop + # 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 $as_nop + # Passes both tests. +ac_preproc_ok=: +break fi -if test -n "$PKG_CONFIG"; then - HWLOC_pkg_min_version=0.9.0 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $HWLOC_pkg_min_version" >&5 -$as_echo_n "checking pkg-config is at least version $HWLOC_pkg_min_version... " >&6; } - if $PKG_CONFIG --atleast-pkgconfig-version $HWLOC_pkg_min_version; 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; } - PKG_CONFIG="" - 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_nop + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$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 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5 -$as_echo_n "checking for X... " >&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 + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for X" >&5 +printf %s "checking for X... " >&6; } # Check whether --with-x was given. -if test "${with_x+set}" = set; then : +if test ${with_x+y} +then : withval=$with_x; fi @@ -18244,12 +19869,41 @@ if test "x$with_x" = xno; then else case $x_includes,$x_libraries in #( *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #( - *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then : - $as_echo_n "(cached) " >&6 -else + *,NONE | NONE,*) if test ${ac_cv_have_x+y} +then : + printf %s "(cached) " >&6 +else $as_nop # One or both of the vars are not set, and there is no cached value. -ac_x_includes=no ac_x_libraries=no -rm -f -r conftest.dir +ac_x_includes=no +ac_x_libraries=no +# Do we need to do anything special at all? +ac_save_LIBS=$LIBS +LIBS="-lX11 $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main (void) +{ +XrmInitialize () + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + # We can compile and link X programs with no special options. + ac_x_includes= + ac_x_libraries= +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS="$ac_save_LIBS" +# If that didn't work, only try xmkmf and file system searches +# for native compilation. +if test x"$ac_x_includes" = xno && test "$cross_compiling" = no +then : + rm -f -r conftest.dir if mkdir conftest.dir; then cd conftest.dir cat >Imakefile <<'_ACEOF' @@ -18288,7 +19942,7 @@ _ACEOF rm -f -r conftest.dir fi -# Standard set of common directories for X headers. + # Standard set of common directories for X headers. # Check X11 before X11Rn because it is often a symlink to the current release. ac_x_header_dirs=' /usr/X11/include @@ -18315,6 +19969,8 @@ ac_x_header_dirs=' /usr/local/include/X11R5 /usr/local/include/X11R4 +/opt/X11/include + /usr/X386/include /usr/x386/include /usr/XFree86/include/X11 @@ -18336,10 +19992,11 @@ if test "$ac_x_includes" = no; then /* end confdefs.h. */ #include _ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : +if ac_fn_c_try_cpp "$LINENO" +then : # We can compile using X headers with no special include directory. ac_x_includes= -else +else $as_nop for ac_dir in $ac_x_header_dirs; do if test -r "$ac_dir/X11/Xlib.h"; then ac_x_includes=$ac_dir @@ -18360,20 +20017,21 @@ if test "$ac_x_libraries" = no; then /* end confdefs.h. */ #include int -main () +main (void) { XrmInitialize () ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : LIBS=$ac_save_LIBS # We can link X programs with no special library path. ac_x_libraries= -else +else $as_nop LIBS=$ac_save_LIBS -for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` +for ac_dir in `printf "%s\n" "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` do # Don't even attempt the hair of trying to link an X program! for ac_extension in a so sl dylib la dll; do @@ -18384,19 +20042,21 @@ do done done fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi # $ac_x_libraries = no +fi +# Record the results. case $ac_x_includes,$ac_x_libraries in #( - no,* | *,no | *\'*) + no,* | *,no | *\'*) : # Didn't find X, or a directory has "'" in its name. - ac_cv_have_x="have_x=no";; #( - *) + ac_cv_have_x="have_x=no" ;; #( + *) : # Record where we found X for the cache. ac_cv_have_x="have_x=yes\ ac_x_includes='$ac_x_includes'\ - ac_x_libraries='$ac_x_libraries'" + ac_x_libraries='$ac_x_libraries'" ;; esac fi ;; #( @@ -18406,8 +20066,8 @@ fi fi # $with_x != no if test "$have_x" != yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5 -$as_echo "$have_x" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5 +printf "%s\n" "$have_x" >&6; } no_x=yes else # If each of the values was on the command line, it overrides each guess. @@ -18417,8 +20077,8 @@ else ac_cv_have_x="have_x=yes\ ac_x_includes='$x_includes'\ ac_x_libraries='$x_libraries'" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5 -$as_echo "libraries $x_libraries, headers $x_includes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5 +printf "%s\n" "libraries $x_libraries, headers $x_includes" >&6; } fi @@ -18426,7 +20086,8 @@ fi - if test "x1" != "x"; then : + if test "x1" != "x" +then : cat <&5 -$as_echo_n "checking hwloc building mode... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hwloc_mode" >&5 -$as_echo "$hwloc_mode" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking hwloc building mode" >&5 +printf %s "checking hwloc building mode... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hwloc_mode" >&5 +printf "%s\n" "$hwloc_mode" >&6; } # Get hwloc's absolute top builddir (which may not be the same as # the real $top_builddir, because we may be building in embedded @@ -18474,62 +20136,52 @@ $as_echo "$hwloc_mode" >&6; } # Go back to where we started cd "$HWLOC_startdir" - { $as_echo "$as_me:${as_lineno-$LINENO}: hwloc builddir: $HWLOC_top_builddir" >&5 -$as_echo "$as_me: hwloc builddir: $HWLOC_top_builddir" >&6;} - { $as_echo "$as_me:${as_lineno-$LINENO}: hwloc srcdir: $HWLOC_top_srcdir" >&5 -$as_echo "$as_me: hwloc srcdir: $HWLOC_top_srcdir" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: hwloc builddir: $HWLOC_top_builddir" >&5 +printf "%s\n" "$as_me: hwloc builddir: $HWLOC_top_builddir" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: hwloc srcdir: $HWLOC_top_srcdir" >&5 +printf "%s\n" "$as_me: hwloc srcdir: $HWLOC_top_srcdir" >&6;} if test "$HWLOC_top_builddir" != "$HWLOC_top_srcdir"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: Detected VPATH build" >&5 -$as_echo "$as_me: Detected VPATH build" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Detected VPATH build" >&5 +printf "%s\n" "$as_me: Detected VPATH build" >&6;} fi # Get the version of hwloc that we are installing - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hwloc version" >&5 -$as_echo_n "checking for hwloc version... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for hwloc version" >&5 +printf %s "checking for hwloc version... " >&6; } HWLOC_VERSION=`sh "$HWLOC_top_srcdir/config/hwloc_get_version.sh" "$HWLOC_top_srcdir/VERSION"` if test "$?" != "0"; then as_fn_error $? "Cannot continue" "$LINENO" 5 fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HWLOC_VERSION" >&5 -$as_echo "$HWLOC_VERSION" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $HWLOC_VERSION" >&5 +printf "%s\n" "$HWLOC_VERSION" >&6; } -cat >>confdefs.h <<_ACEOF -#define HWLOC_VERSION "$HWLOC_VERSION" -_ACEOF +printf "%s\n" "#define HWLOC_VERSION \"$HWLOC_VERSION\"" >>confdefs.h HWLOC_VERSION_MAJOR=`sh "$HWLOC_top_srcdir/config/hwloc_get_version.sh" "$HWLOC_top_srcdir/VERSION" --major` -cat >>confdefs.h <<_ACEOF -#define HWLOC_VERSION_MAJOR $HWLOC_VERSION_MAJOR -_ACEOF +printf "%s\n" "#define HWLOC_VERSION_MAJOR $HWLOC_VERSION_MAJOR" >>confdefs.h HWLOC_VERSION_MINOR=`sh "$HWLOC_top_srcdir/config/hwloc_get_version.sh" "$HWLOC_top_srcdir/VERSION" --minor` -cat >>confdefs.h <<_ACEOF -#define HWLOC_VERSION_MINOR $HWLOC_VERSION_MINOR -_ACEOF +printf "%s\n" "#define HWLOC_VERSION_MINOR $HWLOC_VERSION_MINOR" >>confdefs.h HWLOC_VERSION_RELEASE=`sh "$HWLOC_top_srcdir/config/hwloc_get_version.sh" "$HWLOC_top_srcdir/VERSION" --release` -cat >>confdefs.h <<_ACEOF -#define HWLOC_VERSION_RELEASE $HWLOC_VERSION_RELEASE -_ACEOF +printf "%s\n" "#define HWLOC_VERSION_RELEASE $HWLOC_VERSION_RELEASE" >>confdefs.h HWLOC_VERSION_GREEK=`sh "$HWLOC_top_srcdir/config/hwloc_get_version.sh" "$HWLOC_top_srcdir/VERSION" --greek` -cat >>confdefs.h <<_ACEOF -#define HWLOC_VERSION_GREEK "$HWLOC_VERSION_GREEK" -_ACEOF +printf "%s\n" "#define HWLOC_VERSION_GREEK \"$HWLOC_VERSION_GREEK\"" >>confdefs.h HWLOC_RELEASE_DATE=`sh "$HWLOC_top_srcdir/config/hwloc_get_version.sh" "$HWLOC_top_srcdir/VERSION" --release-date` # Debug mode? - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if want hwloc maintainer support" >&5 -$as_echo_n "checking if want hwloc maintainer support... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if want hwloc maintainer support" >&5 +printf %s "checking if want hwloc maintainer support... " >&6; } hwloc_debug= # Unconditionally disable debug mode in embedded mode; if someone @@ -18538,34 +20190,38 @@ $as_echo_n "checking if want hwloc maintainer support... " >&6; } # option when configuring in embedded mode, and we wouldn't want # to hijack the enclosing application's --enable-debug configure # switch. - if test "$hwloc_mode" = "embedded"; then : + if test "$hwloc_mode" = "embedded" +then : hwloc_debug=0 hwloc_debug_msg="disabled (embedded mode)" fi - if test "$hwloc_debug" = "" -a "$enable_debug" = "yes"; then : + if test "$hwloc_debug" = "" -a "$enable_debug" = "yes" +then : hwloc_debug=1 hwloc_debug_msg="enabled" fi - if test "$hwloc_debug" = ""; then : + if test "$hwloc_debug" = "" +then : hwloc_debug=0 hwloc_debug_msg="disabled" fi # Grr; we use #ifndef for HWLOC_DEBUG! :-( - if test "$hwloc_debug" = "1"; then : - $as_echo "#define HWLOC_DEBUG 1" >>confdefs.h + if test "$hwloc_debug" = "1" +then : + printf "%s\n" "#define HWLOC_DEBUG 1" >>confdefs.h fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hwloc_debug_msg" >&5 -$as_echo "$hwloc_debug_msg" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hwloc_debug_msg" >&5 +printf "%s\n" "$hwloc_debug_msg" >&6; } # We need to set a path for header, etc files depending on whether # we're standalone or embedded. this is taken care of by HWLOC_EMBEDDED. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hwloc directory prefix" >&5 -$as_echo_n "checking for hwloc directory prefix... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: (none)" >&5 -$as_echo "(none)" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for hwloc directory prefix" >&5 +printf %s "checking for hwloc directory prefix... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: (none)" >&5 +printf "%s\n" "(none)" >&6; } # Note that private/config.h *MUST* be listed first so that it # becomes the "main" config header file. Any AC-CONFIG-HEADERS @@ -18577,60 +20233,61 @@ $as_echo "(none)" >&6; } # What prefix are we using? - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hwloc symbol prefix" >&5 -$as_echo_n "checking for hwloc symbol prefix... " >&6; } - if test "$hwloc_symbol_prefix_value" = ""; then : - if test "$with_hwloc_symbol_prefix" = ""; then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for hwloc symbol prefix" >&5 +printf %s "checking for hwloc symbol prefix... " >&6; } + if test "$hwloc_symbol_prefix_value" = "" +then : + if test "$with_hwloc_symbol_prefix" = "" +then : hwloc_symbol_prefix_value=hwloc_ -else +else $as_nop hwloc_symbol_prefix_value=$with_hwloc_symbol_prefix fi fi -cat >>confdefs.h <<_ACEOF -#define HWLOC_SYM_PREFIX $hwloc_symbol_prefix_value -_ACEOF +printf "%s\n" "#define HWLOC_SYM_PREFIX $hwloc_symbol_prefix_value" >>confdefs.h # Ensure to [] escape the whole next line so that we can get the # proper tr tokens hwloc_symbol_prefix_value_caps="`echo $hwloc_symbol_prefix_value | tr '[:lower:]' '[:upper:]'`" -cat >>confdefs.h <<_ACEOF -#define HWLOC_SYM_PREFIX_CAPS $hwloc_symbol_prefix_value_caps -_ACEOF +printf "%s\n" "#define HWLOC_SYM_PREFIX_CAPS $hwloc_symbol_prefix_value_caps" >>confdefs.h - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hwloc_symbol_prefix_value" >&5 -$as_echo "$hwloc_symbol_prefix_value" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hwloc_symbol_prefix_value" >&5 +printf "%s\n" "$hwloc_symbol_prefix_value" >&6; } # Give an easy #define to know if we need to transform all the # hwloc names - if test "$hwloc_symbol_prefix_value" = "hwloc_"; then : - $as_echo "#define HWLOC_SYM_TRANSFORM 0" >>confdefs.h + if test "$hwloc_symbol_prefix_value" = "hwloc_" +then : + printf "%s\n" "#define HWLOC_SYM_TRANSFORM 0" >>confdefs.h -else - $as_echo "#define HWLOC_SYM_TRANSFORM 1" >>confdefs.h +else $as_nop + printf "%s\n" "#define HWLOC_SYM_TRANSFORM 1" >>confdefs.h fi - # Disabled for Charm++ due to https://github.com/UIUC-PPL/charm/issues/2606 # hwloc 2.0+ requires a C99 compliant compiler - #AC_PROG_CC_C99 - # The result of AC_PROG_CC_C99 is stored in ac_cv_prog_cc_c99 - #if test "x$ac_cv_prog_cc_c99" = xno ; then - # AC_MSG_WARN([hwloc requires a C99 compiler]) - # AC_MSG_ERROR([Aborting.]) - #fi + # AC_PROG_CC_C99 obsolete, detected inside AC_PROG_CC, since autoconf 2.70 + + # The C99 result of AC_PROG_CC>=2.70 or AC_PROG_CC_C99 is stored in ac_cv_prog_cc_c99 + if test "x$ac_cv_prog_cc_c99" = xno ; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: hwloc requires a C99 compiler" >&5 +printf "%s\n" "$as_me: WARNING: hwloc requires a C99 compiler" >&2;} + as_fn_error $? "Aborting." "$LINENO" 5 + fi # GCC specifics. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the C compiler vendor" >&5 -$as_echo_n "checking for the C compiler vendor... " >&6; } -if ${hwloc_cv_c_compiler_vendor+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the C compiler vendor" >&5 +printf %s "checking for the C compiler vendor... " >&6; } +if test ${hwloc_cv_c_compiler_vendor+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -18645,7 +20302,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu # check Intel and Android before checking for GNU. # Android - if test "$hwloc_check_compiler_vendor_result" = "unknown"; then : + if test "$hwloc_check_compiler_vendor_result" = "unknown" +then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -18655,14 +20313,16 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu choke me #endif _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : hwloc_check_compiler_vendor_result="android" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi # Intel - if test "$hwloc_check_compiler_vendor_result" = "unknown"; then : + if test "$hwloc_check_compiler_vendor_result" = "unknown" +then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -18672,14 +20332,16 @@ fi choke me #endif _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : hwloc_check_compiler_vendor_result="intel" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi # Portland Group - if test "$hwloc_check_compiler_vendor_result" = "unknown"; then : + if test "$hwloc_check_compiler_vendor_result" = "unknown" +then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -18689,14 +20351,16 @@ fi choke me #endif _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : hwloc_check_compiler_vendor_result="portland group" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi # Borland Turbo C - if test "$hwloc_check_compiler_vendor_result" = "unknown"; then : + if test "$hwloc_check_compiler_vendor_result" = "unknown" +then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -18706,14 +20370,16 @@ fi choke me #endif _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : hwloc_check_compiler_vendor_result="borland" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi # Borland C++ - if test "$hwloc_check_compiler_vendor_result" = "unknown"; then : + if test "$hwloc_check_compiler_vendor_result" = "unknown" +then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -18723,14 +20389,16 @@ fi choke me #endif _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : hwloc_check_compiler_vendor_result="borland" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi # Comeau C++ - if test "$hwloc_check_compiler_vendor_result" = "unknown"; then : + if test "$hwloc_check_compiler_vendor_result" = "unknown" +then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -18740,15 +20408,17 @@ fi choke me #endif _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : hwloc_check_compiler_vendor_result="comeau" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi # Compaq C/C++ # OSF part actually not needed anymore but doesn't hurt - if test "$hwloc_check_compiler_vendor_result" = "unknown"; then : + if test "$hwloc_check_compiler_vendor_result" = "unknown" +then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -18758,9 +20428,10 @@ fi choke me #endif _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : hwloc_check_compiler_vendor_result="compaq" -else +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -18770,9 +20441,10 @@ else choke me #endif _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : hwloc_check_compiler_vendor_result="compaq" -else +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -18782,18 +20454,20 @@ else choke me #endif _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : hwloc_check_compiler_vendor_result="compaq" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi # Cray C/C++ - if test "$hwloc_check_compiler_vendor_result" = "unknown"; then : + if test "$hwloc_check_compiler_vendor_result" = "unknown" +then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -18803,14 +20477,16 @@ fi choke me #endif _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : hwloc_check_compiler_vendor_result="cray" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi # Diab C/C++ - if test "$hwloc_check_compiler_vendor_result" = "unknown"; then : + if test "$hwloc_check_compiler_vendor_result" = "unknown" +then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -18820,14 +20496,16 @@ fi choke me #endif _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : hwloc_check_compiler_vendor_result="diab" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi # Digital Mars - if test "$hwloc_check_compiler_vendor_result" = "unknown"; then : + if test "$hwloc_check_compiler_vendor_result" = "unknown" +then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -18837,14 +20515,16 @@ fi choke me #endif _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : hwloc_check_compiler_vendor_result="digital mars" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi # HP ANSI C / aC++ - if test "$hwloc_check_compiler_vendor_result" = "unknown"; then : + if test "$hwloc_check_compiler_vendor_result" = "unknown" +then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -18854,14 +20534,16 @@ fi choke me #endif _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : hwloc_check_compiler_vendor_result="hp" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi # IBM XL C/C++ - if test "$hwloc_check_compiler_vendor_result" = "unknown"; then : + if test "$hwloc_check_compiler_vendor_result" = "unknown" +then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -18871,9 +20553,10 @@ fi choke me #endif _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : hwloc_check_compiler_vendor_result="ibm" -else +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -18883,16 +20566,18 @@ else choke me #endif _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : hwloc_check_compiler_vendor_result="ibm" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi # KAI C++ (rest in peace) - if test "$hwloc_check_compiler_vendor_result" = "unknown"; then : + if test "$hwloc_check_compiler_vendor_result" = "unknown" +then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -18902,14 +20587,16 @@ fi choke me #endif _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : hwloc_check_compiler_vendor_result="kai" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi # LCC - if test "$hwloc_check_compiler_vendor_result" = "unknown"; then : + if test "$hwloc_check_compiler_vendor_result" = "unknown" +then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -18919,14 +20606,16 @@ fi choke me #endif _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : hwloc_check_compiler_vendor_result="lcc" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi # MetaWare High C/C++ - if test "$hwloc_check_compiler_vendor_result" = "unknown"; then : + if test "$hwloc_check_compiler_vendor_result" = "unknown" +then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -18936,14 +20625,16 @@ fi choke me #endif _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : hwloc_check_compiler_vendor_result="metaware high" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi # Metrowerks Codewarrior - if test "$hwloc_check_compiler_vendor_result" = "unknown"; then : + if test "$hwloc_check_compiler_vendor_result" = "unknown" +then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -18953,14 +20644,16 @@ fi choke me #endif _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : hwloc_check_compiler_vendor_result="metrowerks" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi # MIPSpro (SGI) - if test "$hwloc_check_compiler_vendor_result" = "unknown"; then : + if test "$hwloc_check_compiler_vendor_result" = "unknown" +then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -18970,14 +20663,16 @@ fi choke me #endif _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : hwloc_check_compiler_vendor_result="sgi" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi # MPW C++ - if test "$hwloc_check_compiler_vendor_result" = "unknown"; then : + if test "$hwloc_check_compiler_vendor_result" = "unknown" +then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -18987,14 +20682,16 @@ fi choke me #endif _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : hwloc_check_compiler_vendor_result="mpw" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi # Microsoft - if test "$hwloc_check_compiler_vendor_result" = "unknown"; then : + if test "$hwloc_check_compiler_vendor_result" = "unknown" +then : # Always use C compiler when checking for Microsoft, as # Visual C++ doesn't recognize .cc as a C++ file. ac_ext=c @@ -19012,10 +20709,11 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu choke me #endif _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : hwloc_check_compiler_vendor_result="microsoft" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -19025,7 +20723,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu fi # Norcroft C - if test "$hwloc_check_compiler_vendor_result" = "unknown"; then : + if test "$hwloc_check_compiler_vendor_result" = "unknown" +then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -19035,14 +20734,16 @@ fi choke me #endif _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : hwloc_check_compiler_vendor_result="norcroft" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi # Pelles C - if test "$hwloc_check_compiler_vendor_result" = "unknown"; then : + if test "$hwloc_check_compiler_vendor_result" = "unknown" +then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -19052,14 +20753,16 @@ fi choke me #endif _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : hwloc_check_compiler_vendor_result="pelles" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi # SAS/C - if test "$hwloc_check_compiler_vendor_result" = "unknown"; then : + if test "$hwloc_check_compiler_vendor_result" = "unknown" +then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -19069,14 +20772,16 @@ fi choke me #endif _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : hwloc_check_compiler_vendor_result="sas" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi # Sun Workshop C/C++ - if test "$hwloc_check_compiler_vendor_result" = "unknown"; then : + if test "$hwloc_check_compiler_vendor_result" = "unknown" +then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -19086,14 +20791,16 @@ fi choke me #endif _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : hwloc_check_compiler_vendor_result="sun" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi # TenDRA C/C++ - if test "$hwloc_check_compiler_vendor_result" = "unknown"; then : + if test "$hwloc_check_compiler_vendor_result" = "unknown" +then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -19103,14 +20810,16 @@ fi choke me #endif _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : hwloc_check_compiler_vendor_result="tendra" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi # Tiny C - if test "$hwloc_check_compiler_vendor_result" = "unknown"; then : + if test "$hwloc_check_compiler_vendor_result" = "unknown" +then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -19120,14 +20829,16 @@ fi choke me #endif _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : hwloc_check_compiler_vendor_result="tiny" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi # USL C - if test "$hwloc_check_compiler_vendor_result" = "unknown"; then : + if test "$hwloc_check_compiler_vendor_result" = "unknown" +then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -19137,14 +20848,16 @@ fi choke me #endif _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : hwloc_check_compiler_vendor_result="usl" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi # Watcom C++ - if test "$hwloc_check_compiler_vendor_result" = "unknown"; then : + if test "$hwloc_check_compiler_vendor_result" = "unknown" +then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -19154,14 +20867,16 @@ fi choke me #endif _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : hwloc_check_compiler_vendor_result="watcom" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi # GNU - if test "$hwloc_check_compiler_vendor_result" = "unknown"; then : + if test "$hwloc_check_compiler_vendor_result" = "unknown" +then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -19171,10 +20886,11 @@ fi choke me #endif _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : hwloc_check_compiler_vendor_result="gnu" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi hwloc_cv_c_compiler_vendor="$hwloc_check_compiler_vendor_result" @@ -19187,8 +20903,8 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hwloc_cv_c_compiler_vendor" >&5 -$as_echo "$hwloc_cv_c_compiler_vendor" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hwloc_cv_c_compiler_vendor" >&5 +printf "%s\n" "$hwloc_cv_c_compiler_vendor" >&6; } hwloc_c_vendor="$hwloc_cv_c_compiler_vendor" @@ -19200,7 +20916,7 @@ $as_echo "$hwloc_cv_c_compiler_vendor" >&6; } # Enample system extensions for O_DIRECTORY, fdopen, fssl, etc. -$as_echo "#define _HPUX_SOURCE 1" >>confdefs.h +printf "%s\n" "#define _HPUX_SOURCE 1" >>confdefs.h ac_ext=c @@ -19220,17 +20936,19 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu # 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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5 +printf %s "checking size of void *... " >&6; } +if test ${ac_cv_sizeof_void_p+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default" +then : + +else $as_nop 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;} + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (void *) See \`config.log' for more details" "$LINENO" 5; } else @@ -19239,14 +20957,12 @@ See \`config.log' for more details" "$LINENO" 5; } fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5 -$as_echo "$ac_cv_sizeof_void_p" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5 +printf "%s\n" "$ac_cv_sizeof_void_p" >&6; } -cat >>confdefs.h <<_ACEOF -#define SIZEOF_VOID_P $ac_cv_sizeof_void_p -_ACEOF +printf "%s\n" "#define SIZEOF_VOID_P $ac_cv_sizeof_void_p" >>confdefs.h @@ -19259,34 +20975,36 @@ _ACEOF # # Check OS support # - { $as_echo "$as_me:${as_lineno-$LINENO}: checking which OS support to include" >&5 -$as_echo_n "checking which OS support to include... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which OS support to include" >&5 +printf %s "checking which OS support to include... " >&6; } case ${target} in powerpc64-bgq-linux*) # must be before Linux -$as_echo "#define HWLOC_BGQ_SYS 1" >>confdefs.h +printf "%s\n" "#define HWLOC_BGQ_SYS 1" >>confdefs.h hwloc_bgq=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: result: bgq" >&5 -$as_echo "bgq" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: bgq" >&5 +printf "%s\n" "bgq" >&6; } hwloc_components="$hwloc_components bgq" ;; *-*-linux*) -$as_echo "#define HWLOC_LINUX_SYS 1" >>confdefs.h +printf "%s\n" "#define HWLOC_LINUX_SYS 1" >>confdefs.h + + HWLOC_HAVE_LINUX=1 hwloc_linux=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: result: Linux" >&5 -$as_echo "Linux" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Linux" >&5 +printf "%s\n" "Linux" >&6; } hwloc_components="$hwloc_components linux" if test "x$enable_io" != xno; then -$as_echo "#define HWLOC_HAVE_LINUXIO 1" >>confdefs.h +printf "%s\n" "#define HWLOC_HAVE_LINUXIO 1" >>confdefs.h hwloc_linuxio_happy=yes if test x$enable_pci != xno; then -$as_echo "#define HWLOC_HAVE_LINUXPCI 1" >>confdefs.h +printf "%s\n" "#define HWLOC_HAVE_LINUXPCI 1" >>confdefs.h hwloc_linuxpci_happy=yes fi @@ -19294,98 +21012,98 @@ $as_echo "#define HWLOC_HAVE_LINUXPCI 1" >>confdefs.h ;; *-*-irix*) -$as_echo "#define HWLOC_IRIX_SYS 1" >>confdefs.h +printf "%s\n" "#define HWLOC_IRIX_SYS 1" >>confdefs.h hwloc_irix=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: result: IRIX" >&5 -$as_echo "IRIX" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: IRIX" >&5 +printf "%s\n" "IRIX" >&6; } # no irix component yet ;; *-*-darwin*) -$as_echo "#define HWLOC_DARWIN_SYS 1" >>confdefs.h +printf "%s\n" "#define HWLOC_DARWIN_SYS 1" >>confdefs.h hwloc_darwin=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: result: Darwin" >&5 -$as_echo "Darwin" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Darwin" >&5 +printf "%s\n" "Darwin" >&6; } hwloc_components="$hwloc_components darwin" ;; *-*-solaris*) -$as_echo "#define HWLOC_SOLARIS_SYS 1" >>confdefs.h +printf "%s\n" "#define HWLOC_SOLARIS_SYS 1" >>confdefs.h hwloc_solaris=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: result: Solaris" >&5 -$as_echo "Solaris" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Solaris" >&5 +printf "%s\n" "Solaris" >&6; } hwloc_components="$hwloc_components solaris" ;; *-*-aix*) -$as_echo "#define HWLOC_AIX_SYS 1" >>confdefs.h +printf "%s\n" "#define HWLOC_AIX_SYS 1" >>confdefs.h hwloc_aix=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: result: AIX" >&5 -$as_echo "AIX" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: AIX" >&5 +printf "%s\n" "AIX" >&6; } hwloc_components="$hwloc_components aix" ;; *-*-hpux*) -$as_echo "#define HWLOC_HPUX_SYS 1" >>confdefs.h +printf "%s\n" "#define HWLOC_HPUX_SYS 1" >>confdefs.h hwloc_hpux=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: result: HP-UX" >&5 -$as_echo "HP-UX" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: HP-UX" >&5 +printf "%s\n" "HP-UX" >&6; } hwloc_components="$hwloc_components hpux" ;; *-*-mingw*|*-*-cygwin*) -$as_echo "#define HWLOC_WIN_SYS 1" >>confdefs.h +printf "%s\n" "#define HWLOC_WIN_SYS 1" >>confdefs.h hwloc_windows=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5 -$as_echo "Windows" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Windows" >&5 +printf "%s\n" "Windows" >&6; } hwloc_components="$hwloc_components windows" ;; *-*-*freebsd*) -$as_echo "#define HWLOC_FREEBSD_SYS 1" >>confdefs.h +printf "%s\n" "#define HWLOC_FREEBSD_SYS 1" >>confdefs.h hwloc_freebsd=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: result: FreeBSD" >&5 -$as_echo "FreeBSD" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: FreeBSD" >&5 +printf "%s\n" "FreeBSD" >&6; } hwloc_components="$hwloc_components freebsd" ;; *-*-*netbsd*) -$as_echo "#define HWLOC_NETBSD_SYS 1" >>confdefs.h +printf "%s\n" "#define HWLOC_NETBSD_SYS 1" >>confdefs.h hwloc_netbsd=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: result: NetBSD" >&5 -$as_echo "NetBSD" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: NetBSD" >&5 +printf "%s\n" "NetBSD" >&6; } hwloc_components="$hwloc_components netbsd" ;; *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: Unsupported! ($target)" >&5 -$as_echo "Unsupported! ($target)" >&6; } - -$as_echo "#define HWLOC_UNSUPPORTED_SYS 1" >>confdefs.h - - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ***********************************************************" >&5 -$as_echo "$as_me: WARNING: ***********************************************************" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** hwloc does not support this system." >&5 -$as_echo "$as_me: WARNING: *** hwloc does not support this system." >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** hwloc will *attempt* to build (but it may not work)." >&5 -$as_echo "$as_me: WARNING: *** hwloc will *attempt* to build (but it may not work)." >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** hwloc run-time results may be reduced to showing just one processor," >&5 -$as_echo "$as_me: WARNING: *** hwloc run-time results may be reduced to showing just one processor," >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** and binding will not be supported." >&5 -$as_echo "$as_me: WARNING: *** and binding will not be supported." >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** You have been warned." >&5 -$as_echo "$as_me: WARNING: *** You have been warned." >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Pausing to give you time to read this message..." >&5 -$as_echo "$as_me: WARNING: *** Pausing to give you time to read this message..." >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ***********************************************************" >&5 -$as_echo "$as_me: WARNING: ***********************************************************" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Unsupported! ($target)" >&5 +printf "%s\n" "Unsupported! ($target)" >&6; } + +printf "%s\n" "#define HWLOC_UNSUPPORTED_SYS 1" >>confdefs.h + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: ***********************************************************" >&5 +printf "%s\n" "$as_me: WARNING: ***********************************************************" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: *** hwloc does not support this system." >&5 +printf "%s\n" "$as_me: WARNING: *** hwloc does not support this system." >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: *** hwloc will *attempt* to build (but it may not work)." >&5 +printf "%s\n" "$as_me: WARNING: *** hwloc will *attempt* to build (but it may not work)." >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: *** hwloc run-time results may be reduced to showing just one processor," >&5 +printf "%s\n" "$as_me: WARNING: *** hwloc run-time results may be reduced to showing just one processor," >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: *** and binding will not be supported." >&5 +printf "%s\n" "$as_me: WARNING: *** and binding will not be supported." >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: *** You have been warned." >&5 +printf "%s\n" "$as_me: WARNING: *** You have been warned." >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: *** Pausing to give you time to read this message..." >&5 +printf "%s\n" "$as_me: WARNING: *** Pausing to give you time to read this message..." >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: ***********************************************************" >&5 +printf "%s\n" "$as_me: WARNING: ***********************************************************" >&2;} sleep 10 ;; esac @@ -19393,43 +21111,43 @@ $as_echo "$as_me: WARNING: ***************************************************** # # Check CPU support # - { $as_echo "$as_me:${as_lineno-$LINENO}: checking which CPU support to include" >&5 -$as_echo_n "checking which CPU support to include... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which CPU support to include" >&5 +printf %s "checking which CPU support to include... " >&6; } case ${target} in i*86-*-*|x86_64-*-*|amd64-*-*) case ${ac_cv_sizeof_void_p} in 4) -$as_echo "#define HWLOC_X86_32_ARCH 1" >>confdefs.h +printf "%s\n" "#define HWLOC_X86_32_ARCH 1" >>confdefs.h hwloc_x86_32=yes HWLOC_MS_LIB_ARCH=X86 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: x86_32" >&5 -$as_echo "x86_32" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: x86_32" >&5 +printf "%s\n" "x86_32" >&6; } ;; 8) -$as_echo "#define HWLOC_X86_64_ARCH 1" >>confdefs.h +printf "%s\n" "#define HWLOC_X86_64_ARCH 1" >>confdefs.h hwloc_x86_64=yes HWLOC_MS_LIB_ARCH=X64 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: x86_64" >&5 -$as_echo "x86_64" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: x86_64" >&5 +printf "%s\n" "x86_64" >&6; } ;; *) -$as_echo "#define HWLOC_X86_64_ARCH 1" >>confdefs.h +printf "%s\n" "#define HWLOC_X86_64_ARCH 1" >>confdefs.h hwloc_x86_64=yes HWLOC_MS_LIB_ARCH=X64 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown -- assuming x86_64" >&5 -$as_echo "unknown -- assuming x86_64" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unknown -- assuming x86_64" >&5 +printf "%s\n" "unknown -- assuming x86_64" >&6; } ;; esac ;; *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5 -$as_echo "unknown" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unknown" >&5 +printf "%s\n" "unknown" >&6; } ;; esac @@ -19438,17 +21156,19 @@ $as_echo "unknown" >&6; } # 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 unsigned long" >&5 -$as_echo_n "checking size of unsigned long... " >&6; } -if ${ac_cv_sizeof_unsigned_long+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then : - -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5 +printf %s "checking size of unsigned long... " >&6; } +if test ${ac_cv_sizeof_unsigned_long+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default" +then : + +else $as_nop if test "$ac_cv_type_unsigned_long" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (unsigned long) See \`config.log' for more details" "$LINENO" 5; } else @@ -19457,36 +21177,34 @@ See \`config.log' for more details" "$LINENO" 5; } fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5 -$as_echo "$ac_cv_sizeof_unsigned_long" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5 +printf "%s\n" "$ac_cv_sizeof_unsigned_long" >&6; } -cat >>confdefs.h <<_ACEOF -#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long -_ACEOF +printf "%s\n" "#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define HWLOC_SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long -_ACEOF +printf "%s\n" "#define HWLOC_SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long" >>confdefs.h # 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 unsigned int" >&5 -$as_echo_n "checking size of unsigned int... " >&6; } -if ${ac_cv_sizeof_unsigned_int+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned int))" "ac_cv_sizeof_unsigned_int" "$ac_includes_default"; then : - -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of unsigned int" >&5 +printf %s "checking size of unsigned int... " >&6; } +if test ${ac_cv_sizeof_unsigned_int+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned int))" "ac_cv_sizeof_unsigned_int" "$ac_includes_default" +then : + +else $as_nop if test "$ac_cv_type_unsigned_int" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (unsigned int) See \`config.log' for more details" "$LINENO" 5; } else @@ -19495,89 +21213,90 @@ See \`config.log' for more details" "$LINENO" 5; } fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_int" >&5 -$as_echo "$ac_cv_sizeof_unsigned_int" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_int" >&5 +printf "%s\n" "$ac_cv_sizeof_unsigned_int" >&6; } -cat >>confdefs.h <<_ACEOF -#define SIZEOF_UNSIGNED_INT $ac_cv_sizeof_unsigned_int -_ACEOF +printf "%s\n" "#define SIZEOF_UNSIGNED_INT $ac_cv_sizeof_unsigned_int" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define HWLOC_SIZEOF_UNSIGNED_INT $ac_cv_sizeof_unsigned_int -_ACEOF +printf "%s\n" "#define HWLOC_SIZEOF_UNSIGNED_INT $ac_cv_sizeof_unsigned_int" >>confdefs.h # # Check for compiler attributes and visibility # - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __attribute__" >&5 -$as_echo_n "checking for __attribute__... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __attribute__" >&5 +printf %s "checking for __attribute__... " >&6; } - if ${hwloc_cv___attribute__+:} false; then : - $as_echo_n "(cached) " >&6 -else + if test ${hwloc_cv___attribute__+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include - /* Check for the longest available __attribute__ (since gcc-2.3) */ - struct foo { - char a; - int x[2] __attribute__ ((__packed__)); - }; + + #include int -main () +main (void) { + /* Check for the longest available __attribute__ (since gcc-2.3) */ + struct foo { + char a; + int x2 __attribute__ ((__packed__)); + }; + ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : + +else $as_nop hwloc_cv___attribute__=1 -else - hwloc_cv___attribute__=0 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext if test "$hwloc_cv___attribute__" = "1" ; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include - /* Check for the longest available __attribute__ (since gcc-2.3) */ - struct foo { - char a; - int x[2] __attribute__ ((__packed__)); - }; + + #include int -main () +main (void) { + /* Check for the longest available __attribute__ (since gcc-2.3) */ + struct foo { + char a; + int x2 __attribute__ ((__packed__)); + }; + ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : + +else $as_nop hwloc_cv___attribute__=1 -else - hwloc_cv___attribute__=0 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi -cat >>confdefs.h <<_ACEOF -#define HWLOC_HAVE_ATTRIBUTE $hwloc_cv___attribute__ -_ACEOF +printf "%s\n" "#define HWLOC_HAVE_ATTRIBUTE $hwloc_cv___attribute__" >>confdefs.h # @@ -19585,13 +21304,14 @@ _ACEOF # attributed are supported. # if test "$hwloc_cv___attribute__" = "0" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } hwloc_cv___attribute__aligned=0 hwloc_cv___attribute__always_inline=0 hwloc_cv___attribute__cold=0 hwloc_cv___attribute__const=0 hwloc_cv___attribute__deprecated=0 + hwloc_cv___attribute__constructor=0 hwloc_cv___attribute__format=0 hwloc_cv___attribute__hot=0 hwloc_cv___attribute__malloc=0 @@ -19606,31 +21326,33 @@ $as_echo "no" >&6; } hwloc_cv___attribute__warn_unused_result=0 hwloc_cv___attribute__weak_alias=0 else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __attribute__(aligned)" >&5 -$as_echo_n "checking for __attribute__(aligned)... " >&6; } - if ${hwloc_cv___attribute__aligned+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __attribute__(aligned)" >&5 +printf %s "checking for __attribute__(aligned)... " >&6; } + if test ${hwloc_cv___attribute__aligned+y} +then : + printf %s "(cached) " >&6 +else $as_nop # # Try to compile using the C compiler # cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -struct foo { char text[4]; } __attribute__ ((__aligned__(8))); +struct foo { char text4; } __attribute__ ((__aligned__(8))); int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : # # In case we did succeed: Fine, but was this due to the @@ -19653,10 +21375,10 @@ if ac_fn_c_try_compile "$LINENO"; then : fi -else +else $as_nop hwloc_cv___attribute__aligned=0 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext # # If the attribute is supported by both compilers, @@ -19672,19 +21394,21 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { - int i=4711; - i=usage(&i); + int i=4711; + i=usage(&i); ; return 0; } + _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : hwloc_cv___attribute__aligned=0 -else +else $as_nop # # In case we did NOT succeed: Fine, but was this due to the @@ -19708,7 +21432,7 @@ else fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_c_werror_flag=$ac_c_werror_flag_safe CFLAGS=$CFLAGS_safe @@ -19718,11 +21442,11 @@ fi if test "$hwloc_cv___attribute__aligned" = "1" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -19730,11 +21454,12 @@ $as_echo "no" >&6; } # Ignored by PGI-6.2.5; -- recognized by output-parser # - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __attribute__(always_inline)" >&5 -$as_echo_n "checking for __attribute__(always_inline)... " >&6; } - if ${hwloc_cv___attribute__always_inline+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __attribute__(always_inline)" >&5 +printf %s "checking for __attribute__(always_inline)... " >&6; } + if test ${hwloc_cv___attribute__always_inline+y} +then : + printf %s "(cached) " >&6 +else $as_nop # # Try to compile using the C compiler @@ -19743,14 +21468,15 @@ else /* end confdefs.h. */ int foo (int arg) __attribute__ ((__always_inline__)); int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : # # In case we did succeed: Fine, but was this due to the @@ -19773,10 +21499,10 @@ if ac_fn_c_try_compile "$LINENO"; then : fi -else +else $as_nop hwloc_cv___attribute__always_inline=0 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext # # If the attribute is supported by both compilers, @@ -19792,19 +21518,21 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { - int i=4711; - i=usage(&i); + int i=4711; + i=usage(&i); ; return 0; } + _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : hwloc_cv___attribute__always_inline=0 -else +else $as_nop # # In case we did NOT succeed: Fine, but was this due to the @@ -19828,7 +21556,7 @@ else fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_c_werror_flag=$ac_c_werror_flag_safe CFLAGS=$CFLAGS_safe @@ -19838,20 +21566,21 @@ fi if test "$hwloc_cv___attribute__always_inline" = "1" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __attribute__(cold)" >&5 -$as_echo_n "checking for __attribute__(cold)... " >&6; } - if ${hwloc_cv___attribute__cold+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __attribute__(cold)" >&5 +printf %s "checking for __attribute__(cold)... " >&6; } + if test ${hwloc_cv___attribute__cold+y} +then : + printf %s "(cached) " >&6 +else $as_nop # # Try to compile using the C compiler @@ -19863,14 +21592,15 @@ else int foo(int arg1, int arg2) { return arg1 * arg2 + arg1; } int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : # # In case we did succeed: Fine, but was this due to the @@ -19893,10 +21623,10 @@ if ac_fn_c_try_compile "$LINENO"; then : fi -else +else $as_nop hwloc_cv___attribute__cold=0 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext # # If the attribute is supported by both compilers, @@ -19912,19 +21642,21 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { - int i=4711; - i=usage(&i); + int i=4711; + i=usage(&i); ; return 0; } + _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : hwloc_cv___attribute__cold=0 -else +else $as_nop # # In case we did NOT succeed: Fine, but was this due to the @@ -19948,7 +21680,7 @@ else fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_c_werror_flag=$ac_c_werror_flag_safe CFLAGS=$CFLAGS_safe @@ -19958,20 +21690,21 @@ fi if test "$hwloc_cv___attribute__cold" = "1" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __attribute__(const)" >&5 -$as_echo_n "checking for __attribute__(const)... " >&6; } - if ${hwloc_cv___attribute__const+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __attribute__(const)" >&5 +printf %s "checking for __attribute__(const)... " >&6; } + if test ${hwloc_cv___attribute__const+y} +then : + printf %s "(cached) " >&6 +else $as_nop # # Try to compile using the C compiler @@ -19983,14 +21716,15 @@ else int foo(int arg1, int arg2) { return arg1 * arg2 + arg1; } int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : # # In case we did succeed: Fine, but was this due to the @@ -20013,10 +21747,10 @@ if ac_fn_c_try_compile "$LINENO"; then : fi -else +else $as_nop hwloc_cv___attribute__const=0 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext # # If the attribute is supported by both compilers, @@ -20032,26 +21766,153 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { - int i=4711; - i=usage(&i); + int i=4711; + i=usage(&i); ; return 0; } + _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : hwloc_cv___attribute__const=0 -else +else $as_nop + + # + # In case we did NOT succeed: Fine, but was this due to the + # attribute being ignored? Grep for IgNoRe in conftest.err + # and if found, reset the hwloc_cv__attribute__var=0 + # + hwloc_cv___attribute__const=1 + + # Be safe for systems that have ancient Autoconf's (e.g., RHEL5) + + + if test -s conftest.err ; then + for i in ignore skip ; do + $GREP -iq $i conftest.err + if test "$?" = "0" ; then + hwloc_cv___attribute__const=0 + break; + fi + done + fi + + +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + + ac_c_werror_flag=$ac_c_werror_flag_safe + CFLAGS=$CFLAGS_safe + fi + +fi + + + if test "$hwloc_cv___attribute__const" = "1" ; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + fi + + + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __attribute__(deprecated)" >&5 +printf %s "checking for __attribute__(deprecated)... " >&6; } + if test ${hwloc_cv___attribute__deprecated+y} +then : + printf %s "(cached) " >&6 +else $as_nop + + # + # Try to compile using the C compiler + # + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + int foo(int arg1, int arg2) __attribute__ ((__deprecated__)); + int foo(int arg1, int arg2) { return arg1 * arg2 + arg1; } + +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + + # + # In case we did succeed: Fine, but was this due to the + # attribute being ignored/skipped? Grep for IgNoRe/skip in conftest.err + # and if found, reset the hwloc_cv__attribute__var=0 + # + hwloc_cv___attribute__deprecated=1 + + # Be safe for systems that have ancient Autoconf's (e.g., RHEL5) + + + if test -s conftest.err ; then + for i in ignore skip ; do + $GREP -iq $i conftest.err + if test "$?" = "0" ; then + hwloc_cv___attribute__deprecated=0 + break; + fi + done + fi + + +else $as_nop + hwloc_cv___attribute__deprecated=0 +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + + # + # If the attribute is supported by both compilers, + # try to recompile a *cross-check*, IFF defined. + # + if test '(' "$hwloc_cv___attribute__deprecated" = "1" -a "" != "" ')' ; then + ac_c_werror_flag_safe=$ac_c_werror_flag + ac_c_werror_flag="yes" + CFLAGS_safe=$CFLAGS + CFLAGS="$CFLAGS " + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ + + int i=4711; + i=usage(&i); + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + hwloc_cv___attribute__deprecated=0 +else $as_nop # # In case we did NOT succeed: Fine, but was this due to the # attribute being ignored? Grep for IgNoRe in conftest.err # and if found, reset the hwloc_cv__attribute__var=0 # - hwloc_cv___attribute__const=1 + hwloc_cv___attribute__deprecated=1 # Be safe for systems that have ancient Autoconf's (e.g., RHEL5) @@ -20060,7 +21921,7 @@ else for i in ignore skip ; do $GREP -iq $i conftest.err if test "$?" = "0" ; then - hwloc_cv___attribute__const=0 + hwloc_cv___attribute__deprecated=0 break; fi done @@ -20068,7 +21929,7 @@ else fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_c_werror_flag=$ac_c_werror_flag_safe CFLAGS=$CFLAGS_safe @@ -20077,22 +21938,22 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - if test "$hwloc_cv___attribute__const" = "1" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + if test "$hwloc_cv___attribute__deprecated" = "1" ; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __attribute__(deprecated)" >&5 -$as_echo_n "checking for __attribute__(deprecated)... " >&6; } - if ${hwloc_cv___attribute__deprecated+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __attribute__(constructor)" >&5 +printf %s "checking for __attribute__(constructor)... " >&6; } + if test ${hwloc_cv___attribute__constructor+y} +then : + printf %s "(cached) " >&6 +else $as_nop # # Try to compile using the C compiler @@ -20100,25 +21961,26 @@ else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - int foo(int arg1, int arg2) __attribute__ ((__deprecated__)); - int foo(int arg1, int arg2) { return arg1 * arg2 + arg1; } + void foo(void) __attribute__ ((__constructor__)); + void foo(void) { return; } int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : # # In case we did succeed: Fine, but was this due to the # attribute being ignored/skipped? Grep for IgNoRe/skip in conftest.err # and if found, reset the hwloc_cv__attribute__var=0 # - hwloc_cv___attribute__deprecated=1 + hwloc_cv___attribute__constructor=1 # Be safe for systems that have ancient Autoconf's (e.g., RHEL5) @@ -20127,23 +21989,23 @@ if ac_fn_c_try_compile "$LINENO"; then : for i in ignore skip ; do $GREP -iq $i conftest.err if test "$?" = "0" ; then - hwloc_cv___attribute__deprecated=0 + hwloc_cv___attribute__constructor=0 break; fi done fi -else - hwloc_cv___attribute__deprecated=0 +else $as_nop + hwloc_cv___attribute__constructor=0 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext # # If the attribute is supported by both compilers, # try to recompile a *cross-check*, IFF defined. # - if test '(' "$hwloc_cv___attribute__deprecated" = "1" -a "" != "" ')' ; then + if test '(' "$hwloc_cv___attribute__constructor" = "1" -a "" != "" ')' ; then ac_c_werror_flag_safe=$ac_c_werror_flag ac_c_werror_flag="yes" CFLAGS_safe=$CFLAGS @@ -20153,26 +22015,28 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { - int i=4711; - i=usage(&i); + int i=4711; + i=usage(&i); ; return 0; } + _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - hwloc_cv___attribute__deprecated=0 -else +if ac_fn_c_try_compile "$LINENO" +then : + hwloc_cv___attribute__constructor=0 +else $as_nop # # In case we did NOT succeed: Fine, but was this due to the # attribute being ignored? Grep for IgNoRe in conftest.err # and if found, reset the hwloc_cv__attribute__var=0 # - hwloc_cv___attribute__deprecated=1 + hwloc_cv___attribute__constructor=1 # Be safe for systems that have ancient Autoconf's (e.g., RHEL5) @@ -20181,7 +22045,7 @@ else for i in ignore skip ; do $GREP -iq $i conftest.err if test "$?" = "0" ; then - hwloc_cv___attribute__deprecated=0 + hwloc_cv___attribute__constructor=0 break; fi done @@ -20189,7 +22053,7 @@ else fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_c_werror_flag=$ac_c_werror_flag_safe CFLAGS=$CFLAGS_safe @@ -20198,12 +22062,12 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - if test "$hwloc_cv___attribute__deprecated" = "1" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + if test "$hwloc_cv___attribute__constructor" = "1" ; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -20219,11 +22083,12 @@ $as_echo "no" >&6; } ;; esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __attribute__(format)" >&5 -$as_echo_n "checking for __attribute__(format)... " >&6; } - if ${hwloc_cv___attribute__format+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __attribute__(format)" >&5 +printf %s "checking for __attribute__(format)... " >&6; } + if test ${hwloc_cv___attribute__format+y} +then : + printf %s "(cached) " >&6 +else $as_nop # # Try to compile using the C compiler @@ -20234,14 +22099,15 @@ else int this_printf (void *my_object, const char *my_format, ...) __attribute__ ((__format__ (__printf__, 2, 3))); int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : # # In case we did succeed: Fine, but was this due to the @@ -20264,10 +22130,10 @@ if ac_fn_c_try_compile "$LINENO"; then : fi -else +else $as_nop hwloc_cv___attribute__format=0 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext # # If the attribute is supported by both compilers, @@ -20301,19 +22167,21 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext int main(void); int -main () +main (void) { - int i=4711; - i=usage(&i); + int i=4711; + i=usage(&i); ; return 0; } + _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : hwloc_cv___attribute__format=0 -else +else $as_nop # # In case we did NOT succeed: Fine, but was this due to the @@ -20337,7 +22205,7 @@ else fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_c_werror_flag=$ac_c_werror_flag_safe CFLAGS=$CFLAGS_safe @@ -20347,20 +22215,21 @@ fi if test "$hwloc_cv___attribute__format" = "1" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __attribute__(hot)" >&5 -$as_echo_n "checking for __attribute__(hot)... " >&6; } - if ${hwloc_cv___attribute__hot+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __attribute__(hot)" >&5 +printf %s "checking for __attribute__(hot)... " >&6; } + if test ${hwloc_cv___attribute__hot+y} +then : + printf %s "(cached) " >&6 +else $as_nop # # Try to compile using the C compiler @@ -20372,14 +22241,15 @@ else int foo(int arg1, int arg2) { return arg1 * arg2 + arg1; } int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : # # In case we did succeed: Fine, but was this due to the @@ -20402,10 +22272,10 @@ if ac_fn_c_try_compile "$LINENO"; then : fi -else +else $as_nop hwloc_cv___attribute__hot=0 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext # # If the attribute is supported by both compilers, @@ -20421,19 +22291,21 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { - int i=4711; - i=usage(&i); + int i=4711; + i=usage(&i); ; return 0; } + _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : hwloc_cv___attribute__hot=0 -else +else $as_nop # # In case we did NOT succeed: Fine, but was this due to the @@ -20457,7 +22329,7 @@ else fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_c_werror_flag=$ac_c_werror_flag_safe CFLAGS=$CFLAGS_safe @@ -20467,20 +22339,21 @@ fi if test "$hwloc_cv___attribute__hot" = "1" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __attribute__(malloc)" >&5 -$as_echo_n "checking for __attribute__(malloc)... " >&6; } - if ${hwloc_cv___attribute__malloc+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __attribute__(malloc)" >&5 +printf %s "checking for __attribute__(malloc)... " >&6; } + if test ${hwloc_cv___attribute__malloc+y} +then : + printf %s "(cached) " >&6 +else $as_nop # # Try to compile using the C compiler @@ -20495,14 +22368,15 @@ else int * foo(int arg1) { return (int*) malloc(arg1); } int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : # # In case we did succeed: Fine, but was this due to the @@ -20525,10 +22399,10 @@ if ac_fn_c_try_compile "$LINENO"; then : fi -else +else $as_nop hwloc_cv___attribute__malloc=0 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext # # If the attribute is supported by both compilers, @@ -20544,19 +22418,21 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { - int i=4711; - i=usage(&i); + int i=4711; + i=usage(&i); ; return 0; } + _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : hwloc_cv___attribute__malloc=0 -else +else $as_nop # # In case we did NOT succeed: Fine, but was this due to the @@ -20580,7 +22456,7 @@ else fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_c_werror_flag=$ac_c_werror_flag_safe CFLAGS=$CFLAGS_safe @@ -20590,11 +22466,11 @@ fi if test "$hwloc_cv___attribute__malloc" = "1" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -20606,11 +22482,12 @@ $as_echo "no" >&6; } # The test case is chosen to match our only use in topology-xml-*.c, and reproduces an xlc-13.1.0 bug. # - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __attribute__(may_alias)" >&5 -$as_echo_n "checking for __attribute__(may_alias)... " >&6; } - if ${hwloc_cv___attribute__may_alias+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __attribute__(may_alias)" >&5 +printf %s "checking for __attribute__(may_alias)... " >&6; } + if test ${hwloc_cv___attribute__may_alias+y} +then : + printf %s "(cached) " >&6 +else $as_nop # # Try to compile using the C compiler @@ -20619,14 +22496,15 @@ else /* end confdefs.h. */ struct { int i; } __attribute__ ((__may_alias__)) * p_value; int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : # # In case we did succeed: Fine, but was this due to the @@ -20649,10 +22527,10 @@ if ac_fn_c_try_compile "$LINENO"; then : fi -else +else $as_nop hwloc_cv___attribute__may_alias=0 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext # # If the attribute is supported by both compilers, @@ -20668,19 +22546,21 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { - int i=4711; - i=usage(&i); + int i=4711; + i=usage(&i); ; return 0; } + _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : hwloc_cv___attribute__may_alias=0 -else +else $as_nop # # In case we did NOT succeed: Fine, but was this due to the @@ -20704,7 +22584,7 @@ else fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_c_werror_flag=$ac_c_werror_flag_safe CFLAGS=$CFLAGS_safe @@ -20714,21 +22594,22 @@ fi if test "$hwloc_cv___attribute__may_alias" = "1" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __attribute__(no_instrument_function)" >&5 -$as_echo_n "checking for __attribute__(no_instrument_function)... " >&6; } - if ${hwloc_cv___attribute__no_instrument_function+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __attribute__(no_instrument_function)" >&5 +printf %s "checking for __attribute__(no_instrument_function)... " >&6; } + if test ${hwloc_cv___attribute__no_instrument_function+y} +then : + printf %s "(cached) " >&6 +else $as_nop # # Try to compile using the C compiler @@ -20737,14 +22618,15 @@ else /* end confdefs.h. */ int * foo(int arg1) __attribute__ ((__no_instrument_function__)); int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : # # In case we did succeed: Fine, but was this due to the @@ -20767,10 +22649,10 @@ if ac_fn_c_try_compile "$LINENO"; then : fi -else +else $as_nop hwloc_cv___attribute__no_instrument_function=0 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext # # If the attribute is supported by both compilers, @@ -20786,19 +22668,21 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { - int i=4711; - i=usage(&i); + int i=4711; + i=usage(&i); ; return 0; } + _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : hwloc_cv___attribute__no_instrument_function=0 -else +else $as_nop # # In case we did NOT succeed: Fine, but was this due to the @@ -20822,7 +22706,7 @@ else fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_c_werror_flag=$ac_c_werror_flag_safe CFLAGS=$CFLAGS_safe @@ -20832,11 +22716,11 @@ fi if test "$hwloc_cv___attribute__no_instrument_function" = "1" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -20857,11 +22741,12 @@ $as_echo "no" >&6; } ;; esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __attribute__(nonnull)" >&5 -$as_echo_n "checking for __attribute__(nonnull)... " >&6; } - if ${hwloc_cv___attribute__nonnull+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __attribute__(nonnull)" >&5 +printf %s "checking for __attribute__(nonnull)... " >&6; } + if test ${hwloc_cv___attribute__nonnull+y} +then : + printf %s "(cached) " >&6 +else $as_nop # # Try to compile using the C compiler @@ -20873,14 +22758,15 @@ else int square(int *arg) { return *arg; } int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : # # In case we did succeed: Fine, but was this due to the @@ -20903,10 +22789,10 @@ if ac_fn_c_try_compile "$LINENO"; then : fi -else +else $as_nop hwloc_cv___attribute__nonnull=0 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext # # If the attribute is supported by both compilers, @@ -20942,19 +22828,21 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext int main(void); int -main () +main (void) { - int i=4711; - i=usage(&i); + int i=4711; + i=usage(&i); ; return 0; } + _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : hwloc_cv___attribute__nonnull=0 -else +else $as_nop # # In case we did NOT succeed: Fine, but was this due to the @@ -20978,7 +22866,7 @@ else fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_c_werror_flag=$ac_c_werror_flag_safe CFLAGS=$CFLAGS_safe @@ -20988,21 +22876,22 @@ fi if test "$hwloc_cv___attribute__nonnull" = "1" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __attribute__(noreturn)" >&5 -$as_echo_n "checking for __attribute__(noreturn)... " >&6; } - if ${hwloc_cv___attribute__noreturn+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __attribute__(noreturn)" >&5 +printf %s "checking for __attribute__(noreturn)... " >&6; } + if test ${hwloc_cv___attribute__noreturn+y} +then : + printf %s "(cached) " >&6 +else $as_nop # # Try to compile using the C compiler @@ -21020,14 +22909,15 @@ else void fatal(int arg1) { exit(arg1); } int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : # # In case we did succeed: Fine, but was this due to the @@ -21050,10 +22940,10 @@ if ac_fn_c_try_compile "$LINENO"; then : fi -else +else $as_nop hwloc_cv___attribute__noreturn=0 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext # # If the attribute is supported by both compilers, @@ -21069,19 +22959,21 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { - int i=4711; - i=usage(&i); + int i=4711; + i=usage(&i); ; return 0; } + _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : hwloc_cv___attribute__noreturn=0 -else +else $as_nop # # In case we did NOT succeed: Fine, but was this due to the @@ -21105,7 +22997,257 @@ else fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + + ac_c_werror_flag=$ac_c_werror_flag_safe + CFLAGS=$CFLAGS_safe + fi + +fi + + + if test "$hwloc_cv___attribute__noreturn" = "1" ; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + fi + + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __attribute__(packed)" >&5 +printf %s "checking for __attribute__(packed)... " >&6; } + if test ${hwloc_cv___attribute__packed+y} +then : + printf %s "(cached) " >&6 +else $as_nop + + # + # Try to compile using the C compiler + # + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + struct foo { + char a; + int x2 __attribute__ ((__packed__)); + }; + +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + + # + # In case we did succeed: Fine, but was this due to the + # attribute being ignored/skipped? Grep for IgNoRe/skip in conftest.err + # and if found, reset the hwloc_cv__attribute__var=0 + # + hwloc_cv___attribute__packed=1 + + # Be safe for systems that have ancient Autoconf's (e.g., RHEL5) + + + if test -s conftest.err ; then + for i in ignore skip ; do + $GREP -iq $i conftest.err + if test "$?" = "0" ; then + hwloc_cv___attribute__packed=0 + break; + fi + done + fi + + +else $as_nop + hwloc_cv___attribute__packed=0 +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + + # + # If the attribute is supported by both compilers, + # try to recompile a *cross-check*, IFF defined. + # + if test '(' "$hwloc_cv___attribute__packed" = "1" -a "" != "" ')' ; then + ac_c_werror_flag_safe=$ac_c_werror_flag + ac_c_werror_flag="yes" + CFLAGS_safe=$CFLAGS + CFLAGS="$CFLAGS " + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ + + int i=4711; + i=usage(&i); + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + hwloc_cv___attribute__packed=0 +else $as_nop + + # + # In case we did NOT succeed: Fine, but was this due to the + # attribute being ignored? Grep for IgNoRe in conftest.err + # and if found, reset the hwloc_cv__attribute__var=0 + # + hwloc_cv___attribute__packed=1 + + # Be safe for systems that have ancient Autoconf's (e.g., RHEL5) + + + if test -s conftest.err ; then + for i in ignore skip ; do + $GREP -iq $i conftest.err + if test "$?" = "0" ; then + hwloc_cv___attribute__packed=0 + break; + fi + done + fi + + +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + + ac_c_werror_flag=$ac_c_werror_flag_safe + CFLAGS=$CFLAGS_safe + fi + +fi + + + if test "$hwloc_cv___attribute__packed" = "1" ; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + fi + + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __attribute__(pure)" >&5 +printf %s "checking for __attribute__(pure)... " >&6; } + if test ${hwloc_cv___attribute__pure+y} +then : + printf %s "(cached) " >&6 +else $as_nop + + # + # Try to compile using the C compiler + # + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + int square(int arg) __attribute__ ((__pure__)); + int square(int arg) { return arg * arg; } + +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + + # + # In case we did succeed: Fine, but was this due to the + # attribute being ignored/skipped? Grep for IgNoRe/skip in conftest.err + # and if found, reset the hwloc_cv__attribute__var=0 + # + hwloc_cv___attribute__pure=1 + + # Be safe for systems that have ancient Autoconf's (e.g., RHEL5) + + + if test -s conftest.err ; then + for i in ignore skip ; do + $GREP -iq $i conftest.err + if test "$?" = "0" ; then + hwloc_cv___attribute__pure=0 + break; + fi + done + fi + + +else $as_nop + hwloc_cv___attribute__pure=0 +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + + # + # If the attribute is supported by both compilers, + # try to recompile a *cross-check*, IFF defined. + # + if test '(' "$hwloc_cv___attribute__pure" = "1" -a "" != "" ')' ; then + ac_c_werror_flag_safe=$ac_c_werror_flag + ac_c_werror_flag="yes" + CFLAGS_safe=$CFLAGS + CFLAGS="$CFLAGS " + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ + + int i=4711; + i=usage(&i); + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + hwloc_cv___attribute__pure=0 +else $as_nop + + # + # In case we did NOT succeed: Fine, but was this due to the + # attribute being ignored? Grep for IgNoRe in conftest.err + # and if found, reset the hwloc_cv__attribute__var=0 + # + hwloc_cv___attribute__pure=1 + + # Be safe for systems that have ancient Autoconf's (e.g., RHEL5) + + + if test -s conftest.err ; then + for i in ignore skip ; do + $GREP -iq $i conftest.err + if test "$?" = "0" ; then + hwloc_cv___attribute__pure=0 + break; + fi + done + fi + + +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_c_werror_flag=$ac_c_werror_flag_safe CFLAGS=$CFLAGS_safe @@ -21114,21 +23256,39 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - if test "$hwloc_cv___attribute__noreturn" = "1" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + if test "$hwloc_cv___attribute__pure" = "1" ; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi + # + # Attribute sentinel: + # Ignored by the intel-9.1.045 -- recognized by cross-check + # intel-10.0beta works fine + # Ignored by PGI-6.2.5 (pgCC) -- recognized by output-parser and cross-check + # Ignored by pathcc-2.2.1 -- recognized by cross-check (through grep ignore) + # + HWLOC_ATTRIBUTE_CFLAGS= + case "$hwloc_c_vendor" in + gnu) + HWLOC_ATTRIBUTE_CFLAGS="-Wall" + ;; + intel) + # we do not want to get ignored attributes warnings + HWLOC_ATTRIBUTE_CFLAGS="-wd1292" + ;; + esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __attribute__(packed)" >&5 -$as_echo_n "checking for __attribute__(packed)... " >&6; } - if ${hwloc_cv___attribute__packed+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __attribute__(sentinel)" >&5 +printf %s "checking for __attribute__(sentinel)... " >&6; } + if test ${hwloc_cv___attribute__sentinel+y} +then : + printf %s "(cached) " >&6 +else $as_nop # # Try to compile using the C compiler @@ -21136,27 +23296,25 @@ else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - struct foo { - char a; - int x[2] __attribute__ ((__packed__)); - }; + int my_execlp(const char * file, const char *arg, ...) __attribute__ ((__sentinel__)); int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : # # In case we did succeed: Fine, but was this due to the # attribute being ignored/skipped? Grep for IgNoRe/skip in conftest.err # and if found, reset the hwloc_cv__attribute__var=0 # - hwloc_cv___attribute__packed=1 + hwloc_cv___attribute__sentinel=1 # Be safe for systems that have ancient Autoconf's (e.g., RHEL5) @@ -21165,52 +23323,74 @@ if ac_fn_c_try_compile "$LINENO"; then : for i in ignore skip ; do $GREP -iq $i conftest.err if test "$?" = "0" ; then - hwloc_cv___attribute__packed=0 + hwloc_cv___attribute__sentinel=0 break; fi done fi -else - hwloc_cv___attribute__packed=0 +else $as_nop + hwloc_cv___attribute__sentinel=0 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext # # If the attribute is supported by both compilers, # try to recompile a *cross-check*, IFF defined. # - if test '(' "$hwloc_cv___attribute__packed" = "1" -a "" != "" ')' ; then + if test '(' "$hwloc_cv___attribute__sentinel" = "1" -a " + static int usage(int * argument); + int my_execlp(const char * file, const char *arg, ...) __attribute__ ((__sentinel__)); + + static int usage(int * argument) { + void * last_arg_should_be_null = argument; + return my_execlp ("lala", "/home/there", last_arg_should_be_null); /* This should produce a warning */ + } + /* The autoconf-generated main-function is int main(), which produces a warning by itself */ + int main(void); + " != "" ')' ; then ac_c_werror_flag_safe=$ac_c_werror_flag ac_c_werror_flag="yes" CFLAGS_safe=$CFLAGS - CFLAGS="$CFLAGS " + CFLAGS="$CFLAGS $HWLOC_ATTRIBUTE_CFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ + static int usage(int * argument); + int my_execlp(const char * file, const char *arg, ...) __attribute__ ((__sentinel__)); + + static int usage(int * argument) { + void * last_arg_should_be_null = argument; + return my_execlp ("lala", "/home/there", last_arg_should_be_null); /* This should produce a warning */ + } + /* The autoconf-generated main-function is int main(), which produces a warning by itself */ + int main(void); + int -main () +main (void) { - int i=4711; - i=usage(&i); + int i=4711; + i=usage(&i); ; return 0; } + _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - hwloc_cv___attribute__packed=0 -else +if ac_fn_c_try_compile "$LINENO" +then : + hwloc_cv___attribute__sentinel=0 +else $as_nop # # In case we did NOT succeed: Fine, but was this due to the # attribute being ignored? Grep for IgNoRe in conftest.err # and if found, reset the hwloc_cv__attribute__var=0 # - hwloc_cv___attribute__packed=1 + hwloc_cv___attribute__sentinel=1 # Be safe for systems that have ancient Autoconf's (e.g., RHEL5) @@ -21219,7 +23399,7 @@ else for i in ignore skip ; do $GREP -iq $i conftest.err if test "$?" = "0" ; then - hwloc_cv___attribute__packed=0 + hwloc_cv___attribute__sentinel=0 break; fi done @@ -21227,7 +23407,7 @@ else fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_c_werror_flag=$ac_c_werror_flag_safe CFLAGS=$CFLAGS_safe @@ -21236,21 +23416,22 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - if test "$hwloc_cv___attribute__packed" = "1" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + if test "$hwloc_cv___attribute__sentinel" = "1" ; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __attribute__(pure)" >&5 -$as_echo_n "checking for __attribute__(pure)... " >&6; } - if ${hwloc_cv___attribute__pure+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __attribute__(unused)" >&5 +printf %s "checking for __attribute__(unused)... " >&6; } + if test ${hwloc_cv___attribute__unused+y} +then : + printf %s "(cached) " >&6 +else $as_nop # # Try to compile using the C compiler @@ -21258,25 +23439,26 @@ else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - int square(int arg) __attribute__ ((__pure__)); - int square(int arg) { return arg * arg; } + int square(int arg1 __attribute__ ((__unused__)), int arg2); + int square(int arg1, int arg2) { return arg2; } int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : # # In case we did succeed: Fine, but was this due to the # attribute being ignored/skipped? Grep for IgNoRe/skip in conftest.err # and if found, reset the hwloc_cv__attribute__var=0 # - hwloc_cv___attribute__pure=1 + hwloc_cv___attribute__unused=1 # Be safe for systems that have ancient Autoconf's (e.g., RHEL5) @@ -21285,23 +23467,23 @@ if ac_fn_c_try_compile "$LINENO"; then : for i in ignore skip ; do $GREP -iq $i conftest.err if test "$?" = "0" ; then - hwloc_cv___attribute__pure=0 + hwloc_cv___attribute__unused=0 break; fi done fi -else - hwloc_cv___attribute__pure=0 +else $as_nop + hwloc_cv___attribute__unused=0 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext # # If the attribute is supported by both compilers, # try to recompile a *cross-check*, IFF defined. # - if test '(' "$hwloc_cv___attribute__pure" = "1" -a "" != "" ')' ; then + if test '(' "$hwloc_cv___attribute__unused" = "1" -a "" != "" ')' ; then ac_c_werror_flag_safe=$ac_c_werror_flag ac_c_werror_flag="yes" CFLAGS_safe=$CFLAGS @@ -21311,26 +23493,28 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { - int i=4711; - i=usage(&i); + int i=4711; + i=usage(&i); ; return 0; } + _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - hwloc_cv___attribute__pure=0 -else +if ac_fn_c_try_compile "$LINENO" +then : + hwloc_cv___attribute__unused=0 +else $as_nop # # In case we did NOT succeed: Fine, but was this due to the # attribute being ignored? Grep for IgNoRe in conftest.err # and if found, reset the hwloc_cv__attribute__var=0 # - hwloc_cv___attribute__pure=1 + hwloc_cv___attribute__unused=1 # Be safe for systems that have ancient Autoconf's (e.g., RHEL5) @@ -21339,7 +23523,7 @@ else for i in ignore skip ; do $GREP -iq $i conftest.err if test "$?" = "0" ; then - hwloc_cv___attribute__pure=0 + hwloc_cv___attribute__unused=0 break; fi done @@ -21347,7 +23531,7 @@ else fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_c_werror_flag=$ac_c_werror_flag_safe CFLAGS=$CFLAGS_safe @@ -21356,20 +23540,19 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - if test "$hwloc_cv___attribute__pure" = "1" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + if test "$hwloc_cv___attribute__unused" = "1" ; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi + # - # Attribute sentinel: - # Ignored by the intel-9.1.045 -- recognized by cross-check - # intel-10.0beta works fine - # Ignored by PGI-6.2.5 (pgCC) -- recognized by output-parser and cross-check + # Attribute warn_unused_result: + # Ignored by the intel-compiler 9.1.045 -- recognized by cross-check # Ignored by pathcc-2.2.1 -- recognized by cross-check (through grep ignore) # HWLOC_ATTRIBUTE_CFLAGS= @@ -21383,11 +23566,12 @@ $as_echo "no" >&6; } ;; esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __attribute__(sentinel)" >&5 -$as_echo_n "checking for __attribute__(sentinel)... " >&6; } - if ${hwloc_cv___attribute__sentinel+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __attribute__(warn_unused_result)" >&5 +printf %s "checking for __attribute__(warn_unused_result)... " >&6; } + if test ${hwloc_cv___attribute__warn_unused_result+y} +then : + printf %s "(cached) " >&6 +else $as_nop # # Try to compile using the C compiler @@ -21395,24 +23579,26 @@ else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - int my_execlp(const char * file, const char *arg, ...) __attribute__ ((__sentinel__)); + int foo(int arg) __attribute__ ((__warn_unused_result__)); + int foo(int arg) { return arg + 3; } int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : # # In case we did succeed: Fine, but was this due to the # attribute being ignored/skipped? Grep for IgNoRe/skip in conftest.err # and if found, reset the hwloc_cv__attribute__var=0 # - hwloc_cv___attribute__sentinel=1 + hwloc_cv___attribute__warn_unused_result=1 # Be safe for systems that have ancient Autoconf's (e.g., RHEL5) @@ -21421,30 +23607,32 @@ if ac_fn_c_try_compile "$LINENO"; then : for i in ignore skip ; do $GREP -iq $i conftest.err if test "$?" = "0" ; then - hwloc_cv___attribute__sentinel=0 + hwloc_cv___attribute__warn_unused_result=0 break; fi done fi -else - hwloc_cv___attribute__sentinel=0 +else $as_nop + hwloc_cv___attribute__warn_unused_result=0 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext # # If the attribute is supported by both compilers, # try to recompile a *cross-check*, IFF defined. # - if test '(' "$hwloc_cv___attribute__sentinel" = "1" -a " + if test '(' "$hwloc_cv___attribute__warn_unused_result" = "1" -a " static int usage(int * argument); - int my_execlp(const char * file, const char *arg, ...) __attribute__ ((__sentinel__)); + int foo(int arg) __attribute__ ((__warn_unused_result__)); + int foo(int arg) { return arg + 3; } static int usage(int * argument) { - void * last_arg_should_be_null = argument; - return my_execlp ("lala", "/home/there", last_arg_should_be_null); /* This should produce a warning */ + foo (*argument); /* Should produce an unused result warning */ + return 0; } + /* The autoconf-generated main-function is int main(), which produces a warning by itself */ int main(void); " != "" ')' ; then @@ -21457,36 +23645,40 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext /* end confdefs.h. */ static int usage(int * argument); - int my_execlp(const char * file, const char *arg, ...) __attribute__ ((__sentinel__)); + int foo(int arg) __attribute__ ((__warn_unused_result__)); + int foo(int arg) { return arg + 3; } static int usage(int * argument) { - void * last_arg_should_be_null = argument; - return my_execlp ("lala", "/home/there", last_arg_should_be_null); /* This should produce a warning */ + foo (*argument); /* Should produce an unused result warning */ + return 0; } + /* The autoconf-generated main-function is int main(), which produces a warning by itself */ int main(void); int -main () +main (void) { - int i=4711; - i=usage(&i); + int i=4711; + i=usage(&i); ; return 0; } + _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - hwloc_cv___attribute__sentinel=0 -else +if ac_fn_c_try_compile "$LINENO" +then : + hwloc_cv___attribute__warn_unused_result=0 +else $as_nop # # In case we did NOT succeed: Fine, but was this due to the # attribute being ignored? Grep for IgNoRe in conftest.err # and if found, reset the hwloc_cv__attribute__var=0 # - hwloc_cv___attribute__sentinel=1 + hwloc_cv___attribute__warn_unused_result=1 # Be safe for systems that have ancient Autoconf's (e.g., RHEL5) @@ -21495,7 +23687,7 @@ else for i in ignore skip ; do $GREP -iq $i conftest.err if test "$?" = "0" ; then - hwloc_cv___attribute__sentinel=0 + hwloc_cv___attribute__warn_unused_result=0 break; fi done @@ -21503,7 +23695,7 @@ else fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_c_werror_flag=$ac_c_werror_flag_safe CFLAGS=$CFLAGS_safe @@ -21512,21 +23704,23 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - if test "$hwloc_cv___attribute__sentinel" = "1" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + if test "$hwloc_cv___attribute__warn_unused_result" = "1" ; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __attribute__(unused)" >&5 -$as_echo_n "checking for __attribute__(unused)... " >&6; } - if ${hwloc_cv___attribute__unused+:} false; then : - $as_echo_n "(cached) " >&6 -else + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __attribute__(weak_alias)" >&5 +printf %s "checking for __attribute__(weak_alias)... " >&6; } + if test ${hwloc_cv___attribute__weak_alias+y} +then : + printf %s "(cached) " >&6 +else $as_nop # # Try to compile using the C compiler @@ -21534,25 +23728,27 @@ else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - int square(int arg1 __attribute__ ((__unused__)), int arg2); - int square(int arg1, int arg2) { return arg2; } + int foo(int arg); + int foo(int arg) { return arg + 3; } + int foo2(int arg) __attribute__ ((__weak__, __alias__("foo"))); int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : # # In case we did succeed: Fine, but was this due to the # attribute being ignored/skipped? Grep for IgNoRe/skip in conftest.err # and if found, reset the hwloc_cv__attribute__var=0 # - hwloc_cv___attribute__unused=1 + hwloc_cv___attribute__weak_alias=1 # Be safe for systems that have ancient Autoconf's (e.g., RHEL5) @@ -21561,23 +23757,23 @@ if ac_fn_c_try_compile "$LINENO"; then : for i in ignore skip ; do $GREP -iq $i conftest.err if test "$?" = "0" ; then - hwloc_cv___attribute__unused=0 + hwloc_cv___attribute__weak_alias=0 break; fi done fi -else - hwloc_cv___attribute__unused=0 +else $as_nop + hwloc_cv___attribute__weak_alias=0 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext # # If the attribute is supported by both compilers, # try to recompile a *cross-check*, IFF defined. # - if test '(' "$hwloc_cv___attribute__unused" = "1" -a "" != "" ')' ; then + if test '(' "$hwloc_cv___attribute__weak_alias" = "1" -a "" != "" ')' ; then ac_c_werror_flag_safe=$ac_c_werror_flag ac_c_werror_flag="yes" CFLAGS_safe=$CFLAGS @@ -21587,26 +23783,28 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { - int i=4711; - i=usage(&i); + int i=4711; + i=usage(&i); ; return 0; } + _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - hwloc_cv___attribute__unused=0 -else +if ac_fn_c_try_compile "$LINENO" +then : + hwloc_cv___attribute__weak_alias=0 +else $as_nop # # In case we did NOT succeed: Fine, but was this due to the # attribute being ignored? Grep for IgNoRe in conftest.err # and if found, reset the hwloc_cv__attribute__var=0 # - hwloc_cv___attribute__unused=1 + hwloc_cv___attribute__weak_alias=1 # Be safe for systems that have ancient Autoconf's (e.g., RHEL5) @@ -21615,7 +23813,7 @@ else for i in ignore skip ; do $GREP -iq $i conftest.err if test "$?" = "0" ; then - hwloc_cv___attribute__unused=0 + hwloc_cv___attribute__weak_alias=0 break; fi done @@ -21623,3500 +23821,4235 @@ else fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - ac_c_werror_flag=$ac_c_werror_flag_safe - CFLAGS=$CFLAGS_safe - fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + + ac_c_werror_flag=$ac_c_werror_flag_safe + CFLAGS=$CFLAGS_safe + fi + +fi + + + if test "$hwloc_cv___attribute__weak_alias" = "1" ; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + fi + + + fi + + # Now that all the values are set, define them + + +printf "%s\n" "#define HWLOC_HAVE_ATTRIBUTE_ALIGNED $hwloc_cv___attribute__aligned" >>confdefs.h + + +printf "%s\n" "#define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE $hwloc_cv___attribute__always_inline" >>confdefs.h + + +printf "%s\n" "#define HWLOC_HAVE_ATTRIBUTE_COLD $hwloc_cv___attribute__cold" >>confdefs.h + + +printf "%s\n" "#define HWLOC_HAVE_ATTRIBUTE_CONST $hwloc_cv___attribute__const" >>confdefs.h + + +printf "%s\n" "#define HWLOC_HAVE_ATTRIBUTE_DEPRECATED $hwloc_cv___attribute__deprecated" >>confdefs.h + + +printf "%s\n" "#define HWLOC_HAVE_ATTRIBUTE_CONSTRUCTOR $hwloc_cv___attribute__constructor" >>confdefs.h + + +printf "%s\n" "#define HWLOC_HAVE_ATTRIBUTE_FORMAT $hwloc_cv___attribute__format" >>confdefs.h + + +printf "%s\n" "#define HWLOC_HAVE_ATTRIBUTE_HOT $hwloc_cv___attribute__hot" >>confdefs.h + + +printf "%s\n" "#define HWLOC_HAVE_ATTRIBUTE_MALLOC $hwloc_cv___attribute__malloc" >>confdefs.h + + +printf "%s\n" "#define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS $hwloc_cv___attribute__may_alias" >>confdefs.h + + +printf "%s\n" "#define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION $hwloc_cv___attribute__no_instrument_function" >>confdefs.h + + +printf "%s\n" "#define HWLOC_HAVE_ATTRIBUTE_NONNULL $hwloc_cv___attribute__nonnull" >>confdefs.h + + +printf "%s\n" "#define HWLOC_HAVE_ATTRIBUTE_NORETURN $hwloc_cv___attribute__noreturn" >>confdefs.h + + +printf "%s\n" "#define HWLOC_HAVE_ATTRIBUTE_PACKED $hwloc_cv___attribute__packed" >>confdefs.h + + +printf "%s\n" "#define HWLOC_HAVE_ATTRIBUTE_PURE $hwloc_cv___attribute__pure" >>confdefs.h + + +printf "%s\n" "#define HWLOC_HAVE_ATTRIBUTE_SENTINEL $hwloc_cv___attribute__sentinel" >>confdefs.h + + +printf "%s\n" "#define HWLOC_HAVE_ATTRIBUTE_UNUSED $hwloc_cv___attribute__unused" >>confdefs.h + + +printf "%s\n" "#define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT $hwloc_cv___attribute__warn_unused_result" >>confdefs.h + + +printf "%s\n" "#define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS $hwloc_cv___attribute__weak_alias" >>confdefs.h + + + + # Be safe for systems that have ancient Autoconf's (e.g., RHEL5) + + + # Check if the compiler has support for visibility, like some + # versions of gcc, icc, Sun Studio cc. + # Check whether --enable-visibility was given. +if test ${enable_visibility+y} +then : + enableval=$enable_visibility; +fi + + + case ${target} in + *-*-aix*|*-*-mingw*|*-*-cygwin*|*-*-hpux*) + enable_visibility=no + ;; + esac + + hwloc_visibility_define=0 + hwloc_msg="whether to enable symbol visibility" + if test "$enable_visibility" = "no"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking $hwloc_msg" >&5 +printf %s "checking $hwloc_msg... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no (disabled)" >&5 +printf "%s\n" "no (disabled)" >&6; } + else + CFLAGS_orig=$CFLAGS + + hwloc_add= + case "$hwloc_c_vendor" in + sun) + # Check using Sun Studio -xldscope=hidden flag + hwloc_add=-xldscope=hidden + CFLAGS="$CFLAGS_orig $hwloc_add -errwarn=%all" + ;; + + *) + # Check using -fvisibility=hidden + hwloc_add=-fvisibility=hidden + CFLAGS="$CFLAGS_orig $hwloc_add -Werror" + ;; + esac + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports $hwloc_add" >&5 +printf %s "checking if $CC supports $hwloc_add... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include + __attribute__((visibility("default"))) int foo; + +int +main (void) +{ +fprintf(stderr, "Hello, world\n"); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + if test -s conftest.err +then : + $GREP -iq visibility conftest.err + # If we find "visibility" in the stderr, then + # assume it doesn't work + if test "$?" = "0" +then : + hwloc_add= +fi +fi +else $as_nop + hwloc_add= +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + if test "$hwloc_add" = "" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } fi + CFLAGS=$CFLAGS_orig + HWLOC_VISIBILITY_CFLAGS=$hwloc_add - if test "$hwloc_cv___attribute__unused" = "1" ; 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; } + if test "$hwloc_add" != "" ; then + hwloc_visibility_define=1 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking $hwloc_msg" >&5 +printf %s "checking $hwloc_msg... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes (via $hwloc_add)" >&5 +printf "%s\n" "yes (via $hwloc_add)" >&6; } + elif test "$enable_visibility" = "yes"; then + as_fn_error $? "Symbol visibility support requested but compiler does not seem to support it. Aborting" "$LINENO" 5 + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking $hwloc_msg" >&5 +printf %s "checking $hwloc_msg... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no (unsupported)" >&5 +printf "%s\n" "no (unsupported)" >&6; } + fi + unset hwloc_add fi +printf "%s\n" "#define HWLOC_C_HAVE_VISIBILITY $hwloc_visibility_define" >>confdefs.h - # - # Attribute warn_unused_result: - # Ignored by the intel-compiler 9.1.045 -- recognized by cross-check - # Ignored by pathcc-2.2.1 -- recognized by cross-check (through grep ignore) - # - HWLOC_ATTRIBUTE_CFLAGS= - case "$hwloc_c_vendor" in - gnu) - HWLOC_ATTRIBUTE_CFLAGS="-Wall" - ;; - intel) - # we do not want to get ignored attributes warnings - HWLOC_ATTRIBUTE_CFLAGS="-wd1292" - ;; - esac - { $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 ${hwloc_cv___attribute__warn_unused_result+:} false; then : - $as_echo_n "(cached) " >&6 -else + HWLOC_CFLAGS="$HWLOC_FLAGS $HWLOC_VISIBILITY_CFLAGS" + if test "$HWLOC_VISIBILITY_CFLAGS" != "" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: \"$HWLOC_VISIBILITY_CFLAGS\" has been added to the hwloc CFLAGS" >&5 +printf "%s\n" "$as_me: WARNING: \"$HWLOC_VISIBILITY_CFLAGS\" has been added to the hwloc CFLAGS" >&2;} +fi - # - # Try to compile using the C compiler - # - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + # Make sure the compiler returns an error code when function arg + # count is wrong, otherwise sched_setaffinity checks may fail. + HWLOC_STRICT_ARGS_CFLAGS= + hwloc_args_check=0 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler rejects function calls with too many arguments" >&5 +printf %s "checking whether the C compiler rejects function calls with too many arguments... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - int foo(int arg) __attribute__ ((__warn_unused_result__)); - int foo(int arg) { return arg + 3; } + extern int one_arg(int x); + int foo(void) { return one_arg(1, 2); } int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +else $as_nop + hwloc_args_check=1 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler rejects function calls with too few arguments" >&5 +printf %s "checking whether the C compiler rejects function calls with too few arguments... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - # - # In case we did succeed: Fine, but was this due to the - # attribute being ignored/skipped? Grep for IgNoRe/skip in conftest.err - # and if found, reset the hwloc_cv__attribute__var=0 - # - hwloc_cv___attribute__warn_unused_result=1 + extern int two_arg(int x, int y); + int foo(void) { return two_arg(3); } - # Be safe for systems that have ancient Autoconf's (e.g., RHEL5) +int +main (void) +{ + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +else $as_nop + hwloc_args_check=`expr $hwloc_args_check + 1` + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + if test "$hwloc_args_check" != "2" +then : - if test -s conftest.err ; then - for i in ignore skip ; do - $GREP -iq $i conftest.err - if test "$?" = "0" ; then - hwloc_cv___attribute__warn_unused_result=0 - break; - fi - done - fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Your C compiler does not consider incorrect argument counts to be a fatal error." >&5 +printf "%s\n" "$as_me: WARNING: Your C compiler does not consider incorrect argument counts to be a fatal error." >&2;} + case "$hwloc_c_vendor" in + ibm) + HWLOC_STRICT_ARGS_CFLAGS="-qhalt=e" + ;; + intel) + HWLOC_STRICT_ARGS_CFLAGS="-we140" + ;; + *) + HWLOC_STRICT_ARGS_CFLAGS=FAIL + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Please report this warning and configure using a different C compiler if possible." >&5 +printf "%s\n" "$as_me: WARNING: Please report this warning and configure using a different C compiler if possible." >&2;} + ;; + esac + if test "$HWLOC_STRICT_ARGS_CFLAGS" != "FAIL" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Configure will append '$HWLOC_STRICT_ARGS_CFLAGS' to the value of CFLAGS when needed." >&5 +printf "%s\n" "$as_me: WARNING: Configure will append '$HWLOC_STRICT_ARGS_CFLAGS' to the value of CFLAGS when needed." >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Alternatively you may configure with a different compiler." >&5 +printf "%s\n" "$as_me: WARNING: Alternatively you may configure with a different compiler." >&2;} -else - hwloc_cv___attribute__warn_unused_result=0 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - # - # If the attribute is supported by both compilers, - # try to recompile a *cross-check*, IFF defined. - # - if test '(' "$hwloc_cv___attribute__warn_unused_result" = "1" -a " - static int usage(int * argument); - int foo(int arg) __attribute__ ((__warn_unused_result__)); +fi - int foo(int arg) { return arg + 3; } - static int usage(int * argument) { - foo (*argument); /* Should produce an unused result warning */ - return 0; - } + if test "$hwloc_mode" = "standalone" +then : - /* The autoconf-generated main-function is int main(), which produces a warning by itself */ - int main(void); - " != "" ')' ; then - ac_c_werror_flag_safe=$ac_c_werror_flag - ac_c_werror_flag="yes" - CFLAGS_safe=$CFLAGS - CFLAGS="$CFLAGS $HWLOC_ATTRIBUTE_CFLAGS" + # For the common developer case, if we're in a developer checkout and + # using the GNU compilers, turn on maximum warnings unless + # specifically disabled by the user. + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable \"picky\" compiler mode" >&5 +printf %s "checking whether to enable \"picky\" compiler mode... " >&6; } + hwloc_want_picky=0 + if test "$hwloc_c_vendor" = "gnu" +then : + if test -e "$srcdir/.git" +then : + hwloc_want_picky=1 +fi +fi + if test "$enable_picky" = "yes"; then + if test "$hwloc_c_vendor" = "gnu"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + hwloc_want_picky=1 + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Warning: --enable-picky used, but is currently only defined for the GCC compiler set -- automatically disabled" >&5 +printf "%s\n" "$as_me: WARNING: Warning: --enable-picky used, but is currently only defined for the GCC compiler set -- automatically disabled" >&2;} + hwloc_want_picky=0 + fi + elif test "$enable_picky" = "no"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + hwloc_want_picky=0 + else + if test "$hwloc_want_picky" = 1; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5 +printf "%s\n" "yes (default)" >&6; } + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no (default)" >&5 +printf "%s\n" "no (default)" >&6; } + fi + fi + if test "$hwloc_want_picky" = 1; then + add="-Wall -Wextra -Wunused-parameter -Wundef -Wno-long-long -Wsign-compare" + add="$add -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes" + add="$add -Wcomment -pedantic -Wshadow -Wwrite-strings -Wnested-externs" + add="$add -Wpointer-arith -Wbad-function-cast -Wold-style-definition" + add="$add -Werror-implicit-function-declaration" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + + tmp_save_CFLAGS="$CFLAGS" + CFLAGS="-Wdiscarded-qualifiers -Werror" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if gcc supports -Wdiscarded-qualifiers" >&5 +printf %s "checking if gcc supports -Wdiscarded-qualifiers... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +int i; +int +main (void) +{ - static int usage(int * argument); - int foo(int arg) __attribute__ ((__warn_unused_result__)); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + add="$add -Wdiscarded-qualifiers" - int foo(int arg) { return arg + 3; } - static int usage(int * argument) { - foo (*argument); /* Should produce an unused result warning */ - return 0; - } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + CFLAGS="$tmp_save_CFLAGS" - /* The autoconf-generated main-function is int main(), which produces a warning by itself */ - int main(void); + tmp_save_CFLAGS="$CFLAGS" + CFLAGS="-Wvariadic-macros -Werror" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if gcc supports -Wvariadic-macros" >&5 +printf %s "checking if gcc supports -Wvariadic-macros... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; int -main () +main (void) { - int i=4711; - i=usage(&i); - ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - hwloc_cv___attribute__warn_unused_result=0 -else - - # - # In case we did NOT succeed: Fine, but was this due to the - # attribute being ignored? Grep for IgNoRe in conftest.err - # and if found, reset the hwloc_cv__attribute__var=0 - # - hwloc_cv___attribute__warn_unused_result=1 - - # Be safe for systems that have ancient Autoconf's (e.g., RHEL5) - +if ac_fn_c_try_compile "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + add="$add -Wvariadic-macros" - if test -s conftest.err ; then - for i in ignore skip ; do - $GREP -iq $i conftest.err - if test "$?" = "0" ; then - hwloc_cv___attribute__warn_unused_result=0 - break; - fi - done - fi +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + CFLAGS="$tmp_save_CFLAGS" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + tmp_save_CFLAGS="$CFLAGS" + CFLAGS="-Wtype-limits -Werror" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if gcc supports -Wtype-limits" >&5 +printf %s "checking if gcc supports -Wtype-limits... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main (void) +{ - ac_c_werror_flag=$ac_c_werror_flag_safe - CFLAGS=$CFLAGS_safe - fi + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + add="$add -Wtype-limits" +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + CFLAGS="$tmp_save_CFLAGS" - if test "$hwloc_cv___attribute__warn_unused_result" = "1" ; 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; } - fi + tmp_save_CFLAGS="$CFLAGS" + CFLAGS="-Wstack-usage=262144 -Werror" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if gcc supports -Wstack-usage=262144" >&5 +printf %s "checking if gcc supports -Wstack-usage=262144... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main (void) +{ + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + add="$add -Wstack-usage=262144" +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + CFLAGS="$tmp_save_CFLAGS" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __attribute__(weak_alias)" >&5 -$as_echo_n "checking for __attribute__(weak_alias)... " >&6; } - if ${hwloc_cv___attribute__weak_alias+:} false; then : - $as_echo_n "(cached) " >&6 -else + # -Wextra enables some -Wfoo that we want to disable it at some place - # - # Try to compile using the C compiler - # - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + tmp_save_CFLAGS="$CFLAGS" + CFLAGS="-Wmissing-field-initializers -Werror" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if gcc supports -Wmissing-field-initializers" >&5 +printf %s "checking if gcc supports -Wmissing-field-initializers... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - - int foo(int arg); - int foo(int arg) { return arg + 3; } - int foo2(int arg) __attribute__ ((__weak__, __alias__("foo"))); - +int i; int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - - # - # In case we did succeed: Fine, but was this due to the - # attribute being ignored/skipped? Grep for IgNoRe/skip in conftest.err - # and if found, reset the hwloc_cv__attribute__var=0 - # - hwloc_cv___attribute__weak_alias=1 - - # Be safe for systems that have ancient Autoconf's (e.g., RHEL5) - - - if test -s conftest.err ; then - for i in ignore skip ; do - $GREP -iq $i conftest.err - if test "$?" = "0" ; then - hwloc_cv___attribute__weak_alias=0 - break; - fi - done - fi +if ac_fn_c_try_compile "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + add="$add -Wmissing-field-initializers" +printf "%s\n" "#define HWLOC_HAVE_GCC_W_MISSING_FIELD_INITIALIZERS 1" >>confdefs.h -else - hwloc_cv___attribute__weak_alias=0 +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + CFLAGS="$tmp_save_CFLAGS" - # - # If the attribute is supported by both compilers, - # try to recompile a *cross-check*, IFF defined. - # - if test '(' "$hwloc_cv___attribute__weak_alias" = "1" -a "" != "" ')' ; then - ac_c_werror_flag_safe=$ac_c_werror_flag - ac_c_werror_flag="yes" - CFLAGS_safe=$CFLAGS - CFLAGS="$CFLAGS " - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + tmp_save_CFLAGS="$CFLAGS" + CFLAGS="-Wcast-function-type -Werror" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if gcc supports -Wcast-function-type" >&5 +printf %s "checking if gcc supports -Wcast-function-type... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - +int i; int -main () +main (void) { - int i=4711; - i=usage(&i); - ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - hwloc_cv___attribute__weak_alias=0 -else +if ac_fn_c_try_compile "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + add="$add -Wcast-function-type" - # - # In case we did NOT succeed: Fine, but was this due to the - # attribute being ignored? Grep for IgNoRe in conftest.err - # and if found, reset the hwloc_cv__attribute__var=0 - # - hwloc_cv___attribute__weak_alias=1 +printf "%s\n" "#define HWLOC_HAVE_GCC_W_CAST_FUNCTION_TYPE 1" >>confdefs.h - # Be safe for systems that have ancient Autoconf's (e.g., RHEL5) +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + CFLAGS="$tmp_save_CFLAGS" - if test -s conftest.err ; then - for i in ignore skip ; do - $GREP -iq $i conftest.err - if test "$?" = "0" ; then - hwloc_cv___attribute__weak_alias=0 - break; - fi - done - fi + HWLOC_CFLAGS="$HWLOC_CFLAGS $add" + fi +fi + + # + # Now detect support + # + + ac_fn_c_check_header_compile "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default" +if test "x$ac_cv_header_unistd_h" = xyes +then : + printf "%s\n" "#define HAVE_UNISTD_H 1" >>confdefs.h fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_c_werror_flag=$ac_c_werror_flag_safe - CFLAGS=$CFLAGS_safe - fi + ac_fn_c_check_header_compile "$LINENO" "dirent.h" "ac_cv_header_dirent_h" "$ac_includes_default" +if test "x$ac_cv_header_dirent_h" = xyes +then : + printf "%s\n" "#define HAVE_DIRENT_H 1" >>confdefs.h fi + ac_fn_c_check_header_compile "$LINENO" "strings.h" "ac_cv_header_strings_h" "$ac_includes_default" +if test "x$ac_cv_header_strings_h" = xyes +then : + printf "%s\n" "#define HAVE_STRINGS_H 1" >>confdefs.h - if test "$hwloc_cv___attribute__weak_alias" = "1" ; 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; } - fi +fi + ac_fn_c_check_header_compile "$LINENO" "ctype.h" "ac_cv_header_ctype_h" "$ac_includes_default" +if test "x$ac_cv_header_ctype_h" = xyes +then : + printf "%s\n" "#define HAVE_CTYPE_H 1" >>confdefs.h - fi +fi - # Now that all the values are set, define them -cat >>confdefs.h <<_ACEOF -#define HWLOC_HAVE_ATTRIBUTE_ALIGNED $hwloc_cv___attribute__aligned -_ACEOF + for ac_func in strcasecmp +do : + ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp" +if test "x$ac_cv_func_strcasecmp" = xyes +then : + printf "%s\n" "#define HAVE_STRCASECMP 1" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE $hwloc_cv___attribute__always_inline -_ACEOF + ac_fn_check_decl "$LINENO" "strcasecmp" "ac_cv_have_decl_strcasecmp" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_strcasecmp" = xyes +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether function strcasecmp has a complete prototype" >&5 +printf %s "checking whether function strcasecmp has a complete prototype... " >&6; } + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +int +main (void) +{ +strcasecmp(1,2,3,4,5,6,7,8,9,10); -cat >>confdefs.h <<_ACEOF -#define HWLOC_HAVE_ATTRIBUTE_COLD $hwloc_cv___attribute__cold + ; + return 0; +} _ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } -cat >>confdefs.h <<_ACEOF -#define HWLOC_HAVE_ATTRIBUTE_CONST $hwloc_cv___attribute__const -_ACEOF +printf "%s\n" "#define HWLOC_HAVE_DECL_STRCASECMP 1" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define HWLOC_HAVE_ATTRIBUTE_DEPRECATED $hwloc_cv___attribute__deprecated -_ACEOF -cat >>confdefs.h <<_ACEOF -#define HWLOC_HAVE_ATTRIBUTE_FORMAT $hwloc_cv___attribute__format -_ACEOF +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi -cat >>confdefs.h <<_ACEOF -#define HWLOC_HAVE_ATTRIBUTE_HOT $hwloc_cv___attribute__hot -_ACEOF +fi +done -cat >>confdefs.h <<_ACEOF -#define HWLOC_HAVE_ATTRIBUTE_MALLOC $hwloc_cv___attribute__malloc -_ACEOF + for ac_func in strncasecmp +do : + ac_fn_c_check_func "$LINENO" "strncasecmp" "ac_cv_func_strncasecmp" +if test "x$ac_cv_func_strncasecmp" = xyes +then : + printf "%s\n" "#define HAVE_STRNCASECMP 1" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS $hwloc_cv___attribute__may_alias -_ACEOF + ac_fn_check_decl "$LINENO" "strncasecmp" "ac_cv_have_decl_strncasecmp" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_strncasecmp" = xyes +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether function strncasecmp has a complete prototype" >&5 +printf %s "checking whether function strncasecmp has a complete prototype... " >&6; } + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +int +main (void) +{ +strncasecmp(1,2,3,4,5,6,7,8,9,10); -cat >>confdefs.h <<_ACEOF -#define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION $hwloc_cv___attribute__no_instrument_function + ; + return 0; +} _ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } -cat >>confdefs.h <<_ACEOF -#define HWLOC_HAVE_ATTRIBUTE_NONNULL $hwloc_cv___attribute__nonnull -_ACEOF +printf "%s\n" "#define HWLOC_HAVE_DECL_STRNCASECMP 1" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define HWLOC_HAVE_ATTRIBUTE_NORETURN $hwloc_cv___attribute__noreturn -_ACEOF -cat >>confdefs.h <<_ACEOF -#define HWLOC_HAVE_ATTRIBUTE_PACKED $hwloc_cv___attribute__packed -_ACEOF +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi -cat >>confdefs.h <<_ACEOF -#define HWLOC_HAVE_ATTRIBUTE_PURE $hwloc_cv___attribute__pure -_ACEOF +fi +done -cat >>confdefs.h <<_ACEOF -#define HWLOC_HAVE_ATTRIBUTE_SENTINEL $hwloc_cv___attribute__sentinel -_ACEOF + ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime" +if test "x$ac_cv_func_strftime" = xyes +then : + printf "%s\n" "#define HAVE_STRFTIME 1" >>confdefs.h +fi -cat >>confdefs.h <<_ACEOF -#define HWLOC_HAVE_ATTRIBUTE_UNUSED $hwloc_cv___attribute__unused -_ACEOF + ac_fn_c_check_func "$LINENO" "setlocale" "ac_cv_func_setlocale" +if test "x$ac_cv_func_setlocale" = xyes +then : + printf "%s\n" "#define HAVE_SETLOCALE 1" >>confdefs.h +fi -cat >>confdefs.h <<_ACEOF -#define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT $hwloc_cv___attribute__warn_unused_result -_ACEOF + ac_fn_c_check_header_compile "$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 HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS $hwloc_cv___attribute__weak_alias -_ACEOF +printf "%s\n" "#define HWLOC_HAVE_STDINT_H 1" >>confdefs.h - # Be safe for systems that have ancient Autoconf's (e.g., RHEL5) +fi + ac_fn_c_check_header_compile "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_mman_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_MMAN_H 1" >>confdefs.h - # Check if the compiler has support for visibility, like some - # versions of gcc, icc, Sun Studio cc. - # Check whether --enable-visibility was given. -if test "${enable_visibility+set}" = set; then : - enableval=$enable_visibility; fi - case ${target} in - *-*-aix*|*-*-mingw*|*-*-cygwin*|*-*-hpux*) - enable_visibility=no - ;; - esac + if test x$hwloc_freebsd = xyes; then + echo + echo "**** FreeBSD-specific checks" - hwloc_visibility_define=0 - hwloc_msg="whether to enable symbol visibility" - if test "$enable_visibility" = "no"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking $hwloc_msg" >&5 -$as_echo_n "checking $hwloc_msg... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no (disabled)" >&5 -$as_echo "no (disabled)" >&6; } - else - CFLAGS_orig=$CFLAGS + ac_fn_c_check_header_compile "$LINENO" "sys/domainset.h" "ac_cv_header_sys_domainset_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_domainset_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_DOMAINSET_H 1" >>confdefs.h - hwloc_add= - case "$hwloc_c_vendor" in - sun) - # Check using Sun Studio -xldscope=hidden flag - hwloc_add=-xldscope=hidden - CFLAGS="$CFLAGS_orig $hwloc_add -errwarn=%all" - ;; +fi - *) - # Check using -fvisibility=hidden - hwloc_add=-fvisibility=hidden - CFLAGS="$CFLAGS_orig $hwloc_add -Werror" - ;; - esac + ac_fn_c_check_header_compile "$LINENO" "sys/thr.h" "ac_cv_header_sys_thr_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_thr_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_THR_H 1" >>confdefs.h - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports $hwloc_add" >&5 -$as_echo_n "checking if $CC supports $hwloc_add... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +fi - #include - __attribute__((visibility("default"))) int foo; + ac_fn_c_check_header_compile "$LINENO" "pthread_np.h" "ac_cv_header_pthread_np_h" "$ac_includes_default" +if test "x$ac_cv_header_pthread_np_h" = xyes +then : + printf "%s\n" "#define HAVE_PTHREAD_NP_H 1" >>confdefs.h -int -main () -{ -fprintf(stderr, "Hello, world\n"); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - if test -s conftest.err; then : - $GREP -iq visibility conftest.err - # If we find "visibility" in the stderr, then - # assume it doesn't work - if test "$?" = "0"; then : - hwloc_add= fi + + ac_fn_c_check_header_compile "$LINENO" "sys/cpuset.h" "ac_cv_header_sys_cpuset_h" "#include +" +if test "x$ac_cv_header_sys_cpuset_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_CPUSET_H 1" >>confdefs.h + fi -else - hwloc_add= + ac_fn_c_check_func "$LINENO" "cpuset_setaffinity" "ac_cv_func_cpuset_setaffinity" +if test "x$ac_cv_func_cpuset_setaffinity" = xyes +then : + printf "%s\n" "#define HAVE_CPUSET_SETAFFINITY 1" >>confdefs.h + fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test "$hwloc_add" = ""; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + + ac_fn_c_check_func "$LINENO" "cpuset_setid" "ac_cv_func_cpuset_setid" +if test "x$ac_cv_func_cpuset_setid" = xyes +then : + printf "%s\n" "#define HAVE_CPUSET_SETID 1" >>confdefs.h + fi - CFLAGS=$CFLAGS_orig - HWLOC_VISIBILITY_CFLAGS=$hwloc_add - if test "$hwloc_add" != "" ; then - hwloc_visibility_define=1 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking $hwloc_msg" >&5 -$as_echo_n "checking $hwloc_msg... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (via $hwloc_add)" >&5 -$as_echo "yes (via $hwloc_add)" >&6; } - elif test "$enable_visibility" = "yes"; then - as_fn_error $? "Symbol visibility support requested but compiler does not seem to support it. Aborting" "$LINENO" 5 - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking $hwloc_msg" >&5 -$as_echo_n "checking $hwloc_msg... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no (unsupported)" >&5 -$as_echo "no (unsupported)" >&6; } - fi - unset hwloc_add + echo "**** end of FreeBSD-specific checks" + echo fi + if test x$hwloc_windows = xyes; then + echo + echo "**** Windows-specific checks" -cat >>confdefs.h <<_ACEOF -#define HWLOC_C_HAVE_VISIBILITY $hwloc_visibility_define -_ACEOF + ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default" +if test "x$ac_cv_header_windows_h" = xyes +then : + + +printf "%s\n" "#define HWLOC_HAVE_WINDOWS_H 1" >>confdefs.h - HWLOC_CFLAGS="$HWLOC_FLAGS $HWLOC_VISIBILITY_CFLAGS" - if test "$HWLOC_VISIBILITY_CFLAGS" != ""; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"$HWLOC_VISIBILITY_CFLAGS\" has been added to the hwloc CFLAGS" >&5 -$as_echo "$as_me: WARNING: \"$HWLOC_VISIBILITY_CFLAGS\" has been added to the hwloc CFLAGS" >&2;} fi - # Make sure the compiler returns an error code when function arg - # count is wrong, otherwise sched_setaffinity checks may fail. - HWLOC_STRICT_ARGS_CFLAGS= - hwloc_args_check=0 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler rejects function calls with too many arguments" >&5 -$as_echo_n "checking whether the C compiler rejects function calls with too many arguments... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - extern int one_arg(int x); - int foo(void) { return one_arg(1, 2); } + old_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS -D_WIN32_WINNT=0x0601" + ac_fn_c_check_type "$LINENO" "KAFFINITY" "ac_cv_type_KAFFINITY" "#include +" +if test "x$ac_cv_type_KAFFINITY" = xyes +then : + +printf "%s\n" "#define HAVE_KAFFINITY 1" >>confdefs.h -int -main () -{ - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -else - hwloc_args_check=1 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler rejects function calls with too few arguments" >&5 -$as_echo_n "checking whether the C compiler rejects function calls with too few arguments... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +ac_fn_c_check_type "$LINENO" "PROCESSOR_CACHE_TYPE" "ac_cv_type_PROCESSOR_CACHE_TYPE" "#include +" +if test "x$ac_cv_type_PROCESSOR_CACHE_TYPE" = xyes +then : - extern int two_arg(int x, int y); - int foo(void) { return two_arg(3); } +printf "%s\n" "#define HAVE_PROCESSOR_CACHE_TYPE 1" >>confdefs.h -int -main () -{ - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -else - hwloc_args_check=`expr $hwloc_args_check + 1` - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - if test "$hwloc_args_check" != "2"; then : +ac_fn_c_check_type "$LINENO" "CACHE_DESCRIPTOR" "ac_cv_type_CACHE_DESCRIPTOR" "#include +" +if test "x$ac_cv_type_CACHE_DESCRIPTOR" = xyes +then : + +printf "%s\n" "#define HAVE_CACHE_DESCRIPTOR 1" >>confdefs.h - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your C compiler does not consider incorrect argument counts to be a fatal error." >&5 -$as_echo "$as_me: WARNING: Your C compiler does not consider incorrect argument counts to be a fatal error." >&2;} - case "$hwloc_c_vendor" in - ibm) - HWLOC_STRICT_ARGS_CFLAGS="-qhalt=e" - ;; - intel) - HWLOC_STRICT_ARGS_CFLAGS="-we140" - ;; - *) - HWLOC_STRICT_ARGS_CFLAGS=FAIL - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please report this warning and configure using a different C compiler if possible." >&5 -$as_echo "$as_me: WARNING: Please report this warning and configure using a different C compiler if possible." >&2;} - ;; - esac - if test "$HWLOC_STRICT_ARGS_CFLAGS" != "FAIL"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Configure will append '$HWLOC_STRICT_ARGS_CFLAGS' to the value of CFLAGS when needed." >&5 -$as_echo "$as_me: WARNING: Configure will append '$HWLOC_STRICT_ARGS_CFLAGS' to the value of CFLAGS when needed." >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Alternatively you may configure with a different compiler." >&5 -$as_echo "$as_me: WARNING: Alternatively you may configure with a different compiler." >&2;} +fi +ac_fn_c_check_type "$LINENO" "LOGICAL_PROCESSOR_RELATIONSHIP" "ac_cv_type_LOGICAL_PROCESSOR_RELATIONSHIP" "#include +" +if test "x$ac_cv_type_LOGICAL_PROCESSOR_RELATIONSHIP" = xyes +then : + +printf "%s\n" "#define HAVE_LOGICAL_PROCESSOR_RELATIONSHIP 1" >>confdefs.h + fi +ac_fn_c_check_type "$LINENO" "RelationProcessorPackage" "ac_cv_type_RelationProcessorPackage" "#include +" +if test "x$ac_cv_type_RelationProcessorPackage" = xyes +then : + +printf "%s\n" "#define HAVE_RELATIONPROCESSORPACKAGE 1" >>confdefs.h + fi +ac_fn_c_check_type "$LINENO" "GROUP_AFFINITY" "ac_cv_type_GROUP_AFFINITY" "#include +" +if test "x$ac_cv_type_GROUP_AFFINITY" = xyes +then : + +printf "%s\n" "#define HAVE_GROUP_AFFINITY 1" >>confdefs.h - if test "$hwloc_mode" = "standalone"; then : - # For the common developer case, if we're in a developer checkout and - # using the GNU compilers, turn on maximum warnings unless - # specifically disabled by the user. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable \"picky\" compiler mode" >&5 -$as_echo_n "checking whether to enable \"picky\" compiler mode... " >&6; } - hwloc_want_picky=0 - if test "$hwloc_c_vendor" = "gnu"; then : - if test -e "$srcdir/.git"; then : - hwloc_want_picky=1 fi +ac_fn_c_check_type "$LINENO" "PROCESSOR_RELATIONSHIP" "ac_cv_type_PROCESSOR_RELATIONSHIP" "#include +" +if test "x$ac_cv_type_PROCESSOR_RELATIONSHIP" = xyes +then : + +printf "%s\n" "#define HAVE_PROCESSOR_RELATIONSHIP 1" >>confdefs.h + + fi - if test "$enable_picky" = "yes"; then - if test "$hwloc_c_vendor" = "gnu"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - hwloc_want_picky=1 - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Warning: --enable-picky used, but is currently only defined for the GCC compiler set -- automatically disabled" >&5 -$as_echo "$as_me: WARNING: Warning: --enable-picky used, but is currently only defined for the GCC compiler set -- automatically disabled" >&2;} - hwloc_want_picky=0 - fi - elif test "$enable_picky" = "no"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - hwloc_want_picky=0 - else - if test "$hwloc_want_picky" = 1; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5 -$as_echo "yes (default)" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no (default)" >&5 -$as_echo "no (default)" >&6; } - fi - fi - if test "$hwloc_want_picky" = 1; then - add="-Wall -Wextra -Wunused-parameter -Wundef -Wno-long-long -Wsign-compare" - add="$add -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes" - add="$add -Wcomment -pedantic -Wshadow -Wwrite-strings -Wnested-externs" - add="$add -Wpointer-arith -Wbad-function-cast -Wold-style-definition" - add="$add -Werror-implicit-function-declaration" +ac_fn_c_check_type "$LINENO" "NUMA_NODE_RELATIONSHIP" "ac_cv_type_NUMA_NODE_RELATIONSHIP" "#include +" +if test "x$ac_cv_type_NUMA_NODE_RELATIONSHIP" = xyes +then : +printf "%s\n" "#define HAVE_NUMA_NODE_RELATIONSHIP 1" >>confdefs.h - tmp_save_CFLAGS="$CFLAGS" - CFLAGS="-Wdiscarded-qualifiers -Werror" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gcc supports -Wdiscarded-qualifiers" >&5 -$as_echo_n "checking if gcc supports -Wdiscarded-qualifiers... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -int i; -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; } - add="$add -Wdiscarded-qualifiers" +fi +ac_fn_c_check_type "$LINENO" "CACHE_RELATIONSHIP" "ac_cv_type_CACHE_RELATIONSHIP" "#include +" +if test "x$ac_cv_type_CACHE_RELATIONSHIP" = xyes +then : + +printf "%s\n" "#define HAVE_CACHE_RELATIONSHIP 1" >>confdefs.h + -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS="$tmp_save_CFLAGS" +ac_fn_c_check_type "$LINENO" "PROCESSOR_GROUP_INFO" "ac_cv_type_PROCESSOR_GROUP_INFO" "#include +" +if test "x$ac_cv_type_PROCESSOR_GROUP_INFO" = xyes +then : +printf "%s\n" "#define HAVE_PROCESSOR_GROUP_INFO 1" >>confdefs.h - tmp_save_CFLAGS="$CFLAGS" - CFLAGS="-Wvariadic-macros -Werror" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gcc supports -Wvariadic-macros" >&5 -$as_echo_n "checking if gcc supports -Wvariadic-macros... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -int i; -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; } - add="$add -Wvariadic-macros" +fi +ac_fn_c_check_type "$LINENO" "GROUP_RELATIONSHIP" "ac_cv_type_GROUP_RELATIONSHIP" "#include +" +if test "x$ac_cv_type_GROUP_RELATIONSHIP" = xyes +then : + +printf "%s\n" "#define HAVE_GROUP_RELATIONSHIP 1" >>confdefs.h + -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS="$tmp_save_CFLAGS" +ac_fn_c_check_type "$LINENO" "SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX" "ac_cv_type_SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX" "#include +" +if test "x$ac_cv_type_SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX" = xyes +then : +printf "%s\n" "#define HAVE_SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX 1" >>confdefs.h - tmp_save_CFLAGS="$CFLAGS" - CFLAGS="-Wtype-limits -Werror" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gcc supports -Wtype-limits" >&5 -$as_echo_n "checking if gcc supports -Wtype-limits... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -int i; -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; } - add="$add -Wtype-limits" +fi +ac_fn_c_check_type "$LINENO" "PSAPI_WORKING_SET_EX_BLOCK" "ac_cv_type_PSAPI_WORKING_SET_EX_BLOCK" "#include +" +if test "x$ac_cv_type_PSAPI_WORKING_SET_EX_BLOCK" = xyes +then : + +printf "%s\n" "#define HAVE_PSAPI_WORKING_SET_EX_BLOCK 1" >>confdefs.h + -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS="$tmp_save_CFLAGS" +ac_fn_c_check_type "$LINENO" "PSAPI_WORKING_SET_EX_INFORMATION" "ac_cv_type_PSAPI_WORKING_SET_EX_INFORMATION" "#include +" +if test "x$ac_cv_type_PSAPI_WORKING_SET_EX_INFORMATION" = xyes +then : +printf "%s\n" "#define HAVE_PSAPI_WORKING_SET_EX_INFORMATION 1" >>confdefs.h - tmp_save_CFLAGS="$CFLAGS" - CFLAGS="-Wstack-usage=262144 -Werror" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gcc supports -Wstack-usage=262144" >&5 -$as_echo_n "checking if gcc supports -Wstack-usage=262144... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -int i; -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; } - add="$add -Wstack-usage=262144" +fi +ac_fn_c_check_type "$LINENO" "PROCESSOR_NUMBER" "ac_cv_type_PROCESSOR_NUMBER" "#include +" +if test "x$ac_cv_type_PROCESSOR_NUMBER" = xyes +then : + +printf "%s\n" "#define HAVE_PROCESSOR_NUMBER 1" >>confdefs.h + -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS="$tmp_save_CFLAGS" + CPPFLAGS="$old_CPPFLAGS" - # -Wextra enables some -Wfoo that we want to disable it at some place + ac_fn_check_decl "$LINENO" "GetModuleFileName" "ac_cv_have_decl_GetModuleFileName" "#include +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_GetModuleFileName" = xyes +then : + ac_have_decl=1 +else $as_nop + ac_have_decl=0 +fi +printf "%s\n" "#define HAVE_DECL_GETMODULEFILENAME $ac_have_decl" >>confdefs.h - tmp_save_CFLAGS="$CFLAGS" - CFLAGS="-Wmissing-field-initializers -Werror" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gcc supports -Wmissing-field-initializers" >&5 -$as_echo_n "checking if gcc supports -Wmissing-field-initializers... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for main in -lgdi32" >&5 +printf %s "checking for main in -lgdi32... " >&6; } +if test ${ac_cv_lib_gdi32_main+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lgdi32 $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -int i; + + int -main () +main (void) { - +return 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; } - add="$add -Wmissing-field-initializers" +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_gdi32_main=yes +else $as_nop + ac_cv_lib_gdi32_main=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gdi32_main" >&5 +printf "%s\n" "$ac_cv_lib_gdi32_main" >&6; } +if test "x$ac_cv_lib_gdi32_main" = xyes +then : + HWLOC_LIBS="-lgdi32 $HWLOC_LIBS" -$as_echo "#define HWLOC_HAVE_GCC_W_MISSING_FIELD_INITIALIZERS 1" >>confdefs.h +printf "%s\n" "#define HAVE_LIBGDI32 1" >>confdefs.h -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS="$tmp_save_CFLAGS" - - tmp_save_CFLAGS="$CFLAGS" - CFLAGS="-Wcast-function-type -Werror" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gcc supports -Wcast-function-type" >&5 -$as_echo_n "checking if gcc supports -Wcast-function-type... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PostQuitMessage in -luser32" >&5 +printf %s "checking for PostQuitMessage in -luser32... " >&6; } +if test ${ac_cv_lib_user32_PostQuitMessage+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-luser32 $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -int i; + +/* 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. */ +char PostQuitMessage (); int -main () +main (void) { - +return PostQuitMessage (); ; 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; } - add="$add -Wcast-function-type" - -$as_echo "#define HWLOC_HAVE_GCC_W_CAST_FUNCTION_TYPE 1" >>confdefs.h - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_user32_PostQuitMessage=yes +else $as_nop + ac_cv_lib_user32_PostQuitMessage=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS="$tmp_save_CFLAGS" - - - HWLOC_CFLAGS="$HWLOC_CFLAGS $add" - fi - +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS fi - - # - # Now detect support - # - - for ac_header in unistd.h -do : - 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 : - cat >>confdefs.h <<_ACEOF -#define HAVE_UNISTD_H 1 -_ACEOF - +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_user32_PostQuitMessage" >&5 +printf "%s\n" "$ac_cv_lib_user32_PostQuitMessage" >&6; } +if test "x$ac_cv_lib_user32_PostQuitMessage" = xyes +then : + hwloc_have_user32="yes" fi -done - - for ac_header in dirent.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "dirent.h" "ac_cv_header_dirent_h" "$ac_includes_default" -if test "x$ac_cv_header_dirent_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_DIRENT_H 1 -_ACEOF - -fi + for ac_prog in lib +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_HWLOC_MS_LIB+y} +then : + printf %s "(cached) " >&6 +else $as_nop + case $HWLOC_MS_LIB in + [\\/]* | ?:[\\/]*) + ac_cv_path_HWLOC_MS_LIB="$HWLOC_MS_LIB" # 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 + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + 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_MS_LIB="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi done + done +IFS=$as_save_IFS - for ac_header in strings.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "strings.h" "ac_cv_header_strings_h" "$ac_includes_default" -if test "x$ac_cv_header_strings_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_STRINGS_H 1 -_ACEOF - + ;; +esac fi - -done - - for ac_header in ctype.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "ctype.h" "ac_cv_header_ctype_h" "$ac_includes_default" -if test "x$ac_cv_header_ctype_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_CTYPE_H 1 -_ACEOF - +HWLOC_MS_LIB=$ac_cv_path_HWLOC_MS_LIB +if test -n "$HWLOC_MS_LIB"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $HWLOC_MS_LIB" >&5 +printf "%s\n" "$HWLOC_MS_LIB" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -done - - for ac_func in strcasecmp -do : - ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp" -if test "x$ac_cv_func_strcasecmp" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_STRCASECMP 1 -_ACEOF + test -n "$HWLOC_MS_LIB" && break +done - ac_fn_c_check_decl "$LINENO" "strcasecmp" "ac_cv_have_decl_strcasecmp" "$ac_includes_default" -if test "x$ac_cv_have_decl_strcasecmp" = xyes; then : + echo "**** end of Windows-specific checks" + echo + fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether function strcasecmp has a complete prototype" >&5 -$as_echo_n "checking whether function strcasecmp has a complete prototype... " >&6; } + if test x$hwloc_solaris = xyes; then + echo + echo "**** Solaris-specific checks" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + for ac_header in sys/lgrp_user.h +do : + ac_fn_c_check_header_compile "$LINENO" "sys/lgrp_user.h" "ac_cv_header_sys_lgrp_user_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_lgrp_user_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_LGRP_USER_H 1" >>confdefs.h + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for lgrp_init in -llgrp" >&5 +printf %s "checking for lgrp_init in -llgrp... " >&6; } +if test ${ac_cv_lib_lgrp_lgrp_init+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-llgrp $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default + +/* 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. */ +char lgrp_init (); int -main () +main (void) { -strcasecmp(1,2,3,4,5,6,7,8,9,10); - +return lgrp_init (); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_lgrp_lgrp_init=yes +else $as_nop + ac_cv_lib_lgrp_lgrp_init=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lgrp_lgrp_init" >&5 +printf "%s\n" "$ac_cv_lib_lgrp_lgrp_init" >&6; } +if test "x$ac_cv_lib_lgrp_lgrp_init" = xyes +then : + HWLOC_LIBS="-llgrp $HWLOC_LIBS" -$as_echo "#define HWLOC_HAVE_DECL_STRCASECMP 1" >>confdefs.h +printf "%s\n" "#define HAVE_LIBLGRP 1" >>confdefs.h + ac_fn_check_decl "$LINENO" "lgrp_latency_cookie" "ac_cv_have_decl_lgrp_latency_cookie" "#include +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_lgrp_latency_cookie" = xyes +then : + ac_have_decl=1 +else $as_nop + ac_have_decl=0 +fi +printf "%s\n" "#define HAVE_DECL_LGRP_LATENCY_COOKIE $ac_have_decl" >>confdefs.h fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - fi -done - for ac_func in strncasecmp +done + for ac_header in kstat.h do : - ac_fn_c_check_func "$LINENO" "strncasecmp" "ac_cv_func_strncasecmp" -if test "x$ac_cv_func_strncasecmp" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_STRNCASECMP 1 -_ACEOF - - - ac_fn_c_check_decl "$LINENO" "strncasecmp" "ac_cv_have_decl_strncasecmp" "$ac_includes_default" -if test "x$ac_cv_have_decl_strncasecmp" = xyes; then : + ac_fn_c_check_header_compile "$LINENO" "kstat.h" "ac_cv_header_kstat_h" "$ac_includes_default" +if test "x$ac_cv_header_kstat_h" = xyes +then : + printf "%s\n" "#define HAVE_KSTAT_H 1" >>confdefs.h + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for main in -lkstat" >&5 +printf %s "checking for main in -lkstat... " >&6; } +if test ${ac_cv_lib_kstat_main+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lkstat $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether function strncasecmp has a complete prototype" >&5 -$as_echo_n "checking whether function strncasecmp has a complete prototype... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_includes_default int -main () +main (void) { -strncasecmp(1,2,3,4,5,6,7,8,9,10); - +return main (); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - - -$as_echo "#define HWLOC_HAVE_DECL_STRNCASECMP 1" >>confdefs.h - - - +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_kstat_main=yes +else $as_nop + ac_cv_lib_kstat_main=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kstat_main" >&5 +printf "%s\n" "$ac_cv_lib_kstat_main" >&6; } +if test "x$ac_cv_lib_kstat_main" = xyes +then : + HWLOC_LIBS="-lkstat $HWLOC_LIBS" - +printf "%s\n" "#define HAVE_LIBKSTAT 1" >>confdefs.h fi -done - - for ac_func in strftime -do : - ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime" -if test "x$ac_cv_func_strftime" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_STRFTIME 1 -_ACEOF fi + done - for ac_func in setlocale + for ac_header in picl.h do : - ac_fn_c_check_func "$LINENO" "setlocale" "ac_cv_func_setlocale" -if test "x$ac_cv_func_setlocale" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SETLOCALE 1 -_ACEOF + ac_fn_c_check_header_compile "$LINENO" "picl.h" "ac_cv_header_picl_h" "$ac_includes_default" +if test "x$ac_cv_header_picl_h" = xyes +then : + printf "%s\n" "#define HAVE_PICL_H 1" >>confdefs.h + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for picl_initialize in -lpicl" >&5 +printf %s "checking for picl_initialize in -lpicl... " >&6; } +if test ${ac_cv_lib_picl_picl_initialize+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lpicl $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. */ +char picl_initialize (); +int +main (void) +{ +return picl_initialize (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_picl_picl_initialize=yes +else $as_nop + ac_cv_lib_picl_picl_initialize=no fi -done - - - 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 : - - -$as_echo "#define HWLOC_HAVE_STDINT_H 1" >>confdefs.h - - +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_picl_picl_initialize" >&5 +printf "%s\n" "$ac_cv_lib_picl_picl_initialize" >&6; } +if test "x$ac_cv_lib_picl_picl_initialize" = xyes +then : + HWLOC_LIBS="-lpicl $HWLOC_LIBS" fi - - - for ac_header in sys/mman.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_mman_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SYS_MMAN_H 1 -_ACEOF fi done - - if test x$hwloc_freebsd = xyes; then + echo "**** end of Solaris-specific checks" echo - echo "**** FreeBSD-specific checks" - - for ac_header in sys/domainset.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "sys/domainset.h" "ac_cv_header_sys_domainset_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_domainset_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SYS_DOMAINSET_H 1 -_ACEOF + fi -fi + if test x$hwloc_aix = xyes; then + echo + echo "**** AIX-specific checks" -done + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_getthrds_np" >&5 +printf %s "checking for library containing pthread_getthrds_np... " >&6; } +if test ${ac_cv_search_pthread_getthrds_np+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - for ac_header in sys/thr.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "sys/thr.h" "ac_cv_header_sys_thr_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_thr_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SYS_THR_H 1 +/* 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. */ +char pthread_getthrds_np (); +int +main (void) +{ +return pthread_getthrds_np (); + ; + return 0; +} _ACEOF - +for ac_lib in '' pthread +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_getthrds_np=$ac_res fi - -done - - for ac_header in pthread_np.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "pthread_np.h" "ac_cv_header_pthread_np_h" "$ac_includes_default" -if test "x$ac_cv_header_pthread_np_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_PTHREAD_NP_H 1 -_ACEOF - +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext + if test ${ac_cv_search_pthread_getthrds_np+y} +then : + break fi - done +if test ${ac_cv_search_pthread_getthrds_np+y} +then : - for ac_header in sys/cpuset.h -do : - ac_fn_c_check_header_compile "$LINENO" "sys/cpuset.h" "ac_cv_header_sys_cpuset_h" "#include -" -if test "x$ac_cv_header_sys_cpuset_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SYS_CPUSET_H 1 -_ACEOF - +else $as_nop + ac_cv_search_pthread_getthrds_np=no fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_getthrds_np" >&5 +printf "%s\n" "$ac_cv_search_pthread_getthrds_np" >&6; } +ac_res=$ac_cv_search_pthread_getthrds_np +if test "$ac_res" != no +then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" -done - - for ac_func in cpuset_setaffinity -do : - ac_fn_c_check_func "$LINENO" "cpuset_setaffinity" "ac_cv_func_cpuset_setaffinity" -if test "x$ac_cv_func_cpuset_setaffinity" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_CPUSET_SETAFFINITY 1 -_ACEOF -fi -done +printf "%s\n" "#define HWLOC_HAVE_PTHREAD_GETTHRDS_NP 1" >>confdefs.h - for ac_func in cpuset_setid -do : - ac_fn_c_check_func "$LINENO" "cpuset_setid" "ac_cv_func_cpuset_setid" -if test "x$ac_cv_func_cpuset_setid" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_CPUSET_SETID 1 -_ACEOF fi -done - echo "**** end of FreeBSD-specific checks" + echo "**** end of AIX-specific checks" echo fi - if test x$hwloc_windows = xyes; then + if test x$hwloc_darwin = xyes; then echo - echo "**** Windows-specific checks" - - ac_fn_c_check_header_mongrel "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default" -if test "x$ac_cv_header_windows_h" = xyes; then : - - -$as_echo "#define HWLOC_HAVE_WINDOWS_H 1" >>confdefs.h + echo "**** Darwin-specific checks" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the Foundation framework" >&5 +printf %s "checking for the Foundation framework... " >&6; } + tmp_save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -framework Foundation" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -fi +#include +int +main (void) +{ - old_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS -D_WIN32_WINNT=0x0601" - ac_fn_c_check_type "$LINENO" "KAFFINITY" "ac_cv_type_KAFFINITY" "#include -" -if test "x$ac_cv_type_KAFFINITY" = xyes; then : +return CFDictionaryGetTypeID(); -cat >>confdefs.h <<_ACEOF -#define HAVE_KAFFINITY 1 + ; + return 0; +} _ACEOF +if ac_fn_c_try_link "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + HWLOC_DARWIN_LDFLAGS="$HWLOC_DARWIN_LDFLAGS -framework Foundation" +printf "%s\n" "#define HWLOC_HAVE_DARWIN_FOUNDATION 1" >>confdefs.h +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -ac_fn_c_check_type "$LINENO" "PROCESSOR_CACHE_TYPE" "ac_cv_type_PROCESSOR_CACHE_TYPE" "#include -" -if test "x$ac_cv_type_PROCESSOR_CACHE_TYPE" = xyes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_PROCESSOR_CACHE_TYPE 1 -_ACEOF +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS="$tmp_save_LDFLAGS" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the IOKit framework" >&5 +printf %s "checking for the IOKit framework... " >&6; } + tmp_save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -framework IOKit" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -fi -ac_fn_c_check_type "$LINENO" "CACHE_DESCRIPTOR" "ac_cv_type_CACHE_DESCRIPTOR" "#include -" -if test "x$ac_cv_type_CACHE_DESCRIPTOR" = xyes; then : -cat >>confdefs.h <<_ACEOF -#define HAVE_CACHE_DESCRIPTOR 1 -_ACEOF +#include +int +main (void) +{ -fi -ac_fn_c_check_type "$LINENO" "LOGICAL_PROCESSOR_RELATIONSHIP" "ac_cv_type_LOGICAL_PROCESSOR_RELATIONSHIP" "#include -" -if test "x$ac_cv_type_LOGICAL_PROCESSOR_RELATIONSHIP" = xyes; then : +io_registry_entry_t service = IORegistryGetRootEntry(kIOMasterPortDefault); -cat >>confdefs.h <<_ACEOF -#define HAVE_LOGICAL_PROCESSOR_RELATIONSHIP 1 + ; + return 0; +} _ACEOF +if ac_fn_c_try_link "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + HWLOC_DARWIN_LDFLAGS="$HWLOC_DARWIN_LDFLAGS -framework IOKit" +printf "%s\n" "#define HWLOC_HAVE_DARWIN_IOKIT 1" >>confdefs.h +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -ac_fn_c_check_type "$LINENO" "RelationProcessorPackage" "ac_cv_type_RelationProcessorPackage" "#include -" -if test "x$ac_cv_type_RelationProcessorPackage" = xyes; then : +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS="$tmp_save_LDFLAGS" -cat >>confdefs.h <<_ACEOF -#define HAVE_RELATIONPROCESSORPACKAGE 1 -_ACEOF -fi -ac_fn_c_check_type "$LINENO" "SYSTEM_LOGICAL_PROCESSOR_INFORMATION" "ac_cv_type_SYSTEM_LOGICAL_PROCESSOR_INFORMATION" "#include -" -if test "x$ac_cv_type_SYSTEM_LOGICAL_PROCESSOR_INFORMATION" = xyes; then : + echo "**** end of Darwin-specific checks" + echo + fi -cat >>confdefs.h <<_ACEOF -#define HAVE_SYSTEM_LOGICAL_PROCESSOR_INFORMATION 1 -_ACEOF + if test x$hwloc_linux = xyes; then + echo + echo "**** Linux-specific checks" + ac_fn_check_decl "$LINENO" "sched_getcpu" "ac_cv_have_decl_sched_getcpu" " + #ifndef _GNU_SOURCE + # define _GNU_SOURCE + #endif + #include +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_sched_getcpu" = xyes +then : + ac_have_decl=1 +else $as_nop + ac_have_decl=0 fi -ac_fn_c_check_type "$LINENO" "GROUP_AFFINITY" "ac_cv_type_GROUP_AFFINITY" "#include -" -if test "x$ac_cv_type_GROUP_AFFINITY" = xyes; then : +printf "%s\n" "#define HAVE_DECL_SCHED_GETCPU $ac_have_decl" >>confdefs.h +if test $ac_have_decl = 1 +then : -cat >>confdefs.h <<_ACEOF -#define HAVE_GROUP_AFFINITY 1 -_ACEOF +else $as_nop + : +fi -fi -ac_fn_c_check_type "$LINENO" "PROCESSOR_RELATIONSHIP" "ac_cv_type_PROCESSOR_RELATIONSHIP" "#include -" -if test "x$ac_cv_type_PROCESSOR_RELATIONSHIP" = xyes; then : -cat >>confdefs.h <<_ACEOF -#define HAVE_PROCESSOR_RELATIONSHIP 1 -_ACEOF + ac_fn_check_decl "$LINENO" "sched_setaffinity" "ac_cv_have_decl_sched_setaffinity" " +#ifndef _GNU_SOURCE +# define _GNU_SOURCE +#endif +#include -fi -ac_fn_c_check_type "$LINENO" "NUMA_NODE_RELATIONSHIP" "ac_cv_type_NUMA_NODE_RELATIONSHIP" "#include -" -if test "x$ac_cv_type_NUMA_NODE_RELATIONSHIP" = xyes; then : +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_sched_setaffinity" = xyes +then : -cat >>confdefs.h <<_ACEOF -#define HAVE_NUMA_NODE_RELATIONSHIP 1 -_ACEOF + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether function sched_setaffinity has a complete prototype" >&5 +printf %s "checking whether function sched_setaffinity has a complete prototype... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -fi -ac_fn_c_check_type "$LINENO" "CACHE_RELATIONSHIP" "ac_cv_type_CACHE_RELATIONSHIP" "#include -" -if test "x$ac_cv_type_CACHE_RELATIONSHIP" = xyes; then : +#ifndef _GNU_SOURCE +# define _GNU_SOURCE +#endif +#include + + +int +main (void) +{ +sched_setaffinity(1,2,3,4,5,6,7,8,9,10); -cat >>confdefs.h <<_ACEOF -#define HAVE_CACHE_RELATIONSHIP 1 + ; + return 0; +} _ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } -fi -ac_fn_c_check_type "$LINENO" "PROCESSOR_GROUP_INFO" "ac_cv_type_PROCESSOR_GROUP_INFO" "#include -" -if test "x$ac_cv_type_PROCESSOR_GROUP_INFO" = xyes; then : + hwloc_have_sched_setaffinity=yes + +printf "%s\n" "#define HWLOC_HAVE_SCHED_SETAFFINITY 1" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define HAVE_PROCESSOR_GROUP_INFO 1 -_ACEOF + if test "$HWLOC_STRICT_ARGS_CFLAGS" = "FAIL" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Support for sched_setaffinity() requires a C compiler which" >&5 +printf "%s\n" "$as_me: WARNING: Support for sched_setaffinity() requires a C compiler which" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: considers incorrect argument counts to be a fatal error." >&5 +printf "%s\n" "$as_me: WARNING: considers incorrect argument counts to be a fatal error." >&2;} + as_fn_error $? "Cannot continue." "$LINENO" 5 fi -ac_fn_c_check_type "$LINENO" "GROUP_RELATIONSHIP" "ac_cv_type_GROUP_RELATIONSHIP" "#include -" -if test "x$ac_cv_type_GROUP_RELATIONSHIP" = xyes; then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for old prototype of sched_setaffinity" >&5 +printf %s "checking for old prototype of sched_setaffinity... " >&6; } + hwloc_save_CFLAGS=$CFLAGS + CFLAGS="$CFLAGS $HWLOC_STRICT_ARGS_CFLAGS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -cat >>confdefs.h <<_ACEOF -#define HAVE_GROUP_RELATIONSHIP 1 + + #ifndef _GNU_SOURCE + # define _GNU_SOURCE + #endif + #include + static unsigned long mask; + +int +main (void) +{ + sched_setaffinity(0, (void*) &mask); + ; + return 0; +} _ACEOF +if ac_fn_c_try_compile "$LINENO" +then : +printf "%s\n" "#define HWLOC_HAVE_OLD_SCHED_SETAFFINITY 1" >>confdefs.h + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -ac_fn_c_check_type "$LINENO" "SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX" "ac_cv_type_SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX" "#include -" -if test "x$ac_cv_type_SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX" = xyes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX 1 -_ACEOF +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + CFLAGS=$hwloc_save_CFLAGS fi -ac_fn_c_check_type "$LINENO" "PSAPI_WORKING_SET_EX_BLOCK" "ac_cv_type_PSAPI_WORKING_SET_EX_BLOCK" "#include -" -if test "x$ac_cv_type_PSAPI_WORKING_SET_EX_BLOCK" = xyes; then : +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi -cat >>confdefs.h <<_ACEOF -#define HAVE_PSAPI_WORKING_SET_EX_BLOCK 1 -_ACEOF + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working CPU_SET" >&5 +printf %s "checking for working CPU_SET... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -fi -ac_fn_c_check_type "$LINENO" "PSAPI_WORKING_SET_EX_INFORMATION" "ac_cv_type_PSAPI_WORKING_SET_EX_INFORMATION" "#include -" -if test "x$ac_cv_type_PSAPI_WORKING_SET_EX_INFORMATION" = xyes; then : + #include + cpu_set_t set; -cat >>confdefs.h <<_ACEOF -#define HAVE_PSAPI_WORKING_SET_EX_INFORMATION 1 +int +main (void) +{ + CPU_ZERO(&set); CPU_SET(0, &set); + ; + return 0; +} _ACEOF +if ac_fn_c_try_link "$LINENO" +then : +printf "%s\n" "#define HWLOC_HAVE_CPU_SET 1" >>confdefs.h + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -ac_fn_c_check_type "$LINENO" "PROCESSOR_NUMBER" "ac_cv_type_PROCESSOR_NUMBER" "#include -" -if test "x$ac_cv_type_PROCESSOR_NUMBER" = xyes; then : +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext -cat >>confdefs.h <<_ACEOF -#define HAVE_PROCESSOR_NUMBER 1 -_ACEOF + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working CPU_SET_S" >&5 +printf %s "checking for working CPU_SET_S... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -fi + #include + cpu_set_t *set; - CPPFLAGS="$old_CPPFLAGS" +int +main (void) +{ - ac_fn_c_check_decl "$LINENO" "GetModuleFileName" "ac_cv_have_decl_GetModuleFileName" "#include -" -if test "x$ac_cv_have_decl_GetModuleFileName" = xyes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi + set = CPU_ALLOC(1024); + CPU_ZERO_S(CPU_ALLOC_SIZE(1024), set); + CPU_SET_S(CPU_ALLOC_SIZE(1024), 0, set); + CPU_FREE(set); -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_GETMODULEFILENAME $ac_have_decl + ; + return 0; +} _ACEOF +if ac_fn_c_try_link "$LINENO" +then : +printf "%s\n" "#define HWLOC_HAVE_CPU_SET_S 1" >>confdefs.h - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lgdi32" >&5 -$as_echo_n "checking for main in -lgdi32... " >&6; } -if ${ac_cv_lib_gdi32_main+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lgdi32 $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working syscall with 6 parameters" >&5 +printf %s "checking for working syscall with 6 parameters... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ + #include + #include + int -main () +main (void) { -return main (); +syscall(0, 1, 2, 3, 4, 5, 6); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_gdi32_main=yes -else - ac_cv_lib_gdi32_main=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_gdi32_main" >&5 -$as_echo "$ac_cv_lib_gdi32_main" >&6; } -if test "x$ac_cv_lib_gdi32_main" = xyes; then : - HWLOC_LIBS="-lgdi32 $HWLOC_LIBS" +if ac_fn_c_try_link "$LINENO" +then : -$as_echo "#define HAVE_LIBGDI32 1" >>confdefs.h +printf "%s\n" "#define HWLOC_HAVE_SYSCALL 1" >>confdefs.h + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PostQuitMessage in -luser32" >&5 -$as_echo_n "checking for PostQuitMessage in -luser32... " >&6; } -if ${ac_cv_lib_user32_PostQuitMessage+:} false; then : - $as_echo_n "(cached) " >&6 -else + # Linux libudev support + if test "x$enable_libudev" != xno; then + for ac_header in libudev.h +do : + ac_fn_c_check_header_compile "$LINENO" "libudev.h" "ac_cv_header_libudev_h" "$ac_includes_default" +if test "x$ac_cv_header_libudev_h" = xyes +then : + printf "%s\n" "#define HAVE_LIBUDEV_H 1" >>confdefs.h + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for udev_device_new_from_subsystem_sysname in -ludev" >&5 +printf %s "checking for udev_device_new_from_subsystem_sysname in -ludev... " >&6; } +if test ${ac_cv_lib_udev_udev_device_new_from_subsystem_sysname+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS -LIBS="-luser32 $LIBS" +LIBS="-ludev $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 PostQuitMessage (); +char udev_device_new_from_subsystem_sysname (); int -main () +main (void) { -return PostQuitMessage (); +return udev_device_new_from_subsystem_sysname (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_user32_PostQuitMessage=yes -else - ac_cv_lib_user32_PostQuitMessage=no +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_udev_udev_device_new_from_subsystem_sysname=yes +else $as_nop + ac_cv_lib_udev_udev_device_new_from_subsystem_sysname=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_user32_PostQuitMessage" >&5 -$as_echo "$ac_cv_lib_user32_PostQuitMessage" >&6; } -if test "x$ac_cv_lib_user32_PostQuitMessage" = xyes; then : - hwloc_have_user32="yes" -fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_udev_udev_device_new_from_subsystem_sysname" >&5 +printf "%s\n" "$ac_cv_lib_udev_udev_device_new_from_subsystem_sysname" >&6; } +if test "x$ac_cv_lib_udev_udev_device_new_from_subsystem_sysname" = xyes +then : + HWLOC_LIBS="$HWLOC_LIBS -ludev" - for ac_prog in lib -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_MS_LIB+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $HWLOC_MS_LIB in - [\\/]* | ?:[\\/]*) - ac_cv_path_HWLOC_MS_LIB="$HWLOC_MS_LIB" # 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_MS_LIB="$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 +printf "%s\n" "#define HWLOC_HAVE_LIBUDEV 1" >>confdefs.h - ;; -esac -fi -HWLOC_MS_LIB=$ac_cv_path_HWLOC_MS_LIB -if test -n "$HWLOC_MS_LIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HWLOC_MS_LIB" >&5 -$as_echo "$HWLOC_MS_LIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi +fi - test -n "$HWLOC_MS_LIB" && break -done +fi +done + fi - echo "**** end of Windows-specific checks" + echo "**** end of Linux-specific checks" echo fi - if test x$hwloc_solaris = xyes; then - echo - echo "**** Solaris-specific checks" + if test "x$hwloc_linux" != "xyes" ; then + # Don't look for sys/sysctl.h on Linux because it's deprecated and + # generates a warning in GCC10. Also it's unneeded. + ac_fn_c_check_header_compile "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_param_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_PARAM_H 1" >>confdefs.h - for ac_header in sys/lgrp_user.h +fi + + for ac_header in sys/sysctl.h do : - ac_fn_c_check_header_mongrel "$LINENO" "sys/lgrp_user.h" "ac_cv_header_sys_lgrp_user_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_lgrp_user_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SYS_LGRP_USER_H 1 -_ACEOF + ac_fn_c_check_header_compile "$LINENO" "sys/sysctl.h" "ac_cv_header_sys_sysctl_h" " + $ac_includes_default + #if HAVE_SYS_PARAM_H + #include + #endif - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lgrp_init in -llgrp" >&5 -$as_echo_n "checking for lgrp_init in -llgrp... " >&6; } -if ${ac_cv_lib_lgrp_lgrp_init+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-llgrp $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +" +if test "x$ac_cv_header_sys_sysctl_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_SYSCTL_H 1" >>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 lgrp_init (); -int -main () -{ -return lgrp_init (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_lgrp_lgrp_init=yes -else - ac_cv_lib_lgrp_lgrp_init=no + ac_fn_check_decl "$LINENO" "CTL_HW" "ac_cv_have_decl_CTL_HW" " + #if HAVE_SYS_PARAM_H + #include + #endif + #include + +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_CTL_HW" = xyes +then : + ac_have_decl=1 +else $as_nop + ac_have_decl=0 fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +printf "%s\n" "#define HAVE_DECL_CTL_HW $ac_have_decl" >>confdefs.h +ac_fn_check_decl "$LINENO" "HW_NCPU" "ac_cv_have_decl_HW_NCPU" " + #if HAVE_SYS_PARAM_H + #include + #endif + #include + +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_HW_NCPU" = xyes +then : + ac_have_decl=1 +else $as_nop + ac_have_decl=0 fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lgrp_lgrp_init" >&5 -$as_echo "$ac_cv_lib_lgrp_lgrp_init" >&6; } -if test "x$ac_cv_lib_lgrp_lgrp_init" = xyes; then : - HWLOC_LIBS="-llgrp $HWLOC_LIBS" +printf "%s\n" "#define HAVE_DECL_HW_NCPU $ac_have_decl" >>confdefs.h +ac_fn_check_decl "$LINENO" "HW_REALMEM64" "ac_cv_have_decl_HW_REALMEM64" " + #if HAVE_SYS_PARAM_H + #include + #endif + #include + +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_HW_REALMEM64" = xyes +then : + ac_have_decl=1 +else $as_nop + ac_have_decl=0 +fi +printf "%s\n" "#define HAVE_DECL_HW_REALMEM64 $ac_have_decl" >>confdefs.h +ac_fn_check_decl "$LINENO" "HW_MEMSIZE64" "ac_cv_have_decl_HW_MEMSIZE64" " + #if HAVE_SYS_PARAM_H + #include + #endif + #include + +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_HW_MEMSIZE64" = xyes +then : + ac_have_decl=1 +else $as_nop + ac_have_decl=0 +fi +printf "%s\n" "#define HAVE_DECL_HW_MEMSIZE64 $ac_have_decl" >>confdefs.h +ac_fn_check_decl "$LINENO" "HW_PHYSMEM64" "ac_cv_have_decl_HW_PHYSMEM64" " + #if HAVE_SYS_PARAM_H + #include + #endif + #include + +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_HW_PHYSMEM64" = xyes +then : + ac_have_decl=1 +else $as_nop + ac_have_decl=0 +fi +printf "%s\n" "#define HAVE_DECL_HW_PHYSMEM64 $ac_have_decl" >>confdefs.h +ac_fn_check_decl "$LINENO" "HW_USERMEM64" "ac_cv_have_decl_HW_USERMEM64" " + #if HAVE_SYS_PARAM_H + #include + #endif + #include + +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_HW_USERMEM64" = xyes +then : + ac_have_decl=1 +else $as_nop + ac_have_decl=0 +fi +printf "%s\n" "#define HAVE_DECL_HW_USERMEM64 $ac_have_decl" >>confdefs.h +ac_fn_check_decl "$LINENO" "HW_REALMEM" "ac_cv_have_decl_HW_REALMEM" " + #if HAVE_SYS_PARAM_H + #include + #endif + #include + +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_HW_REALMEM" = xyes +then : + ac_have_decl=1 +else $as_nop + ac_have_decl=0 +fi +printf "%s\n" "#define HAVE_DECL_HW_REALMEM $ac_have_decl" >>confdefs.h +ac_fn_check_decl "$LINENO" "HW_MEMSIZE" "ac_cv_have_decl_HW_MEMSIZE" " + #if HAVE_SYS_PARAM_H + #include + #endif + #include + +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_HW_MEMSIZE" = xyes +then : + ac_have_decl=1 +else $as_nop + ac_have_decl=0 +fi +printf "%s\n" "#define HAVE_DECL_HW_MEMSIZE $ac_have_decl" >>confdefs.h +ac_fn_check_decl "$LINENO" "HW_PHYSMEM" "ac_cv_have_decl_HW_PHYSMEM" " + #if HAVE_SYS_PARAM_H + #include + #endif + #include -$as_echo "#define HAVE_LIBLGRP 1" >>confdefs.h +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_HW_PHYSMEM" = xyes +then : + ac_have_decl=1 +else $as_nop + ac_have_decl=0 +fi +printf "%s\n" "#define HAVE_DECL_HW_PHYSMEM $ac_have_decl" >>confdefs.h +ac_fn_check_decl "$LINENO" "HW_USERMEM" "ac_cv_have_decl_HW_USERMEM" " + #if HAVE_SYS_PARAM_H + #include + #endif + #include - ac_fn_c_check_decl "$LINENO" "lgrp_latency_cookie" "ac_cv_have_decl_lgrp_latency_cookie" "#include -" -if test "x$ac_cv_have_decl_lgrp_latency_cookie" = xyes; then : +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_HW_USERMEM" = xyes +then : ac_have_decl=1 -else +else $as_nop ac_have_decl=0 fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_LGRP_LATENCY_COOKIE $ac_have_decl -_ACEOF +printf "%s\n" "#define HAVE_DECL_HW_USERMEM $ac_have_decl" >>confdefs.h fi +done -fi + # Don't detect sysctl* on Linux because its sysctl() syscall is + # long deprecated and unneeded. Some libc still expose the symbol + # and raise a big warning at link time. -done + # Do a full link test instead of just using AC_CHECK_FUNCS, which + # just checks to see if the symbol exists or not. For example, + # the prototype of sysctl uses u_int, which on some platforms + # (such as FreeBSD) is only defined under __BSD_VISIBLE, __USE_BSD + # or other similar definitions. So while the symbols "sysctl" and + # "sysctlbyname" might still be available in libc (which autoconf + # checks for), they might not be actually usable. + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysctl" >&5 +printf %s "checking for sysctl... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - for ac_header in kstat.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "kstat.h" "ac_cv_header_kstat_h" "$ac_includes_default" -if test "x$ac_cv_header_kstat_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_KSTAT_H 1 + + #include + #include + #include + +int +main (void) +{ + + return sysctl(NULL,0,NULL,NULL,NULL,0); + + ; + return 0; +} _ACEOF +if ac_fn_c_try_link "$LINENO" +then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lkstat" >&5 -$as_echo_n "checking for main in -lkstat... " >&6; } -if ${ac_cv_lib_kstat_main+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lkstat $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext +printf "%s\n" "#define HAVE_SYSCTL 1" >>confdefs.h + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysctlbyname" >&5 +printf %s "checking for sysctlbyname... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ + #include + #include + #include + int -main () +main (void) { -return main (); + + return sysctlbyname(NULL,NULL,NULL,NULL,0); + ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_kstat_main=yes -else - ac_cv_lib_kstat_main=no +if ac_fn_c_try_link "$LINENO" +then : + +printf "%s\n" "#define HAVE_SYSCTLBYNAME 1" >>confdefs.h + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kstat_main" >&5 -$as_echo "$ac_cv_lib_kstat_main" >&6; } -if test "x$ac_cv_lib_kstat_main" = xyes; then : - HWLOC_LIBS="-lkstat $HWLOC_LIBS" + fi + + ac_fn_check_decl "$LINENO" "pthread_setaffinity_np" "ac_cv_have_decl_pthread_setaffinity_np" " + #include + #ifdef HAVE_PTHREAD_NP_H + # include + #endif -$as_echo "#define HAVE_LIBKSTAT 1" >>confdefs.h +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_pthread_setaffinity_np" = xyes +then : + ac_have_decl=1 +else $as_nop + ac_have_decl=0 +fi +printf "%s\n" "#define HAVE_DECL_PTHREAD_SETAFFINITY_NP $ac_have_decl" >>confdefs.h +if test $ac_have_decl = 1 +then : +else $as_nop + : fi + ac_fn_check_decl "$LINENO" "pthread_getaffinity_np" "ac_cv_have_decl_pthread_getaffinity_np" " + #include + #ifdef HAVE_PTHREAD_NP_H + # include + #endif +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_pthread_getaffinity_np" = xyes +then : + ac_have_decl=1 +else $as_nop + ac_have_decl=0 fi +printf "%s\n" "#define HAVE_DECL_PTHREAD_GETAFFINITY_NP $ac_have_decl" >>confdefs.h +if test $ac_have_decl = 1 +then : -done +else $as_nop + : +fi - for ac_header in picl.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "picl.h" "ac_cv_header_picl_h" "$ac_includes_default" -if test "x$ac_cv_header_picl_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_PICL_H 1 -_ACEOF + ac_fn_check_decl "$LINENO" "fabsf" "ac_cv_have_decl_fabsf" "#include +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_fabsf" = xyes +then : + ac_have_decl=1 +else $as_nop + ac_have_decl=0 +fi +printf "%s\n" "#define HAVE_DECL_FABSF $ac_have_decl" >>confdefs.h +if test $ac_have_decl = 1 +then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for picl_initialize in -lpicl" >&5 -$as_echo_n "checking for picl_initialize in -lpicl... " >&6; } -if ${ac_cv_lib_picl_picl_initialize+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fabsf in -lm" >&5 +printf %s "checking for fabsf in -lm... " >&6; } +if test ${ac_cv_lib_m_fabsf+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS -LIBS="-lpicl $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 picl_initialize (); +char fabsf (); int -main () +main (void) { -return picl_initialize (); +return fabsf (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_picl_picl_initialize=yes -else - ac_cv_lib_picl_picl_initialize=no +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_m_fabsf=yes +else $as_nop + ac_cv_lib_m_fabsf=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_picl_picl_initialize" >&5 -$as_echo "$ac_cv_lib_picl_picl_initialize" >&6; } -if test "x$ac_cv_lib_picl_picl_initialize" = xyes; then : - HWLOC_LIBS="-lpicl $HWLOC_LIBS" -fi - +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_fabsf" >&5 +printf "%s\n" "$ac_cv_lib_m_fabsf" >&6; } +if test "x$ac_cv_lib_m_fabsf" = xyes +then : + need_libm=yes fi -done - - echo "**** end of Solaris-specific checks" - echo - fi +fi - if test x$hwloc_aix = xyes; then - echo - echo "**** AIX-specific checks" + ac_fn_check_decl "$LINENO" "modff" "ac_cv_have_decl_modff" "#include +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_modff" = xyes +then : + ac_have_decl=1 +else $as_nop + ac_have_decl=0 +fi +printf "%s\n" "#define HAVE_DECL_MODFF $ac_have_decl" >>confdefs.h +if test $ac_have_decl = 1 +then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_getthrds_np" >&5 -$as_echo_n "checking for library containing pthread_getthrds_np... " >&6; } -if ${ac_cv_search_pthread_getthrds_np+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for modff in -lm" >&5 +printf %s "checking for modff in -lm... " >&6; } +if test ${ac_cv_lib_m_modff+y} +then : + printf %s "(cached) " >&6 +else $as_nop + 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 pthread_getthrds_np (); +char modff (); int -main () +main (void) { -return pthread_getthrds_np (); +return modff (); ; return 0; } _ACEOF -for ac_lib in '' pthread; 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_getthrds_np=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if ${ac_cv_search_pthread_getthrds_np+:} false; then : - break +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_m_modff=yes +else $as_nop + ac_cv_lib_m_modff=no fi -done -if ${ac_cv_search_pthread_getthrds_np+:} false; then : - -else - ac_cv_search_pthread_getthrds_np=no +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_modff" >&5 +printf "%s\n" "$ac_cv_lib_m_modff" >&6; } +if test "x$ac_cv_lib_m_modff" = xyes +then : + need_libm=yes fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_getthrds_np" >&5 -$as_echo "$ac_cv_search_pthread_getthrds_np" >&6; } -ac_res=$ac_cv_search_pthread_getthrds_np -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - - -$as_echo "#define HWLOC_HAVE_PTHREAD_GETTHRDS_NP 1" >>confdefs.h fi - - echo "**** end of AIX-specific checks" - echo + if test x$need_libm = xyes; then + HWLOC_LIBS="-lm $HWLOC_LIBS" fi - if test x$hwloc_linux = xyes; then - echo - echo "**** Linux-specific checks" + ac_fn_check_decl "$LINENO" "_SC_NPROCESSORS_ONLN" "ac_cv_have_decl__SC_NPROCESSORS_ONLN" "#include +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl__SC_NPROCESSORS_ONLN" = xyes +then : + ac_have_decl=1 +else $as_nop + ac_have_decl=0 +fi +printf "%s\n" "#define HAVE_DECL__SC_NPROCESSORS_ONLN $ac_have_decl" >>confdefs.h +if test $ac_have_decl = 1 +then : - ac_fn_c_check_decl "$LINENO" "sched_getcpu" "ac_cv_have_decl_sched_getcpu" " - #ifndef _GNU_SOURCE - # define _GNU_SOURCE - #endif - #include +else $as_nop + : +fi +ac_fn_check_decl "$LINENO" "_SC_NPROCESSORS_CONF" "ac_cv_have_decl__SC_NPROCESSORS_CONF" "#include +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl__SC_NPROCESSORS_CONF" = xyes +then : + ac_have_decl=1 +else $as_nop + ac_have_decl=0 +fi +printf "%s\n" "#define HAVE_DECL__SC_NPROCESSORS_CONF $ac_have_decl" >>confdefs.h +if test $ac_have_decl = 1 +then : -" -if test "x$ac_cv_have_decl_sched_getcpu" = xyes; then : +else $as_nop + : +fi +ac_fn_check_decl "$LINENO" "_SC_NPROC_ONLN" "ac_cv_have_decl__SC_NPROC_ONLN" "#include +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl__SC_NPROC_ONLN" = xyes +then : ac_have_decl=1 -else +else $as_nop ac_have_decl=0 fi +printf "%s\n" "#define HAVE_DECL__SC_NPROC_ONLN $ac_have_decl" >>confdefs.h +if test $ac_have_decl = 1 +then : -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_SCHED_GETCPU $ac_have_decl -_ACEOF -if test $ac_have_decl = 1; then : +else $as_nop + : +fi +ac_fn_check_decl "$LINENO" "_SC_NPROC_CONF" "ac_cv_have_decl__SC_NPROC_CONF" "#include +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl__SC_NPROC_CONF" = xyes +then : + ac_have_decl=1 +else $as_nop + ac_have_decl=0 +fi +printf "%s\n" "#define HAVE_DECL__SC_NPROC_CONF $ac_have_decl" >>confdefs.h +if test $ac_have_decl = 1 +then : -else +else $as_nop : fi +ac_fn_check_decl "$LINENO" "_SC_PAGESIZE" "ac_cv_have_decl__SC_PAGESIZE" "#include +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl__SC_PAGESIZE" = xyes +then : + ac_have_decl=1 +else $as_nop + ac_have_decl=0 +fi +printf "%s\n" "#define HAVE_DECL__SC_PAGESIZE $ac_have_decl" >>confdefs.h +if test $ac_have_decl = 1 +then : +else $as_nop + : +fi +ac_fn_check_decl "$LINENO" "_SC_PAGE_SIZE" "ac_cv_have_decl__SC_PAGE_SIZE" "#include +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl__SC_PAGE_SIZE" = xyes +then : + ac_have_decl=1 +else $as_nop + ac_have_decl=0 +fi +printf "%s\n" "#define HAVE_DECL__SC_PAGE_SIZE $ac_have_decl" >>confdefs.h +if test $ac_have_decl = 1 +then : +else $as_nop + : +fi +ac_fn_check_decl "$LINENO" "_SC_LARGE_PAGESIZE" "ac_cv_have_decl__SC_LARGE_PAGESIZE" "#include +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl__SC_LARGE_PAGESIZE" = xyes +then : + ac_have_decl=1 +else $as_nop + ac_have_decl=0 +fi +printf "%s\n" "#define HAVE_DECL__SC_LARGE_PAGESIZE $ac_have_decl" >>confdefs.h +if test $ac_have_decl = 1 +then : - ac_fn_c_check_decl "$LINENO" "sched_setaffinity" "ac_cv_have_decl_sched_setaffinity" " -#ifndef _GNU_SOURCE -# define _GNU_SOURCE -#endif -#include +else $as_nop + : +fi -" -if test "x$ac_cv_have_decl_sched_setaffinity" = xyes; then : + ac_fn_c_check_header_compile "$LINENO" "mach/mach_init.h" "ac_cv_header_mach_mach_init_h" "$ac_includes_default" +if test "x$ac_cv_header_mach_mach_init_h" = xyes +then : + printf "%s\n" "#define HAVE_MACH_MACH_INIT_H 1" >>confdefs.h - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether function sched_setaffinity has a complete prototype" >&5 -$as_echo_n "checking whether function sched_setaffinity has a complete prototype... " >&6; } +fi - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + ac_fn_c_check_header_compile "$LINENO" "mach_init.h" "ac_cv_header_mach_init_h" "$ac_includes_default" +if test "x$ac_cv_header_mach_init_h" = xyes +then : + printf "%s\n" "#define HAVE_MACH_INIT_H 1" >>confdefs.h -#ifndef _GNU_SOURCE -# define _GNU_SOURCE -#endif -#include +fi + for ac_header in mach/mach_host.h +do : + ac_fn_c_check_header_compile "$LINENO" "mach/mach_host.h" "ac_cv_header_mach_mach_host_h" "$ac_includes_default" +if test "x$ac_cv_header_mach_mach_host_h" = xyes +then : + printf "%s\n" "#define HAVE_MACH_MACH_HOST_H 1" >>confdefs.h -int -main () -{ -sched_setaffinity(1,2,3,4,5,6,7,8,9,10); + ac_fn_c_check_func "$LINENO" "host_info" "ac_cv_func_host_info" +if test "x$ac_cv_func_host_info" = xyes +then : + printf "%s\n" "#define HAVE_HOST_INFO 1" >>confdefs.h - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +fi -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - hwloc_have_sched_setaffinity=yes +fi -$as_echo "#define HWLOC_HAVE_SCHED_SETAFFINITY 1" >>confdefs.h +done - if test "$HWLOC_STRICT_ARGS_CFLAGS" = "FAIL"; then : + ac_fn_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_strtoull" = xyes +then : + ac_have_decl=1 +else $as_nop + ac_have_decl=0 +fi +printf "%s\n" "#define HAVE_DECL_STRTOULL $ac_have_decl" >>confdefs.h +if test $ac_have_decl = 1 +then : - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Support for sched_setaffinity() requires a C compiler which" >&5 -$as_echo "$as_me: WARNING: Support for sched_setaffinity() requires a C compiler which" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: considers incorrect argument counts to be a fatal error." >&5 -$as_echo "$as_me: WARNING: considers incorrect argument counts to be a fatal error." >&2;} - as_fn_error $? "Cannot continue." "$LINENO" 5 +else $as_nop + ac_fn_c_check_func "$LINENO" "strtoull" "ac_cv_func_strtoull" +if test "x$ac_cv_func_strtoull" = xyes +then : + printf "%s\n" "#define HAVE_STRTOULL 1" >>confdefs.h fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for old prototype of sched_setaffinity" >&5 -$as_echo_n "checking for old prototype of sched_setaffinity... " >&6; } - hwloc_save_CFLAGS=$CFLAGS - CFLAGS="$CFLAGS $HWLOC_STRICT_ARGS_CFLAGS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +fi - #ifndef _GNU_SOURCE - # define _GNU_SOURCE - #endif - #include - static unsigned long mask; -int -main () -{ - sched_setaffinity(0, (void*) &mask); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : + # Needed for Windows in private/misc.h + ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default" +if test "x$ac_cv_type_ssize_t" = xyes +then : + +printf "%s\n" "#define HAVE_SSIZE_T 1" >>confdefs.h -$as_echo "#define HWLOC_HAVE_OLD_SCHED_SETAFFINITY 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 core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$hwloc_save_CFLAGS + ac_fn_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_snprintf" = xyes +then : + ac_have_decl=1 +else $as_nop + ac_have_decl=0 +fi +printf "%s\n" "#define HAVE_DECL_SNPRINTF $ac_have_decl" >>confdefs.h + # strdup and putenv are declared in windows headers but marked deprecated + ac_fn_check_decl "$LINENO" "_strdup" "ac_cv_have_decl__strdup" "$ac_includes_default +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl__strdup" = xyes +then : + ac_have_decl=1 +else $as_nop + ac_have_decl=0 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +printf "%s\n" "#define HAVE_DECL__STRDUP $ac_have_decl" >>confdefs.h + + ac_fn_check_decl "$LINENO" "_putenv" "ac_cv_have_decl__putenv" "$ac_includes_default +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl__putenv" = xyes +then : + ac_have_decl=1 +else $as_nop + ac_have_decl=0 fi +printf "%s\n" "#define HAVE_DECL__PUTENV $ac_have_decl" >>confdefs.h + + # Could add mkdir and access for hwloc-gather-cpuid.c on Windows + broken_snprintf=no + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether snprintf is correct" >&5 +printf %s "checking whether snprintf is correct... " >&6; } + if test "$cross_compiling" = yes +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: don't know (cross-compiling)" >&5 +printf "%s\n" "don't know (cross-compiling)" >&6; } + broken_snprintf=maybe - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working CPU_SET" >&5 -$as_echo_n "checking for working CPU_SET... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #include - cpu_set_t set; +#include +#include +#include int -main () +main (void) { - CPU_ZERO(&set); CPU_SET(0, &set); + +char buf[7]; +assert(snprintf(buf, 7, "abcdef") == 6); +assert(snprintf(buf, 6, "abcdef") == 6); +assert(snprintf(buf, 5, "abcdef") == 6); +assert(snprintf(buf, 0, "abcdef") == 6); +assert(snprintf(NULL, 0, "abcdef") == 6); +return 0; + ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_run "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else $as_nop -$as_echo "#define HWLOC_HAVE_CPU_SET 1" >>confdefs.h + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + broken_snprintf=yes - { $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 core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working CPU_SET_S" >&5 -$as_echo_n "checking for working CPU_SET_S... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi - #include - cpu_set_t *set; -int -main () -{ + if test x$broken_snprintf = xno; then - set = CPU_ALLOC(1024); - CPU_ZERO_S(CPU_ALLOC_SIZE(1024), set); - CPU_SET_S(CPU_ALLOC_SIZE(1024), 0, set); - CPU_FREE(set); +printf "%s\n" "#define HWLOC_HAVE_CORRECT_SNPRINTF 1" >>confdefs.h - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : + fi -$as_echo "#define HWLOC_HAVE_CPU_SET_S 1" >>confdefs.h + ac_fn_check_decl "$LINENO" "getprogname" "ac_cv_have_decl_getprogname" "$ac_includes_default +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_getprogname" = xyes +then : + ac_have_decl=1 +else $as_nop + ac_have_decl=0 +fi +printf "%s\n" "#define HAVE_DECL_GETPROGNAME $ac_have_decl" >>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; } + ac_fn_check_decl "$LINENO" "getexecname" "ac_cv_have_decl_getexecname" "$ac_includes_default +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_getexecname" = xyes +then : + ac_have_decl=1 +else $as_nop + ac_have_decl=0 fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +printf "%s\n" "#define HAVE_DECL_GETEXECNAME $ac_have_decl" >>confdefs.h - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working syscall with 6 parameters" >&5 -$as_echo_n "checking for working syscall with 6 parameters... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + # program_invocation_name and __progname may be available but not exported in headers + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for program_invocation_name" >&5 +printf %s "checking for program_invocation_name... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #include - #include + #ifndef _GNU_SOURCE + # define _GNU_SOURCE + #endif + #include + #include + extern char *program_invocation_name; int -main () +main (void) { -syscall(0, 1, 2, 3, 4, 5, 6); + + return printf("%s\n", program_invocation_name); + ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : -$as_echo "#define HWLOC_HAVE_SYSCALL 1" >>confdefs.h +printf "%s\n" "#define HAVE_PROGRAM_INVOCATION_NAME 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; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __progname" >&5 +printf %s "checking for __progname... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - # Linux libudev support - if test "x$enable_libudev" != xno; then - for ac_header in libudev.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "libudev.h" "ac_cv_header_libudev_h" "$ac_includes_default" -if test "x$ac_cv_header_libudev_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBUDEV_H 1 -_ACEOF - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for udev_device_new_from_subsystem_sysname in -ludev" >&5 -$as_echo_n "checking for udev_device_new_from_subsystem_sysname in -ludev... " >&6; } -if ${ac_cv_lib_udev_udev_device_new_from_subsystem_sysname+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ludev $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + #include + extern char *__progname; -/* 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 udev_device_new_from_subsystem_sysname (); int -main () +main (void) { -return udev_device_new_from_subsystem_sysname (); + + return printf("%s\n", __progname); + ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_udev_udev_device_new_from_subsystem_sysname=yes -else - ac_cv_lib_udev_udev_device_new_from_subsystem_sysname=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_udev_udev_device_new_from_subsystem_sysname" >&5 -$as_echo "$ac_cv_lib_udev_udev_device_new_from_subsystem_sysname" >&6; } -if test "x$ac_cv_lib_udev_udev_device_new_from_subsystem_sysname" = xyes; then : - - HWLOC_LIBS="$HWLOC_LIBS -ludev" - -$as_echo "#define HWLOC_HAVE_LIBUDEV 1" >>confdefs.h - +if ac_fn_c_try_link "$LINENO" +then : -fi +printf "%s\n" "#define HAVE___PROGNAME 1" >>confdefs.h + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext -done - - fi - - echo "**** end of Linux-specific checks" - echo - fi + case ${target} in + *-*-mingw*|*-*-cygwin*) + hwloc_pid_t=HANDLE + hwloc_thread_t=HANDLE + ;; + *) + hwloc_pid_t=pid_t + ac_fn_c_check_type "$LINENO" "pthread_t" "ac_cv_type_pthread_t" "#include +" +if test "x$ac_cv_type_pthread_t" = xyes +then : - if test "x$hwloc_linux" != "xyes" ; then - # Don't look for sys/sysctl.h on Linux because it's deprecated and - # generates a warning in GCC10. Also it's unneeded. - 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 +printf "%s\n" "#define HAVE_PTHREAD_T 1" >>confdefs.h +hwloc_thread_t=pthread_t +else $as_nop + : fi -done + ;; + esac - for ac_header in sys/sysctl.h -do : - ac_fn_c_check_header_compile "$LINENO" "sys/sysctl.h" "ac_cv_header_sys_sysctl_h" " - $ac_includes_default - #if HAVE_SYS_PARAM_H - #include - #endif +printf "%s\n" "#define hwloc_pid_t $hwloc_pid_t" >>confdefs.h -" -if test "x$ac_cv_header_sys_sysctl_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SYS_SYSCTL_H 1 -_ACEOF + if test "x$hwloc_thread_t" != "x" ; then - ac_fn_c_check_decl "$LINENO" "CTL_HW" "ac_cv_have_decl_CTL_HW" " - #if HAVE_SYS_PARAM_H - #include - #endif - #include +printf "%s\n" "#define hwloc_thread_t $hwloc_thread_t" >>confdefs.h -" -if test "x$ac_cv_have_decl_CTL_HW" = xyes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi + fi -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_CTL_HW $ac_have_decl -_ACEOF -ac_fn_c_check_decl "$LINENO" "HW_NCPU" "ac_cv_have_decl_HW_NCPU" " - #if HAVE_SYS_PARAM_H - #include - #endif - #include + # Extract the first word of "bash", so it can be a program name with args. +set dummy bash; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_BASH+y} +then : + printf %s "(cached) " >&6 +else $as_nop + case $BASH in + [\\/]* | ?:[\\/]*) + ac_cv_path_BASH="$BASH" # 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 + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + 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_BASH="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$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 "x$ac_cv_have_decl_HW_NCPU" = xyes; then : - ac_have_decl=1 -else - ac_have_decl=0 + ;; +esac fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_HW_NCPU $ac_have_decl -_ACEOF -ac_fn_c_check_decl "$LINENO" "HW_REALMEM64" "ac_cv_have_decl_HW_REALMEM64" " - #if HAVE_SYS_PARAM_H - #include - #endif - #include - -" -if test "x$ac_cv_have_decl_HW_REALMEM64" = xyes; then : - ac_have_decl=1 +BASH=$ac_cv_path_BASH +if test -n "$BASH"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5 +printf "%s\n" "$BASH" >&6; } else - ac_have_decl=0 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_HW_REALMEM64 $ac_have_decl -_ACEOF -ac_fn_c_check_decl "$LINENO" "HW_MEMSIZE64" "ac_cv_have_decl_HW_MEMSIZE64" " - #if HAVE_SYS_PARAM_H - #include - #endif - #include -" -if test "x$ac_cv_have_decl_HW_MEMSIZE64" = xyes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_HW_MEMSIZE64 $ac_have_decl -_ACEOF -ac_fn_c_check_decl "$LINENO" "HW_PHYSMEM64" "ac_cv_have_decl_HW_PHYSMEM64" " - #if HAVE_SYS_PARAM_H - #include - #endif - #include -" -if test "x$ac_cv_have_decl_HW_PHYSMEM64" = xyes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi + 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 : + printf "%s\n" "#define HAVE_FFS 1" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_HW_PHYSMEM64 $ac_have_decl -_ACEOF -ac_fn_c_check_decl "$LINENO" "HW_USERMEM64" "ac_cv_have_decl_HW_USERMEM64" " - #if HAVE_SYS_PARAM_H - #include - #endif - #include -" -if test "x$ac_cv_have_decl_HW_USERMEM64" = xyes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi + ac_fn_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_ffs" = xyes +then : -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_HW_USERMEM64 $ac_have_decl -_ACEOF -ac_fn_c_check_decl "$LINENO" "HW_REALMEM" "ac_cv_have_decl_HW_REALMEM" " - #if HAVE_SYS_PARAM_H - #include - #endif - #include + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether function ffs has a complete prototype" >&5 +printf %s "checking whether function ffs has a complete prototype... " >&6; } -" -if test "x$ac_cv_have_decl_HW_REALMEM" = xyes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +int +main (void) +{ +ffs(1,2,3,4,5,6,7,8,9,10); -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_HW_REALMEM $ac_have_decl + ; + return 0; +} _ACEOF -ac_fn_c_check_decl "$LINENO" "HW_MEMSIZE" "ac_cv_have_decl_HW_MEMSIZE" " - #if HAVE_SYS_PARAM_H - #include - #endif - #include +if ac_fn_c_try_compile "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } -" -if test "x$ac_cv_have_decl_HW_MEMSIZE" = xyes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_HW_MEMSIZE $ac_have_decl -_ACEOF -ac_fn_c_check_decl "$LINENO" "HW_PHYSMEM" "ac_cv_have_decl_HW_PHYSMEM" " - #if HAVE_SYS_PARAM_H - #include - #endif - #include -" -if test "x$ac_cv_have_decl_HW_PHYSMEM" = xyes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi +printf "%s\n" "#define HWLOC_HAVE_DECL_FFS 1" >>confdefs.h + -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_HW_PHYSMEM $ac_have_decl -_ACEOF -ac_fn_c_check_decl "$LINENO" "HW_USERMEM" "ac_cv_have_decl_HW_USERMEM" " - #if HAVE_SYS_PARAM_H - #include - #endif - #include -" -if test "x$ac_cv_have_decl_HW_USERMEM" = xyes; then : - ac_have_decl=1 -else - ac_have_decl=0 +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_HW_USERMEM $ac_have_decl -_ACEOF +printf "%s\n" "#define HWLOC_HAVE_FFS 1" >>confdefs.h + + if ( $CC --version | grep gccfss ) >/dev/null 2>&1 ; then + +printf "%s\n" "#define HWLOC_HAVE_BROKEN_FFS 1" >>confdefs.h + + fi fi done + for ac_func in ffsl +do : + ac_fn_c_check_func "$LINENO" "ffsl" "ac_cv_func_ffsl" +if test "x$ac_cv_func_ffsl" = xyes +then : + printf "%s\n" "#define HAVE_FFSL 1" >>confdefs.h - # Don't detect sysctl* on Linux because its sysctl() syscall is - # long deprecated and unneeded. Some libc still expose the symbol - # and raise a big warning at link time. - # Do a full link test instead of just using AC_CHECK_FUNCS, which - # just checks to see if the symbol exists or not. For example, - # the prototype of sysctl uses u_int, which on some platforms - # (such as FreeBSD) is only defined under __BSD_VISIBLE, __USE_BSD - # or other similar definitions. So while the symbols "sysctl" and - # "sysctlbyname" might still be available in libc (which autoconf - # checks for), they might not be actually usable. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysctl" >&5 -$as_echo_n "checking for sysctl... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + ac_fn_check_decl "$LINENO" "ffsl" "ac_cv_have_decl_ffsl" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_ffsl" = xyes +then : - #include - #include - #include + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether function ffsl has a complete prototype" >&5 +printf %s "checking whether function ffsl has a complete prototype... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default int -main () +main (void) { -return sysctl(NULL,0,NULL,NULL,NULL,0); +ffsl(1,2,3,4,5,6,7,8,9,10); + ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } -$as_echo "#define HAVE_SYSCTL 1" >>confdefs.h +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } - { $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 core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysctlbyname" >&5 -$as_echo_n "checking for sysctlbyname... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - #include - #include - #include +printf "%s\n" "#define HWLOC_HAVE_DECL_FFSL 1" >>confdefs.h -int -main () -{ -return sysctlbyname(NULL,NULL,NULL,NULL,0); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : -$as_echo "#define HAVE_SYSCTLBYNAME 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 core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - fi - - ac_fn_c_check_decl "$LINENO" "pthread_setaffinity_np" "ac_cv_have_decl_pthread_setaffinity_np" " - #include - #ifdef HAVE_PTHREAD_NP_H - # include - #endif - -" -if test "x$ac_cv_have_decl_pthread_setaffinity_np" = xyes; then : - ac_have_decl=1 -else - ac_have_decl=0 +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_PTHREAD_SETAFFINITY_NP $ac_have_decl -_ACEOF -if test $ac_have_decl = 1; then : -else - : -fi +printf "%s\n" "#define HWLOC_HAVE_FFSL 1" >>confdefs.h - ac_fn_c_check_decl "$LINENO" "pthread_getaffinity_np" "ac_cv_have_decl_pthread_getaffinity_np" " - #include - #ifdef HAVE_PTHREAD_NP_H - # include - #endif -" -if test "x$ac_cv_have_decl_pthread_getaffinity_np" = xyes; then : - ac_have_decl=1 -else - ac_have_decl=0 fi -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_PTHREAD_GETAFFINITY_NP $ac_have_decl -_ACEOF -if test $ac_have_decl = 1; then : +done -else - : -fi + for ac_func in fls +do : + ac_fn_c_check_func "$LINENO" "fls" "ac_cv_func_fls" +if test "x$ac_cv_func_fls" = xyes +then : + printf "%s\n" "#define HAVE_FLS 1" >>confdefs.h - ac_fn_c_check_decl "$LINENO" "fabsf" "ac_cv_have_decl_fabsf" "#include -" -if test "x$ac_cv_have_decl_fabsf" = xyes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_FABSF $ac_have_decl -_ACEOF -if test $ac_have_decl = 1; then : + ac_fn_check_decl "$LINENO" "fls" "ac_cv_have_decl_fls" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_fls" = xyes +then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fabsf in -lm" >&5 -$as_echo_n "checking for fabsf in -lm... " >&6; } -if ${ac_cv_lib_m_fabsf+:} 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. */ + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether function fls has a complete prototype" >&5 +printf %s "checking whether function fls has a complete prototype... " >&6; } -/* 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 fabsf (); + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default int -main () +main (void) { -return fabsf (); +fls(1,2,3,4,5,6,7,8,9,10); + ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_m_fabsf=yes -else - ac_cv_lib_m_fabsf=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +if ac_fn_c_try_compile "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + + +printf "%s\n" "#define HWLOC_HAVE_DECL_FLS 1" >>confdefs.h + + + fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_fabsf" >&5 -$as_echo "$ac_cv_lib_m_fabsf" >&6; } -if test "x$ac_cv_lib_m_fabsf" = xyes; then : - need_libm=yes +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -fi +printf "%s\n" "#define HWLOC_HAVE_FLS 1" >>confdefs.h + - ac_fn_c_check_decl "$LINENO" "modff" "ac_cv_have_decl_modff" "#include -" -if test "x$ac_cv_have_decl_modff" = xyes; then : - ac_have_decl=1 -else - ac_have_decl=0 fi -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_MODFF $ac_have_decl -_ACEOF -if test $ac_have_decl = 1; then : +done - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for modff in -lm" >&5 -$as_echo_n "checking for modff in -lm... " >&6; } -if ${ac_cv_lib_m_modff+:} 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. */ + for ac_func in flsl +do : + ac_fn_c_check_func "$LINENO" "flsl" "ac_cv_func_flsl" +if test "x$ac_cv_func_flsl" = xyes +then : + printf "%s\n" "#define HAVE_FLSL 1" >>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 modff (); + + ac_fn_check_decl "$LINENO" "flsl" "ac_cv_have_decl_flsl" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_flsl" = xyes +then : + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether function flsl has a complete prototype" >&5 +printf %s "checking whether function flsl has a complete prototype... " >&6; } + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default int -main () +main (void) { -return modff (); +flsl(1,2,3,4,5,6,7,8,9,10); + ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_m_modff=yes -else - ac_cv_lib_m_modff=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_modff" >&5 -$as_echo "$ac_cv_lib_m_modff" >&6; } -if test "x$ac_cv_lib_m_modff" = xyes; then : - need_libm=yes -fi +if ac_fn_c_try_compile "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } -fi - if test x$need_libm = xyes; then - HWLOC_LIBS="-lm $HWLOC_LIBS" - fi +printf "%s\n" "#define HWLOC_HAVE_DECL_FLSL 1" >>confdefs.h - ac_fn_c_check_decl "$LINENO" "_SC_NPROCESSORS_ONLN" "ac_cv_have_decl__SC_NPROCESSORS_ONLN" "#include -" -if test "x$ac_cv_have_decl__SC_NPROCESSORS_ONLN" = xyes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL__SC_NPROCESSORS_ONLN $ac_have_decl -_ACEOF -if test $ac_have_decl = 1; then : -else - : fi -ac_fn_c_check_decl "$LINENO" "_SC_NPROCESSORS_CONF" "ac_cv_have_decl__SC_NPROCESSORS_CONF" "#include -" -if test "x$ac_cv_have_decl__SC_NPROCESSORS_CONF" = xyes; then : - ac_have_decl=1 -else - ac_have_decl=0 +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL__SC_NPROCESSORS_CONF $ac_have_decl -_ACEOF -if test $ac_have_decl = 1; then : -else - : -fi -ac_fn_c_check_decl "$LINENO" "_SC_NPROC_ONLN" "ac_cv_have_decl__SC_NPROC_ONLN" "#include -" -if test "x$ac_cv_have_decl__SC_NPROC_ONLN" = xyes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi +printf "%s\n" "#define HWLOC_HAVE_FLSL 1" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL__SC_NPROC_ONLN $ac_have_decl -_ACEOF -if test $ac_have_decl = 1; then : -else - : -fi -ac_fn_c_check_decl "$LINENO" "_SC_NPROC_CONF" "ac_cv_have_decl__SC_NPROC_CONF" "#include -" -if test "x$ac_cv_have_decl__SC_NPROC_CONF" = xyes; then : - ac_have_decl=1 -else - ac_have_decl=0 fi -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL__SC_NPROC_CONF $ac_have_decl -_ACEOF -if test $ac_have_decl = 1; then : +done -else - : -fi -ac_fn_c_check_decl "$LINENO" "_SC_PAGESIZE" "ac_cv_have_decl__SC_PAGESIZE" "#include -" -if test "x$ac_cv_have_decl__SC_PAGESIZE" = xyes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL__SC_PAGESIZE $ac_have_decl -_ACEOF -if test $ac_have_decl = 1; then : + for ac_func in clz +do : + ac_fn_c_check_func "$LINENO" "clz" "ac_cv_func_clz" +if test "x$ac_cv_func_clz" = xyes +then : + printf "%s\n" "#define HAVE_CLZ 1" >>confdefs.h -else - : -fi -ac_fn_c_check_decl "$LINENO" "_SC_PAGE_SIZE" "ac_cv_have_decl__SC_PAGE_SIZE" "#include -" -if test "x$ac_cv_have_decl__SC_PAGE_SIZE" = xyes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL__SC_PAGE_SIZE $ac_have_decl -_ACEOF -if test $ac_have_decl = 1; then : + ac_fn_check_decl "$LINENO" "clz" "ac_cv_have_decl_clz" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_clz" = xyes +then : -else - : -fi -ac_fn_c_check_decl "$LINENO" "_SC_LARGE_PAGESIZE" "ac_cv_have_decl__SC_LARGE_PAGESIZE" "#include -" -if test "x$ac_cv_have_decl__SC_LARGE_PAGESIZE" = xyes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether function clz has a complete prototype" >&5 +printf %s "checking whether function clz has a complete prototype... " >&6; } + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +int +main (void) +{ +clz(1,2,3,4,5,6,7,8,9,10); -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL__SC_LARGE_PAGESIZE $ac_have_decl + ; + return 0; +} _ACEOF -if test $ac_have_decl = 1; then : +if ac_fn_c_try_compile "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } -else - : -fi +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } - for ac_header in mach/mach_init.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "mach/mach_init.h" "ac_cv_header_mach_mach_init_h" "$ac_includes_default" -if test "x$ac_cv_header_mach_mach_init_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_MACH_MACH_INIT_H 1 -_ACEOF +printf "%s\n" "#define HWLOC_HAVE_DECL_CLZ 1" >>confdefs.h + + +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -done - for ac_header in mach_init.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "mach_init.h" "ac_cv_header_mach_init_h" "$ac_includes_default" -if test "x$ac_cv_header_mach_init_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_MACH_INIT_H 1 -_ACEOF +printf "%s\n" "#define HWLOC_HAVE_CLZ 1" >>confdefs.h + fi done - for ac_header in mach/mach_host.h + for ac_func in clzl do : - ac_fn_c_check_header_mongrel "$LINENO" "mach/mach_host.h" "ac_cv_header_mach_mach_host_h" "$ac_includes_default" -if test "x$ac_cv_header_mach_mach_host_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_MACH_MACH_HOST_H 1 -_ACEOF + ac_fn_c_check_func "$LINENO" "clzl" "ac_cv_func_clzl" +if test "x$ac_cv_func_clzl" = xyes +then : + printf "%s\n" "#define HAVE_CLZL 1" >>confdefs.h + + + ac_fn_check_decl "$LINENO" "clzl" "ac_cv_have_decl_clzl" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_clzl" = xyes +then : + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether function clzl has a complete prototype" >&5 +printf %s "checking whether function clzl has a complete prototype... " >&6; } + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +int +main (void) +{ +clzl(1,2,3,4,5,6,7,8,9,10); - for ac_func in host_info -do : - ac_fn_c_check_func "$LINENO" "host_info" "ac_cv_func_host_info" -if test "x$ac_cv_func_host_info" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_HOST_INFO 1 + ; + return 0; +} _ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } -fi -done +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } -fi +printf "%s\n" "#define HWLOC_HAVE_DECL_CLZL 1" >>confdefs.h -done - ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default -" -if test "x$ac_cv_have_decl_strtoull" = xyes; then : - ac_have_decl=1 -else - ac_have_decl=0 +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_STRTOULL $ac_have_decl -_ACEOF -if test $ac_have_decl = 1; then : -else - for ac_func in strtoull -do : - ac_fn_c_check_func "$LINENO" "strtoull" "ac_cv_func_strtoull" -if test "x$ac_cv_func_strtoull" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_STRTOULL 1 -_ACEOF +printf "%s\n" "#define HWLOC_HAVE_CLZL 1" >>confdefs.h + fi + done + if test "$hwloc_c_vendor" != "android" +then : + + for ac_func in openat +do : + ac_fn_c_check_func "$LINENO" "openat" "ac_cv_func_openat" +if test "x$ac_cv_func_openat" = xyes +then : + printf "%s\n" "#define HAVE_OPENAT 1" >>confdefs.h + hwloc_have_openat=yes fi +done +fi - # Needed for Windows in private/misc.h - ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default" -if test "x$ac_cv_type_ssize_t" = xyes; then : + ac_fn_c_check_header_compile "$LINENO" "malloc.h" "ac_cv_header_malloc_h" "$ac_includes_default" +if test "x$ac_cv_header_malloc_h" = xyes +then : + printf "%s\n" "#define HAVE_MALLOC_H 1" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define HAVE_SSIZE_T 1 -_ACEOF +fi + ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" +if test "x$ac_cv_func_getpagesize" = xyes +then : + printf "%s\n" "#define HAVE_GETPAGESIZE 1" >>confdefs.h fi +ac_fn_c_check_func "$LINENO" "memalign" "ac_cv_func_memalign" +if test "x$ac_cv_func_memalign" = xyes +then : + printf "%s\n" "#define HAVE_MEMALIGN 1" >>confdefs.h - ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default -" -if test "x$ac_cv_have_decl_snprintf" = xyes; then : - ac_have_decl=1 -else - ac_have_decl=0 fi +ac_fn_c_check_func "$LINENO" "posix_memalign" "ac_cv_func_posix_memalign" +if test "x$ac_cv_func_posix_memalign" = xyes +then : + printf "%s\n" "#define HAVE_POSIX_MEMALIGN 1" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_SNPRINTF $ac_have_decl -_ACEOF - - # strdup and putenv are declared in windows headers but marked deprecated - ac_fn_c_check_decl "$LINENO" "_strdup" "ac_cv_have_decl__strdup" "$ac_includes_default -" -if test "x$ac_cv_have_decl__strdup" = xyes; then : - ac_have_decl=1 -else - ac_have_decl=0 fi -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL__STRDUP $ac_have_decl -_ACEOF - ac_fn_c_check_decl "$LINENO" "_putenv" "ac_cv_have_decl__putenv" "$ac_includes_default -" -if test "x$ac_cv_have_decl__putenv" = xyes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi + ac_fn_c_check_header_compile "$LINENO" "sys/utsname.h" "ac_cv_header_sys_utsname_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_utsname_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_UTSNAME_H 1" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL__PUTENV $ac_have_decl -_ACEOF +fi - # Could add mkdir and access for hwloc-gather-cpuid.c on Windows + ac_fn_c_check_func "$LINENO" "uname" "ac_cv_func_uname" +if test "x$ac_cv_func_uname" = xyes +then : + printf "%s\n" "#define HAVE_UNAME 1" >>confdefs.h - broken_snprintf=no - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf is correct" >&5 -$as_echo_n "checking whether snprintf is correct... " >&6; } - if test "$cross_compiling" = yes; then : +fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: don't know (cross-compiling)" >&5 -$as_echo "don't know (cross-compiling)" >&6; } - broken_snprintf=maybe -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + # Components and pciaccess require pthread_mutex, see if it needs -lpthread + hwloc_pthread_mutex_happy=no + # Try without explicit -lpthread first + ac_fn_c_check_func "$LINENO" "pthread_mutex_lock" "ac_cv_func_pthread_mutex_lock" +if test "x$ac_cv_func_pthread_mutex_lock" = xyes +then : + hwloc_pthread_mutex_happy=yes + HWLOC_LIBS_PRIVATE="$HWLOC_LIBS_PRIVATE -lpthread" +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: trying again with -lpthread ..." >&5 +printf "%s\n" "$as_me: trying again with -lpthread ..." >&6;} + # Try again with explicit -lpthread + $as_unset ac_cv_func_pthread_mutex_lock + tmp_save_LIBS=$LIBS + LIBS="$LIBS -lpthread" + ac_fn_c_check_func "$LINENO" "pthread_mutex_lock" "ac_cv_func_pthread_mutex_lock" +if test "x$ac_cv_func_pthread_mutex_lock" = xyes +then : + hwloc_pthread_mutex_happy=yes + HWLOC_LIBS="$HWLOC_LIBS -lpthread" -#include -#include -#include +fi -int -main () -{ + LIBS="$tmp_save_LIBS" -char buf[7]; -assert(snprintf(buf, 7, "abcdef") == 6); -assert(snprintf(buf, 6, "abcdef") == 6); -assert(snprintf(buf, 5, "abcdef") == 6); -assert(snprintf(buf, 0, "abcdef") == 6); -assert(snprintf(NULL, 0, "abcdef") == 6); -return 0; +fi - ; - 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 + if test "x$hwloc_pthread_mutex_happy" = "xyes" +then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - broken_snprintf=yes +printf "%s\n" "#define HWLOC_HAVE_PTHREAD_MUTEX 1" >>confdefs.h -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext fi + if test "x$hwloc_pthread_mutex_happy" != xyes -a "x$hwloc_windows" != xyes +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: pthread_mutex_lock not available, required for thread-safe initialization on non-Windows platforms." >&5 +printf "%s\n" "$as_me: WARNING: pthread_mutex_lock not available, required for thread-safe initialization on non-Windows platforms." >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Please report this to the hwloc-devel mailing list." >&5 +printf "%s\n" "$as_me: WARNING: Please report this to the hwloc-devel mailing list." >&2;} + as_fn_error $? "Cannot continue" "$LINENO" 5 +fi - if test x$broken_snprintf = xno; then - -$as_echo "#define HWLOC_HAVE_CORRECT_SNPRINTF 1" >>confdefs.h + if test "$hwloc_mode" != "embedded" +then : + ac_fn_c_check_header_compile "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default" +if test "x$ac_cv_header_valgrind_valgrind_h" = xyes +then : + printf "%s\n" "#define HAVE_VALGRIND_VALGRIND_H 1" >>confdefs.h - fi +fi - ac_fn_c_check_decl "$LINENO" "getprogname" "ac_cv_have_decl_getprogname" "$ac_includes_default -" -if test "x$ac_cv_have_decl_getprogname" = xyes; then : + ac_fn_check_decl "$LINENO" "RUNNING_ON_VALGRIND" "ac_cv_have_decl_RUNNING_ON_VALGRIND" "#include +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_RUNNING_ON_VALGRIND" = xyes +then : ac_have_decl=1 -else +else $as_nop ac_have_decl=0 fi +printf "%s\n" "#define HAVE_DECL_RUNNING_ON_VALGRIND $ac_have_decl" >>confdefs.h +if test $ac_have_decl = 1 +then : -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_GETPROGNAME $ac_have_decl -_ACEOF - - ac_fn_c_check_decl "$LINENO" "getexecname" "ac_cv_have_decl_getexecname" "$ac_includes_default -" -if test "x$ac_cv_have_decl_getexecname" = xyes; then : - ac_have_decl=1 -else - ac_have_decl=0 +else $as_nop + : fi -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_GETEXECNAME $ac_have_decl -_ACEOF - # program_invocation_name and __progname may be available but not exported in headers - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for program_invocation_name" >&5 -$as_echo_n "checking for program_invocation_name... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +else $as_nop - #ifndef _GNU_SOURCE - # define _GNU_SOURCE - #endif - #include - #include - extern char *program_invocation_name; -int -main () -{ +printf "%s\n" "#define HAVE_DECL_RUNNING_ON_VALGRIND 0" >>confdefs.h - return printf("%s\n", program_invocation_name); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : +fi -$as_echo "#define HAVE_PROGRAM_INVOCATION_NAME 1" >>confdefs.h + if test "x$enable_32bits_pci_domain" = "xyes" +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; } -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __progname" >&5 -$as_echo_n "checking for __progname... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +printf "%s\n" "#define HWLOC_HAVE_32BITS_PCI_DOMAIN 1" >>confdefs.h - #include - extern char *__progname; -int -main () -{ +fi - return printf("%s\n", __progname); + # PCI support via libpciaccess. NOTE: we do not support + # libpci/pciutils because that library is GPL and is incompatible + # with our BSD license. + hwloc_pciaccess_happy=no + if test "x$enable_io" != xno && test "x$enable_pci" != xno; then + echo + echo "**** pciaccess configuration" - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : + hwloc_pciaccess_happy=yes -$as_echo "#define HAVE___PROGNAME 1" >>confdefs.h - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + HWLOC_pkg_failed=no + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PCIACCESS" >&5 +printf %s "checking for PCIACCESS... " >&6; } + if test -n "$PKG_CONFIG"; then + if test -n "$HWLOC_PCIACCESS_CFLAGS"; then + HWLOC_pkg_cv_HWLOC_PCIACCESS_CFLAGS="$HWLOC_PCIACCESS_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --silence-errors \"pciaccess\""; } >&5 + ($PKG_CONFIG --exists --silence-errors "pciaccess") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + HWLOC_pkg_cv_HWLOC_PCIACCESS_CFLAGS=`$PKG_CONFIG --cflags "pciaccess" 2>/dev/null` + else + HWLOC_pkg_failed=yes +fi + fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + HWLOC_pkg_failed=untried fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - - case ${target} in - *-*-mingw*|*-*-cygwin*) - hwloc_pid_t=HANDLE - hwloc_thread_t=HANDLE - ;; - *) - hwloc_pid_t=pid_t - ac_fn_c_check_type "$LINENO" "pthread_t" "ac_cv_type_pthread_t" "#include -" -if test "x$ac_cv_type_pthread_t" = xyes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_PTHREAD_T 1 -_ACEOF -hwloc_thread_t=pthread_t + if test -n "$PKG_CONFIG"; then + if test -n "$HWLOC_PCIACCESS_LIBS"; then + HWLOC_pkg_cv_HWLOC_PCIACCESS_LIBS="$HWLOC_PCIACCESS_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --silence-errors \"pciaccess\""; } >&5 + ($PKG_CONFIG --exists --silence-errors "pciaccess") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + HWLOC_pkg_cv_HWLOC_PCIACCESS_LIBS=`$PKG_CONFIG --libs "pciaccess" 2>/dev/null` + else + HWLOC_pkg_failed=yes +fi + fi else - : + HWLOC_pkg_failed=untried fi - ;; - esac - -cat >>confdefs.h <<_ACEOF -#define hwloc_pid_t $hwloc_pid_t -_ACEOF - - if test "x$hwloc_thread_t" != "x" ; then -cat >>confdefs.h <<_ACEOF -#define hwloc_thread_t $hwloc_thread_t -_ACEOF - fi - # Extract the first word of "bash", so it can be a program name with args. -set dummy bash; 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_BASH+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $BASH in - [\\/]* | ?:[\\/]*) - ac_cv_path_BASH="$BASH" # 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_BASH="$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 + # Check for failure of pkg-config + if test $HWLOC_pkg_failed = yes; then - ;; -esac -fi -BASH=$ac_cv_path_BASH -if test -n "$BASH"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5 -$as_echo "$BASH" >&6; } +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + HWLOC_pkg_short_errors_supported=yes else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + HWLOC_pkg_short_errors_supported=no fi + if test $HWLOC_pkg_short_errors_supported = yes; then + HWLOC_PCIACCESS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "pciaccess" 2>&1` + else + HWLOC_PCIACCESS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "pciaccess" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$HWLOC_PCIACCESS_PKG_ERRORS" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + hwloc_pciaccess_happy=no + elif test $HWLOC_pkg_failed = untried; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cannot check without pkg-config" >&5 +printf "%s\n" "cannot check without pkg-config" >&6; } + hwloc_pciaccess_happy=no + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + + # If we got good results from pkg-config, check that they + # actually work (i.e., that we can link against the resulting + # $LIBS). The canonical example why we do this is if + # pkg-config returns 64 bit libraries but ./configure was run + # with CFLAGS=-m32 LDFLAGS=-m32. pkg-config gave us valid + # results, but we'll fail if we try to link. So detect that + # failure now. + # There are also cases on Mac where pkg-config returns paths + # that do not actually exists until some magic is applied. + # https://www.open-mpi.org/community/lists/hwloc-devel/2015/03/4402.php + # So check whether we find the header as well. + hwloc_cflags_save=$CFLAGS + hwloc_cppflags_save=$CPPFLAGS + hwloc_libs_save=$LIBS + CFLAGS="$CFLAGS $HWLOC_pkg_cv_HWLOC_PCIACCESS_CFLAGS" + CPPFLAGS="$CPPFLAGS $HWLOC_pkg_cv_HWLOC_PCIACCESS_CFLAGS" + LIBS="$LIBS $HWLOC_pkg_cv_HWLOC_PCIACCESS_LIBS" + ac_fn_c_check_header_compile "$LINENO" "pciaccess.h" "ac_cv_header_pciaccess_h" "$ac_includes_default" +if test "x$ac_cv_header_pciaccess_h" = xyes +then : + + ac_fn_c_check_func "$LINENO" "pci_slot_match_iterator_create" "ac_cv_func_pci_slot_match_iterator_create" +if test "x$ac_cv_func_pci_slot_match_iterator_create" = xyes +then : + hwloc_result=yes +else $as_nop + hwloc_result=no +fi - 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 +else $as_nop + hwloc_result=no +fi + CFLAGS=$hwloc_cflags_save + CPPFLAGS=$hwloc_cppflags_save + LIBS=$hwloc_libs_save - ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default" -if test "x$ac_cv_have_decl_ffs" = xyes; then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for final PCIACCESS support" >&5 +printf %s "checking for final PCIACCESS support... " >&6; } + if test "$hwloc_result" = "yes" +then : + HWLOC_PCIACCESS_CFLAGS=$HWLOC_pkg_cv_HWLOC_PCIACCESS_CFLAGS + HWLOC_PCIACCESS_LIBS=$HWLOC_pkg_cv_HWLOC_PCIACCESS_LIBS + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + : +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + hwloc_pciaccess_happy=no +fi + fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether function ffs has a complete prototype" >&5 -$as_echo_n "checking whether function ffs has a complete prototype... " >&6; } + # Only add the REQUIRES if we got pciaccess through pkg-config. + # Otherwise we don't know if pciaccess.pc is installed + if test "$hwloc_pciaccess_happy" = "yes" +then : + HWLOC_PCIACCESS_REQUIRES=pciaccess +fi - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + # Just for giggles, if we didn't find a pciaccess pkg-config, + # just try looking for its header file and library. + if test "$hwloc_pciaccess_happy" != "yes" +then : + ac_fn_c_check_header_compile "$LINENO" "pciaccess.h" "ac_cv_header_pciaccess_h" "$ac_includes_default" +if test "x$ac_cv_header_pciaccess_h" = xyes +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pci_slot_match_iterator_create in -lpciaccess" >&5 +printf %s "checking for pci_slot_match_iterator_create in -lpciaccess... " >&6; } +if test ${ac_cv_lib_pciaccess_pci_slot_match_iterator_create+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lpciaccess $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default + +/* 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. */ +char pci_slot_match_iterator_create (); int -main () +main (void) { -ffs(1,2,3,4,5,6,7,8,9,10); - +return pci_slot_match_iterator_create (); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - - -$as_echo "#define HWLOC_HAVE_DECL_FFS 1" >>confdefs.h - - - +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_pciaccess_pci_slot_match_iterator_create=yes +else $as_nop + ac_cv_lib_pciaccess_pci_slot_match_iterator_create=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pciaccess_pci_slot_match_iterator_create" >&5 +printf "%s\n" "$ac_cv_lib_pciaccess_pci_slot_match_iterator_create" >&6; } +if test "x$ac_cv_lib_pciaccess_pci_slot_match_iterator_create" = xyes +then : + hwloc_pciaccess_happy=yes + HWLOC_PCIACCESS_LIBS="-lpciaccess" +fi -$as_echo "#define HWLOC_HAVE_FFS 1" >>confdefs.h - - if ( $CC --version | grep gccfss ) >/dev/null 2>&1 ; then - -$as_echo "#define HWLOC_HAVE_BROKEN_FFS 1" >>confdefs.h - - fi fi -done - for ac_func in ffsl -do : - ac_fn_c_check_func "$LINENO" "ffsl" "ac_cv_func_ffsl" -if test "x$ac_cv_func_ffsl" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_FFSL 1 -_ACEOF +fi - ac_fn_c_check_decl "$LINENO" "ffsl" "ac_cv_have_decl_ffsl" "$ac_includes_default" -if test "x$ac_cv_have_decl_ffsl" = xyes; then : + if test "$hwloc_pciaccess_happy" = "yes" +then : + hwloc_components="$hwloc_components pci" + hwloc_pci_component_maybeplugin=1 +fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether function ffsl has a complete prototype" >&5 -$as_echo_n "checking whether function ffsl has a complete prototype... " >&6; } + echo "**** end of pciaccess configuration" + fi + # If we asked for pci support but couldn't deliver, fail + if test "$enable_pci" = "yes" -a "$hwloc_pciaccess_happy" = "no" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Specified --enable-pci switch, but could not" >&5 +printf "%s\n" "$as_me: WARNING: Specified --enable-pci switch, but could not" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: find appropriate support" >&5 +printf "%s\n" "$as_me: WARNING: find appropriate support" >&2;} + as_fn_error $? "Cannot continue" "$LINENO" 5 +fi + # don't add LIBS/CFLAGS/REQUIRES yet, depends on plugins - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -ffsl(1,2,3,4,5,6,7,8,9,10); + if test "x$enable_io" != xno && test "x$enable_opencl" != xno -o "x$enable_cuda" != xno -o "x$enable_nvml" != xno; then + echo + echo "**** NVIDIA-common configuration" - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + # Try to find CUDA pkg-config using a specific CUDA version + # Use --with-cuda-version first, or $CUDA_VERSION + cuda_version=$CUDA_VERSION + if test "x$with_cuda_version" != xno -a "x$with_cuda_version" != x; then + cuda_version=$with_cuda_version + fi + if test x$cuda_version != x; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if cuda-$cuda_version.pc exists" >&5 +printf %s "checking if cuda-$cuda_version.pc exists... " >&6; } + if test -n "$PKG_CONFIG" && \ + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --silence-errors \"cuda-\$cuda_version\""; } >&5 + ($PKG_CONFIG --exists --silence-errors "cuda-$cuda_version") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + cudapc=cuda-$cuda_version + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + if test -n "$PKG_CONFIG"; then + if test -n "$cuda_includedir"; then + HWLOC_pkg_cv_cuda_includedir="$cuda_includedir" + else + if test -n "$PKG_CONFIG" && \ + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --silence-errors \"\$cudapc\""; } >&5 + ($PKG_CONFIG --exists --silence-errors "$cudapc") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + HWLOC_pkg_cv_cuda_includedir=`$PKG_CONFIG --variable=includedir "$cudapc" 2>/dev/null` + else + HWLOC_pkg_failed=yes +fi + fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - - -$as_echo "#define HWLOC_HAVE_DECL_FFSL 1" >>confdefs.h - - + HWLOC_pkg_failed=untried +fi + if test -n "$PKG_CONFIG"; then + if test -n "$cuda_libdir"; then + HWLOC_pkg_cv_cuda_libdir="$cuda_libdir" + else + if test -n "$PKG_CONFIG" && \ + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --silence-errors \"\$cudapc\""; } >&5 + ($PKG_CONFIG --exists --silence-errors "$cudapc") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + HWLOC_pkg_cv_cuda_libdir=`$PKG_CONFIG --variable=libdir "$cudapc" 2>/dev/null` + else + HWLOC_pkg_failed=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +else + HWLOC_pkg_failed=untried fi - -$as_echo "#define HWLOC_HAVE_FFSL 1" >>confdefs.h - - + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -done + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if cudart-$cuda_version.pc exists" >&5 +printf %s "checking if cudart-$cuda_version.pc exists... " >&6; } + if test -n "$PKG_CONFIG" && \ + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --silence-errors \"cudart-\$cuda_version\""; } >&5 + ($PKG_CONFIG --exists --silence-errors "cudart-$cuda_version") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + cudartpc=cudart-$cuda_version + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } - for ac_func in fls -do : - ac_fn_c_check_func "$LINENO" "fls" "ac_cv_func_fls" -if test "x$ac_cv_func_fls" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_FLS 1 -_ACEOF + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + fi + # OpenCL/NVML/CUDA may use CUDA directories, define common directories + # libnvidia-ml.so (and libcuda.so for tests) is under stubs + # when the driver isn't installed on the build machine. + # hwloc programs will fail to link if libnvidia-ml.so.1 is not available there too. + if test "x$with_cuda" != xno -a "x$with_cuda" != x; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: using custom CUDA install path $with_cuda ..." >&5 +printf "%s\n" "$as_me: using custom CUDA install path $with_cuda ..." >&6;} + if test "x${ac_cv_sizeof_void_p}" = x4; then + HWLOC_CUDA_COMMON_LDFLAGS="-L$with_cuda/lib/ -L$with_cuda/lib/stubs/" + else + HWLOC_CUDA_COMMON_LDFLAGS="-L$with_cuda/lib64/ -L$with_cuda/lib64/stubs/" + fi + HWLOC_CUDA_COMMON_CPPFLAGS="-I$with_cuda/include/" + + else if test x$HWLOC_pkg_cv_cuda_includedir != x -a x$HWLOC_pkg_cv_cuda_libdir != x; then + # or use cuda libdir/includedir from cuda.pc above + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: using CUDA libdir and includedir from ${cudapc}.pc ..." >&5 +printf "%s\n" "$as_me: using CUDA libdir and includedir from ${cudapc}.pc ..." >&6;} + HWLOC_CUDA_COMMON_LDFLAGS="-L$HWLOC_pkg_cv_cuda_libdir -L$HWLOC_pkg_cv_cuda_libdir/stubs/" + HWLOC_CUDA_COMMON_CPPFLAGS="-I$HWLOC_pkg_cv_cuda_includedir" + + else if test -f /usr/local/cuda/include/cuda.h; then + # or try the default /usr/local/cuda + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: using default CUDA install path /usr/local/cuda ..." >&5 +printf "%s\n" "$as_me: using default CUDA install path /usr/local/cuda ..." >&6;} + HWLOC_CUDA_COMMON_LDFLAGS="-L/usr/local/cuda/lib64/ -L/usr/local/cuda/lib64/stubs/" + HWLOC_CUDA_COMMON_CPPFLAGS="-I/usr/local/cuda/include/" + fi fi fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: common CUDA/OpenCL/NVML CPPFLAGS: $HWLOC_CUDA_COMMON_CPPFLAGS" >&5 +printf "%s\n" "$as_me: common CUDA/OpenCL/NVML CPPFLAGS: $HWLOC_CUDA_COMMON_CPPFLAGS" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: common CUDA/OpenCL/NVML LDFLAGS: $HWLOC_CUDA_COMMON_LDFLAGS" >&5 +printf "%s\n" "$as_me: common CUDA/OpenCL/NVML LDFLAGS: $HWLOC_CUDA_COMMON_LDFLAGS" >&6;} + + echo "**** end of NVIDIA-common configuration" + fi - ac_fn_c_check_decl "$LINENO" "fls" "ac_cv_have_decl_fls" "$ac_includes_default" -if test "x$ac_cv_have_decl_fls" = xyes; then : + # CUDA support + hwloc_have_cuda=no + hwloc_have_cudart=no + if test "x$enable_io" != xno && test "x$enable_cuda" != "xno"; then + echo + echo "**** CUDA configuration" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether function fls has a complete prototype" >&5 -$as_echo_n "checking whether function fls has a complete prototype... " >&6; } + # Look for CUDA first, for our test only + if test "x$cudapc" != x; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -fls(1,2,3,4,5,6,7,8,9,10); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + HWLOC_pkg_failed=no + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CUDA" >&5 +printf %s "checking for CUDA... " >&6; } + if test -n "$PKG_CONFIG"; then + if test -n "$HWLOC_CUDA_CFLAGS"; then + HWLOC_pkg_cv_HWLOC_CUDA_CFLAGS="$HWLOC_CUDA_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --silence-errors \"\$cudapc\""; } >&5 + ($PKG_CONFIG --exists --silence-errors "$cudapc") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + HWLOC_pkg_cv_HWLOC_CUDA_CFLAGS=`$PKG_CONFIG --cflags "$cudapc" 2>/dev/null` + else + HWLOC_pkg_failed=yes +fi + fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - - -$as_echo "#define HWLOC_HAVE_DECL_FLS 1" >>confdefs.h - - + HWLOC_pkg_failed=untried +fi + if test -n "$PKG_CONFIG"; then + if test -n "$HWLOC_CUDA_LIBS"; then + HWLOC_pkg_cv_HWLOC_CUDA_LIBS="$HWLOC_CUDA_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --silence-errors \"\$cudapc\""; } >&5 + ($PKG_CONFIG --exists --silence-errors "$cudapc") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + HWLOC_pkg_cv_HWLOC_CUDA_LIBS=`$PKG_CONFIG --libs "$cudapc" 2>/dev/null` + else + HWLOC_pkg_failed=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +else + HWLOC_pkg_failed=untried fi -$as_echo "#define HWLOC_HAVE_FLS 1" >>confdefs.h + # Check for failure of pkg-config + if test $HWLOC_pkg_failed = yes; then +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + HWLOC_pkg_short_errors_supported=yes +else + HWLOC_pkg_short_errors_supported=no fi -done - - for ac_func in flsl -do : - ac_fn_c_check_func "$LINENO" "flsl" "ac_cv_func_flsl" -if test "x$ac_cv_func_flsl" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_FLSL 1 -_ACEOF - - - ac_fn_c_check_decl "$LINENO" "flsl" "ac_cv_have_decl_flsl" "$ac_includes_default" -if test "x$ac_cv_have_decl_flsl" = xyes; then : - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether function flsl has a complete prototype" >&5 -$as_echo_n "checking whether function flsl has a complete prototype... " >&6; } - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -flsl(1,2,3,4,5,6,7,8,9,10); + if test $HWLOC_pkg_short_errors_supported = yes; then + HWLOC_CUDA_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$cudapc" 2>&1` + else + HWLOC_CUDA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$cudapc" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$HWLOC_CUDA_PKG_ERRORS" >&5 - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + as_fn_error $? "Package requirements ($cudapc) were not met: -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +$HWLOC_CUDA_PKG_ERRORS +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. -$as_echo "#define HWLOC_HAVE_DECL_FLSL 1" >>confdefs.h +Alternatively, you may set the environment variables HWLOC_CUDA_CFLAGS +and HWLOC_CUDA_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" "$LINENO" 5 + elif test $HWLOC_pkg_failed = untried; then + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. +Alternatively, you may set the environment variables HWLOC_CUDA_CFLAGS +and HWLOC_CUDA_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +To get pkg-config, see . +See \`config.log' for more details" "$LINENO" 5; } + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + # If we got good results from pkg-config, check that they + # actually work (i.e., that we can link against the resulting + # $LIBS). The canonical example why we do this is if + # pkg-config returns 64 bit libraries but ./configure was run + # with CFLAGS=-m32 LDFLAGS=-m32. pkg-config gave us valid + # results, but we'll fail if we try to link. So detect that + # failure now. + # There are also cases on Mac where pkg-config returns paths + # that do not actually exists until some magic is applied. + # https://www.open-mpi.org/community/lists/hwloc-devel/2015/03/4402.php + # So check whether we find the header as well. + hwloc_cflags_save=$CFLAGS + hwloc_cppflags_save=$CPPFLAGS + hwloc_libs_save=$LIBS + CFLAGS="$CFLAGS $HWLOC_pkg_cv_HWLOC_CUDA_CFLAGS" + CPPFLAGS="$CPPFLAGS $HWLOC_pkg_cv_HWLOC_CUDA_CFLAGS" + LIBS="$LIBS $HWLOC_pkg_cv_HWLOC_CUDA_LIBS" + ac_fn_c_check_header_compile "$LINENO" "cuda.h" "ac_cv_header_cuda_h" "$ac_includes_default" +if test "x$ac_cv_header_cuda_h" = xyes +then : + + ac_fn_c_check_func "$LINENO" "cuInit" "ac_cv_func_cuInit" +if test "x$ac_cv_func_cuInit" = xyes +then : + hwloc_result=yes +else $as_nop + hwloc_result=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - - - -$as_echo "#define HWLOC_HAVE_FLSL 1" >>confdefs.h +else $as_nop + hwloc_result=no fi -done + CFLAGS=$hwloc_cflags_save + CPPFLAGS=$hwloc_cppflags_save + LIBS=$hwloc_libs_save - for ac_func in clz + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for final CUDA support" >&5 +printf %s "checking for final CUDA support... " >&6; } + if test "$hwloc_result" = "yes" +then : + HWLOC_CUDA_CFLAGS=$HWLOC_pkg_cv_HWLOC_CUDA_CFLAGS + HWLOC_CUDA_LIBS=$HWLOC_pkg_cv_HWLOC_CUDA_LIBS + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + hwloc_have_cuda=yes +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + : +fi + fi + else + HWLOC_CUDA_CPPFLAGS="$HWLOC_CUDA_COMMON_CPPFLAGS" + HWLOC_CUDA_LDFLAGS="$HWLOC_CUDA_COMMON_LDFLAGS" + tmp_save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $HWLOC_CUDA_CPPFLAGS" + tmp_save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $HWLOC_CUDA_LDFLAGS" + for ac_header in cuda.h do : - ac_fn_c_check_func "$LINENO" "clz" "ac_cv_func_clz" -if test "x$ac_cv_func_clz" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_CLZ 1 -_ACEOF - - - ac_fn_c_check_decl "$LINENO" "clz" "ac_cv_have_decl_clz" "$ac_includes_default" -if test "x$ac_cv_have_decl_clz" = xyes; then : - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether function clz has a complete prototype" >&5 -$as_echo_n "checking whether function clz has a complete prototype... " >&6; } + ac_fn_c_check_header_compile "$LINENO" "cuda.h" "ac_cv_header_cuda_h" "$ac_includes_default" +if test "x$ac_cv_header_cuda_h" = xyes +then : + printf "%s\n" "#define HAVE_CUDA_H 1" >>confdefs.h - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if CUDA_VERSION >= 3020" >&5 +printf %s "checking if CUDA_VERSION >= 3020... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default + +#include +#ifndef CUDA_VERSION +#error CUDA_VERSION undefined +#elif CUDA_VERSION < 3020 +#error CUDA_VERSION too old +#endif int -main () +main (void) { -clz(1,2,3,4,5,6,7,8,9,10); - +int i = 3; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +if ac_fn_c_try_compile "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for cuInit in -lcuda" >&5 +printf %s "checking for cuInit in -lcuda... " >&6; } +if test ${ac_cv_lib_cuda_cuInit+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lcuda $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. */ +char cuInit (); +int +main (void) +{ +return cuInit (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_cuda_cuInit=yes +else $as_nop + ac_cv_lib_cuda_cuInit=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cuda_cuInit" >&5 +printf "%s\n" "$ac_cv_lib_cuda_cuInit" >&6; } +if test "x$ac_cv_lib_cuda_cuInit" = xyes +then : -$as_echo "#define HWLOC_HAVE_DECL_CLZ 1" >>confdefs.h + HWLOC_CUDA_LIBS="-lcuda" + hwloc_have_cuda=yes +fi +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi +done + CPPFLAGS="$tmp_save_CPPFLAGS" + LDFLAGS="$tmp_save_LDFLAGS" + fi + if test x$hwloc_have_cuda = xyes; then -$as_echo "#define HWLOC_HAVE_CLZ 1" >>confdefs.h -fi -done - for ac_func in clzl -do : - ac_fn_c_check_func "$LINENO" "clzl" "ac_cv_func_clzl" -if test "x$ac_cv_func_clzl" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_CLZL 1 -_ACEOF +printf "%s\n" "#define HAVE_CUDA 1" >>confdefs.h + fi - ac_fn_c_check_decl "$LINENO" "clzl" "ac_cv_have_decl_clzl" "$ac_includes_default" -if test "x$ac_cv_have_decl_clzl" = xyes; then : + # Look for CUDART now, for library and tests + if test "x$cudartpc" != x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether function clzl has a complete prototype" >&5 -$as_echo_n "checking whether function clzl has a complete prototype... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -clzl(1,2,3,4,5,6,7,8,9,10); + HWLOC_pkg_failed=no + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CUDART" >&5 +printf %s "checking for CUDART... " >&6; } - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + if test -n "$PKG_CONFIG"; then + if test -n "$HWLOC_CUDART_CFLAGS"; then + HWLOC_pkg_cv_HWLOC_CUDART_CFLAGS="$HWLOC_CUDART_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --silence-errors \"\$cudartpc\""; } >&5 + ($PKG_CONFIG --exists --silence-errors "$cudartpc") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + HWLOC_pkg_cv_HWLOC_CUDART_CFLAGS=`$PKG_CONFIG --cflags "$cudartpc" 2>/dev/null` + else + HWLOC_pkg_failed=yes +fi + fi +else + HWLOC_pkg_failed=untried +fi + if test -n "$PKG_CONFIG"; then + if test -n "$HWLOC_CUDART_LIBS"; then + HWLOC_pkg_cv_HWLOC_CUDART_LIBS="$HWLOC_CUDART_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --silence-errors \"\$cudartpc\""; } >&5 + ($PKG_CONFIG --exists --silence-errors "$cudartpc") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + HWLOC_pkg_cv_HWLOC_CUDART_LIBS=`$PKG_CONFIG --libs "$cudartpc" 2>/dev/null` + else + HWLOC_pkg_failed=yes +fi + fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + HWLOC_pkg_failed=untried +fi -$as_echo "#define HWLOC_HAVE_DECL_CLZL 1" >>confdefs.h + # Check for failure of pkg-config + if test $HWLOC_pkg_failed = yes; then +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + HWLOC_pkg_short_errors_supported=yes +else + HWLOC_pkg_short_errors_supported=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - + if test $HWLOC_pkg_short_errors_supported = yes; then + HWLOC_CUDART_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$cudartpc" 2>&1` + else + HWLOC_CUDART_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$cudartpc" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$HWLOC_CUDART_PKG_ERRORS" >&5 + as_fn_error $? "Package requirements ($cudartpc) were not met: -$as_echo "#define HWLOC_HAVE_CLZL 1" >>confdefs.h +$HWLOC_CUDART_PKG_ERRORS +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. -fi -done +Alternatively, you may set the environment variables HWLOC_CUDART_CFLAGS +and HWLOC_CUDART_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" "$LINENO" 5 + elif test $HWLOC_pkg_failed = untried; then + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. +Alternatively, you may set the environment variables HWLOC_CUDART_CFLAGS +and HWLOC_CUDART_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. - if test "$hwloc_c_vendor" != "android"; then : - for ac_func in openat -do : - ac_fn_c_check_func "$LINENO" "openat" "ac_cv_func_openat" -if test "x$ac_cv_func_openat" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_OPENAT 1 -_ACEOF - hwloc_have_openat=yes -fi -done +To get pkg-config, see . +See \`config.log' for more details" "$LINENO" 5; } + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + # If we got good results from pkg-config, check that they + # actually work (i.e., that we can link against the resulting + # $LIBS). The canonical example why we do this is if + # pkg-config returns 64 bit libraries but ./configure was run + # with CFLAGS=-m32 LDFLAGS=-m32. pkg-config gave us valid + # results, but we'll fail if we try to link. So detect that + # failure now. + # There are also cases on Mac where pkg-config returns paths + # that do not actually exists until some magic is applied. + # https://www.open-mpi.org/community/lists/hwloc-devel/2015/03/4402.php + # So check whether we find the header as well. + hwloc_cflags_save=$CFLAGS + hwloc_cppflags_save=$CPPFLAGS + hwloc_libs_save=$LIBS + CFLAGS="$CFLAGS $HWLOC_pkg_cv_HWLOC_CUDART_CFLAGS" + CPPFLAGS="$CPPFLAGS $HWLOC_pkg_cv_HWLOC_CUDART_CFLAGS" + LIBS="$LIBS $HWLOC_pkg_cv_HWLOC_CUDART_LIBS" + ac_fn_c_check_header_compile "$LINENO" "cuda_runtime_api.h" "ac_cv_header_cuda_runtime_api_h" "$ac_includes_default" +if test "x$ac_cv_header_cuda_runtime_api_h" = xyes +then : + + ac_fn_c_check_func "$LINENO" "cudaGetDeviceProperties" "ac_cv_func_cudaGetDeviceProperties" +if test "x$ac_cv_func_cudaGetDeviceProperties" = xyes +then : + hwloc_result=yes +else $as_nop + hwloc_result=no fi - 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 +else $as_nop + hwloc_result=no fi -done - - for ac_func in getpagesize memalign posix_memalign -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 + CFLAGS=$hwloc_cflags_save + CPPFLAGS=$hwloc_cppflags_save + LIBS=$hwloc_libs_save + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for final CUDART support" >&5 +printf %s "checking for final CUDART support... " >&6; } + if test "$hwloc_result" = "yes" +then : + HWLOC_CUDART_CFLAGS=$HWLOC_pkg_cv_HWLOC_CUDART_CFLAGS + HWLOC_CUDART_LIBS=$HWLOC_pkg_cv_HWLOC_CUDART_LIBS + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + + hwloc_have_cudart=yes + HWLOC_CUDART_REQUIRES=$cudartpc + +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + : fi -done + fi + else + HWLOC_CUDART_CPPFLAGS="$HWLOC_CUDA_COMMON_CPPFLAGS" + HWLOC_CUDART_LDFLAGS="$HWLOC_CUDA_COMMON_LDFLAGS" + tmp_save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $HWLOC_CUDART_CPPFLAGS" + tmp_save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $HWLOC_CUDART_LDFLAGS" + for ac_header in cuda_runtime_api.h +do : + ac_fn_c_check_header_compile "$LINENO" "cuda_runtime_api.h" "ac_cv_header_cuda_runtime_api_h" "$ac_includes_default" +if test "x$ac_cv_header_cuda_runtime_api_h" = xyes +then : + printf "%s\n" "#define HAVE_CUDA_RUNTIME_API_H 1" >>confdefs.h + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if CUDART_VERSION >= 3020" >&5 +printf %s "checking if CUDART_VERSION >= 3020... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - for ac_header in sys/utsname.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "sys/utsname.h" "ac_cv_header_sys_utsname_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_utsname_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SYS_UTSNAME_H 1 +#include +#ifndef CUDART_VERSION +#error CUDART_VERSION undefined +#elif CUDART_VERSION < 3020 +#error CUDART_VERSION too old +#endif +int +main (void) +{ +int i = 3; + ; + return 0; +} _ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for cudaGetDeviceProperties in -lcudart" >&5 +printf %s "checking for cudaGetDeviceProperties in -lcudart... " >&6; } +if test ${ac_cv_lib_cudart_cudaGetDeviceProperties+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lcudart $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. */ +char cudaGetDeviceProperties (); +int +main (void) +{ +return cudaGetDeviceProperties (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_cudart_cudaGetDeviceProperties=yes +else $as_nop + ac_cv_lib_cudart_cudaGetDeviceProperties=no fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cudart_cudaGetDeviceProperties" >&5 +printf "%s\n" "$ac_cv_lib_cudart_cudaGetDeviceProperties" >&6; } +if test "x$ac_cv_lib_cudart_cudaGetDeviceProperties" = xyes +then : -done - - for ac_func in uname -do : - ac_fn_c_check_func "$LINENO" "uname" "ac_cv_func_uname" -if test "x$ac_cv_func_uname" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_UNAME 1 -_ACEOF + HWLOC_CUDART_LIBS="-lcudart" + hwloc_have_cudart=yes fi -done - if test "$hwloc_mode" != "embedded"; then : - for ac_header in valgrind/valgrind.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default" -if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_VALGRIND_VALGRIND_H 1 -_ACEOF +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi done + CPPFLAGS="$tmp_save_CPPFLAGS" + LDFLAGS="$tmp_save_LDFLAGS" + fi + if test x$hwloc_have_cudart = xyes; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a program linked with -lcudart can run" >&5 +printf %s "checking whether a program linked with -lcudart can run... " >&6; } + tmp_save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $HWLOC_CUDART_LDFLAGS" + tmp_save_LIBS="$LIBS" + LIBS="$LIBS $HWLOC_CUDART_LIBS" + if test "$cross_compiling" = yes +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: don't know (cross-compiling)" >&5 +printf "%s\n" "don't know (cross-compiling)" >&6; } +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - ac_fn_c_check_decl "$LINENO" "RUNNING_ON_VALGRIND" "ac_cv_have_decl_RUNNING_ON_VALGRIND" "#include -" -if test "x$ac_cv_have_decl_RUNNING_ON_VALGRIND" = xyes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_RUNNING_ON_VALGRIND $ac_have_decl -_ACEOF -if test $ac_have_decl = 1; then : +#include +int cudaGetDeviceCount(int *); -else - : -fi +int +main (void) +{ +int n; +cudaGetDeviceCount(&n); /* may fail if using stubs, but we're looking for libcudart load error instead only */ +return 0; -else + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + hwloc_cuda_warning=no +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + hwloc_cuda_warning=yes +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi -$as_echo "#define HAVE_DECL_RUNNING_ON_VALGRIND 0" >>confdefs.h + LDFLAGS="$tmp_save_LDFLAGS" + LIBS="$tmp_save_LIBS" -fi - if test "x$enable_32bits_pci_domain" = "xyes"; then : -$as_echo "#define HWLOC_HAVE_32BITS_PCI_DOMAIN 1" >>confdefs.h +printf "%s\n" "#define HWLOC_HAVE_CUDART 1" >>confdefs.h + fi + if test "$enable_cuda" = "yes" -a "$hwloc_have_cudart" = "no" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Specified --enable-cuda switch, but could not" >&5 +printf "%s\n" "$as_me: WARNING: Specified --enable-cuda switch, but could not" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: find appropriate support" >&5 +printf "%s\n" "$as_me: WARNING: find appropriate support" >&2;} + as_fn_error $? "Cannot continue" "$LINENO" 5 +fi + if test "x$with_cuda_version" != x -a "$hwloc_have_cudart" = "no" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Specified --with-cuda-version switch, but could not" >&5 +printf "%s\n" "$as_me: WARNING: Specified --with-cuda-version switch, but could not" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: find appropriate support" >&5 +printf "%s\n" "$as_me: WARNING: find appropriate support" >&2;} + as_fn_error $? "Cannot continue" "$LINENO" 5 fi - # PCI support via libpciaccess. NOTE: we do not support - # libpci/pciutils because that library is GPL and is incompatible - # with our BSD license. - hwloc_pciaccess_happy=no - if test "x$enable_io" != xno && test "x$enable_pci" != xno; then - hwloc_pciaccess_happy=yes + if test "x$hwloc_have_cudart" = "xyes"; then + hwloc_components="$hwloc_components cuda" + hwloc_cuda_component_maybeplugin=1 + fi + echo "**** end of CUDA configuration" + fi + # don't add LIBS/CFLAGS yet, depends on plugins - HWLOC_pkg_failed=no - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PCIACCESS" >&5 -$as_echo_n "checking for PCIACCESS... " >&6; } + # NVML support + hwloc_nvml_happy=no + hwloc_nvml_warning=no + if test "x$enable_io" != xno && test "x$enable_nvml" != "xno"; then + echo + echo "**** NVML configuration" + + hwloc_nvml_happy=yes + HWLOC_NVML_CPPFLAGS="$HWLOC_CUDA_COMMON_CPPFLAGS" + HWLOC_NVML_LDFLAGS="$HWLOC_CUDA_COMMON_LDFLAGS" + tmp_save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $HWLOC_NVML_CPPFLAGS" + tmp_save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $HWLOC_NVML_LDFLAGS" + tmp_save_LIBS="$LIBS" + for ac_header in nvml.h +do : + ac_fn_c_check_header_compile "$LINENO" "nvml.h" "ac_cv_header_nvml_h" "$ac_includes_default" +if test "x$ac_cv_header_nvml_h" = xyes +then : + printf "%s\n" "#define HAVE_NVML_H 1" >>confdefs.h + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for nvmlInit in -lnvidia-ml" >&5 +printf %s "checking for nvmlInit in -lnvidia-ml... " >&6; } +if test ${ac_cv_lib_nvidia_ml_nvmlInit+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lnvidia-ml $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - if test -n "$PKG_CONFIG"; then - if test -n "$HWLOC_PCIACCESS_CFLAGS"; then - HWLOC_pkg_cv_HWLOC_PCIACCESS_CFLAGS="$HWLOC_PCIACCESS_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --silence-errors \"pciaccess\""; } >&5 - ($PKG_CONFIG --exists --silence-errors "pciaccess") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - HWLOC_pkg_cv_HWLOC_PCIACCESS_CFLAGS=`$PKG_CONFIG --cflags "pciaccess" 2>/dev/null` - else - HWLOC_pkg_failed=yes +/* 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. */ +char nvmlInit (); +int +main (void) +{ +return nvmlInit (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_nvidia_ml_nvmlInit=yes +else $as_nop + ac_cv_lib_nvidia_ml_nvmlInit=no fi - fi -else - HWLOC_pkg_failed=untried +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nvidia_ml_nvmlInit" >&5 +printf "%s\n" "$ac_cv_lib_nvidia_ml_nvmlInit" >&6; } +if test "x$ac_cv_lib_nvidia_ml_nvmlInit" = xyes +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a program linked with -lnvidia-ml can run" >&5 +printf %s "checking whether a program linked with -lnvidia-ml can run... " >&6; } + HWLOC_NVML_LIBS="-lnvidia-ml" + LIBS="$LIBS $HWLOC_NVML_LIBS" + if test "$cross_compiling" = yes +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: don't know (cross-compiling)" >&5 +printf "%s\n" "don't know (cross-compiling)" >&6; } + hwloc_nvml_happy=maybe +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - if test -n "$PKG_CONFIG"; then - if test -n "$HWLOC_PCIACCESS_LIBS"; then - HWLOC_pkg_cv_HWLOC_PCIACCESS_LIBS="$HWLOC_PCIACCESS_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --silence-errors \"pciaccess\""; } >&5 - ($PKG_CONFIG --exists --silence-errors "pciaccess") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - HWLOC_pkg_cv_HWLOC_PCIACCESS_LIBS=`$PKG_CONFIG --libs "pciaccess" 2>/dev/null` - else - HWLOC_pkg_failed=yes -fi - fi -else - HWLOC_pkg_failed=untried -fi +#include +char nvmlInit (); +int +main (void) +{ + return nvmlInit (); - # Check for failure of pkg-config - if test $HWLOC_pkg_failed = yes; then -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - HWLOC_pkg_short_errors_supported=yes -else - HWLOC_pkg_short_errors_supported=no + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + hwloc_nvml_warning=no +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + hwloc_nvml_warning=yes +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi - if test $HWLOC_pkg_short_errors_supported = yes; then - HWLOC_PCIACCESS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "pciaccess" 2>&1` - else - HWLOC_PCIACCESS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "pciaccess" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$HWLOC_PCIACCESS_PKG_ERRORS" >&5 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - hwloc_pciaccess_happy=no - elif test $HWLOC_pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot check without pkg-config" >&5 -$as_echo "cannot check without pkg-config" >&6; } - hwloc_pciaccess_happy=no - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +else $as_nop + hwloc_nvml_happy=no +fi - # If we got good results from pkg-config, check that they - # actually work (i.e., that we can link against the resulting - # $LIBS). The canonical example why we do this is if - # pkg-config returns 64 bit libraries but ./configure was run - # with CFLAGS=-m32 LDFLAGS=-m32. pkg-config gave us valid - # results, but we'll fail if we try to link. So detect that - # failure now. - # There are also cases on Mac where pkg-config returns paths - # that do not actually exists until some magic is applied. - # https://www.open-mpi.org/community/lists/hwloc-devel/2015/03/4402.php - # So check whether we find the header as well. - hwloc_cflags_save=$CFLAGS - hwloc_cppflags_save=$CPPFLAGS - hwloc_libs_save=$LIBS - CFLAGS="$CFLAGS $HWLOC_pkg_cv_HWLOC_PCIACCESS_CFLAGS" - CPPFLAGS="$CPPFLAGS $HWLOC_pkg_cv_HWLOC_PCIACCESS_CFLAGS" - LIBS="$LIBS $HWLOC_pkg_cv_HWLOC_PCIACCESS_LIBS" - ac_fn_c_check_header_mongrel "$LINENO" "pciaccess.h" "ac_cv_header_pciaccess_h" "$ac_includes_default" -if test "x$ac_cv_header_pciaccess_h" = xyes; then : - ac_fn_c_check_func "$LINENO" "pci_slot_match_iterator_create" "ac_cv_func_pci_slot_match_iterator_create" -if test "x$ac_cv_func_pci_slot_match_iterator_create" = xyes; then : - hwloc_result=yes -else - hwloc_result=no +else $as_nop + hwloc_nvml_happy=no fi +done + LIBS="$tmp_save_LIBS" + CPPFLAGS="$tmp_save_CPPFLAGS" + LDFLAGS="$tmp_save_LDFLAGS" + + if test "x$hwloc_nvml_happy" = "xyes"; then + tmp_save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $HWLOC_NVML_CPPFLAGS" + ac_fn_check_decl "$LINENO" "nvmlDeviceGetMaxPcieLinkGeneration" "ac_cv_have_decl_nvmlDeviceGetMaxPcieLinkGeneration" "#include +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_nvmlDeviceGetMaxPcieLinkGeneration" = xyes +then : + ac_have_decl=1 +else $as_nop + ac_have_decl=0 +fi +printf "%s\n" "#define HAVE_DECL_NVMLDEVICEGETMAXPCIELINKGENERATION $ac_have_decl" >>confdefs.h +if test $ac_have_decl = 1 +then : -else - hwloc_result=no +else $as_nop + : fi + CPPFLAGS="$tmp_save_CPPFLAGS" + fi - CFLAGS=$hwloc_cflags_save - CPPFLAGS=$hwloc_cppflags_save - LIBS=$hwloc_libs_save + echo "**** end of NVML configuration" + fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for final PCIACCESS support" >&5 -$as_echo_n "checking for final PCIACCESS support... " >&6; } - if test "$hwloc_result" = "yes"; then : - HWLOC_PCIACCESS_CFLAGS=$HWLOC_pkg_cv_HWLOC_PCIACCESS_CFLAGS - HWLOC_PCIACCESS_LIBS=$HWLOC_pkg_cv_HWLOC_PCIACCESS_LIBS - { $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; } - hwloc_pciaccess_happy=no + + + # If we asked for nvml support but couldn't deliver, fail + if test "$enable_nvml" = "yes" -a "$hwloc_nvml_happy" = "no" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Specified --enable-nvml switch, but could not" >&5 +printf "%s\n" "$as_me: WARNING: Specified --enable-nvml switch, but could not" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: find appropriate support" >&5 +printf "%s\n" "$as_me: WARNING: find appropriate support" >&2;} + as_fn_error $? "Cannot continue" "$LINENO" 5 fi + if test "x$hwloc_nvml_happy" = "xyes"; then + +printf "%s\n" "#define HWLOC_HAVE_NVML 1" >>confdefs.h + + HWLOC_HAVE_NVML=1 + + hwloc_components="$hwloc_components nvml" + hwloc_nvml_component_maybeplugin=1 + else + HWLOC_HAVE_NVML=0 + fi + # don't add LIBS/CFLAGS/REQUIRES yet, depends on plugins - # Only add the REQUIRES if we got pciaccess through pkg-config. - # Otherwise we don't know if pciaccess.pc is installed - if test "$hwloc_pciaccess_happy" = "yes"; then : - HWLOC_PCIACCESS_REQUIRES=pciaccess -fi + # RSMI support, rocm_smi64 is just library name and not related to 32/64 bits + hwloc_rsmi_happy=no + if test "x$enable_io" != xno && test "x$enable_rsmi" != "xno"; then + echo + echo "**** RSMI configuration" - # Just for giggles, if we didn't find a pciaccess pkg-config, - # just try looking for its header file and library. - if test "$hwloc_pciaccess_happy" != "yes"; then : - ac_fn_c_check_header_mongrel "$LINENO" "pciaccess.h" "ac_cv_header_pciaccess_h" "$ac_includes_default" -if test "x$ac_cv_header_pciaccess_h" = xyes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pci_slot_match_iterator_create in -lpciaccess" >&5 -$as_echo_n "checking for pci_slot_match_iterator_create in -lpciaccess... " >&6; } -if ${ac_cv_lib_pciaccess_pci_slot_match_iterator_create+:} false; then : - $as_echo_n "(cached) " >&6 -else + # Try to find the ROCm default path a specific ROCm version + # Use --with-rocm-version first, or $CUDA_VERSION + rocm_version=$ROCM_VERSION + if test "x$with_rocm_version" != xno -a "x$with_rocm_version" != x; then + rocm_version=$with_rocm_version + fi + if test "x$with_rocm" != x -a "x$with_rocm" != xyes; then + rocm_dir=$with_rocm + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: using custom ROCm install path $rocm_dir ..." >&5 +printf "%s\n" "$as_me: using custom ROCm install path $rocm_dir ..." >&6;} + else if test "x$rocm_version" != x; then + rocm_dir=/opt/rocm-${rocm_version} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: assuming ROCm $rocm_version is installed in $rocm_dir ..." >&5 +printf "%s\n" "$as_me: assuming ROCm $rocm_version is installed in $rocm_dir ..." >&6;} + else if test -d /opt/rocm; then + rocm_dir=/opt/rocm + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: using standard ROCm install path $rocm_dir ..." >&5 +printf "%s\n" "$as_me: using standard ROCm install path $rocm_dir ..." >&6;} + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: assuming ROCm is installed in standard directories ..." >&5 +printf "%s\n" "$as_me: assuming ROCm is installed in standard directories ..." >&6;} + fi fi fi + if test "x$rocm_dir" != x; then + HWLOC_RSMI_CPPFLAGS="-I$rocm_dir/rocm_smi/include/" + HWLOC_RSMI_LDFLAGS="-L$rocm_dir/rocm_smi/lib/" + fi + + hwloc_rsmi_happy=yes + CPPFLAGS_save="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $HWLOC_RSMI_CPPFLAGS" + for ac_header in rocm_smi/rocm_smi.h +do : + ac_fn_c_check_header_compile "$LINENO" "rocm_smi/rocm_smi.h" "ac_cv_header_rocm_smi_rocm_smi_h" "$ac_includes_default" +if test "x$ac_cv_header_rocm_smi_rocm_smi_h" = xyes +then : + printf "%s\n" "#define HAVE_ROCM_SMI_ROCM_SMI_H 1" >>confdefs.h + + LDFLAGS_save="$LDFLAGS" + LDFLAGS="$LDFLAGS $HWLOC_RSMI_LDFLAGS" + LIBS_save="$LIBS" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for rsmi_init in -lrocm_smi64" >&5 +printf %s "checking for rsmi_init in -lrocm_smi64... " >&6; } +if test ${ac_cv_lib_rocm_smi64_rsmi_init+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS -LIBS="-lpciaccess $LIBS" +LIBS="-lrocm_smi64 $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 pci_slot_match_iterator_create (); +char rsmi_init (); int -main () +main (void) { -return pci_slot_match_iterator_create (); +return rsmi_init (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_pciaccess_pci_slot_match_iterator_create=yes -else - ac_cv_lib_pciaccess_pci_slot_match_iterator_create=no +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_rocm_smi64_rsmi_init=yes +else $as_nop + ac_cv_lib_rocm_smi64_rsmi_init=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pciaccess_pci_slot_match_iterator_create" >&5 -$as_echo "$ac_cv_lib_pciaccess_pci_slot_match_iterator_create" >&6; } -if test "x$ac_cv_lib_pciaccess_pci_slot_match_iterator_create" = xyes; then : - hwloc_pciaccess_happy=yes - HWLOC_PCIACCESS_LIBS="-lpciaccess" -fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rocm_smi64_rsmi_init" >&5 +printf "%s\n" "$ac_cv_lib_rocm_smi64_rsmi_init" >&6; } +if test "x$ac_cv_lib_rocm_smi64_rsmi_init" = xyes +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a program linked with -lrocm_smi64 can run" >&5 +printf %s "checking whether a program linked with -lrocm_smi64 can run... " >&6; } + HWLOC_RSMI_LIBS="-lrocm_smi64" + LIBS="$LIBS $HWLOC_RSMI_LIBS" + if test "$cross_compiling" = yes +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: don't know (cross-compiling)" >&5 +printf "%s\n" "don't know (cross-compiling)" >&6; } +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -fi +#include +char rsmi_init(int); + +int +main (void) +{ +return rsmi_init(0); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + hwloc_rsmi_warning=no +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + hwloc_rsmi_warning=yes +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +else $as_nop + hwloc_rsmi_happy=no fi - if test "$hwloc_pciaccess_happy" = "yes"; then : - hwloc_components="$hwloc_components pci" - hwloc_pci_component_maybeplugin=1 + LDFLAGS="$LDFLAGS_save" + LIBS="$LIBS_save" + +else $as_nop + hwloc_rsmi_happy=no fi + +done + CPPFLAGS="$CPPFLAGS_save" + + echo "**** end of RSMI configuration" fi - # If we asked for pci support but couldn't deliver, fail - if test "$enable_pci" = "yes" -a "$hwloc_pciaccess_happy" = "no"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Specified --enable-pci switch, but could not" >&5 -$as_echo "$as_me: WARNING: Specified --enable-pci switch, but could not" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: find appropriate support" >&5 -$as_echo "$as_me: WARNING: find appropriate support" >&2;} - as_fn_error $? "Cannot continue" "$LINENO" 5 + + + + # If we asked for rsmi support but couldn't deliver, fail + if test "$enable_rsmi" = "yes" -a "$hwloc_rsmi_happy" = "no" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Specified --enable-rsmi switch, but could not" >&5 +printf "%s\n" "$as_me: WARNING: Specified --enable-rsmi switch, but could not" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: find appropriate support" >&5 +printf "%s\n" "$as_me: WARNING: find appropriate support" >&2;} + as_fn_error $? "Cannot continue" "$LINENO" 5 fi + if test "x$hwloc_rsmi_happy" = "xyes"; then + +printf "%s\n" "#define HWLOC_HAVE_RSMI 1" >>confdefs.h + + HWLOC_HAVE_RSMI=1 + + hwloc_components="$hwloc_components rsmi" + hwloc_rsmi_component_maybeplugin=1 + else + HWLOC_HAVE_RSMI=0 + + fi # don't add LIBS/CFLAGS/REQUIRES yet, depends on plugins # OpenCL support hwloc_opencl_happy=no if test "x$enable_io" != xno && test "x$enable_opencl" != "xno"; then + echo + echo "**** OpenCL configuration" + hwloc_opencl_happy=yes case ${target} in *-*-darwin*) # On Darwin, only use the OpenCL framework - for ac_header in OpenCL/cl_ext.h + for ac_header in OpenCL/cl_ext.h do : - ac_fn_c_check_header_mongrel "$LINENO" "OpenCL/cl_ext.h" "ac_cv_header_OpenCL_cl_ext_h" "$ac_includes_default" -if test "x$ac_cv_header_OpenCL_cl_ext_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_OPENCL_CL_EXT_H 1 -_ACEOF + ac_fn_c_check_header_compile "$LINENO" "OpenCL/cl_ext.h" "ac_cv_header_OpenCL_cl_ext_h" "$ac_includes_default" +if test "x$ac_cv_header_OpenCL_cl_ext_h" = xyes +then : + printf "%s\n" "#define HAVE_OPENCL_CL_EXT_H 1" >>confdefs.h - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the OpenCL framework" >&5 -$as_echo_n "checking for the OpenCL framework... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the OpenCL framework" >&5 +printf %s "checking for the OpenCL framework... " >&6; } tmp_save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -framework OpenCL" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -25126,7 +28059,7 @@ $as_echo_n "checking for the OpenCL framework... " >&6; } #include int -main () +main (void) { return clGetDeviceIDs(0, 0, 0, NULL, NULL); @@ -25135,41 +28068,51 @@ return clGetDeviceIDs(0, 0, 0, NULL, NULL); return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +if ac_fn_c_try_link "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } HWLOC_OPENCL_LDFLAGS="-framework OpenCL" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } hwloc_opencl_happy=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$tmp_save_LDFLAGS" -else +else $as_nop hwloc_opencl_happy=no fi done - ;; *) # On Others, look for OpenCL at normal locations - for ac_header in CL/cl_ext.h + HWLOC_OPENCL_CPPFLAGS="$HWLOC_CUDA_COMMON_CPPFLAGS" + HWLOC_OPENCL_LDFLAGS="$HWLOC_CUDA_COMMON_LDFLAGS" + if test "x$rocm_dir" != x; then + HWLOC_OPENCL_CPPFLAGS="$HWLOC_OPENCL_CPPFLAGS -I$rocm_dir/opencl/include/" + HWLOC_OPENCL_LDFLAGS="$HWLOC_OPENCL_LDFLAGS -L$rocm_dir/opencl/lib/" + fi + tmp_save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $HWLOC_OPENCL_CPPFLAGS" + tmp_save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $HWLOC_OPENCL_LDFLAGS" + for ac_header in CL/cl_ext.h do : - ac_fn_c_check_header_mongrel "$LINENO" "CL/cl_ext.h" "ac_cv_header_CL_cl_ext_h" "$ac_includes_default" -if test "x$ac_cv_header_CL_cl_ext_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_CL_CL_EXT_H 1 -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clGetDeviceIDs in -lOpenCL" >&5 -$as_echo_n "checking for clGetDeviceIDs in -lOpenCL... " >&6; } -if ${ac_cv_lib_OpenCL_clGetDeviceIDs+:} false; then : - $as_echo_n "(cached) " >&6 -else + ac_fn_c_check_header_compile "$LINENO" "CL/cl_ext.h" "ac_cv_header_CL_cl_ext_h" "$ac_includes_default" +if test "x$ac_cv_header_CL_cl_ext_h" = xyes +then : + printf "%s\n" "#define HAVE_CL_CL_EXT_H 1" >>confdefs.h + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for clGetDeviceIDs in -lOpenCL" >&5 +printf %s "checking for clGetDeviceIDs in -lOpenCL... " >&6; } +if test ${ac_cv_lib_OpenCL_clGetDeviceIDs+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lOpenCL $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -25178,449 +28121,430 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 clGetDeviceIDs (); int -main () +main (void) { return clGetDeviceIDs (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_OpenCL_clGetDeviceIDs=yes -else +else $as_nop ac_cv_lib_OpenCL_clGetDeviceIDs=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_OpenCL_clGetDeviceIDs" >&5 -$as_echo "$ac_cv_lib_OpenCL_clGetDeviceIDs" >&6; } -if test "x$ac_cv_lib_OpenCL_clGetDeviceIDs" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_OpenCL_clGetDeviceIDs" >&5 +printf "%s\n" "$ac_cv_lib_OpenCL_clGetDeviceIDs" >&6; } +if test "x$ac_cv_lib_OpenCL_clGetDeviceIDs" = xyes +then : HWLOC_OPENCL_LIBS="-lOpenCL" -else +else $as_nop hwloc_opencl_happy=no fi -else +else $as_nop hwloc_opencl_happy=no fi done - + CPPFLAGS="$tmp_save_CPPFLAGS" + LDFLAGS="$tmp_save_LDFLAGS" ;; esac + + echo "**** end of OpenCL configuration" fi # If we asked for opencl support but couldn't deliver, fail - if test "$enable_opencl" = "yes" -a "$hwloc_opencl_happy" = "no"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Specified --enable-opencl switch, but could not" >&5 -$as_echo "$as_me: WARNING: Specified --enable-opencl switch, but could not" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: find appropriate support" >&5 -$as_echo "$as_me: WARNING: find appropriate support" >&2;} + if test "$enable_opencl" = "yes" -a "$hwloc_opencl_happy" = "no" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Specified --enable-opencl switch, but could not" >&5 +printf "%s\n" "$as_me: WARNING: Specified --enable-opencl switch, but could not" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: find appropriate support" >&5 +printf "%s\n" "$as_me: WARNING: find appropriate support" >&2;} as_fn_error $? "Cannot continue" "$LINENO" 5 fi - if test "x$hwloc_opencl_happy" = "xyes"; then - -$as_echo "#define HWLOC_HAVE_OPENCL 1" >>confdefs.h + if test "x$hwloc_opencl_happy" = "xyes"; then + +printf "%s\n" "#define HWLOC_HAVE_OPENCL 1" >>confdefs.h + + HWLOC_HAVE_OPENCL=1 + + hwloc_components="$hwloc_components opencl" + hwloc_opencl_component_maybeplugin=1 + else + HWLOC_HAVE_OPENCL=0 + + fi + # don't add LIBS/CFLAGS/REQUIRES yet, depends on plugins + + # LevelZero support + hwloc_levelzero_happy=no + if test "x$enable_io" != xno && test "x$enable_levelzero" != "xno"; then + echo + echo "**** LevelZero configuration" + + + + HWLOC_pkg_failed=no + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for LEVELZERO" >&5 +printf %s "checking for LEVELZERO... " >&6; } + + if test -n "$PKG_CONFIG"; then + if test -n "$HWLOC_LEVELZERO_CFLAGS"; then + HWLOC_pkg_cv_HWLOC_LEVELZERO_CFLAGS="$HWLOC_LEVELZERO_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --silence-errors \"libze_loader\""; } >&5 + ($PKG_CONFIG --exists --silence-errors "libze_loader") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + HWLOC_pkg_cv_HWLOC_LEVELZERO_CFLAGS=`$PKG_CONFIG --cflags "libze_loader" 2>/dev/null` + else + HWLOC_pkg_failed=yes +fi + fi +else + HWLOC_pkg_failed=untried +fi + + if test -n "$PKG_CONFIG"; then + if test -n "$HWLOC_LEVELZERO_LIBS"; then + HWLOC_pkg_cv_HWLOC_LEVELZERO_LIBS="$HWLOC_LEVELZERO_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --silence-errors \"libze_loader\""; } >&5 + ($PKG_CONFIG --exists --silence-errors "libze_loader") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + HWLOC_pkg_cv_HWLOC_LEVELZERO_LIBS=`$PKG_CONFIG --libs "libze_loader" 2>/dev/null` + else + HWLOC_pkg_failed=yes +fi + fi +else + HWLOC_pkg_failed=untried +fi + + + + + # Check for failure of pkg-config + if test $HWLOC_pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + HWLOC_pkg_short_errors_supported=yes +else + HWLOC_pkg_short_errors_supported=no +fi + if test $HWLOC_pkg_short_errors_supported = yes; then + HWLOC_LEVELZERO_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libze_loader" 2>&1` + else + HWLOC_LEVELZERO_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libze_loader" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$HWLOC_LEVELZERO_PKG_ERRORS" >&5 + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + hwloc_levelzero_happy=no + elif test $HWLOC_pkg_failed = untried; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cannot check without pkg-config" >&5 +printf "%s\n" "cannot check without pkg-config" >&6; } + hwloc_levelzero_happy=no + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + + # If we got good results from pkg-config, check that they + # actually work (i.e., that we can link against the resulting + # $LIBS). The canonical example why we do this is if + # pkg-config returns 64 bit libraries but ./configure was run + # with CFLAGS=-m32 LDFLAGS=-m32. pkg-config gave us valid + # results, but we'll fail if we try to link. So detect that + # failure now. + # There are also cases on Mac where pkg-config returns paths + # that do not actually exists until some magic is applied. + # https://www.open-mpi.org/community/lists/hwloc-devel/2015/03/4402.php + # So check whether we find the header as well. + hwloc_cflags_save=$CFLAGS + hwloc_cppflags_save=$CPPFLAGS + hwloc_libs_save=$LIBS + CFLAGS="$CFLAGS $HWLOC_pkg_cv_HWLOC_LEVELZERO_CFLAGS" + CPPFLAGS="$CPPFLAGS $HWLOC_pkg_cv_HWLOC_LEVELZERO_CFLAGS" + LIBS="$LIBS $HWLOC_pkg_cv_HWLOC_LEVELZERO_LIBS" + ac_fn_c_check_header_compile "$LINENO" "level_zero/zes_api.h" "ac_cv_header_level_zero_zes_api_h" "$ac_includes_default" +if test "x$ac_cv_header_level_zero_zes_api_h" = xyes +then : + + ac_fn_c_check_func "$LINENO" "zesDevicePciGetProperties" "ac_cv_func_zesDevicePciGetProperties" +if test "x$ac_cv_func_zesDevicePciGetProperties" = xyes +then : + hwloc_result=yes +else $as_nop + hwloc_result=no +fi - HWLOC_HAVE_OPENCL=1 - - hwloc_components="$hwloc_components opencl" - hwloc_opencl_component_maybeplugin=1 - else - HWLOC_HAVE_OPENCL=0 - - fi - # don't add LIBS/CFLAGS/REQUIRES yet, depends on plugins - # CUDA support - hwloc_have_cuda=no - hwloc_have_cudart=no - if test "x$enable_io" != xno && test "x$enable_cuda" != "xno"; then - for ac_header in cuda.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "cuda.h" "ac_cv_header_cuda_h" "$ac_includes_default" -if test "x$ac_cv_header_cuda_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_CUDA_H 1 -_ACEOF +else $as_nop + hwloc_result=no +fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CUDA_VERSION >= 3020" >&5 -$as_echo_n "checking if CUDA_VERSION >= 3020... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + CFLAGS=$hwloc_cflags_save + CPPFLAGS=$hwloc_cppflags_save + LIBS=$hwloc_libs_save -#include -#ifndef CUDA_VERSION -#error CUDA_VERSION undefined -#elif CUDA_VERSION < 3020 -#error CUDA_VERSION too old -#endif -int -main () -{ -int i = 3; - ; - 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; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cuInit in -lcuda" >&5 -$as_echo_n "checking for cuInit in -lcuda... " >&6; } -if ${ac_cv_lib_cuda_cuInit+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for final LEVELZERO support" >&5 +printf %s "checking for final LEVELZERO support... " >&6; } + if test "$hwloc_result" = "yes" +then : + HWLOC_LEVELZERO_CFLAGS=$HWLOC_pkg_cv_HWLOC_LEVELZERO_CFLAGS + HWLOC_LEVELZERO_LIBS=$HWLOC_pkg_cv_HWLOC_LEVELZERO_LIBS + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + hwloc_levelzero_happy=yes + HWLOC_LEVELZERO_REQUIRES=libze_loader + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for zeDevicePciGetPropertiesExt in -lze_loader" >&5 +printf %s "checking for zeDevicePciGetPropertiesExt in -lze_loader... " >&6; } +if test ${ac_cv_lib_ze_loader_zeDevicePciGetPropertiesExt+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS -LIBS="-lcuda $LIBS" +LIBS="-lze_loader $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 cuInit (); +char zeDevicePciGetPropertiesExt (); int -main () +main (void) { -return cuInit (); +return zeDevicePciGetPropertiesExt (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_cuda_cuInit=yes -else - ac_cv_lib_cuda_cuInit=no +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_ze_loader_zeDevicePciGetPropertiesExt=yes +else $as_nop + ac_cv_lib_ze_loader_zeDevicePciGetPropertiesExt=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cuda_cuInit" >&5 -$as_echo "$ac_cv_lib_cuda_cuInit" >&6; } -if test "x$ac_cv_lib_cuda_cuInit" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ze_loader_zeDevicePciGetPropertiesExt" >&5 +printf "%s\n" "$ac_cv_lib_ze_loader_zeDevicePciGetPropertiesExt" >&6; } +if test "x$ac_cv_lib_ze_loader_zeDevicePciGetPropertiesExt" = xyes +then : -$as_echo "#define HAVE_CUDA 1" >>confdefs.h - - hwloc_have_cuda=yes -fi +printf "%s\n" "#define HWLOC_HAVE_ZEDEVICEPCIGETPROPERTIESEXT 1" >>confdefs.h -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -done - - for ac_header in cuda_runtime_api.h +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + hwloc_levelzero_happy=no +fi + fi + if test x$hwloc_levelzero_happy = xno; then + hwloc_levelzero_happy=yes + for ac_header in level_zero/ze_api.h do : - ac_fn_c_check_header_mongrel "$LINENO" "cuda_runtime_api.h" "ac_cv_header_cuda_runtime_api_h" "$ac_includes_default" -if test "x$ac_cv_header_cuda_runtime_api_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_CUDA_RUNTIME_API_H 1 -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CUDART_VERSION >= 3020" >&5 -$as_echo_n "checking if CUDART_VERSION >= 3020... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#ifndef CUDART_VERSION -#error CUDART_VERSION undefined -#elif CUDART_VERSION < 3020 -#error CUDART_VERSION too old -#endif -int -main () -{ -int i = 3; - ; - 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; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cudaGetDeviceProperties in -lcudart" >&5 -$as_echo_n "checking for cudaGetDeviceProperties in -lcudart... " >&6; } -if ${ac_cv_lib_cudart_cudaGetDeviceProperties+:} false; then : - $as_echo_n "(cached) " >&6 -else + ac_fn_c_check_header_compile "$LINENO" "level_zero/ze_api.h" "ac_cv_header_level_zero_ze_api_h" "$ac_includes_default" +if test "x$ac_cv_header_level_zero_ze_api_h" = xyes +then : + printf "%s\n" "#define HAVE_LEVEL_ZERO_ZE_API_H 1" >>confdefs.h + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for zeInit in -lze_loader" >&5 +printf %s "checking for zeInit in -lze_loader... " >&6; } +if test ${ac_cv_lib_ze_loader_zeInit+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS -LIBS="-lcudart $LIBS" +LIBS="-lze_loader $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 cudaGetDeviceProperties (); +char zeInit (); int -main () +main (void) { -return cudaGetDeviceProperties (); +return zeInit (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_cudart_cudaGetDeviceProperties=yes -else - ac_cv_lib_cudart_cudaGetDeviceProperties=no +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_ze_loader_zeInit=yes +else $as_nop + ac_cv_lib_ze_loader_zeInit=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cudart_cudaGetDeviceProperties" >&5 -$as_echo "$ac_cv_lib_cudart_cudaGetDeviceProperties" >&6; } -if test "x$ac_cv_lib_cudart_cudaGetDeviceProperties" = xyes; then : - - HWLOC_CUDA_LIBS="-lcudart" - - hwloc_have_cudart=yes - -$as_echo "#define HWLOC_HAVE_CUDART 1" >>confdefs.h - - -fi - - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi - -done - - - if test "$enable_cuda" = "yes" -a "$hwloc_have_cudart" = "no"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Specified --enable-cuda switch, but could not" >&5 -$as_echo "$as_me: WARNING: Specified --enable-cuda switch, but could not" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: find appropriate support" >&5 -$as_echo "$as_me: WARNING: find appropriate support" >&2;} - as_fn_error $? "Cannot continue" "$LINENO" 5 -fi - - if test "x$hwloc_have_cudart" = "xyes"; then - hwloc_components="$hwloc_components cuda" - hwloc_cuda_component_maybeplugin=1 - fi - fi - # don't add LIBS/CFLAGS yet, depends on plugins +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ze_loader_zeInit" >&5 +printf "%s\n" "$ac_cv_lib_ze_loader_zeInit" >&6; } +if test "x$ac_cv_lib_ze_loader_zeInit" = xyes +then : - # NVML support - hwloc_nvml_happy=no - if test "x$enable_io" != xno && test "x$enable_nvml" != "xno"; then - hwloc_nvml_happy=yes - for ac_header in nvml.h + for ac_header in level_zero/zes_api.h do : - ac_fn_c_check_header_mongrel "$LINENO" "nvml.h" "ac_cv_header_nvml_h" "$ac_includes_default" -if test "x$ac_cv_header_nvml_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_NVML_H 1 -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nvmlInit in -lnvidia-ml" >&5 -$as_echo_n "checking for nvmlInit in -lnvidia-ml... " >&6; } -if ${ac_cv_lib_nvidia_ml_nvmlInit+:} false; then : - $as_echo_n "(cached) " >&6 -else + ac_fn_c_check_header_compile "$LINENO" "level_zero/zes_api.h" "ac_cv_header_level_zero_zes_api_h" "$ac_includes_default" +if test "x$ac_cv_header_level_zero_zes_api_h" = xyes +then : + printf "%s\n" "#define HAVE_LEVEL_ZERO_ZES_API_H 1" >>confdefs.h + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for zesDevicePciGetProperties in -lze_loader" >&5 +printf %s "checking for zesDevicePciGetProperties in -lze_loader... " >&6; } +if test ${ac_cv_lib_ze_loader_zesDevicePciGetProperties+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS -LIBS="-lnvidia-ml $LIBS" +LIBS="-lze_loader $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 nvmlInit (); +char zesDevicePciGetProperties (); int -main () +main (void) { -return nvmlInit (); +return zesDevicePciGetProperties (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_nvidia_ml_nvmlInit=yes -else - ac_cv_lib_nvidia_ml_nvmlInit=no +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_ze_loader_zesDevicePciGetProperties=yes +else $as_nop + ac_cv_lib_ze_loader_zesDevicePciGetProperties=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nvidia_ml_nvmlInit" >&5 -$as_echo "$ac_cv_lib_nvidia_ml_nvmlInit" >&6; } -if test "x$ac_cv_lib_nvidia_ml_nvmlInit" = xyes; then : - HWLOC_NVML_LIBS="-lnvidia-ml" -else - hwloc_nvml_happy=no -fi - - -else - hwloc_nvml_happy=no -fi - -done - - fi - if test "x$hwloc_nvml_happy" = "xyes"; then - tmp_save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $HWLOC_NVML_CFLAGS" - tmp_save_LIBS="$LIBS" - LIBS="$LIBS $HWLOC_NVML_LIBS" - ac_fn_c_check_decl "$LINENO" "nvmlDeviceGetMaxPcieLinkGeneration" "ac_cv_have_decl_nvmlDeviceGetMaxPcieLinkGeneration" "#include -" -if test "x$ac_cv_have_decl_nvmlDeviceGetMaxPcieLinkGeneration" = xyes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_NVMLDEVICEGETMAXPCIELINKGENERATION $ac_have_decl -_ACEOF -if test $ac_have_decl = 1; then : - -else - : -fi - - CFLAGS="$tmp_save_CFLAGS" - LIBS="$tmp_save_LIBS" - fi - - # If we asked for nvml support but couldn't deliver, fail - if test "$enable_nvml" = "yes" -a "$hwloc_nvml_happy" = "no"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Specified --enable-nvml switch, but could not" >&5 -$as_echo "$as_me: WARNING: Specified --enable-nvml switch, but could not" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: find appropriate support" >&5 -$as_echo "$as_me: WARNING: find appropriate support" >&2;} - as_fn_error $? "Cannot continue" "$LINENO" 5 -fi - if test "x$hwloc_nvml_happy" = "xyes"; then - -$as_echo "#define HWLOC_HAVE_NVML 1" >>confdefs.h - - HWLOC_HAVE_NVML=1 - - hwloc_components="$hwloc_components nvml" - hwloc_nvml_component_maybeplugin=1 - else - HWLOC_HAVE_NVML=0 - - fi - # don't add LIBS/CFLAGS/REQUIRES yet, depends on plugins - - # RSMI support, rocm_smi64 is just library name and not related to 32/64 bits - hwloc_rsmi_happy=no - if test "x$enable_io" != xno && test "x$enable_rsmi" != "xno"; then - hwloc_rsmi_happy=yes - for ac_header in rocm_smi/rocm_smi.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "rocm_smi/rocm_smi.h" "ac_cv_header_rocm_smi_rocm_smi_h" "$ac_includes_default" -if test "x$ac_cv_header_rocm_smi_rocm_smi_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_ROCM_SMI_ROCM_SMI_H 1 -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rsmi_init in -lrocm_smi64" >&5 -$as_echo_n "checking for rsmi_init in -lrocm_smi64... " >&6; } -if ${ac_cv_lib_rocm_smi64_rsmi_init+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ze_loader_zesDevicePciGetProperties" >&5 +printf "%s\n" "$ac_cv_lib_ze_loader_zesDevicePciGetProperties" >&6; } +if test "x$ac_cv_lib_ze_loader_zesDevicePciGetProperties" = xyes +then : + HWLOC_LEVELZERO_LIBS="-lze_loader" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for zeDevicePciGetPropertiesExt in -lze_loader" >&5 +printf %s "checking for zeDevicePciGetPropertiesExt in -lze_loader... " >&6; } +if test ${ac_cv_lib_ze_loader_zeDevicePciGetPropertiesExt+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS -LIBS="-lrocm_smi64 $LIBS" +LIBS="-lze_loader $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 rsmi_init (); +char zeDevicePciGetPropertiesExt (); int -main () +main (void) { -return rsmi_init (); +return zeDevicePciGetPropertiesExt (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_rocm_smi64_rsmi_init=yes -else - ac_cv_lib_rocm_smi64_rsmi_init=no +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_ze_loader_zeDevicePciGetPropertiesExt=yes +else $as_nop + ac_cv_lib_ze_loader_zeDevicePciGetPropertiesExt=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rocm_smi64_rsmi_init" >&5 -$as_echo "$ac_cv_lib_rocm_smi64_rsmi_init" >&6; } -if test "x$ac_cv_lib_rocm_smi64_rsmi_init" = xyes; then : - HWLOC_RSMI_LIBS="-lrocm_smi64" -else - hwloc_rsmi_happy=no +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ze_loader_zeDevicePciGetPropertiesExt" >&5 +printf "%s\n" "$ac_cv_lib_ze_loader_zeDevicePciGetPropertiesExt" >&6; } +if test "x$ac_cv_lib_ze_loader_zeDevicePciGetPropertiesExt" = xyes +then : + +printf "%s\n" "#define HWLOC_HAVE_ZEDEVICEPCIGETPROPERTIESEXT 1" >>confdefs.h + fi -else - hwloc_rsmi_happy=no +else $as_nop + hwloc_levelzero_happy=no +fi + + +else $as_nop + hwloc_levelzero_happy=no +fi + +done + +else $as_nop + hwloc_levelzero_happy=no +fi + + +else $as_nop + hwloc_levelzero_happy=no fi done + fi + echo "**** end of LevelZero configuration" fi - # If we asked for rsmi support but couldn't deliver, fail - if test "$enable_rsmi" = "yes" -a "$hwloc_rsmi_happy" = "no"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Specified --enable-rsmi switch, but could not" >&5 -$as_echo "$as_me: WARNING: Specified --enable-rsmi switch, but could not" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: find appropriate support" >&5 -$as_echo "$as_me: WARNING: find appropriate support" >&2;} + # If we asked for LevelZero support but couldn't deliver, fail + if test "$enable_levelzero" = "yes" -a "$hwloc_levelzero_happy" = "no" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Specified --enable-levelzero switch, but could not" >&5 +printf "%s\n" "$as_me: WARNING: Specified --enable-levelzero switch, but could not" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: find appropriate support" >&5 +printf "%s\n" "$as_me: WARNING: find appropriate support" >&2;} as_fn_error $? "Cannot continue" "$LINENO" 5 fi - if test "x$hwloc_rsmi_happy" = "xyes"; then + if test "x$hwloc_levelzero_happy" = "xyes"; then -$as_echo "#define HWLOC_HAVE_RSMI 1" >>confdefs.h +printf "%s\n" "#define HWLOC_HAVE_LEVELZERO 1" >>confdefs.h - HWLOC_HAVE_RSMI=1 + HWLOC_HAVE_LEVELZERO=1 - hwloc_components="$hwloc_components rsmi" - hwloc_rsmi_component_maybeplugin=1 + hwloc_components="$hwloc_components levelzero" + hwloc_levelzero_component_maybeplugin=1 else - HWLOC_HAVE_RSMI=0 + HWLOC_HAVE_LEVELZERO=0 fi # don't add LIBS/CFLAGS/REQUIRES yet, depends on plugins @@ -25628,13 +28552,16 @@ $as_echo "#define HWLOC_HAVE_RSMI 1" >>confdefs.h # GL Support hwloc_gl_happy=no if test "x$enable_io" != xno && test "x$enable_gl" != "xno"; then + echo + echo "**** NVIDIA GL configuration" + hwloc_gl_happy=yes # some X11 support (less then lstopo in hwloc_internal.m4) if test "$no_x" = yes; then # Not all programs may use this symbol, but it does not hurt to define it. -$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h +printf "%s\n" "#define X_DISPLAY_MISSING 1" >>confdefs.h X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS= else @@ -25647,8 +28574,8 @@ else X_LIBS="$X_LIBS -L$x_libraries" # For Solaris; some versions of Sun CC require a space after -R and # others require no space. Words are not sufficient . . . . - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5 -$as_echo_n "checking whether -R must be followed by a space... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5 +printf %s "checking whether -R must be followed by a space... " >&6; } ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries" ac_xsave_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes @@ -25656,42 +28583,44 @@ $as_echo_n "checking whether -R must be followed by a space... " >&6; } /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +if ac_fn_c_try_link "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } X_LIBS="$X_LIBS -R$x_libraries" -else +else $as_nop LIBS="$ac_xsave_LIBS -R $x_libraries" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +if ac_fn_c_try_link "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } X_LIBS="$X_LIBS -R $x_libraries" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5 -$as_echo "neither works" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: neither works" >&5 +printf "%s\n" "neither works" >&6; } fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ac_c_werror_flag=$ac_xsave_c_werror_flag LIBS=$ac_xsave_LIBS @@ -25714,26 +28643,25 @@ rm -f core conftest.err conftest.$ac_objext \ /* 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 XOpenDisplay (); int -main () +main (void) { return XOpenDisplay (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5 -$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; } -if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then : - $as_echo_n "(cached) " >&6 -else +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5 +printf %s "checking for dnet_ntoa in -ldnet... " >&6; } +if test ${ac_cv_lib_dnet_dnet_ntoa+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-ldnet $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -25742,39 +28670,39 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 dnet_ntoa (); int -main () +main (void) { return dnet_ntoa (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_dnet_dnet_ntoa=yes -else +else $as_nop ac_cv_lib_dnet_dnet_ntoa=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5 -$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; } -if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5 +printf "%s\n" "$ac_cv_lib_dnet_dnet_ntoa" >&6; } +if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes +then : X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet" fi if test $ac_cv_lib_dnet_dnet_ntoa = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5 -$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; } -if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5 +printf %s "checking for dnet_ntoa in -ldnet_stub... " >&6; } +if test ${ac_cv_lib_dnet_stub_dnet_ntoa+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-ldnet_stub $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -25783,36 +28711,35 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 dnet_ntoa (); int -main () +main (void) { return dnet_ntoa (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_dnet_stub_dnet_ntoa=yes -else +else $as_nop ac_cv_lib_dnet_stub_dnet_ntoa=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5 -$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; } -if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5 +printf "%s\n" "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; } +if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes +then : X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub" fi fi fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS="$ac_xsave_LIBS" @@ -25825,16 +28752,18 @@ rm -f core conftest.err conftest.$ac_objext \ # The functions gethostbyname, getservbyname, and inet_addr are # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking. ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname" -if test "x$ac_cv_func_gethostbyname" = xyes; then : +if test "x$ac_cv_func_gethostbyname" = xyes +then : fi if test $ac_cv_func_gethostbyname = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5 -$as_echo_n "checking for gethostbyname in -lnsl... " >&6; } -if ${ac_cv_lib_nsl_gethostbyname+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5 +printf %s "checking for gethostbyname in -lnsl... " >&6; } +if test ${ac_cv_lib_nsl_gethostbyname+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lnsl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -25843,39 +28772,39 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 () +main (void) { return gethostbyname (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_nsl_gethostbyname=yes -else +else $as_nop ac_cv_lib_nsl_gethostbyname=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5 -$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; } -if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5 +printf "%s\n" "$ac_cv_lib_nsl_gethostbyname" >&6; } +if test "x$ac_cv_lib_nsl_gethostbyname" = xyes +then : X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl" fi if test $ac_cv_lib_nsl_gethostbyname = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5 -$as_echo_n "checking for gethostbyname in -lbsd... " >&6; } -if ${ac_cv_lib_bsd_gethostbyname+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5 +printf %s "checking for gethostbyname in -lbsd... " >&6; } +if test ${ac_cv_lib_bsd_gethostbyname+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lbsd $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -25884,30 +28813,29 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 () +main (void) { return gethostbyname (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_bsd_gethostbyname=yes -else +else $as_nop ac_cv_lib_bsd_gethostbyname=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5 -$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; } -if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5 +printf "%s\n" "$ac_cv_lib_bsd_gethostbyname" >&6; } +if test "x$ac_cv_lib_bsd_gethostbyname" = xyes +then : X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd" fi @@ -25922,16 +28850,18 @@ fi # must be given before -lnsl if both are needed. We assume that # if connect needs -lnsl, so does gethostbyname. ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect" -if test "x$ac_cv_func_connect" = xyes; then : +if test "x$ac_cv_func_connect" = xyes +then : fi if test $ac_cv_func_connect = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5 -$as_echo_n "checking for connect in -lsocket... " >&6; } -if ${ac_cv_lib_socket_connect+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5 +printf %s "checking for connect in -lsocket... " >&6; } +if test ${ac_cv_lib_socket_connect+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $X_EXTRA_LIBS $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -25940,30 +28870,29 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 connect (); int -main () +main (void) { return connect (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_socket_connect=yes -else +else $as_nop ac_cv_lib_socket_connect=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5 -$as_echo "$ac_cv_lib_socket_connect" >&6; } -if test "x$ac_cv_lib_socket_connect" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5 +printf "%s\n" "$ac_cv_lib_socket_connect" >&6; } +if test "x$ac_cv_lib_socket_connect" = xyes +then : X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS" fi @@ -25971,16 +28900,18 @@ fi # Guillermo Gomez says -lposix is necessary on A/UX. ac_fn_c_check_func "$LINENO" "remove" "ac_cv_func_remove" -if test "x$ac_cv_func_remove" = xyes; then : +if test "x$ac_cv_func_remove" = xyes +then : fi if test $ac_cv_func_remove = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5 -$as_echo_n "checking for remove in -lposix... " >&6; } -if ${ac_cv_lib_posix_remove+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5 +printf %s "checking for remove in -lposix... " >&6; } +if test ${ac_cv_lib_posix_remove+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lposix $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -25989,30 +28920,29 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 remove (); int -main () +main (void) { return remove (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_posix_remove=yes -else +else $as_nop ac_cv_lib_posix_remove=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5 -$as_echo "$ac_cv_lib_posix_remove" >&6; } -if test "x$ac_cv_lib_posix_remove" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5 +printf "%s\n" "$ac_cv_lib_posix_remove" >&6; } +if test "x$ac_cv_lib_posix_remove" = xyes +then : X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix" fi @@ -26020,16 +28950,18 @@ fi # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. ac_fn_c_check_func "$LINENO" "shmat" "ac_cv_func_shmat" -if test "x$ac_cv_func_shmat" = xyes; then : +if test "x$ac_cv_func_shmat" = xyes +then : fi if test $ac_cv_func_shmat = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5 -$as_echo_n "checking for shmat in -lipc... " >&6; } -if ${ac_cv_lib_ipc_shmat+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5 +printf %s "checking for shmat in -lipc... " >&6; } +if test ${ac_cv_lib_ipc_shmat+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lipc $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -26038,30 +28970,29 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 shmat (); int -main () +main (void) { return shmat (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_ipc_shmat=yes -else +else $as_nop ac_cv_lib_ipc_shmat=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5 -$as_echo "$ac_cv_lib_ipc_shmat" >&6; } -if test "x$ac_cv_lib_ipc_shmat" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5 +printf "%s\n" "$ac_cv_lib_ipc_shmat" >&6; } +if test "x$ac_cv_lib_ipc_shmat" = xyes +then : X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc" fi @@ -26077,11 +29008,12 @@ fi # These have to be linked with before -lX11, unlike the other # libraries we check for below, so use a different variable. # John Interrante, Karl Berry - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5 -$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; } -if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5 +printf %s "checking for IceConnectionNumber in -lICE... " >&6; } +if test ${ac_cv_lib_ICE_IceConnectionNumber+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lICE $X_EXTRA_LIBS $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -26090,30 +29022,29 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 IceConnectionNumber (); int -main () +main (void) { return IceConnectionNumber (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_ICE_IceConnectionNumber=yes -else +else $as_nop ac_cv_lib_ICE_IceConnectionNumber=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5 -$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; } -if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5 +printf "%s\n" "$ac_cv_lib_ICE_IceConnectionNumber" >&6; } +if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes +then : X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" fi @@ -26127,18 +29058,18 @@ fi CPPFLAGS="$CPPFLAGS $X_CFLAGS" LIBS="$LIBS $X_PRE_LIBS $X_LIBS $X_EXTRA_LIBS" - for ac_header in X11/Xlib.h + for ac_header in X11/Xlib.h do : - ac_fn_c_check_header_mongrel "$LINENO" "X11/Xlib.h" "ac_cv_header_X11_Xlib_h" "$ac_includes_default" -if test "x$ac_cv_header_X11_Xlib_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_X11_XLIB_H 1 -_ACEOF - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XOpenDisplay in -lX11" >&5 -$as_echo_n "checking for XOpenDisplay in -lX11... " >&6; } -if ${ac_cv_lib_X11_XOpenDisplay+:} false; then : - $as_echo_n "(cached) " >&6 -else + ac_fn_c_check_header_compile "$LINENO" "X11/Xlib.h" "ac_cv_header_X11_Xlib_h" "$ac_includes_default" +if test "x$ac_cv_header_X11_Xlib_h" = xyes +then : + printf "%s\n" "#define HAVE_X11_XLIB_H 1" >>confdefs.h + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XOpenDisplay in -lX11" >&5 +printf %s "checking for XOpenDisplay in -lX11... " >&6; } +if test ${ac_cv_lib_X11_XOpenDisplay+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lX11 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -26147,30 +29078,29 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 XOpenDisplay (); int -main () +main (void) { return XOpenDisplay (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_X11_XOpenDisplay=yes -else +else $as_nop ac_cv_lib_X11_XOpenDisplay=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_X11_XOpenDisplay" >&5 -$as_echo "$ac_cv_lib_X11_XOpenDisplay" >&6; } -if test "x$ac_cv_lib_X11_XOpenDisplay" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_X11_XOpenDisplay" >&5 +printf "%s\n" "$ac_cv_lib_X11_XOpenDisplay" >&6; } +if test "x$ac_cv_lib_X11_XOpenDisplay" = xyes +then : hwloc_enable_X11=yes fi @@ -26178,29 +29108,29 @@ fi fi done - CPPFLAGS=$CPPFLAGS_save LIBS=$LIBS_save - if test "$hwloc_enable_X11" != "yes"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 not found; GL disabled" >&5 -$as_echo "$as_me: WARNING: X11 not found; GL disabled" >&2;} + if test "$hwloc_enable_X11" != "yes" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: X11 not found; GL disabled" >&5 +printf "%s\n" "$as_me: WARNING: X11 not found; GL disabled" >&2;} hwloc_gl_happy=no fi - for ac_header in NVCtrl/NVCtrl.h + for ac_header in NVCtrl/NVCtrl.h do : - ac_fn_c_check_header_mongrel "$LINENO" "NVCtrl/NVCtrl.h" "ac_cv_header_NVCtrl_NVCtrl_h" "$ac_includes_default" -if test "x$ac_cv_header_NVCtrl_NVCtrl_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_NVCTRL_NVCTRL_H 1 -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XNVCTRLQueryTargetAttribute in -lXNVCtrl" >&5 -$as_echo_n "checking for XNVCTRLQueryTargetAttribute in -lXNVCtrl... " >&6; } -if ${ac_cv_lib_XNVCtrl_XNVCTRLQueryTargetAttribute+:} false; then : - $as_echo_n "(cached) " >&6 -else + ac_fn_c_check_header_compile "$LINENO" "NVCtrl/NVCtrl.h" "ac_cv_header_NVCtrl_NVCtrl_h" "$ac_includes_default" +if test "x$ac_cv_header_NVCtrl_NVCtrl_h" = xyes +then : + printf "%s\n" "#define HAVE_NVCTRL_NVCTRL_H 1" >>confdefs.h + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XNVCTRLQueryTargetAttribute in -lXNVCtrl" >&5 +printf %s "checking for XNVCTRLQueryTargetAttribute in -lXNVCtrl... " >&6; } +if test ${ac_cv_lib_XNVCtrl_XNVCTRLQueryTargetAttribute+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lXNVCtrl -lXext $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -26209,46 +29139,44 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 XNVCTRLQueryTargetAttribute (); int -main () +main (void) { return XNVCTRLQueryTargetAttribute (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_XNVCtrl_XNVCTRLQueryTargetAttribute=yes -else +else $as_nop ac_cv_lib_XNVCtrl_XNVCTRLQueryTargetAttribute=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_XNVCtrl_XNVCTRLQueryTargetAttribute" >&5 -$as_echo "$ac_cv_lib_XNVCtrl_XNVCTRLQueryTargetAttribute" >&6; } -if test "x$ac_cv_lib_XNVCtrl_XNVCTRLQueryTargetAttribute" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_XNVCtrl_XNVCTRLQueryTargetAttribute" >&5 +printf "%s\n" "$ac_cv_lib_XNVCtrl_XNVCTRLQueryTargetAttribute" >&6; } +if test "x$ac_cv_lib_XNVCtrl_XNVCTRLQueryTargetAttribute" = xyes +then : : -else +else $as_nop hwloc_gl_happy=no fi -else +else $as_nop hwloc_gl_happy=no fi done - if test "x$hwloc_gl_happy" = "xyes"; then -$as_echo "#define HWLOC_HAVE_GL 1" >>confdefs.h +printf "%s\n" "#define HWLOC_HAVE_GL 1" >>confdefs.h HWLOC_GL_LIBS="-lXNVCtrl -lXext -lX11" @@ -26259,37 +29187,43 @@ $as_echo "#define HWLOC_HAVE_GL 1" >>confdefs.h hwloc_components="$hwloc_components gl" hwloc_gl_component_maybeplugin=1 else - if test "$enable_gl" = "yes"; then : + if test "$enable_gl" = "yes" +then : - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Specified --enable-gl switch, but could not" >&5 -$as_echo "$as_me: WARNING: Specified --enable-gl switch, but could not" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: find appropriate support" >&5 -$as_echo "$as_me: WARNING: find appropriate support" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Specified --enable-gl switch, but could not" >&5 +printf "%s\n" "$as_me: WARNING: Specified --enable-gl switch, but could not" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: find appropriate support" >&5 +printf "%s\n" "$as_me: WARNING: find appropriate support" >&2;} as_fn_error $? "Cannot continue" "$LINENO" 5 fi fi + + echo "**** end of NVIDIA GL configuration" fi # don't add LIBS/CFLAGS yet, depends on plugins # libxml2 support hwloc_libxml2_happy= if test "x$enable_libxml2" != "xno"; then + echo + echo "**** libxml2 configuration" + HWLOC_pkg_failed=no - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBXML2" >&5 -$as_echo_n "checking for LIBXML2... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for LIBXML2" >&5 +printf %s "checking for LIBXML2... " >&6; } if test -n "$PKG_CONFIG"; then if test -n "$HWLOC_LIBXML2_CFLAGS"; then HWLOC_pkg_cv_HWLOC_LIBXML2_CFLAGS="$HWLOC_LIBXML2_CFLAGS" else if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --silence-errors \"libxml-2.0\""; } >&5 + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --silence-errors \"libxml-2.0\""; } >&5 ($PKG_CONFIG --exists --silence-errors "libxml-2.0") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then HWLOC_pkg_cv_HWLOC_LIBXML2_CFLAGS=`$PKG_CONFIG --cflags "libxml-2.0" 2>/dev/null` else @@ -26305,10 +29239,10 @@ fi HWLOC_pkg_cv_HWLOC_LIBXML2_LIBS="$HWLOC_LIBXML2_LIBS" else if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --silence-errors \"libxml-2.0\""; } >&5 + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --silence-errors \"libxml-2.0\""; } >&5 ($PKG_CONFIG --exists --silence-errors "libxml-2.0") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then HWLOC_pkg_cv_HWLOC_LIBXML2_LIBS=`$PKG_CONFIG --libs "libxml-2.0" 2>/dev/null` else @@ -26338,16 +29272,16 @@ fi # Put the nasty error message in config.log where it belongs echo "$HWLOC_LIBXML2_PKG_ERRORS" >&5 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } hwloc_libxml2_happy=no elif test $HWLOC_pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot check without pkg-config" >&5 -$as_echo "cannot check without pkg-config" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cannot check without pkg-config" >&5 +printf "%s\n" "cannot check without pkg-config" >&6; } hwloc_libxml2_happy=no else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } # If we got good results from pkg-config, check that they # actually work (i.e., that we can link against the resulting @@ -26366,45 +29300,49 @@ $as_echo "yes" >&6; } CFLAGS="$CFLAGS $HWLOC_pkg_cv_HWLOC_LIBXML2_CFLAGS" CPPFLAGS="$CPPFLAGS $HWLOC_pkg_cv_HWLOC_LIBXML2_CFLAGS" LIBS="$LIBS $HWLOC_pkg_cv_HWLOC_LIBXML2_LIBS" - ac_fn_c_check_header_mongrel "$LINENO" "libxml/parser.h" "ac_cv_header_libxml_parser_h" "$ac_includes_default" -if test "x$ac_cv_header_libxml_parser_h" = xyes; then : + ac_fn_c_check_header_compile "$LINENO" "libxml/parser.h" "ac_cv_header_libxml_parser_h" "$ac_includes_default" +if test "x$ac_cv_header_libxml_parser_h" = xyes +then : ac_fn_c_check_func "$LINENO" "xmlNewDoc" "ac_cv_func_xmlNewDoc" -if test "x$ac_cv_func_xmlNewDoc" = xyes; then : +if test "x$ac_cv_func_xmlNewDoc" = xyes +then : hwloc_result=yes -else +else $as_nop hwloc_result=no fi -else +else $as_nop hwloc_result=no fi - CFLAGS=$hwloc_cflags_save CPPFLAGS=$hwloc_cppflags_save LIBS=$hwloc_libs_save - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for final LIBXML2 support" >&5 -$as_echo_n "checking for final LIBXML2 support... " >&6; } - if test "$hwloc_result" = "yes"; then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for final LIBXML2 support" >&5 +printf %s "checking for final LIBXML2 support... " >&6; } + if test "$hwloc_result" = "yes" +then : HWLOC_LIBXML2_CFLAGS=$HWLOC_pkg_cv_HWLOC_LIBXML2_CFLAGS HWLOC_LIBXML2_LIBS=$HWLOC_pkg_cv_HWLOC_LIBXML2_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } hwloc_libxml2_happy=yes -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } hwloc_libxml2_happy=no fi fi + + echo "**** end of libxml2 configuration" fi if test "x$hwloc_libxml2_happy" = "xyes"; then HWLOC_LIBXML2_REQUIRES="libxml-2.0" -$as_echo "#define HWLOC_HAVE_LIBXML2 1" >>confdefs.h +printf "%s\n" "#define HWLOC_HAVE_LIBXML2 1" >>confdefs.h HWLOC_HAVE_LIBXML2=1 @@ -26414,9 +29352,10 @@ $as_echo "#define HWLOC_HAVE_LIBXML2 1" >>confdefs.h else HWLOC_HAVE_LIBXML2=0 - if test "$enable_libxml2" = "yes"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-libxml2 requested, but libxml2 was not found" >&5 -$as_echo "$as_me: WARNING: --enable-libxml2 requested, but libxml2 was not found" >&2;} + if test "$enable_libxml2" = "yes" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: --enable-libxml2 requested, but libxml2 was not found" >&5 +printf "%s\n" "$as_me: WARNING: --enable-libxml2 requested, but libxml2 was not found" >&2;} as_fn_error $? "Cannot continue" "$LINENO" 5 fi fi @@ -26424,8 +29363,11 @@ fi # Try to compile the x86 cpuid inlines if test "x$enable_cpuid" != "xno"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for x86 cpuid" >&5 -$as_echo_n "checking for x86 cpuid... " >&6; } + echo + echo "**** x86 CPUID configuration" + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for x86 cpuid" >&5 +printf %s "checking for x86 cpuid... " >&6; } old_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -I$HWLOC_top_srcdir/include" # We need hwloc_uint64_t but we can't use autogen/config.h before configure ends. @@ -26451,7 +29393,7 @@ $as_echo_n "checking for x86 cpuid... " >&6; } #include int -main () +main (void) { if (hwloc_have_x86_cpuid()) { @@ -26465,91 +29407,39 @@ main () return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +if ac_fn_c_try_link "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } -$as_echo "#define HWLOC_HAVE_X86_CPUID 1" >>confdefs.h +printf "%s\n" "#define HWLOC_HAVE_X86_CPUID 1" >>confdefs.h + + HWLOC_HAVE_X86_CPUID=1 hwloc_have_x86_cpuid=yes -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext if test "x$hwloc_have_x86_cpuid" = xyes; then hwloc_components="$hwloc_components x86" fi CPPFLAGS="$old_CPPFLAGS" - fi - - # Components require pthread_mutex, see if it needs -lpthread - hwloc_pthread_mutex_happy=no - # Try without explicit -lpthread first - ac_fn_c_check_func "$LINENO" "pthread_mutex_lock" "ac_cv_func_pthread_mutex_lock" -if test "x$ac_cv_func_pthread_mutex_lock" = xyes; then : - hwloc_pthread_mutex_happy=yes - HWLOC_LIBS_PRIVATE="$HWLOC_LIBS_PRIVATE -lpthread" - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_lock with -lpthread" >&5 -$as_echo_n "checking for pthread_mutex_lock with -lpthread... " >&6; } - # Try again with explicit -lpthread, but don't use AC_CHECK_FUNC to avoid the cache - tmp_save_LIBS=$LIBS - LIBS="$LIBS -lpthread" - 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_mutex_lock (); -int -main () -{ -return pthread_mutex_lock (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - hwloc_pthread_mutex_happy=yes - HWLOC_LIBS="$HWLOC_LIBS -lpthread" - -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hwloc_pthread_mutex_happy" >&5 -$as_echo "$hwloc_pthread_mutex_happy" >&6; } - LIBS="$tmp_save_LIBS" -fi - - if test "x$hwloc_pthread_mutex_happy" = "xyes"; then : - -$as_echo "#define HWLOC_HAVE_PTHREAD_MUTEX 1" >>confdefs.h - -fi - - if test "x$hwloc_pthread_mutex_happy" != xyes -a "x$hwloc_windows" != xyes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pthread_mutex_lock not available, required for thread-safe initialization on non-Windows platforms." >&5 -$as_echo "$as_me: WARNING: pthread_mutex_lock not available, required for thread-safe initialization on non-Windows platforms." >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please report this to the hwloc-devel mailing list." >&5 -$as_echo "$as_me: WARNING: Please report this to the hwloc-devel mailing list." >&2;} - as_fn_error $? "Cannot continue" "$LINENO" 5 -fi + echo "**** end of x86 CPUID configuration" + fi # # Now enable registration of listed components # + echo + echo "**** component and plugin-specific configuration" # Plugin support - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if plugin support is enabled" >&5 -$as_echo_n "checking if plugin support is enabled... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if plugin support is enabled" >&5 +printf %s "checking if plugin support is enabled... " >&6; } # Plugins (even core support) are totally disabled by default. # Pass --enable-plugins=foo (with "foo" NOT an existing component) to enable plugins but build none of them. if test "x$enable_plugins" = xyes; then @@ -26561,31 +29451,31 @@ $as_echo_n "checking if plugin support is enabled... " >&6; } else hwloc_have_plugins=no fi fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hwloc_have_plugins" >&5 -$as_echo "$hwloc_have_plugins" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hwloc_have_plugins" >&5 +printf "%s\n" "$hwloc_have_plugins" >&6; } if test "x$hwloc_have_plugins" = xyes; then # dlopen and ltdl (at least 2.4.2) doesn't work on AIX # posix linkers don't work well with plugins and windows dll constraints if test "x$enable_plugin_dlopen" = x; then if test "x$hwloc_aix" = "xyes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: dlopen does not work on AIX, disabled by default." >&5 -$as_echo "$as_me: WARNING: dlopen does not work on AIX, disabled by default." >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: dlopen does not work on AIX, disabled by default." >&5 +printf "%s\n" "$as_me: WARNING: dlopen does not work on AIX, disabled by default." >&2;} enable_plugin_dlopen=no else if test "x$hwloc_windows" = "xyes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: dlopen not supported on non-native Windows build, disabled by default." >&5 -$as_echo "$as_me: WARNING: dlopen not supported on non-native Windows build, disabled by default." >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: dlopen not supported on non-native Windows build, disabled by default." >&5 +printf "%s\n" "$as_me: WARNING: dlopen not supported on non-native Windows build, disabled by default." >&2;} enable_plugin_dlopen=no fi fi fi if test "x$enable_plugin_ltdl" = x; then if test "x$hwloc_aix" = "xyes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ltdl does not work on AIX, disabled by default." >&5 -$as_echo "$as_me: WARNING: ltdl does not work on AIX, disabled by default." >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: ltdl does not work on AIX, disabled by default." >&5 +printf "%s\n" "$as_me: WARNING: ltdl does not work on AIX, disabled by default." >&2;} enable_plugin_dlopen=no else if test "x$hwloc_windows" = "xyes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ltdl not supported on non-native Windows build, disabled by default." >&5 -$as_echo "$as_me: WARNING: ltdl not supported on non-native Windows build, disabled by default." >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: ltdl not supported on non-native Windows build, disabled by default." >&5 +printf "%s\n" "$as_me: WARNING: ltdl not supported on non-native Windows build, disabled by default." >&2;} enable_plugin_dlopen=no fi fi fi @@ -26594,8 +29484,8 @@ $as_echo "$as_me: WARNING: ltdl not supported on non-native Windows build, disab if test "x$enable_plugin_dlopen" != xno; then hwloc_dlopen_ready=no - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen" >&5 -$as_echo_n "checking for dlopen... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen" >&5 +printf %s "checking for dlopen... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -26605,7 +29495,7 @@ $as_echo_n "checking for dlopen... " >&6; } void *handle; int -main () +main (void) { handle = dlopen(NULL, RTLD_NOW|RTLD_LOCAL); @@ -26614,20 +29504,23 @@ main () return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +if ac_fn_c_try_link "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } hwloc_dlopen_ready=yes -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ac_fn_c_check_header_mongrel "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default" -if test "x$ac_cv_header_dlfcn_h" = xyes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if ${ac_cv_lib_dl_dlopen+:} false; then : - $as_echo_n "(cached) " >&6 -else +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default" +if test "x$ac_cv_header_dlfcn_h" = xyes +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +printf %s "checking for dlopen in -ldl... " >&6; } +if test ${ac_cv_lib_dl_dlopen+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -26636,30 +29529,29 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 dlopen (); int -main () +main (void) { return dlopen (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_dl_dlopen=yes -else +else $as_nop ac_cv_lib_dl_dlopen=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = xyes +then : hwloc_dlopen_ready=yes hwloc_dlopen_libs=-ldl fi @@ -26668,9 +29560,8 @@ fi fi - fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi @@ -26678,13 +29569,15 @@ rm -f core conftest.err conftest.$ac_objext \ if test "x$enable_plugin_ltdl" != xno; then hwloc_ltdl_ready=no - ac_fn_c_check_header_mongrel "$LINENO" "ltdl.h" "ac_cv_header_ltdl_h" "$ac_includes_default" -if test "x$ac_cv_header_ltdl_h" = xyes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lt_dlopenext in -lltdl" >&5 -$as_echo_n "checking for lt_dlopenext in -lltdl... " >&6; } -if ${ac_cv_lib_ltdl_lt_dlopenext+:} false; then : - $as_echo_n "(cached) " >&6 -else + ac_fn_c_check_header_compile "$LINENO" "ltdl.h" "ac_cv_header_ltdl_h" "$ac_includes_default" +if test "x$ac_cv_header_ltdl_h" = xyes +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for lt_dlopenext in -lltdl" >&5 +printf %s "checking for lt_dlopenext in -lltdl... " >&6; } +if test ${ac_cv_lib_ltdl_lt_dlopenext+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lltdl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -26693,30 +29586,29 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 lt_dlopenext (); int -main () +main (void) { return lt_dlopenext (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_ltdl_lt_dlopenext=yes -else +else $as_nop ac_cv_lib_ltdl_lt_dlopenext=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ltdl_lt_dlopenext" >&5 -$as_echo "$ac_cv_lib_ltdl_lt_dlopenext" >&6; } -if test "x$ac_cv_lib_ltdl_lt_dlopenext" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ltdl_lt_dlopenext" >&5 +printf "%s\n" "$ac_cv_lib_ltdl_lt_dlopenext" >&6; } +if test "x$ac_cv_lib_ltdl_lt_dlopenext" = xyes +then : hwloc_ltdl_ready=yes hwloc_ltdl_libs=-lltdl fi @@ -26725,26 +29617,25 @@ fi fi - fi # Now use dlopen by default, or ltdl, or just fail to enable plugins - { $as_echo "$as_me:${as_lineno-$LINENO}: checking which library to use for loading plugins" >&5 -$as_echo_n "checking which library to use for loading plugins... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which library to use for loading plugins" >&5 +printf %s "checking which library to use for loading plugins... " >&6; } if test "x$hwloc_dlopen_ready" = xyes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: dlopen" >&5 -$as_echo "dlopen" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: dlopen" >&5 +printf "%s\n" "dlopen" >&6; } hwloc_plugins_load=dlopen # Now enable dlopen libs HWLOC_DL_LIBS="$hwloc_dlopen_libs" else if test x$hwloc_ltdl_ready = xyes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ltdl" >&5 -$as_echo "ltdl" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ltdl" >&5 +printf "%s\n" "ltdl" >&6; } hwloc_plugins_load=ltdl # Now enable ltdl libs -$as_echo "#define HWLOC_HAVE_LTDL 1" >>confdefs.h +printf "%s\n" "#define HWLOC_HAVE_LTDL 1" >>confdefs.h HWLOC_LTDL_LIBS="$hwloc_ltdl_libs" @@ -26775,11 +29666,12 @@ $as_echo "#define HWLOC_HAVE_LTDL 1" >>confdefs.h darwin*) # if libdl is installed we need to link against it - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if ${ac_cv_lib_dl_dlopen+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +printf %s "checking for dlopen in -ldl... " >&6; } +if test ${ac_cv_lib_dl_dlopen+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -26788,32 +29680,31 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 dlopen (); int -main () +main (void) { return dlopen (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_dl_dlopen=yes -else +else $as_nop ac_cv_lib_dl_dlopen=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = xyes +then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -else +else $as_nop lt_cv_dlopen="dyld" lt_cv_dlopen_libs= @@ -26825,14 +29716,16 @@ fi *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" -if test "x$ac_cv_func_shl_load" = xyes; then : +if test "x$ac_cv_func_shl_load" = xyes +then : lt_cv_dlopen="shl_load" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 -$as_echo_n "checking for shl_load in -ldld... " >&6; } -if ${ac_cv_lib_dld_shl_load+:} false; then : - $as_echo_n "(cached) " >&6 -else +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 +printf %s "checking for shl_load in -ldld... " >&6; } +if test ${ac_cv_lib_dld_shl_load+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -26841,41 +29734,42 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 shl_load (); int -main () +main (void) { return shl_load (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_dld_shl_load=yes -else +else $as_nop ac_cv_lib_dld_shl_load=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 -$as_echo "$ac_cv_lib_dld_shl_load" >&6; } -if test "x$ac_cv_lib_dld_shl_load" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 +printf "%s\n" "$ac_cv_lib_dld_shl_load" >&6; } +if test "x$ac_cv_lib_dld_shl_load" = xyes +then : lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" -else +else $as_nop ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" -if test "x$ac_cv_func_dlopen" = xyes; then : +if test "x$ac_cv_func_dlopen" = xyes +then : lt_cv_dlopen="dlopen" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if ${ac_cv_lib_dl_dlopen+:} false; then : - $as_echo_n "(cached) " >&6 -else +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +printf %s "checking for dlopen in -ldl... " >&6; } +if test ${ac_cv_lib_dl_dlopen+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -26884,37 +29778,37 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 dlopen (); int -main () +main (void) { return dlopen (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_dl_dlopen=yes -else +else $as_nop ac_cv_lib_dl_dlopen=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = xyes +then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 -$as_echo_n "checking for dlopen in -lsvld... " >&6; } -if ${ac_cv_lib_svld_dlopen+:} false; then : - $as_echo_n "(cached) " >&6 -else +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 +printf %s "checking for dlopen in -lsvld... " >&6; } +if test ${ac_cv_lib_svld_dlopen+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -26923,37 +29817,37 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 dlopen (); int -main () +main (void) { return dlopen (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_svld_dlopen=yes -else +else $as_nop ac_cv_lib_svld_dlopen=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 -$as_echo "$ac_cv_lib_svld_dlopen" >&6; } -if test "x$ac_cv_lib_svld_dlopen" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 +printf "%s\n" "$ac_cv_lib_svld_dlopen" >&6; } +if test "x$ac_cv_lib_svld_dlopen" = xyes +then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 -$as_echo_n "checking for dld_link in -ldld... " >&6; } -if ${ac_cv_lib_dld_dld_link+:} false; then : - $as_echo_n "(cached) " >&6 -else +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 +printf %s "checking for dld_link in -ldld... " >&6; } +if test ${ac_cv_lib_dld_dld_link+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -26962,30 +29856,29 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 dld_link (); int -main () +main (void) { return dld_link (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_dld_dld_link=yes -else +else $as_nop ac_cv_lib_dld_dld_link=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 -$as_echo "$ac_cv_lib_dld_dld_link" >&6; } -if test "x$ac_cv_lib_dld_dld_link" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 +printf "%s\n" "$ac_cv_lib_dld_dld_link" >&6; } +if test "x$ac_cv_lib_dld_dld_link" = xyes +then : lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" fi @@ -27017,26 +29910,19 @@ fi lt_cv_dlopen_self="$save_lt_cv_dlopen_self" else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 -$as_echo "none" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Plugin support requested, but could not enable dlopen or ltdl" >&5 -$as_echo "$as_me: WARNING: Plugin support requested, but could not enable dlopen or ltdl" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none" >&5 +printf "%s\n" "none" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Plugin support requested, but could not enable dlopen or ltdl" >&5 +printf "%s\n" "$as_me: WARNING: Plugin support requested, but could not enable dlopen or ltdl" >&2;} as_fn_error $? "Cannot continue" "$LINENO" 5 fi fi -$as_echo "#define HWLOC_HAVE_PLUGINS 1" >>confdefs.h +printf "%s\n" "#define HWLOC_HAVE_PLUGINS 1" >>confdefs.h fi - -# Check whether --with-hwloc-plugins-path was given. -if test "${with_hwloc_plugins_path+set}" = set; then : - withval=$with_hwloc_plugins_path; HWLOC_PLUGINS_PATH="$with_hwloc_plugins_path" -else - HWLOC_PLUGINS_PATH="\$(libdir)/hwloc" -fi - + # HWLOC_PLUGINS_PATH is defined in AC_ARG_WITH([hwloc-plugins-path]...) HWLOC_PLUGINS_DIR=`echo "$HWLOC_PLUGINS_PATH" | cut -d: -f1` @@ -27074,10 +29960,10 @@ done # Now we have some hwloc__component=plugin/static # and hwloc_static/plugin_components=list (space separated) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking components to build statically" >&5 -$as_echo_n "checking components to build statically... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hwloc_static_components" >&5 -$as_echo "$hwloc_static_components" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking components to build statically" >&5 +printf %s "checking components to build statically... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hwloc_static_components" >&5 +printf "%s\n" "$hwloc_static_components" >&6; } cat <>"$hwloc_static_components_file" #include @@ -27091,48 +29977,94 @@ cat <>"$hwloc_static_components_file" }; EOF - { $as_echo "$as_me:${as_lineno-$LINENO}: checking components to build as plugins" >&5 -$as_echo_n "checking components to build as plugins... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hwloc_plugin_components" >&5 -$as_echo "$hwloc_plugin_components" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking components to build as plugins" >&5 +printf %s "checking components to build as plugins... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hwloc_plugin_components" >&5 +printf "%s\n" "$hwloc_plugin_components" >&6; } - if test "$hwloc_pci_component" = "static"; then : + if test "$hwloc_pci_component" = "static" +then : HWLOC_LIBS="$HWLOC_LIBS $HWLOC_PCIACCESS_LIBS" - HWLOC_CFLAGS="$HWLOC_CFLAGS $HWLOC_PCIACCESS_CFLAGS" + HWLOC_LDFLAGS="$HWLOC_LDFLAGS $HWLOC_PCIACCESS_LDFLAGS" + HWLOC_CFLAGS="$HWLOC_CFLAGS $HWLOC_PCIACCESS_CPPFLAGS $HWLOC_PCIACCESS_CFLAGS" HWLOC_REQUIRES="$HWLOC_PCIACCESS_REQUIRES $HWLOC_REQUIRES" + +printf "%s\n" "#define HWLOC_PCI_COMPONENT_BUILTIN 1" >>confdefs.h + fi - if test "$hwloc_opencl_component" = "static"; then : + if test "$hwloc_opencl_component" = "static" +then : HWLOC_LIBS="$HWLOC_LIBS $HWLOC_OPENCL_LIBS" HWLOC_LDFLAGS="$HWLOC_LDFLAGS $HWLOC_OPENCL_LDFLAGS" - HWLOC_CFLAGS="$HWLOC_CFLAGS $HWLOC_OPENCL_CFLAGS" + HWLOC_CFLAGS="$HWLOC_CFLAGS $HWLOC_OPENCL_CPPFLAGS $HWLOC_OPENCL_CFLAGS" HWLOC_REQUIRES="$HWLOC_OPENCL_REQUIRES $HWLOC_REQUIRES" + +printf "%s\n" "#define HWLOC_OPENCL_COMPONENT_BUILTIN 1" >>confdefs.h + fi - if test "$hwloc_cuda_component" = "static"; then : - HWLOC_LIBS="$HWLOC_LIBS $HWLOC_CUDA_LIBS" - HWLOC_CFLAGS="$HWLOC_CFLAGS $HWLOC_CUDA_CFLAGS" - HWLOC_REQUIRES="$HWLOC_CUDA_REQUIRES $HWLOC_REQUIRES" + if test "$hwloc_cuda_component" = "static" +then : + HWLOC_LIBS="$HWLOC_LIBS $HWLOC_CUDART_LIBS" + HWLOC_LDFLAGS="$HWLOC_LDFLAGS $HWLOC_CUDART_LDFLAGS" + HWLOC_CFLAGS="$HWLOC_CFLAGS $HWLOC_CUDART_CPPFLAGS $HWLOC_CUDART_CFLAGS" + HWLOC_REQUIRES="$HWLOC_CUDART_REQUIRES $HWLOC_REQUIRES" + +printf "%s\n" "#define HWLOC_CUDA_COMPONENT_BUILTIN 1" >>confdefs.h + fi - if test "$hwloc_nvml_component" = "static"; then : + if test "$hwloc_nvml_component" = "static" +then : HWLOC_LIBS="$HWLOC_LIBS $HWLOC_NVML_LIBS" - HWLOC_CFLAGS="$HWLOC_CFLAGS $HWLOC_NVML_CFLAGS" + HWLOC_LDFLAGS="$HWLOC_LDFLAGS $HWLOC_NVML_LDFLAGS" + HWLOC_CFLAGS="$HWLOC_CFLAGS $HWLOC_NVML_CPPFLAGS $HWLOC_NVML_CFLAGS" HWLOC_REQUIRES="$HWLOC_NVML_REQUIRES $HWLOC_REQUIRES" + +printf "%s\n" "#define HWLOC_NVML_COMPONENT_BUILTIN 1" >>confdefs.h + fi - if test "$hwloc_rsmi_component" = "static"; then : + if test "$hwloc_rsmi_component" = "static" +then : HWLOC_LIBS="$HWLOC_LIBS $HWLOC_RSMI_LIBS" - HWLOC_CFLAGS="$HWLOC_CFLAGS $HWLOC_RSMI_CFLAGS" + HWLOC_LDFLAGS="$HWLOC_LDFLAGS $HWLOC_RSMI_LDFLAGS" + HWLOC_CFLAGS="$HWLOC_CFLAGS $HWLOC_RSMI_CPPFLAGS $HWLOC_RSMI_CFLAGS" HWLOC_REQUIRES="$HWLOC_RSMI_REQUIRES $HWLOC_REQUIRES" + +printf "%s\n" "#define HWLOC_RSMI_COMPONENT_BUILTIN 1" >>confdefs.h + +fi + if test "$hwloc_levelzero_component" = "static" +then : + HWLOC_LIBS="$HWLOC_LIBS $HWLOC_LEVELZERO_LIBS" + HWLOC_LDFLAGS="$HWLOC_LDFLAGS $HWLOC_LEVELZERO_LDFLAGS" + HWLOC_CFLAGS="$HWLOC_CFLAGS $HWLOC_LEVELZERO_CPPFLAGS $HWLOC_LEVELZERO_CFLAGS" + HWLOC_REQUIRES="$HWLOC_LEVELZERO_REQUIRES $HWLOC_REQUIRES" + +printf "%s\n" "#define HWLOC_LEVELZERO_COMPONENT_BUILTIN 1" >>confdefs.h + fi - if test "$hwloc_gl_component" = "static"; then : + if test "$hwloc_gl_component" = "static" +then : HWLOC_LIBS="$HWLOC_LIBS $HWLOC_GL_LIBS" - HWLOC_CFLAGS="$HWLOC_CFLAGS $HWLOC_GL_CFLAGS" + HWLOC_LDFLAGS="$HWLOC_LDFLAGS $HWLOC_GL_LDFLAGS" + HWLOC_CFLAGS="$HWLOC_CFLAGS $HWLOC_GL_CPPFLAGS $HWLOC_GL_CFLAGS" HWLOC_REQUIRES="$HWLOC_GL_REQUIRES $HWLOC_REQUIRES" + +printf "%s\n" "#define HWLOC_GL_COMPONENT_BUILTIN 1" >>confdefs.h + fi - if test "$hwloc_xml_libxml_component" = "static"; then : + if test "$hwloc_xml_libxml_component" = "static" +then : HWLOC_LIBS="$HWLOC_LIBS $HWLOC_LIBXML2_LIBS" - HWLOC_CFLAGS="$HWLOC_CFLAGS $HWLOC_LIBXML2_CFLAGS" + HWLOC_LDFLAGS="$HWLOC_LDFLAGS $HWLOC_LIBXML2_LDFLAGS" + HWLOC_CFLAGS="$HWLOC_CFLAGS $HWLOC_LIBXML2_CPPFLAGS $HWLOC_LIBXML2_CFLAGS" HWLOC_REQUIRES="$HWLOC_LIBXML2_REQUIRES $HWLOC_REQUIRES" + +printf "%s\n" "#define HWLOC_XML_LIBXML_COMPONENT_BUILTIN 1" >>confdefs.h + fi + echo "**** end of component and plugin configuration" + # # Setup HWLOC's C, CPP, and LD flags, and LIBS # @@ -27152,7 +30084,8 @@ fi # to be empty so that nothing is linked into libhwloc_embedded.la # itself -- only the upper-layer will link in anything required. - if test "$hwloc_mode" = "embedded"; then : + if test "$hwloc_mode" = "embedded" +then : HWLOC_EMBEDDED_CFLAGS=$HWLOC_CFLAGS HWLOC_EMBEDDED_CPPFLAGS=$HWLOC_CPPFLAGS HWLOC_EMBEDDED_LDFLAGS=$HWLOC_LDFLAGS @@ -27189,17 +30122,20 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu # Check whether --enable-netloc was given. -if test "${enable_netloc+set}" = set; then : +if test ${enable_netloc+y} +then : enableval=$enable_netloc; fi -if test "$enable_netloc" = "yes" -a "$hwloc_mode" = "standalone"; then : +if test "$enable_netloc" = "yes" -a "$hwloc_mode" = "standalone" +then : - if test "x1" != "x"; then : + if test "x1" != "x" +then : cat <&5 -$as_echo_n "checking if netloc supports this platform... " >&6; } - if test "$ac_cv_func_asprintf" != "yes"; then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if netloc supports this platform" >&5 +printf %s "checking if netloc supports this platform... " >&6; } + if test "$ac_cv_func_asprintf" != "yes" +then : netloc_happy=no netloc_missing_reason=" (asprintf missing)" fi - if test "$hwloc_windows" = "yes"; then : + if test "$hwloc_windows" = "yes" +then : netloc_happy=no netloc_missing_reason=" (Windows platform)" fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $netloc_happy$netloc_missing_reason" >&5 -$as_echo "$netloc_happy$netloc_missing_reason" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $netloc_happy$netloc_missing_reason" >&5 +printf "%s\n" "$netloc_happy$netloc_missing_reason" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SCOTCH_archSub in -lscotch" >&5 -$as_echo_n "checking for SCOTCH_archSub in -lscotch... " >&6; } -if ${ac_cv_lib_scotch_SCOTCH_archSub+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SCOTCH_archSub in -lscotch" >&5 +printf %s "checking for SCOTCH_archSub in -lscotch... " >&6; } +if test ${ac_cv_lib_scotch_SCOTCH_archSub+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lscotch -lscotcherr $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -27250,44 +30191,42 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 SCOTCH_archSub (); int -main () +main (void) { return SCOTCH_archSub (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_scotch_SCOTCH_archSub=yes -else +else $as_nop ac_cv_lib_scotch_SCOTCH_archSub=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_scotch_SCOTCH_archSub" >&5 -$as_echo "$ac_cv_lib_scotch_SCOTCH_archSub" >&6; } -if test "x$ac_cv_lib_scotch_SCOTCH_archSub" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_scotch_SCOTCH_archSub" >&5 +printf "%s\n" "$ac_cv_lib_scotch_SCOTCH_archSub" >&6; } +if test "x$ac_cv_lib_scotch_SCOTCH_archSub" = xyes +then : scotch_found_headers=yes; -$as_echo "#define NETLOC_SCOTCH 1" >>confdefs.h +printf "%s\n" "#define NETLOC_SCOTCH 1" >>confdefs.h fi - for ac_header in mpi.h + for ac_header in mpi.h do : - ac_fn_c_check_header_mongrel "$LINENO" "mpi.h" "ac_cv_header_mpi_h" "$ac_includes_default" -if test "x$ac_cv_header_mpi_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_MPI_H 1 -_ACEOF + ac_fn_c_check_header_compile "$LINENO" "mpi.h" "ac_cv_header_mpi_h" "$ac_includes_default" +if test "x$ac_cv_header_mpi_h" = xyes +then : + printf "%s\n" "#define HAVE_MPI_H 1" >>confdefs.h mpi_found_headers=yes; MPI_CPPFLAGS=`mpicc -showme:compile 2>/dev/null` MPI_LDADD=`mpicc -showme:link 2>/dev/null` @@ -27298,14 +30237,14 @@ fi done - # Extract the first word of "xz", so it can be a program name with args. set dummy xz; 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_xz+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_xz+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$xz"; then ac_cv_prog_xz="$xz" # Let the user override the test. else @@ -27313,11 +30252,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_xz="yes" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -27329,11 +30272,11 @@ fi fi xz=$ac_cv_prog_xz if test -n "$xz"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xz" >&5 -$as_echo "$xz" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xz" >&5 +printf "%s\n" "$xz" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -27354,7 +30297,8 @@ fi # to be empty so that nothing is linked into libnetloc_embedded.la # itself -- only the upper-layer will link in anything required. - if test "$hwloc_mode" = "embedded"; then : + if test "$hwloc_mode" = "embedded" +then : NETLOC_EMBEDDED_CFLAGS=$NETLOC_CFLAGS NETLOC_EMBEDDED_CPPFLAGS=$NETLOC_CPPFLAGS NETLOC_EMBEDDED_LDADD='$(HWLOC_top_builddir)/netloc/libnetloc_embedded.la' @@ -27366,10 +30310,12 @@ fi - if test "$netloc_happy" = "yes"; then : + if test "$netloc_happy" = "yes" +then : -else - if test "$enable_netloc" = "yes"; then : +else $as_nop + if test "$enable_netloc" = "yes" +then : as_fn_error $? "Cannot build netloc core" "$LINENO" 5 fi @@ -27402,6 +30348,10 @@ VERSION="${PACKAGE_VERSION}" . $srcdir/VERSION +libhwloc_so_version_current=`echo $libhwloc_so_version | cut -d: -f1` +libhwloc_so_version_age=`echo $libhwloc_so_version | cut -d: -f3` +libhwloc_so_name=`expr $libhwloc_so_version_current - $libhwloc_so_version_age` + #################################################################### # Setup the rest of the infrastructure #################################################################### @@ -27411,11 +30361,12 @@ VERSION="${PACKAGE_VERSION}" # Extract the first word of "diff", so it can be a program name with args. set dummy diff; 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_DIFF+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_DIFF+y} +then : + printf %s "(cached) " >&6 +else $as_nop case $DIFF in [\\/]* | ?:[\\/]*) ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path. @@ -27425,11 +30376,15 @@ else for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac 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_DIFF="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_DIFF="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -27441,16 +30396,17 @@ esac fi DIFF=$ac_cv_path_DIFF if test -n "$DIFF"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5 -$as_echo "$DIFF" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5 +printf "%s\n" "$DIFF" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -if test "$hwloc_mode" = "standalone"; then : +if test "$hwloc_mode" = "standalone" +then : cat <&5 -$as_echo_n "checking if this is a developer build... " >&6; } - if test ! -e "$srcdir/.git"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no (doxygen generation is optional)" >&5 -$as_echo "no (doxygen generation is optional)" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if this is a developer build" >&5 +printf %s "checking if this is a developer build... " >&6; } + if test ! -e "$srcdir/.git" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no (doxygen generation is optional)" >&5 +printf "%s\n" "no (doxygen generation is optional)" >&6; } test "x$enable_doxygen" = x && enable_doxygen=no -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } test "x$enable_doxygen" = x && enable_doxygen=yes fi @@ -27477,11 +30434,12 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}doxygen", so it can be a program name with args. set dummy ${ac_tool_prefix}doxygen; 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_DOXYGEN+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_DOXYGEN+y} +then : + printf %s "(cached) " >&6 +else $as_nop case $DOXYGEN in [\\/]* | ?:[\\/]*) ac_cv_path_DOXYGEN="$DOXYGEN" # Let the user override the test with a path. @@ -27491,11 +30449,15 @@ else for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac 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_DOXYGEN="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_DOXYGEN="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -27507,11 +30469,11 @@ esac fi DOXYGEN=$ac_cv_path_DOXYGEN if test -n "$DOXYGEN"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOXYGEN" >&5 -$as_echo "$DOXYGEN" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DOXYGEN" >&5 +printf "%s\n" "$DOXYGEN" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -27520,11 +30482,12 @@ if test -z "$ac_cv_path_DOXYGEN"; then ac_pt_DOXYGEN=$DOXYGEN # Extract the first word of "doxygen", so it can be a program name with args. set dummy doxygen; 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_ac_pt_DOXYGEN+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_ac_pt_DOXYGEN+y} +then : + printf %s "(cached) " >&6 +else $as_nop case $ac_pt_DOXYGEN in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_DOXYGEN="$ac_pt_DOXYGEN" # Let the user override the test with a path. @@ -27534,11 +30497,15 @@ else for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac 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_ac_pt_DOXYGEN="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_ac_pt_DOXYGEN="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -27550,11 +30517,11 @@ esac fi ac_pt_DOXYGEN=$ac_cv_path_ac_pt_DOXYGEN if test -n "$ac_pt_DOXYGEN"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_DOXYGEN" >&5 -$as_echo "$ac_pt_DOXYGEN" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_DOXYGEN" >&5 +printf "%s\n" "$ac_pt_DOXYGEN" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_pt_DOXYGEN" = x; then @@ -27562,8 +30529,8 @@ fi 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;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DOXYGEN=$ac_pt_DOXYGEN @@ -27578,11 +30545,12 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pdflatex", so it can be a program name with args. set dummy ${ac_tool_prefix}pdflatex; 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_PDFLATEX+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_PDFLATEX+y} +then : + printf %s "(cached) " >&6 +else $as_nop case $PDFLATEX in [\\/]* | ?:[\\/]*) ac_cv_path_PDFLATEX="$PDFLATEX" # Let the user override the test with a path. @@ -27592,11 +30560,15 @@ else for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac 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_PDFLATEX="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_PDFLATEX="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -27608,11 +30580,11 @@ esac fi PDFLATEX=$ac_cv_path_PDFLATEX if test -n "$PDFLATEX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PDFLATEX" >&5 -$as_echo "$PDFLATEX" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PDFLATEX" >&5 +printf "%s\n" "$PDFLATEX" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -27621,11 +30593,12 @@ if test -z "$ac_cv_path_PDFLATEX"; then ac_pt_PDFLATEX=$PDFLATEX # Extract the first word of "pdflatex", so it can be a program name with args. set dummy pdflatex; 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_ac_pt_PDFLATEX+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_ac_pt_PDFLATEX+y} +then : + printf %s "(cached) " >&6 +else $as_nop case $ac_pt_PDFLATEX in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PDFLATEX="$ac_pt_PDFLATEX" # Let the user override the test with a path. @@ -27635,11 +30608,15 @@ else for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac 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_ac_pt_PDFLATEX="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_ac_pt_PDFLATEX="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -27651,11 +30628,11 @@ esac fi ac_pt_PDFLATEX=$ac_cv_path_ac_pt_PDFLATEX if test -n "$ac_pt_PDFLATEX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PDFLATEX" >&5 -$as_echo "$ac_pt_PDFLATEX" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PDFLATEX" >&5 +printf "%s\n" "$ac_pt_PDFLATEX" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_pt_PDFLATEX" = x; then @@ -27663,8 +30640,8 @@ fi 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;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac PDFLATEX=$ac_pt_PDFLATEX @@ -27678,11 +30655,12 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}makeindex", so it can be a program name with args. set dummy ${ac_tool_prefix}makeindex; 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_MAKEINDEX+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_MAKEINDEX+y} +then : + printf %s "(cached) " >&6 +else $as_nop case $MAKEINDEX in [\\/]* | ?:[\\/]*) ac_cv_path_MAKEINDEX="$MAKEINDEX" # Let the user override the test with a path. @@ -27692,11 +30670,15 @@ else for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac 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_MAKEINDEX="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_MAKEINDEX="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -27708,11 +30690,11 @@ esac fi MAKEINDEX=$ac_cv_path_MAKEINDEX if test -n "$MAKEINDEX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKEINDEX" >&5 -$as_echo "$MAKEINDEX" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAKEINDEX" >&5 +printf "%s\n" "$MAKEINDEX" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -27721,11 +30703,12 @@ if test -z "$ac_cv_path_MAKEINDEX"; then ac_pt_MAKEINDEX=$MAKEINDEX # Extract the first word of "makeindex", so it can be a program name with args. set dummy makeindex; 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_ac_pt_MAKEINDEX+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_ac_pt_MAKEINDEX+y} +then : + printf %s "(cached) " >&6 +else $as_nop case $ac_pt_MAKEINDEX in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_MAKEINDEX="$ac_pt_MAKEINDEX" # Let the user override the test with a path. @@ -27735,11 +30718,15 @@ else for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac 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_ac_pt_MAKEINDEX="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_ac_pt_MAKEINDEX="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -27751,11 +30738,11 @@ esac fi ac_pt_MAKEINDEX=$ac_cv_path_ac_pt_MAKEINDEX if test -n "$ac_pt_MAKEINDEX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_MAKEINDEX" >&5 -$as_echo "$ac_pt_MAKEINDEX" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_MAKEINDEX" >&5 +printf "%s\n" "$ac_pt_MAKEINDEX" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_pt_MAKEINDEX" = x; then @@ -27763,8 +30750,8 @@ fi 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;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac MAKEINDEX=$ac_pt_MAKEINDEX @@ -27778,11 +30765,12 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}fig2dev", so it can be a program name with args. set dummy ${ac_tool_prefix}fig2dev; 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_FIG2DEV+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_FIG2DEV+y} +then : + printf %s "(cached) " >&6 +else $as_nop case $FIG2DEV in [\\/]* | ?:[\\/]*) ac_cv_path_FIG2DEV="$FIG2DEV" # Let the user override the test with a path. @@ -27792,11 +30780,15 @@ else for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac 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_FIG2DEV="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_FIG2DEV="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -27808,11 +30800,11 @@ esac fi FIG2DEV=$ac_cv_path_FIG2DEV if test -n "$FIG2DEV"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIG2DEV" >&5 -$as_echo "$FIG2DEV" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $FIG2DEV" >&5 +printf "%s\n" "$FIG2DEV" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -27821,11 +30813,12 @@ if test -z "$ac_cv_path_FIG2DEV"; then ac_pt_FIG2DEV=$FIG2DEV # Extract the first word of "fig2dev", so it can be a program name with args. set dummy fig2dev; 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_ac_pt_FIG2DEV+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_ac_pt_FIG2DEV+y} +then : + printf %s "(cached) " >&6 +else $as_nop case $ac_pt_FIG2DEV in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_FIG2DEV="$ac_pt_FIG2DEV" # Let the user override the test with a path. @@ -27835,11 +30828,15 @@ else for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac 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_ac_pt_FIG2DEV="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_ac_pt_FIG2DEV="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -27851,11 +30848,11 @@ esac fi ac_pt_FIG2DEV=$ac_cv_path_ac_pt_FIG2DEV if test -n "$ac_pt_FIG2DEV"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_FIG2DEV" >&5 -$as_echo "$ac_pt_FIG2DEV" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_FIG2DEV" >&5 +printf "%s\n" "$ac_pt_FIG2DEV" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_pt_FIG2DEV" = x; then @@ -27863,8 +30860,8 @@ fi 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;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac FIG2DEV=$ac_pt_FIG2DEV @@ -27878,11 +30875,12 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gs", so it can be a program name with args. set dummy ${ac_tool_prefix}gs; 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_GS+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_GS+y} +then : + printf %s "(cached) " >&6 +else $as_nop case $GS in [\\/]* | ?:[\\/]*) ac_cv_path_GS="$GS" # Let the user override the test with a path. @@ -27892,11 +30890,15 @@ else for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac 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_GS="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_GS="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -27908,11 +30910,11 @@ esac fi GS=$ac_cv_path_GS if test -n "$GS"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GS" >&5 -$as_echo "$GS" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GS" >&5 +printf "%s\n" "$GS" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -27921,11 +30923,12 @@ if test -z "$ac_cv_path_GS"; then ac_pt_GS=$GS # Extract the first word of "gs", so it can be a program name with args. set dummy gs; 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_ac_pt_GS+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_ac_pt_GS+y} +then : + printf %s "(cached) " >&6 +else $as_nop case $ac_pt_GS in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_GS="$ac_pt_GS" # Let the user override the test with a path. @@ -27935,11 +30938,15 @@ else for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac 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_ac_pt_GS="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_ac_pt_GS="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -27951,11 +30958,11 @@ esac fi ac_pt_GS=$ac_cv_path_ac_pt_GS if test -n "$ac_pt_GS"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_GS" >&5 -$as_echo "$ac_pt_GS" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_GS" >&5 +printf "%s\n" "$ac_pt_GS" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_pt_GS" = x; then @@ -27963,8 +30970,8 @@ fi 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;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac GS=$ac_pt_GS @@ -27978,11 +30985,12 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}epstopdf", so it can be a program name with args. set dummy ${ac_tool_prefix}epstopdf; 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_EPSTOPDF+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_EPSTOPDF+y} +then : + printf %s "(cached) " >&6 +else $as_nop case $EPSTOPDF in [\\/]* | ?:[\\/]*) ac_cv_path_EPSTOPDF="$EPSTOPDF" # Let the user override the test with a path. @@ -27992,11 +31000,15 @@ else for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac 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_EPSTOPDF="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_EPSTOPDF="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -28008,11 +31020,11 @@ esac fi EPSTOPDF=$ac_cv_path_EPSTOPDF if test -n "$EPSTOPDF"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EPSTOPDF" >&5 -$as_echo "$EPSTOPDF" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $EPSTOPDF" >&5 +printf "%s\n" "$EPSTOPDF" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -28021,11 +31033,12 @@ if test -z "$ac_cv_path_EPSTOPDF"; then ac_pt_EPSTOPDF=$EPSTOPDF # Extract the first word of "epstopdf", so it can be a program name with args. set dummy epstopdf; 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_ac_pt_EPSTOPDF+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_ac_pt_EPSTOPDF+y} +then : + printf %s "(cached) " >&6 +else $as_nop case $ac_pt_EPSTOPDF in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_EPSTOPDF="$ac_pt_EPSTOPDF" # Let the user override the test with a path. @@ -28035,11 +31048,15 @@ else for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac 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_ac_pt_EPSTOPDF="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_ac_pt_EPSTOPDF="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -28051,11 +31068,11 @@ esac fi ac_pt_EPSTOPDF=$ac_cv_path_ac_pt_EPSTOPDF if test -n "$ac_pt_EPSTOPDF"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_EPSTOPDF" >&5 -$as_echo "$ac_pt_EPSTOPDF" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_EPSTOPDF" >&5 +printf "%s\n" "$ac_pt_EPSTOPDF" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_pt_EPSTOPDF" = x; then @@ -28063,8 +31080,8 @@ fi 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;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac EPSTOPDF=$ac_pt_EPSTOPDF @@ -28074,36 +31091,43 @@ else fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if can build doxygen docs" >&5 -$as_echo_n "checking if can build doxygen docs... " >&6; } - if test "x$DOXYGEN" != "x" -a "x$PDFLATEX" != "x" -a "x$MAKEINDEX" != "x" -a "x$FIG2DEV" != "x" -a "x$GS" != "x" -a "x$EPSTOPDF" != "x"; then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if can build doxygen docs" >&5 +printf %s "checking if can build doxygen docs... " >&6; } + if test "x$DOXYGEN" != "x" -a "x$PDFLATEX" != "x" -a "x$MAKEINDEX" != "x" -a "x$FIG2DEV" != "x" -a "x$GS" != "x" -a "x$EPSTOPDF" != "x" +then : hwloc_generate_doxs=yes -else +else $as_nop hwloc_generate_doxs=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hwloc_generate_doxs" >&5 -$as_echo "$hwloc_generate_doxs" >&6; } - if test "x$hwloc_generate_doxs" = xyes -a "x$HWLOC_DOXYGEN_VERSION" = x1.6.2; then : - hwloc_generate_doxs="no"; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: doxygen 1.6.2 has broken short name support, disabling" >&5 -$as_echo "$as_me: WARNING: doxygen 1.6.2 has broken short name support, disabling" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hwloc_generate_doxs" >&5 +printf "%s\n" "$hwloc_generate_doxs" >&6; } + if test "x$hwloc_generate_doxs" = xyes -a "x$HWLOC_DOXYGEN_VERSION" = x1.6.2 +then : + hwloc_generate_doxs="no"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: doxygen 1.6.2 has broken short name support, disabling" >&5 +printf "%s\n" "$as_me: WARNING: doxygen 1.6.2 has broken short name support, disabling" >&2;} fi - if test "x$hwloc_generate_doxs" = xyes -a "x$HWLOC_DOXYGEN_VERSION" = x1.8.16 -a "$HWLOC_top_builddir" = "$HWLOC_top_srcdir"; then : - hwloc_generate_doxs="no"; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: doxygen 1.8.16 fails when building inside the source-tree, disabling" >&5 -$as_echo "$as_me: WARNING: doxygen 1.8.16 fails when building inside the source-tree, disabling" >&2;} + if test "x$hwloc_generate_doxs" = xyes -a "x$HWLOC_DOXYGEN_VERSION" = x1.8.16 -a "$HWLOC_top_builddir" = "$HWLOC_top_srcdir" +then : + hwloc_generate_doxs="no"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: doxygen 1.8.16 fails when building inside the source-tree, disabling" >&5 +printf "%s\n" "$as_me: WARNING: doxygen 1.8.16 fails when building inside the source-tree, disabling" >&2;} fi - # Making the top-level README requires w3m or lynx. + if test "x$enable_readme" != xno +then : - if test -n "$ac_tool_prefix"; then + # Making the top-level README requires w3m or lynx. + + if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}w3m", so it can be a program name with args. set dummy ${ac_tool_prefix}w3m; 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_W3M+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_W3M+y} +then : + printf %s "(cached) " >&6 +else $as_nop case $W3M in [\\/]* | ?:[\\/]*) ac_cv_path_W3M="$W3M" # Let the user override the test with a path. @@ -28113,11 +31137,15 @@ else for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac 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_W3M="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_W3M="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -28129,11 +31157,11 @@ esac fi W3M=$ac_cv_path_W3M if test -n "$W3M"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $W3M" >&5 -$as_echo "$W3M" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $W3M" >&5 +printf "%s\n" "$W3M" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -28142,11 +31170,12 @@ if test -z "$ac_cv_path_W3M"; then ac_pt_W3M=$W3M # Extract the first word of "w3m", so it can be a program name with args. set dummy w3m; 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_ac_pt_W3M+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_ac_pt_W3M+y} +then : + printf %s "(cached) " >&6 +else $as_nop case $ac_pt_W3M in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_W3M="$ac_pt_W3M" # Let the user override the test with a path. @@ -28156,11 +31185,15 @@ else for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac 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_ac_pt_W3M="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_ac_pt_W3M="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -28172,11 +31205,11 @@ esac fi ac_pt_W3M=$ac_cv_path_ac_pt_W3M if test -n "$ac_pt_W3M"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_W3M" >&5 -$as_echo "$ac_pt_W3M" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_W3M" >&5 +printf "%s\n" "$ac_pt_W3M" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_pt_W3M" = x; then @@ -28184,8 +31217,8 @@ fi 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;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac W3M=$ac_pt_W3M @@ -28195,14 +31228,15 @@ else fi - if test -n "$ac_tool_prefix"; then + if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}lynx", so it can be a program name with args. set dummy ${ac_tool_prefix}lynx; 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_LYNX+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_LYNX+y} +then : + printf %s "(cached) " >&6 +else $as_nop case $LYNX in [\\/]* | ?:[\\/]*) ac_cv_path_LYNX="$LYNX" # Let the user override the test with a path. @@ -28212,11 +31246,15 @@ else for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac 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_LYNX="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_LYNX="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -28228,11 +31266,11 @@ esac fi LYNX=$ac_cv_path_LYNX if test -n "$LYNX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LYNX" >&5 -$as_echo "$LYNX" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LYNX" >&5 +printf "%s\n" "$LYNX" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -28241,11 +31279,12 @@ if test -z "$ac_cv_path_LYNX"; then ac_pt_LYNX=$LYNX # Extract the first word of "lynx", so it can be a program name with args. set dummy lynx; 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_ac_pt_LYNX+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_ac_pt_LYNX+y} +then : + printf %s "(cached) " >&6 +else $as_nop case $ac_pt_LYNX in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_LYNX="$ac_pt_LYNX" # Let the user override the test with a path. @@ -28255,11 +31294,15 @@ else for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac 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_ac_pt_LYNX="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_ac_pt_LYNX="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -28271,11 +31314,11 @@ esac fi ac_pt_LYNX=$ac_cv_path_ac_pt_LYNX if test -n "$ac_pt_LYNX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LYNX" >&5 -$as_echo "$ac_pt_LYNX" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LYNX" >&5 +printf "%s\n" "$ac_pt_LYNX" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_pt_LYNX" = x; then @@ -28283,8 +31326,8 @@ fi 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;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac LYNX=$ac_pt_LYNX @@ -28294,47 +31337,61 @@ else fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if can build top-level README" >&5 -$as_echo_n "checking if can build top-level README... " >&6; } - if test "x$W3M" != "x"; then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if can build top-level README" >&5 +printf %s "checking if can build top-level README... " >&6; } + if test "x$W3M" != "x" +then : hwloc_generate_readme=yes - HWLOC_W3_GENERATOR=$W3M -else - if test "x$LYNX" != "x"; then : + HWLOC_W3_GENERATOR=$W3M +else $as_nop + if test "x$LYNX" != "x" +then : hwloc_generate_readme=yes - HWLOC_W3_GENERATOR="$LYNX -dump -nolist" -else + HWLOC_W3_GENERATOR="$LYNX -dump -nolist" +else $as_nop hwloc_generate_readme=no fi fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hwloc_generate_readme" >&5 -$as_echo "$hwloc_generate_readme" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hwloc_generate_readme" >&5 +printf "%s\n" "$hwloc_generate_readme" >&6; } + +else $as_nop + + hwloc_generate_readme=no + +fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if will build top-level README" >&5 +printf %s "checking if will build top-level README... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hwloc_generate_readme" >&5 +printf "%s\n" "$hwloc_generate_readme" >&6; } # If any one of the above tools is missing, we will refuse to make dist. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if will build doxygen docs" >&5 -$as_echo_n "checking if will build doxygen docs... " >&6; } - if test "x$hwloc_generate_doxs" = "xyes" -a "x$enable_doxygen" != "xno"; then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if will build doxygen docs" >&5 +printf %s "checking if will build doxygen docs... " >&6; } + if test "x$hwloc_generate_doxs" = "xyes" -a "x$enable_doxygen" != "xno" +then : -else +else $as_nop hwloc_generate_doxs=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hwloc_generate_doxs" >&5 -$as_echo "$hwloc_generate_doxs" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hwloc_generate_doxs" >&5 +printf "%s\n" "$hwloc_generate_doxs" >&6; } # See if we want to install the doxygen docs - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if will install doxygen docs" >&5 -$as_echo_n "checking if will install doxygen docs... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if will install doxygen docs" >&5 +printf %s "checking if will install doxygen docs... " >&6; } if test "x$hwloc_generate_doxs" = "xyes" -o \ -f "$srcdir/doc/doxygen-doc/man/man3/hwloc_distrib.3" -a \ -f "$srcdir/doc/doxygen-doc/hwloc-a4.pdf" -a \ - -f "$srcdir/doc/doxygen-doc/hwloc-letter.pdf"; then : + -f "$srcdir/doc/doxygen-doc/hwloc-letter.pdf" +then : hwloc_install_doxs=yes -else +else $as_nop hwloc_install_doxs=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hwloc_install_doxs" >&5 -$as_echo "$hwloc_install_doxs" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hwloc_install_doxs" >&5 +printf "%s\n" "$hwloc_install_doxs" >&6; } # Generate some files for the docs ac_config_files="$ac_config_files doc/Makefile doc/examples/Makefile doc/doxygen-config.cfg" @@ -28362,7 +31419,7 @@ EOF if test "$no_x" = yes; then # Not all programs may use this symbol, but it does not hurt to define it. -$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h +printf "%s\n" "#define X_DISPLAY_MISSING 1" >>confdefs.h X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS= else @@ -28375,8 +31432,8 @@ else X_LIBS="$X_LIBS -L$x_libraries" # For Solaris; some versions of Sun CC require a space after -R and # others require no space. Words are not sufficient . . . . - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5 -$as_echo_n "checking whether -R must be followed by a space... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5 +printf %s "checking whether -R must be followed by a space... " >&6; } ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries" ac_xsave_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes @@ -28384,42 +31441,44 @@ $as_echo_n "checking whether -R must be followed by a space... " >&6; } /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +if ac_fn_c_try_link "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } X_LIBS="$X_LIBS -R$x_libraries" -else +else $as_nop LIBS="$ac_xsave_LIBS -R $x_libraries" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +if ac_fn_c_try_link "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } X_LIBS="$X_LIBS -R $x_libraries" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5 -$as_echo "neither works" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: neither works" >&5 +printf "%s\n" "neither works" >&6; } fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ac_c_werror_flag=$ac_xsave_c_werror_flag LIBS=$ac_xsave_LIBS @@ -28442,26 +31501,25 @@ rm -f core conftest.err conftest.$ac_objext \ /* 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 XOpenDisplay (); int -main () +main (void) { return XOpenDisplay (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5 -$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; } -if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then : - $as_echo_n "(cached) " >&6 -else +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5 +printf %s "checking for dnet_ntoa in -ldnet... " >&6; } +if test ${ac_cv_lib_dnet_dnet_ntoa+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-ldnet $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -28470,39 +31528,39 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 dnet_ntoa (); int -main () +main (void) { return dnet_ntoa (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_dnet_dnet_ntoa=yes -else +else $as_nop ac_cv_lib_dnet_dnet_ntoa=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5 -$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; } -if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5 +printf "%s\n" "$ac_cv_lib_dnet_dnet_ntoa" >&6; } +if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes +then : X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet" fi if test $ac_cv_lib_dnet_dnet_ntoa = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5 -$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; } -if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5 +printf %s "checking for dnet_ntoa in -ldnet_stub... " >&6; } +if test ${ac_cv_lib_dnet_stub_dnet_ntoa+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-ldnet_stub $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -28511,36 +31569,35 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 dnet_ntoa (); int -main () +main (void) { return dnet_ntoa (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_dnet_stub_dnet_ntoa=yes -else +else $as_nop ac_cv_lib_dnet_stub_dnet_ntoa=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5 -$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; } -if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5 +printf "%s\n" "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; } +if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes +then : X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub" fi fi fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS="$ac_xsave_LIBS" @@ -28553,16 +31610,18 @@ rm -f core conftest.err conftest.$ac_objext \ # The functions gethostbyname, getservbyname, and inet_addr are # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking. ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname" -if test "x$ac_cv_func_gethostbyname" = xyes; then : +if test "x$ac_cv_func_gethostbyname" = xyes +then : fi if test $ac_cv_func_gethostbyname = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5 -$as_echo_n "checking for gethostbyname in -lnsl... " >&6; } -if ${ac_cv_lib_nsl_gethostbyname+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5 +printf %s "checking for gethostbyname in -lnsl... " >&6; } +if test ${ac_cv_lib_nsl_gethostbyname+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lnsl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -28571,39 +31630,39 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 () +main (void) { return gethostbyname (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_nsl_gethostbyname=yes -else +else $as_nop ac_cv_lib_nsl_gethostbyname=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5 -$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; } -if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5 +printf "%s\n" "$ac_cv_lib_nsl_gethostbyname" >&6; } +if test "x$ac_cv_lib_nsl_gethostbyname" = xyes +then : X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl" fi if test $ac_cv_lib_nsl_gethostbyname = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5 -$as_echo_n "checking for gethostbyname in -lbsd... " >&6; } -if ${ac_cv_lib_bsd_gethostbyname+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5 +printf %s "checking for gethostbyname in -lbsd... " >&6; } +if test ${ac_cv_lib_bsd_gethostbyname+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lbsd $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -28612,30 +31671,29 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 () +main (void) { return gethostbyname (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_bsd_gethostbyname=yes -else +else $as_nop ac_cv_lib_bsd_gethostbyname=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5 -$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; } -if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5 +printf "%s\n" "$ac_cv_lib_bsd_gethostbyname" >&6; } +if test "x$ac_cv_lib_bsd_gethostbyname" = xyes +then : X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd" fi @@ -28650,16 +31708,18 @@ fi # must be given before -lnsl if both are needed. We assume that # if connect needs -lnsl, so does gethostbyname. ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect" -if test "x$ac_cv_func_connect" = xyes; then : +if test "x$ac_cv_func_connect" = xyes +then : fi if test $ac_cv_func_connect = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5 -$as_echo_n "checking for connect in -lsocket... " >&6; } -if ${ac_cv_lib_socket_connect+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5 +printf %s "checking for connect in -lsocket... " >&6; } +if test ${ac_cv_lib_socket_connect+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $X_EXTRA_LIBS $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -28668,30 +31728,29 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 connect (); int -main () +main (void) { return connect (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_socket_connect=yes -else +else $as_nop ac_cv_lib_socket_connect=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5 -$as_echo "$ac_cv_lib_socket_connect" >&6; } -if test "x$ac_cv_lib_socket_connect" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5 +printf "%s\n" "$ac_cv_lib_socket_connect" >&6; } +if test "x$ac_cv_lib_socket_connect" = xyes +then : X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS" fi @@ -28699,16 +31758,18 @@ fi # Guillermo Gomez says -lposix is necessary on A/UX. ac_fn_c_check_func "$LINENO" "remove" "ac_cv_func_remove" -if test "x$ac_cv_func_remove" = xyes; then : +if test "x$ac_cv_func_remove" = xyes +then : fi if test $ac_cv_func_remove = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5 -$as_echo_n "checking for remove in -lposix... " >&6; } -if ${ac_cv_lib_posix_remove+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5 +printf %s "checking for remove in -lposix... " >&6; } +if test ${ac_cv_lib_posix_remove+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lposix $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -28717,30 +31778,29 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 remove (); int -main () +main (void) { return remove (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_posix_remove=yes -else +else $as_nop ac_cv_lib_posix_remove=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5 -$as_echo "$ac_cv_lib_posix_remove" >&6; } -if test "x$ac_cv_lib_posix_remove" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5 +printf "%s\n" "$ac_cv_lib_posix_remove" >&6; } +if test "x$ac_cv_lib_posix_remove" = xyes +then : X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix" fi @@ -28748,16 +31808,18 @@ fi # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. ac_fn_c_check_func "$LINENO" "shmat" "ac_cv_func_shmat" -if test "x$ac_cv_func_shmat" = xyes; then : +if test "x$ac_cv_func_shmat" = xyes +then : fi if test $ac_cv_func_shmat = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5 -$as_echo_n "checking for shmat in -lipc... " >&6; } -if ${ac_cv_lib_ipc_shmat+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5 +printf %s "checking for shmat in -lipc... " >&6; } +if test ${ac_cv_lib_ipc_shmat+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lipc $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -28766,30 +31828,29 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 shmat (); int -main () +main (void) { return shmat (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_ipc_shmat=yes -else +else $as_nop ac_cv_lib_ipc_shmat=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5 -$as_echo "$ac_cv_lib_ipc_shmat" >&6; } -if test "x$ac_cv_lib_ipc_shmat" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5 +printf "%s\n" "$ac_cv_lib_ipc_shmat" >&6; } +if test "x$ac_cv_lib_ipc_shmat" = xyes +then : X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc" fi @@ -28805,11 +31866,12 @@ fi # These have to be linked with before -lX11, unlike the other # libraries we check for below, so use a different variable. # John Interrante, Karl Berry - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5 -$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; } -if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5 +printf %s "checking for IceConnectionNumber in -lICE... " >&6; } +if test ${ac_cv_lib_ICE_IceConnectionNumber+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lICE $X_EXTRA_LIBS $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -28818,30 +31880,29 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 IceConnectionNumber (); int -main () +main (void) { return IceConnectionNumber (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_ICE_IceConnectionNumber=yes -else +else $as_nop ac_cv_lib_ICE_IceConnectionNumber=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5 -$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; } -if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5 +printf "%s\n" "$ac_cv_lib_ICE_IceConnectionNumber" >&6; } +if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes +then : X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" fi @@ -28855,18 +31916,18 @@ fi CPPFLAGS="$CPPFLAGS $X_CFLAGS" LIBS="$LIBS $X_PRE_LIBS $X_LIBS $X_EXTRA_LIBS" - for ac_header in X11/Xlib.h + for ac_header in X11/Xlib.h do : - ac_fn_c_check_header_mongrel "$LINENO" "X11/Xlib.h" "ac_cv_header_X11_Xlib_h" "$ac_includes_default" -if test "x$ac_cv_header_X11_Xlib_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_X11_XLIB_H 1 -_ACEOF - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XOpenDisplay in -lX11" >&5 -$as_echo_n "checking for XOpenDisplay in -lX11... " >&6; } -if ${ac_cv_lib_X11_XOpenDisplay+:} false; then : - $as_echo_n "(cached) " >&6 -else + ac_fn_c_check_header_compile "$LINENO" "X11/Xlib.h" "ac_cv_header_X11_Xlib_h" "$ac_includes_default" +if test "x$ac_cv_header_X11_Xlib_h" = xyes +then : + printf "%s\n" "#define HAVE_X11_XLIB_H 1" >>confdefs.h + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XOpenDisplay in -lX11" >&5 +printf %s "checking for XOpenDisplay in -lX11... " >&6; } +if test ${ac_cv_lib_X11_XOpenDisplay+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lX11 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -28875,47 +31936,44 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 XOpenDisplay (); int -main () +main (void) { return XOpenDisplay (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_X11_XOpenDisplay=yes -else +else $as_nop ac_cv_lib_X11_XOpenDisplay=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_X11_XOpenDisplay" >&5 -$as_echo "$ac_cv_lib_X11_XOpenDisplay" >&6; } -if test "x$ac_cv_lib_X11_XOpenDisplay" = xyes; then : - for ac_header in X11/Xutil.h +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_X11_XOpenDisplay" >&5 +printf "%s\n" "$ac_cv_lib_X11_XOpenDisplay" >&6; } +if test "x$ac_cv_lib_X11_XOpenDisplay" = xyes +then : + for ac_header in X11/Xutil.h do : ac_fn_c_check_header_compile "$LINENO" "X11/Xutil.h" "ac_cv_header_X11_Xutil_h" "#include " -if test "x$ac_cv_header_X11_Xutil_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_X11_XUTIL_H 1 -_ACEOF - for ac_header in X11/keysym.h +if test "x$ac_cv_header_X11_Xutil_h" = xyes +then : + printf "%s\n" "#define HAVE_X11_XUTIL_H 1" >>confdefs.h + for ac_header in X11/keysym.h do : - ac_fn_c_check_header_mongrel "$LINENO" "X11/keysym.h" "ac_cv_header_X11_keysym_h" "$ac_includes_default" -if test "x$ac_cv_header_X11_keysym_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_X11_KEYSYM_H 1 -_ACEOF + ac_fn_c_check_header_compile "$LINENO" "X11/keysym.h" "ac_cv_header_X11_keysym_h" "$ac_includes_default" +if test "x$ac_cv_header_X11_keysym_h" = xyes +then : + printf "%s\n" "#define HAVE_X11_KEYSYM_H 1" >>confdefs.h -$as_echo "#define HWLOC_HAVE_X11_KEYSYM 1" >>confdefs.h +printf "%s\n" "#define HWLOC_HAVE_X11_KEYSYM 1" >>confdefs.h hwloc_x11_keysym_happy=yes HWLOC_X11_CPPFLAGS="$X_CFLAGS" @@ -28926,19 +31984,16 @@ fi done - fi done - fi fi done - CPPFLAGS=$CPPFLAGS_save LIBS=$LIBS_save @@ -28948,18 +32003,18 @@ done HWLOC_pkg_failed=no - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAIRO" >&5 -$as_echo_n "checking for CAIRO... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CAIRO" >&5 +printf %s "checking for CAIRO... " >&6; } if test -n "$PKG_CONFIG"; then if test -n "$HWLOC_CAIRO_CFLAGS"; then HWLOC_pkg_cv_HWLOC_CAIRO_CFLAGS="$HWLOC_CAIRO_CFLAGS" else if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --silence-errors \"cairo\""; } >&5 + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --silence-errors \"cairo\""; } >&5 ($PKG_CONFIG --exists --silence-errors "cairo") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then HWLOC_pkg_cv_HWLOC_CAIRO_CFLAGS=`$PKG_CONFIG --cflags "cairo" 2>/dev/null` else @@ -28975,10 +32030,10 @@ fi HWLOC_pkg_cv_HWLOC_CAIRO_LIBS="$HWLOC_CAIRO_LIBS" else if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --silence-errors \"cairo\""; } >&5 + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --silence-errors \"cairo\""; } >&5 ($PKG_CONFIG --exists --silence-errors "cairo") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then HWLOC_pkg_cv_HWLOC_CAIRO_LIBS=`$PKG_CONFIG --libs "cairo" 2>/dev/null` else @@ -29008,16 +32063,16 @@ fi # Put the nasty error message in config.log where it belongs echo "$HWLOC_CAIRO_PKG_ERRORS" >&5 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } hwloc_cairo_happy=no elif test $HWLOC_pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot check without pkg-config" >&5 -$as_echo "cannot check without pkg-config" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cannot check without pkg-config" >&5 +printf "%s\n" "cannot check without pkg-config" >&6; } hwloc_cairo_happy=no else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } # If we got good results from pkg-config, check that they # actually work (i.e., that we can link against the resulting @@ -29036,37 +32091,39 @@ $as_echo "yes" >&6; } CFLAGS="$CFLAGS $HWLOC_pkg_cv_HWLOC_CAIRO_CFLAGS" CPPFLAGS="$CPPFLAGS $HWLOC_pkg_cv_HWLOC_CAIRO_CFLAGS" LIBS="$LIBS $HWLOC_pkg_cv_HWLOC_CAIRO_LIBS" - ac_fn_c_check_header_mongrel "$LINENO" "cairo.h" "ac_cv_header_cairo_h" "$ac_includes_default" -if test "x$ac_cv_header_cairo_h" = xyes; then : + ac_fn_c_check_header_compile "$LINENO" "cairo.h" "ac_cv_header_cairo_h" "$ac_includes_default" +if test "x$ac_cv_header_cairo_h" = xyes +then : ac_fn_c_check_func "$LINENO" "cairo_fill" "ac_cv_func_cairo_fill" -if test "x$ac_cv_func_cairo_fill" = xyes; then : +if test "x$ac_cv_func_cairo_fill" = xyes +then : hwloc_result=yes -else +else $as_nop hwloc_result=no fi -else +else $as_nop hwloc_result=no fi - CFLAGS=$hwloc_cflags_save CPPFLAGS=$hwloc_cppflags_save LIBS=$hwloc_libs_save - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for final CAIRO support" >&5 -$as_echo_n "checking for final CAIRO support... " >&6; } - if test "$hwloc_result" = "yes"; then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for final CAIRO support" >&5 +printf %s "checking for final CAIRO support... " >&6; } + if test "$hwloc_result" = "yes" +then : HWLOC_CAIRO_CFLAGS=$HWLOC_pkg_cv_HWLOC_CAIRO_CFLAGS HWLOC_CAIRO_LIBS=$HWLOC_pkg_cv_HWLOC_CAIRO_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } hwloc_cairo_happy=yes -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } hwloc_cairo_happy=no fi fi @@ -29074,10 +32131,10 @@ fi if test "x$hwloc_cairo_happy" = "xyes"; then -$as_echo "#define HWLOC_HAVE_CAIRO 1" >>confdefs.h +printf "%s\n" "#define HWLOC_HAVE_CAIRO 1" >>confdefs.h - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstopo Cairo/X11 interactive graphical output is supported" >&5 -$as_echo_n "checking whether lstopo Cairo/X11 interactive graphical output is supported... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether lstopo Cairo/X11 interactive graphical output is supported" >&5 +printf %s "checking whether lstopo Cairo/X11 interactive graphical output is supported... " >&6; } if test "x$hwloc_x11_keysym_happy" = xyes; then save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $HWLOC_CAIRO_CFLAGS $HWLOC_X11_CPPFLAGS" @@ -29088,7 +32145,7 @@ $as_echo_n "checking whether lstopo Cairo/X11 interactive graphical output is su #include int -main () +main (void) { #ifndef CAIRO_HAS_XLIB_SURFACE @@ -29100,129 +32157,116 @@ main () } _ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : +if ac_fn_c_try_cpp "$LINENO" +then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } lstopo_have_x11=yes -$as_echo "#define LSTOPO_HAVE_X11 1" >>confdefs.h +printf "%s\n" "#define LSTOPO_HAVE_X11 1" >>confdefs.h -else +else $as_nop - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no (missing CAIRO_HAS_XLIB_SURFACE)" >&5 -$as_echo "no (missing CAIRO_HAS_XLIB_SURFACE)" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no (missing CAIRO_HAS_XLIB_SURFACE)" >&5 +printf "%s\n" "no (missing CAIRO_HAS_XLIB_SURFACE)" >&6; } fi rm -f conftest.err conftest.i conftest.$ac_ext CPPFLAGS="$save_CPPFLAGS" else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no (missing X11)" >&5 -$as_echo "no (missing X11)" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no (missing X11)" >&5 +printf "%s\n" "no (missing X11)" >&6; } fi else - if test "$enable_cairo" = "yes"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-cairo requested, but Cairo/X11 support was not found" >&5 -$as_echo "$as_me: WARNING: --enable-cairo requested, but Cairo/X11 support was not found" >&2;} + if test "$enable_cairo" = "yes" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: --enable-cairo requested, but Cairo/X11 support was not found" >&5 +printf "%s\n" "$as_me: WARNING: --enable-cairo requested, but Cairo/X11 support was not found" >&2;} as_fn_error $? "Cannot continue" "$LINENO" 5 fi fi ac_fn_c_check_type "$LINENO" "wchar_t" "ac_cv_type_wchar_t" "#include " -if test "x$ac_cv_type_wchar_t" = xyes; then : +if test "x$ac_cv_type_wchar_t" = xyes +then : -cat >>confdefs.h <<_ACEOF -#define HAVE_WCHAR_T 1 -_ACEOF +printf "%s\n" "#define HAVE_WCHAR_T 1" >>confdefs.h - for ac_func in putwc -do : - ac_fn_c_check_func "$LINENO" "putwc" "ac_cv_func_putwc" -if test "x$ac_cv_func_putwc" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_PUTWC 1 -_ACEOF + ac_fn_c_check_func "$LINENO" "putwc" "ac_cv_func_putwc" +if test "x$ac_cv_func_putwc" = xyes +then : + printf "%s\n" "#define HAVE_PUTWC 1" >>confdefs.h fi -done fi HWLOC_XML_LOCALIZED=1 - for ac_header in locale.h xlocale.h + for ac_header in locale.h xlocale.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 : + as_ac_Header=`printf "%s\n" "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 +#define `printf "%s\n" "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF - for ac_func in setlocale -do : - ac_fn_c_check_func "$LINENO" "setlocale" "ac_cv_func_setlocale" -if test "x$ac_cv_func_setlocale" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SETLOCALE 1 -_ACEOF + ac_fn_c_check_func "$LINENO" "setlocale" "ac_cv_func_setlocale" +if test "x$ac_cv_func_setlocale" = xyes +then : + printf "%s\n" "#define HAVE_SETLOCALE 1" >>confdefs.h fi -done - for ac_func in uselocale + + for ac_func in uselocale do : ac_fn_c_check_func "$LINENO" "uselocale" "ac_cv_func_uselocale" -if test "x$ac_cv_func_uselocale" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_USELOCALE 1 -_ACEOF +if test "x$ac_cv_func_uselocale" = xyes +then : + printf "%s\n" "#define HAVE_USELOCALE 1" >>confdefs.h HWLOC_XML_LOCALIZED=0 fi -done +done fi done - - for ac_header in langinfo.h + for ac_header in langinfo.h do : - ac_fn_c_check_header_mongrel "$LINENO" "langinfo.h" "ac_cv_header_langinfo_h" "$ac_includes_default" -if test "x$ac_cv_header_langinfo_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LANGINFO_H 1 -_ACEOF + ac_fn_c_check_header_compile "$LINENO" "langinfo.h" "ac_cv_header_langinfo_h" "$ac_includes_default" +if test "x$ac_cv_header_langinfo_h" = xyes +then : + printf "%s\n" "#define HAVE_LANGINFO_H 1" >>confdefs.h - for ac_func in nl_langinfo -do : - ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo" -if test "x$ac_cv_func_nl_langinfo" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_NL_LANGINFO 1 -_ACEOF + ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo" +if test "x$ac_cv_func_nl_langinfo" = xyes +then : + printf "%s\n" "#define HAVE_NL_LANGINFO 1" >>confdefs.h fi -done fi done - hwloc_old_LIBS="$LIBS" chosen_curses="" for curses in ncurses curses do - for lib in "" -ltermcap -l${curses}w -l$curses -ltinfo + for lib in "" -l${curses}w -l$curses -ltinfo -ltermcap do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking termcap support using $curses and $lib" >&5 -$as_echo_n "checking termcap support using $curses and $lib... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking termcap support using $curses and $lib" >&5 +printf %s "checking termcap support using $curses and $lib... " >&6; } LIBS="$hwloc_old_LIBS $lib" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -29231,31 +32275,32 @@ $as_echo_n "checking termcap support using $curses and $lib... " >&6; } #include int -main () +main (void) { tparm(NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0) ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } HWLOC_TERMCAP_LIBS="$LIBS" -$as_echo "#define HWLOC_HAVE_LIBTERMCAP 1" >>confdefs.h +printf "%s\n" "#define HWLOC_HAVE_LIBTERMCAP 1" >>confdefs.h chosen_curses=$curses -else +else $as_nop - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext test "x$chosen_curses" != "x" && break done @@ -29264,7 +32309,7 @@ rm -f core conftest.err conftest.$ac_objext \ if test "$chosen_curses" = ncurses then -$as_echo "#define HWLOC_USE_NCURSES 1" >>confdefs.h +printf "%s\n" "#define HWLOC_USE_NCURSES 1" >>confdefs.h fi LIBS="$hwloc_old_LIBS" @@ -29272,56 +32317,56 @@ $as_echo "#define HWLOC_USE_NCURSES 1" >>confdefs.h - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether diff accepts -u" >&5 -$as_echo_n "checking whether diff accepts -u... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether diff accepts -u" >&5 +printf %s "checking whether diff accepts -u... " >&6; } if $DIFF -u /dev/null /dev/null 2> /dev/null then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } HWLOC_DIFF_U="-u" else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } HWLOC_DIFF_U="" fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether diff accepts -w" >&5 -$as_echo_n "checking whether diff accepts -w... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether diff accepts -w" >&5 +printf %s "checking whether diff accepts -w... " >&6; } if $DIFF -w /dev/null /dev/null 2> /dev/null then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } HWLOC_DIFF_W="-w" else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } HWLOC_DIFF_W="" fi # Solaris needs -lsocket for socket/bind/... in hwloc-ps - ac_fn_c_check_decl "$LINENO" "bind" "ac_cv_have_decl_bind" "#include -" -if test "x$ac_cv_have_decl_bind" = xyes; then : + ac_fn_check_decl "$LINENO" "bind" "ac_cv_have_decl_bind" "#include +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_bind" = xyes +then : ac_have_decl=1 -else +else $as_nop ac_have_decl=0 fi +printf "%s\n" "#define HAVE_DECL_BIND $ac_have_decl" >>confdefs.h +if test $ac_have_decl = 1 +then : -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_BIND $ac_have_decl -_ACEOF -if test $ac_have_decl = 1; then : - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bind in -lsocket" >&5 -$as_echo_n "checking for bind in -lsocket... " >&6; } -if ${ac_cv_lib_socket_bind+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for bind in -lsocket" >&5 +printf %s "checking for bind in -lsocket... " >&6; } +if test ${ac_cv_lib_socket_bind+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -29330,30 +32375,29 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 bind (); int -main () +main (void) { return bind (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_socket_bind=yes -else +else $as_nop ac_cv_lib_socket_bind=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_bind" >&5 -$as_echo "$ac_cv_lib_socket_bind" >&6; } -if test "x$ac_cv_lib_socket_bind" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_bind" >&5 +printf "%s\n" "$ac_cv_lib_socket_bind" >&6; } +if test "x$ac_cv_lib_socket_bind" = xyes +then : need_libsocket=yes fi @@ -29366,30 +32410,139 @@ fi fi - for ac_header in time.h + for ac_header in time.h do : - ac_fn_c_check_header_mongrel "$LINENO" "time.h" "ac_cv_header_time_h" "$ac_includes_default" -if test "x$ac_cv_header_time_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_TIME_H 1 -_ACEOF + ac_fn_c_check_header_compile "$LINENO" "time.h" "ac_cv_header_time_h" "$ac_includes_default" +if test "x$ac_cv_header_time_h" = xyes +then : + printf "%s\n" "#define HAVE_TIME_H 1" >>confdefs.h - for ac_func in clock_gettime -do : - ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime" -if test "x$ac_cv_func_clock_gettime" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_CLOCK_GETTIME 1 -_ACEOF + ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime" +if test "x$ac_cv_func_clock_gettime" = xyes +then : + printf "%s\n" "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h fi + + +fi + done + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}archivemount", so it can be a program name with args. +set dummy ${ac_tool_prefix}archivemount; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_ARCHIVEMOUNT+y} +then : + printf %s "(cached) " >&6 +else $as_nop + case $ARCHIVEMOUNT in + [\\/]* | ?:[\\/]*) + ac_cv_path_ARCHIVEMOUNT="$ARCHIVEMOUNT" # 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 + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + 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_ARCHIVEMOUNT="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$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 +ARCHIVEMOUNT=$ac_cv_path_ARCHIVEMOUNT +if test -n "$ARCHIVEMOUNT"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ARCHIVEMOUNT" >&5 +printf "%s\n" "$ARCHIVEMOUNT" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi + +fi +if test -z "$ac_cv_path_ARCHIVEMOUNT"; then + ac_pt_ARCHIVEMOUNT=$ARCHIVEMOUNT + # Extract the first word of "archivemount", so it can be a program name with args. +set dummy archivemount; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_ac_pt_ARCHIVEMOUNT+y} +then : + printf %s "(cached) " >&6 +else $as_nop + case $ac_pt_ARCHIVEMOUNT in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_pt_ARCHIVEMOUNT="$ac_pt_ARCHIVEMOUNT" # 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 + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + 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_ac_pt_ARCHIVEMOUNT="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$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 +ac_pt_ARCHIVEMOUNT=$ac_cv_path_ac_pt_ARCHIVEMOUNT +if test -n "$ac_pt_ARCHIVEMOUNT"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_ARCHIVEMOUNT" >&5 +printf "%s\n" "$ac_pt_ARCHIVEMOUNT" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + if test "x$ac_pt_ARCHIVEMOUNT" = x; then + ARCHIVEMOUNT="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + ARCHIVEMOUNT=$ac_pt_ARCHIVEMOUNT + fi +else + ARCHIVEMOUNT="$ac_cv_path_ARCHIVEMOUNT" +fi + + if test "x$ARCHIVEMOUNT" != x; then + +printf "%s\n" "#define HWLOC_ARCHIVEMOUNT_PATH \"$ARCHIVEMOUNT\"" >>confdefs.h + fi # Only generate this if we're building the utilities # Even the netloc library Makefile is here because @@ -29405,11 +32558,12 @@ done ### EOF - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_self in -lpthread" >&5 -$as_echo_n "checking for pthread_self in -lpthread... " >&6; } -if ${ac_cv_lib_pthread_pthread_self+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_self in -lpthread" >&5 +printf %s "checking for pthread_self in -lpthread... " >&6; } +if test ${ac_cv_lib_pthread_pthread_self+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -29418,30 +32572,29 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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_self (); int -main () +main (void) { return pthread_self (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_pthread_pthread_self=yes -else +else $as_nop ac_cv_lib_pthread_pthread_self=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_self" >&5 -$as_echo "$ac_cv_lib_pthread_pthread_self" >&6; } -if test "x$ac_cv_lib_pthread_pthread_self" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_self" >&5 +printf "%s\n" "$ac_cv_lib_pthread_pthread_self" >&6; } +if test "x$ac_cv_lib_pthread_pthread_self" = xyes +then : hwloc_have_pthread=yes fi @@ -29449,18 +32602,18 @@ fi HWLOC_pkg_failed=no - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NUMA" >&5 -$as_echo_n "checking for NUMA... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for NUMA" >&5 +printf %s "checking for NUMA... " >&6; } if test -n "$PKG_CONFIG"; then if test -n "$HWLOC_NUMA_CFLAGS"; then HWLOC_pkg_cv_HWLOC_NUMA_CFLAGS="$HWLOC_NUMA_CFLAGS" else if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --silence-errors \"numa\""; } >&5 + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --silence-errors \"numa\""; } >&5 ($PKG_CONFIG --exists --silence-errors "numa") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then HWLOC_pkg_cv_HWLOC_NUMA_CFLAGS=`$PKG_CONFIG --cflags "numa" 2>/dev/null` else @@ -29476,10 +32629,10 @@ fi HWLOC_pkg_cv_HWLOC_NUMA_LIBS="$HWLOC_NUMA_LIBS" else if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --silence-errors \"numa\""; } >&5 + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --silence-errors \"numa\""; } >&5 ($PKG_CONFIG --exists --silence-errors "numa") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then HWLOC_pkg_cv_HWLOC_NUMA_LIBS=`$PKG_CONFIG --libs "numa" 2>/dev/null` else @@ -29509,15 +32662,16 @@ fi # Put the nasty error message in config.log where it belongs echo "$HWLOC_NUMA_PKG_ERRORS" >&5 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } # libnuma didn't have a .pc before 2.0.12, look for it manually. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for numa_available in -lnuma" >&5 -$as_echo_n "checking for numa_available in -lnuma... " >&6; } -if ${ac_cv_lib_numa_numa_available+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for numa_available in -lnuma" >&5 +printf %s "checking for numa_available in -lnuma... " >&6; } +if test ${ac_cv_lib_numa_numa_available+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lnuma $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -29526,53 +32680,53 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 numa_available (); int -main () +main (void) { return numa_available (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_numa_numa_available=yes -else +else $as_nop ac_cv_lib_numa_numa_available=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_numa_numa_available" >&5 -$as_echo "$ac_cv_lib_numa_numa_available" >&6; } -if test "x$ac_cv_lib_numa_numa_available" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_numa_numa_available" >&5 +printf "%s\n" "$ac_cv_lib_numa_numa_available" >&6; } +if test "x$ac_cv_lib_numa_numa_available" = xyes +then : # and make sure this old release has at least numa_bitmask_alloc() for our tests - ac_fn_c_check_decl "$LINENO" "numa_bitmask_alloc" "ac_cv_have_decl_numa_bitmask_alloc" "#include -" -if test "x$ac_cv_have_decl_numa_bitmask_alloc" = xyes; then : + ac_fn_check_decl "$LINENO" "numa_bitmask_alloc" "ac_cv_have_decl_numa_bitmask_alloc" "#include +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_numa_bitmask_alloc" = xyes +then : hwloc_have_linux_libnuma=yes HWLOC_NUMA_LIBS=-lnuma fi - fi elif test $HWLOC_pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot check without pkg-config" >&5 -$as_echo "cannot check without pkg-config" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cannot check without pkg-config" >&5 +printf "%s\n" "cannot check without pkg-config" >&6; } # libnuma didn't have a .pc before 2.0.12, look for it manually. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for numa_available in -lnuma" >&5 -$as_echo_n "checking for numa_available in -lnuma... " >&6; } -if ${ac_cv_lib_numa_numa_available+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for numa_available in -lnuma" >&5 +printf %s "checking for numa_available in -lnuma... " >&6; } +if test ${ac_cv_lib_numa_numa_available+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lnuma $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -29581,46 +32735,45 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 numa_available (); int -main () +main (void) { return numa_available (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_numa_numa_available=yes -else +else $as_nop ac_cv_lib_numa_numa_available=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_numa_numa_available" >&5 -$as_echo "$ac_cv_lib_numa_numa_available" >&6; } -if test "x$ac_cv_lib_numa_numa_available" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_numa_numa_available" >&5 +printf "%s\n" "$ac_cv_lib_numa_numa_available" >&6; } +if test "x$ac_cv_lib_numa_numa_available" = xyes +then : # and make sure this old release has at least numa_bitmask_alloc() for our tests - ac_fn_c_check_decl "$LINENO" "numa_bitmask_alloc" "ac_cv_have_decl_numa_bitmask_alloc" "#include -" -if test "x$ac_cv_have_decl_numa_bitmask_alloc" = xyes; then : + ac_fn_check_decl "$LINENO" "numa_bitmask_alloc" "ac_cv_have_decl_numa_bitmask_alloc" "#include +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_numa_bitmask_alloc" = xyes +then : hwloc_have_linux_libnuma=yes HWLOC_NUMA_LIBS=-lnuma fi - fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } # If we got good results from pkg-config, check that they # actually work (i.e., that we can link against the resulting @@ -29639,44 +32792,47 @@ $as_echo "yes" >&6; } CFLAGS="$CFLAGS $HWLOC_pkg_cv_HWLOC_NUMA_CFLAGS" CPPFLAGS="$CPPFLAGS $HWLOC_pkg_cv_HWLOC_NUMA_CFLAGS" LIBS="$LIBS $HWLOC_pkg_cv_HWLOC_NUMA_LIBS" - ac_fn_c_check_header_mongrel "$LINENO" "numa.h" "ac_cv_header_numa_h" "$ac_includes_default" -if test "x$ac_cv_header_numa_h" = xyes; then : + ac_fn_c_check_header_compile "$LINENO" "numa.h" "ac_cv_header_numa_h" "$ac_includes_default" +if test "x$ac_cv_header_numa_h" = xyes +then : ac_fn_c_check_func "$LINENO" "numa_available" "ac_cv_func_numa_available" -if test "x$ac_cv_func_numa_available" = xyes; then : +if test "x$ac_cv_func_numa_available" = xyes +then : hwloc_result=yes -else +else $as_nop hwloc_result=no fi -else +else $as_nop hwloc_result=no fi - CFLAGS=$hwloc_cflags_save CPPFLAGS=$hwloc_cppflags_save LIBS=$hwloc_libs_save - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for final NUMA support" >&5 -$as_echo_n "checking for final NUMA support... " >&6; } - if test "$hwloc_result" = "yes"; then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for final NUMA support" >&5 +printf %s "checking for final NUMA support... " >&6; } + if test "$hwloc_result" = "yes" +then : HWLOC_NUMA_CFLAGS=$HWLOC_pkg_cv_HWLOC_NUMA_CFLAGS HWLOC_NUMA_LIBS=$HWLOC_pkg_cv_HWLOC_NUMA_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } hwloc_have_linux_libnuma=yes -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } # libnuma didn't have a .pc before 2.0.12, look for it manually. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for numa_available in -lnuma" >&5 -$as_echo_n "checking for numa_available in -lnuma... " >&6; } -if ${ac_cv_lib_numa_numa_available+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for numa_available in -lnuma" >&5 +printf %s "checking for numa_available in -lnuma... " >&6; } +if test ${ac_cv_lib_numa_numa_available+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lnuma $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -29685,84 +32841,77 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 numa_available (); int -main () +main (void) { return numa_available (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_numa_numa_available=yes -else +else $as_nop ac_cv_lib_numa_numa_available=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_numa_numa_available" >&5 -$as_echo "$ac_cv_lib_numa_numa_available" >&6; } -if test "x$ac_cv_lib_numa_numa_available" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_numa_numa_available" >&5 +printf "%s\n" "$ac_cv_lib_numa_numa_available" >&6; } +if test "x$ac_cv_lib_numa_numa_available" = xyes +then : # and make sure this old release has at least numa_bitmask_alloc() for our tests - ac_fn_c_check_decl "$LINENO" "numa_bitmask_alloc" "ac_cv_have_decl_numa_bitmask_alloc" "#include -" -if test "x$ac_cv_have_decl_numa_bitmask_alloc" = xyes; then : + ac_fn_check_decl "$LINENO" "numa_bitmask_alloc" "ac_cv_have_decl_numa_bitmask_alloc" "#include +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_numa_bitmask_alloc" = xyes +then : hwloc_have_linux_libnuma=yes HWLOC_NUMA_LIBS=-lnuma fi - fi fi fi - for ac_header in stdlib.h + for ac_header in stdlib.h do : - ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" -if test "x$ac_cv_header_stdlib_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_STDLIB_H 1 -_ACEOF + ac_fn_c_check_header_compile "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" +if test "x$ac_cv_header_stdlib_h" = xyes +then : + printf "%s\n" "#define HAVE_STDLIB_H 1" >>confdefs.h - for ac_func in mkstemp -do : - ac_fn_c_check_func "$LINENO" "mkstemp" "ac_cv_func_mkstemp" -if test "x$ac_cv_func_mkstemp" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_MKSTEMP 1 -_ACEOF + ac_fn_c_check_func "$LINENO" "mkstemp" "ac_cv_func_mkstemp" +if test "x$ac_cv_func_mkstemp" = xyes +then : + printf "%s\n" "#define HAVE_MKSTEMP 1" >>confdefs.h fi -done fi done - - for ac_header in infiniband/verbs.h + for ac_header in infiniband/verbs.h do : - ac_fn_c_check_header_mongrel "$LINENO" "infiniband/verbs.h" "ac_cv_header_infiniband_verbs_h" "$ac_includes_default" -if test "x$ac_cv_header_infiniband_verbs_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_INFINIBAND_VERBS_H 1 -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ibv_open_device in -libverbs" >&5 -$as_echo_n "checking for ibv_open_device in -libverbs... " >&6; } -if ${ac_cv_lib_ibverbs_ibv_open_device+:} false; then : - $as_echo_n "(cached) " >&6 -else + ac_fn_c_check_header_compile "$LINENO" "infiniband/verbs.h" "ac_cv_header_infiniband_verbs_h" "$ac_includes_default" +if test "x$ac_cv_header_infiniband_verbs_h" = xyes +then : + printf "%s\n" "#define HAVE_INFINIBAND_VERBS_H 1" >>confdefs.h + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ibv_open_device in -libverbs" >&5 +printf %s "checking for ibv_open_device in -libverbs... " >&6; } +if test ${ac_cv_lib_ibverbs_ibv_open_device+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-libverbs $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -29771,34 +32920,36 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 ibv_open_device (); int -main () +main (void) { return ibv_open_device (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_ibverbs_ibv_open_device=yes -else +else $as_nop ac_cv_lib_ibverbs_ibv_open_device=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ibverbs_ibv_open_device" >&5 -$as_echo "$ac_cv_lib_ibverbs_ibv_open_device" >&6; } -if test "x$ac_cv_lib_ibverbs_ibv_open_device" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ibverbs_ibv_open_device" >&5 +printf "%s\n" "$ac_cv_lib_ibverbs_ibv_open_device" >&6; } +if test "x$ac_cv_lib_ibverbs_ibv_open_device" = xyes +then : -$as_echo "#define HAVE_LIBIBVERBS 1" >>confdefs.h +printf "%s\n" "#define HAVE_LIBIBVERBS 1" >>confdefs.h hwloc_have_libibverbs=yes + HWLOC_IBVERBS_LIBS=-libverbs + + fi @@ -29806,16 +32957,16 @@ fi done - for ac_prog in xmllint 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_XMLLINT+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_XMLLINT+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$XMLLINT"; then ac_cv_prog_XMLLINT="$XMLLINT" # Let the user override the test. else @@ -29823,11 +32974,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_XMLLINT="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -29838,11 +32993,11 @@ fi fi XMLLINT=$ac_cv_prog_XMLLINT if test -n "$XMLLINT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5 -$as_echo "$XMLLINT" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5 +printf "%s\n" "$XMLLINT" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -29854,11 +33009,12 @@ done 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_BUNZIPP+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_BUNZIPP+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$BUNZIPP"; then ac_cv_prog_BUNZIPP="$BUNZIPP" # Let the user override the test. else @@ -29866,11 +33022,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_BUNZIPP="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -29881,11 +33041,11 @@ fi fi BUNZIPP=$ac_cv_prog_BUNZIPP if test -n "$BUNZIPP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNZIPP" >&5 -$as_echo "$BUNZIPP" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $BUNZIPP" >&5 +printf "%s\n" "$BUNZIPP" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -29894,8 +33054,8 @@ done test -n "$BUNZIPP" || BUNZIPP="false" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX works" >&5 -$as_echo_n "checking if CXX works... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if CXX works" >&5 +printf %s "checking if CXX works... " >&6; } ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -29913,47 +33073,48 @@ int foo(void) { } int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : +if ac_fn_cxx_try_compile "$LINENO" +then : hwloc_have_cxx=yes -else +else $as_nop hwloc_have_cxx=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 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}: result: $hwloc_have_cxx" >&5 -$as_echo "$hwloc_have_cxx" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hwloc_have_cxx" >&5 +printf "%s\n" "$hwloc_have_cxx" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether diff accepts -u" >&5 -$as_echo_n "checking whether diff accepts -u... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether diff accepts -u" >&5 +printf %s "checking whether diff accepts -u... " >&6; } if $DIFF -u /dev/null /dev/null 2> /dev/null then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } HWLOC_DIFF_U="-u" else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } HWLOC_DIFF_U="" fi # Only generate these files if we're making the tests - ac_config_files="$ac_config_files tests/Makefile tests/hwloc/Makefile tests/hwloc/linux/Makefile tests/hwloc/linux/allowed/Makefile tests/hwloc/linux/gather/Makefile tests/hwloc/x86/Makefile tests/hwloc/x86+linux/Makefile tests/hwloc/xml/Makefile tests/hwloc/ports/Makefile tests/hwloc/rename/Makefile tests/hwloc/linux/allowed/test-topology.sh tests/hwloc/linux/gather/test-gather-topology.sh tests/hwloc/linux/test-topology.sh tests/hwloc/x86/test-topology.sh tests/hwloc/x86+linux/test-topology.sh tests/hwloc/xml/test-topology.sh tests/hwloc/wrapper.sh utils/hwloc/hwloc-compress-dir utils/hwloc/hwloc-gather-topology utils/hwloc/test-hwloc-annotate.sh utils/hwloc/test-hwloc-calc.sh utils/hwloc/test-hwloc-compress-dir.sh utils/hwloc/test-hwloc-diffpatch.sh utils/hwloc/test-hwloc-distrib.sh utils/hwloc/test-hwloc-info.sh utils/hwloc/test-fake-plugin.sh utils/hwloc/test-parsing-flags.sh utils/hwloc/test-hwloc-dump-hwdata/Makefile utils/hwloc/test-hwloc-dump-hwdata/test-hwloc-dump-hwdata.sh utils/lstopo/test-lstopo.sh utils/lstopo/test-lstopo-shmem.sh utils/netloc/infiniband/netloc_ib_gather_raw contrib/hwloc-ps.www/Makefile contrib/systemd/Makefile contrib/completion/Makefile contrib/misc/Makefile contrib/windows/Makefile contrib/windows/test-windows-version.sh tests/netloc/Makefile tests/netloc/tests.sh" + ac_config_files="$ac_config_files tests/Makefile tests/hwloc/Makefile tests/hwloc/linux/Makefile tests/hwloc/linux/allowed/Makefile tests/hwloc/linux/gather/Makefile tests/hwloc/x86/Makefile tests/hwloc/x86+linux/Makefile tests/hwloc/xml/Makefile tests/hwloc/ports/Makefile tests/hwloc/rename/Makefile tests/hwloc/linux/allowed/test-topology.sh tests/hwloc/linux/gather/test-gather-topology.sh tests/hwloc/linux/test-topology.sh tests/hwloc/x86/test-topology.sh tests/hwloc/x86+linux/test-topology.sh tests/hwloc/xml/test-topology.sh tests/hwloc/wrapper.sh utils/hwloc/hwloc-compress-dir utils/hwloc/hwloc-gather-topology utils/hwloc/test-hwloc-annotate.sh utils/hwloc/test-hwloc-calc.sh utils/hwloc/test-hwloc-compress-dir.sh utils/hwloc/test-hwloc-diffpatch.sh utils/hwloc/test-hwloc-distrib.sh utils/hwloc/test-hwloc-info.sh utils/hwloc/test-build-custom-topology.sh utils/hwloc/test-fake-plugin.sh utils/hwloc/test-parsing-flags.sh utils/hwloc/test-hwloc-dump-hwdata/Makefile utils/hwloc/test-hwloc-dump-hwdata/test-hwloc-dump-hwdata.sh utils/lstopo/test-lstopo.sh utils/lstopo/test-lstopo-shmem.sh utils/netloc/infiniband/netloc_ib_gather_raw contrib/hwloc-ps.www/Makefile contrib/systemd/Makefile contrib/completion/Makefile contrib/misc/Makefile contrib/windows/Makefile tests/netloc/Makefile tests/netloc/tests.sh" ac_config_commands="$ac_config_commands chmoding-scripts" @@ -29965,7 +33126,7 @@ $as_echo "no" >&6; } # AC_CONFIG_LINKS. :-\ Since these tests are only run when # built in standalone mode, only generate them in # standalone mode. - ac_config_links="$ac_config_links tests/hwloc/ports/topology-solaris.c:hwloc/topology-solaris.c tests/hwloc/ports/topology-solaris-chiptype.c:hwloc/topology-solaris-chiptype.c tests/hwloc/ports/topology-aix.c:hwloc/topology-aix.c tests/hwloc/ports/topology-windows.c:hwloc/topology-windows.c tests/hwloc/ports/topology-darwin.c:hwloc/topology-darwin.c tests/hwloc/ports/topology-freebsd.c:hwloc/topology-freebsd.c tests/hwloc/ports/topology-netbsd.c:hwloc/topology-netbsd.c tests/hwloc/ports/topology-hpux.c:hwloc/topology-hpux.c tests/hwloc/ports/topology-bgq.c:hwloc/topology-bgq.c tests/hwloc/ports/topology-opencl.c:hwloc/topology-opencl.c tests/hwloc/ports/topology-cuda.c:hwloc/topology-cuda.c tests/hwloc/ports/topology-nvml.c:hwloc/topology-nvml.c tests/hwloc/ports/topology-rsmi.c:hwloc/topology-rsmi.c tests/hwloc/ports/topology-gl.c:hwloc/topology-gl.c tests/hwloc/ports/lstopo-windows.c:utils/lstopo/lstopo-windows.c tests/hwloc/ports/lstopo-android.c:utils/lstopo/lstopo-android.c" + ac_config_links="$ac_config_links tests/hwloc/ports/topology-solaris.c:hwloc/topology-solaris.c tests/hwloc/ports/topology-solaris-chiptype.c:hwloc/topology-solaris-chiptype.c tests/hwloc/ports/topology-aix.c:hwloc/topology-aix.c tests/hwloc/ports/topology-windows.c:hwloc/topology-windows.c tests/hwloc/ports/topology-darwin.c:hwloc/topology-darwin.c tests/hwloc/ports/topology-freebsd.c:hwloc/topology-freebsd.c tests/hwloc/ports/topology-netbsd.c:hwloc/topology-netbsd.c tests/hwloc/ports/topology-hpux.c:hwloc/topology-hpux.c tests/hwloc/ports/topology-bgq.c:hwloc/topology-bgq.c tests/hwloc/ports/topology-opencl.c:hwloc/topology-opencl.c tests/hwloc/ports/topology-cuda.c:hwloc/topology-cuda.c tests/hwloc/ports/topology-nvml.c:hwloc/topology-nvml.c tests/hwloc/ports/topology-rsmi.c:hwloc/topology-rsmi.c tests/hwloc/ports/topology-levelzero.c:hwloc/topology-levelzero.c tests/hwloc/ports/topology-gl.c:hwloc/topology-gl.c tests/hwloc/ports/lstopo-windows.c:utils/lstopo/lstopo-windows.c tests/hwloc/ports/lstopo-android.c:utils/lstopo/lstopo-android.c" fi @@ -29979,7 +33140,8 @@ EOF # Run the AM_CONDITIONALs - if test "$hwloc_did_am_conditionals" != "yes"; then : + if test "$hwloc_did_am_conditionals" != "yes" +then : if test "$hwloc_mode" = "standalone"; then HWLOC_BUILD_STANDALONE_TRUE= @@ -30118,6 +33280,14 @@ else HWLOC_HAVE_RSMI_FALSE= fi + if test "$hwloc_levelzero_happy" = "yes"; then + HWLOC_HAVE_LEVELZERO_TRUE= + HWLOC_HAVE_LEVELZERO_FALSE='#' +else + HWLOC_HAVE_LEVELZERO_TRUE='#' + HWLOC_HAVE_LEVELZERO_FALSE= +fi + if test "x$BUNZIPP" != "xfalse"; then HWLOC_HAVE_BUNZIPP_TRUE= HWLOC_HAVE_BUNZIPP_FALSE='#' @@ -30339,6 +33509,14 @@ else HWLOC_RSMI_BUILD_STATIC_FALSE= fi + if test "x$hwloc_levelzero_component" = "xstatic"; then + HWLOC_LEVELZERO_BUILD_STATIC_TRUE= + HWLOC_LEVELZERO_BUILD_STATIC_FALSE='#' +else + HWLOC_LEVELZERO_BUILD_STATIC_TRUE='#' + HWLOC_LEVELZERO_BUILD_STATIC_FALSE= +fi + if test "x$hwloc_gl_component" = "xstatic"; then HWLOC_GL_BUILD_STATIC_TRUE= HWLOC_GL_BUILD_STATIC_FALSE='#' @@ -30478,8 +33656,8 @@ _ACEOF 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;} ;; + *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( @@ -30509,15 +33687,15 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; /^ac_cv_env_/b end t clear :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/ 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;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +printf "%s\n" "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else @@ -30531,8 +33709,8 @@ $as_echo "$as_me: updating cache $cache_file" >&6;} 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;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache @@ -30549,7 +33727,7 @@ U= 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"` + ac_i=`printf "%s\n" "$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" @@ -30560,14 +33738,14 @@ 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; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 +printf %s "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; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: done" >&5 +printf "%s\n" "done" >&6; } if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' @@ -30660,6 +33838,10 @@ if test -z "${HWLOC_HAVE_RSMI_TRUE}" && test -z "${HWLOC_HAVE_RSMI_FALSE}"; then as_fn_error $? "conditional \"HWLOC_HAVE_RSMI\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${HWLOC_HAVE_LEVELZERO_TRUE}" && test -z "${HWLOC_HAVE_LEVELZERO_FALSE}"; then + as_fn_error $? "conditional \"HWLOC_HAVE_LEVELZERO\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${HWLOC_HAVE_BUNZIPP_TRUE}" && test -z "${HWLOC_HAVE_BUNZIPP_FALSE}"; then as_fn_error $? "conditional \"HWLOC_HAVE_BUNZIPP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -30768,6 +33950,10 @@ if test -z "${HWLOC_RSMI_BUILD_STATIC_TRUE}" && test -z "${HWLOC_RSMI_BUILD_STAT as_fn_error $? "conditional \"HWLOC_RSMI_BUILD_STATIC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${HWLOC_LEVELZERO_BUILD_STATIC_TRUE}" && test -z "${HWLOC_LEVELZERO_BUILD_STATIC_FALSE}"; then + as_fn_error $? "conditional \"HWLOC_LEVELZERO_BUILD_STATIC\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${HWLOC_GL_BUILD_STATIC_TRUE}" && test -z "${HWLOC_GL_BUILD_STATIC_FALSE}"; then as_fn_error $? "conditional \"HWLOC_GL_BUILD_STATIC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -30817,8 +34003,8 @@ fi 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;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 +printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL @@ -30841,14 +34027,16 @@ cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : +as_nop=: +if test ${ZSH_VERSION+y} && (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 +else $as_nop case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( @@ -30858,46 +34046,46 @@ esac fi + +# Reset variables that may have inherited troublesome values from +# the environment. + +# IFS needs to be set, to space, tab, and newline, in precisely that order. +# (If _AS_PATH_WALK were called with IFS unset, it would have the +# side effect of setting IFS to empty, thus disabling word splitting.) +# Quoting is to prevent editors from complaining about space-tab. 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 +IFS=" "" $as_nl" + +PS1='$ ' +PS2='> ' +PS4='+ ' + +# Ensure predictable behavior from utilities with locale-dependent output. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# We cannot yet rely on "unset" to work, but we need these variables +# to be unset--not just set to an empty or harmless value--now, to +# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct +# also avoids known problems related to "unset" and subshell syntax +# in other old shells (e.g. bash 2.01 and pdksh 5.2.14). +for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH +do eval test \${$as_var+y} \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done + +# Ensure that fds 0, 1, and 2 are open. +if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi +if (exec 3>&2) ; then :; else exec 2>/dev/null; fi # The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then +if ${PATH_SEPARATOR+false} :; 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 || @@ -30906,13 +34094,6 @@ if test "${PATH_SEPARATOR+set}" != set; then 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 #(( @@ -30921,8 +34102,12 @@ case $0 in #(( 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 + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + test -r "$as_dir$0" && as_myself=$as_dir$0 && break done IFS=$as_save_IFS @@ -30934,30 +34119,10 @@ 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 + printf "%s\n" "$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] @@ -30970,13 +34135,14 @@ 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 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - $as_echo "$as_me: error: $2" >&2 + printf "%s\n" "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error + # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. @@ -31003,18 +34169,20 @@ 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 : +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 +else $as_nop as_fn_append () { eval $1=\$$1\$2 @@ -31026,12 +34194,13 @@ fi # as_fn_append # 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 : +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null +then : eval 'as_fn_arith () { as_val=$(( $* )) }' -else +else $as_nop as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` @@ -31062,7 +34231,7 @@ as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | +printf "%s\n" X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -31084,6 +34253,10 @@ as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits + +# Determine whether it's possible to make 'echo' print without a newline. +# These variables are no longer used directly by Autoconf, but are AC_SUBSTed +# for compatibility with existing Makefiles. ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) @@ -31097,6 +34270,12 @@ case `echo -n x` in #((((( ECHO_N='-n';; esac +# For backward compatibility with old third-party macros, we provide +# the shell variables $as_echo and $as_echo_n. New code should use +# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. +as_echo='printf %s\n' +as_echo_n='printf %s' + rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file @@ -31138,7 +34317,7 @@ as_fn_mkdir_p () as_dirs= while :; do case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" @@ -31147,7 +34326,7 @@ $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" | +printf "%s\n" X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -31209,8 +34388,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by hwloc $as_me 2.4.1, which was -generated by GNU Autoconf 2.69. Invocation command line was +This file was extended by hwloc $as_me 2.8.0, which was +generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -31276,14 +34455,16 @@ $config_commands Report bugs to ." _ACEOF +ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"` +ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"` cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" +ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -hwloc config.status 2.4.1 -configured by $0, generated by GNU Autoconf 2.69, +hwloc config.status 2.8.0 +configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" -Copyright (C) 2012 Free Software Foundation, Inc. +Copyright (C) 2021 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -31323,15 +34504,15 @@ do -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 ;; + printf "%s\n" "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) - $as_echo "$ac_cs_config"; exit ;; + printf "%s\n" "$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"` ;; + *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" @@ -31339,7 +34520,7 @@ do --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; @@ -31348,7 +34529,7 @@ do as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) - $as_echo "$ac_cs_usage"; exit ;; + printf "%s\n" "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; @@ -31376,7 +34557,7 @@ 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 + \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" @@ -31390,7 +34571,7 @@ exec 5>>config.log sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX - $as_echo "$ac_log" + printf "%s\n" "$ac_log" } >&5 _ACEOF @@ -31837,6 +35018,7 @@ do "utils/hwloc/test-hwloc-diffpatch.sh") CONFIG_FILES="$CONFIG_FILES utils/hwloc/test-hwloc-diffpatch.sh" ;; "utils/hwloc/test-hwloc-distrib.sh") CONFIG_FILES="$CONFIG_FILES utils/hwloc/test-hwloc-distrib.sh" ;; "utils/hwloc/test-hwloc-info.sh") CONFIG_FILES="$CONFIG_FILES utils/hwloc/test-hwloc-info.sh" ;; + "utils/hwloc/test-build-custom-topology.sh") CONFIG_FILES="$CONFIG_FILES utils/hwloc/test-build-custom-topology.sh" ;; "utils/hwloc/test-fake-plugin.sh") CONFIG_FILES="$CONFIG_FILES utils/hwloc/test-fake-plugin.sh" ;; "utils/hwloc/test-parsing-flags.sh") CONFIG_FILES="$CONFIG_FILES utils/hwloc/test-parsing-flags.sh" ;; "utils/hwloc/test-hwloc-dump-hwdata/Makefile") CONFIG_FILES="$CONFIG_FILES utils/hwloc/test-hwloc-dump-hwdata/Makefile" ;; @@ -31849,7 +35031,6 @@ do "contrib/completion/Makefile") CONFIG_FILES="$CONFIG_FILES contrib/completion/Makefile" ;; "contrib/misc/Makefile") CONFIG_FILES="$CONFIG_FILES contrib/misc/Makefile" ;; "contrib/windows/Makefile") CONFIG_FILES="$CONFIG_FILES contrib/windows/Makefile" ;; - "contrib/windows/test-windows-version.sh") CONFIG_FILES="$CONFIG_FILES contrib/windows/test-windows-version.sh" ;; "tests/netloc/Makefile") CONFIG_FILES="$CONFIG_FILES tests/netloc/Makefile" ;; "tests/netloc/tests.sh") CONFIG_FILES="$CONFIG_FILES tests/netloc/tests.sh" ;; "chmoding-scripts") CONFIG_COMMANDS="$CONFIG_COMMANDS chmoding-scripts" ;; @@ -31866,6 +35047,7 @@ do "tests/hwloc/ports/topology-cuda.c") CONFIG_LINKS="$CONFIG_LINKS tests/hwloc/ports/topology-cuda.c:hwloc/topology-cuda.c" ;; "tests/hwloc/ports/topology-nvml.c") CONFIG_LINKS="$CONFIG_LINKS tests/hwloc/ports/topology-nvml.c:hwloc/topology-nvml.c" ;; "tests/hwloc/ports/topology-rsmi.c") CONFIG_LINKS="$CONFIG_LINKS tests/hwloc/ports/topology-rsmi.c:hwloc/topology-rsmi.c" ;; + "tests/hwloc/ports/topology-levelzero.c") CONFIG_LINKS="$CONFIG_LINKS tests/hwloc/ports/topology-levelzero.c:hwloc/topology-levelzero.c" ;; "tests/hwloc/ports/topology-gl.c") CONFIG_LINKS="$CONFIG_LINKS tests/hwloc/ports/topology-gl.c:hwloc/topology-gl.c" ;; "tests/hwloc/ports/lstopo-windows.c") CONFIG_LINKS="$CONFIG_LINKS tests/hwloc/ports/lstopo-windows.c:utils/lstopo/lstopo-windows.c" ;; "tests/hwloc/ports/lstopo-android.c") CONFIG_LINKS="$CONFIG_LINKS tests/hwloc/ports/lstopo-android.c:utils/lstopo/lstopo-android.c" ;; @@ -31880,10 +35062,10 @@ done # 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_LINKS+set}" = set || CONFIG_LINKS=$config_links - test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands + test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files + test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers + test ${CONFIG_LINKS+y} || CONFIG_LINKS=$config_links + test ${CONFIG_COMMANDS+y} || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree @@ -32219,7 +35401,7 @@ do 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 + case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done @@ -32227,17 +35409,17 @@ do # 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' + printf "%s\n" "$*" | 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;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 +printf "%s\n" "$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" | + ac_sed_conf_input=`printf "%s\n" "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac @@ -32254,7 +35436,7 @@ $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" | +printf "%s\n" X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -32278,9 +35460,9 @@ $as_echo X"$ac_file" | case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + ac_dir_suffix=/`printf "%s\n" "$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|/||'` + ac_top_builddir_sub=`printf "%s\n" "$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/ ;; @@ -32342,8 +35524,8 @@ ac_sed_dataroot=' 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;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +printf "%s\n" "$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=' @@ -32387,9 +35569,9 @@ 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' + { printf "%s\n" "$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' +printf "%s\n" "$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" @@ -32405,20 +35587,20 @@ which seems to be undefined. Please make sure it is defined" >&2;} # if test x"$ac_file" != x-; then { - $as_echo "/* $configure_input */" \ + printf "%s\n" "/* $configure_input */" >&1 \ && 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;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 +printf "%s\n" "$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 */" \ + printf "%s\n" "/* $configure_input */" >&1 \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi @@ -32438,7 +35620,7 @@ $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" | +printf "%s\n" X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -32470,8 +35652,8 @@ $as_echo X"$_am_arg" | ac_source=$srcdir/$ac_source fi - { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5 -$as_echo "$as_me: linking $ac_source to $ac_file" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5 +printf "%s\n" "$as_me: linking $ac_source to $ac_file" >&6;} if test ! -r "$ac_source"; then as_fn_error $? "$ac_source: file not found" "$LINENO" 5 @@ -32489,8 +35671,8 @@ $as_echo "$as_me: linking $ac_source to $ac_file" >&6;} as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5 fi ;; - :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 -$as_echo "$as_me: executing $ac_file commands" >&6;} + :C) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 +printf "%s\n" "$as_me: executing $ac_file commands" >&6;} ;; esac @@ -32516,7 +35698,7 @@ esac 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/:.*$//'` + am_mf=`printf "%s\n" "$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 @@ -32528,7 +35710,7 @@ $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" | +printf "%s\n" X"$am_mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -32550,7 +35732,7 @@ $as_echo X"$am_mf" | $as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \ X"$am_mf" : 'X\(//\)$' \| \ X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$am_mf" | +printf "%s\n" X/"$am_mf" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -32575,8 +35757,8 @@ $as_echo X/"$am_mf" | (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;} + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$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 @@ -33136,6 +36318,7 @@ _LT_EOF esac + ltmain=$ac_aux_dir/ltmain.sh @@ -33320,13 +36503,13 @@ _LT_EOF utils/hwloc/test-hwloc-diffpatch.sh \ utils/hwloc/test-hwloc-distrib.sh \ utils/hwloc/test-hwloc-info.sh \ + utils/hwloc/test-build-custom-topology.sh \ utils/hwloc/test-fake-plugin.sh \ utils/hwloc/test-parsing-flags.sh \ utils/hwloc/test-hwloc-dump-hwdata/test-hwloc-dump-hwdata.sh \ utils/lstopo/test-lstopo.sh \ utils/lstopo/test-lstopo-shmem.sh \ utils/netloc/infiniband/netloc_ib_gather_raw \ - contrib/windows/test-windows-version.sh \ tests/netloc/tests.sh ;; esac @@ -33362,8 +36545,8 @@ if test "$no_create" != yes; then $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;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi @@ -33380,33 +36563,40 @@ fi # Show which optional support we'll be building hwloc_xml_status=basic -if test "$hwloc_libxml2_happy" = "yes"; then : +if test "$hwloc_libxml2_happy" = "yes" +then : hwloc_xml_status=full fi netloc_status=no -if test "$netloc_happy" = "yes"; then : +if test "$netloc_happy" = "yes" +then : netlocscotch_status=without - if test "$scotch_found_headers" = "yes"; then : + if test "$scotch_found_headers" = "yes" +then : netlocscotch_status=with fi netloc_status="yes ($netlocscotch_status scotch)" fi -if test "$enable_embedded_mode" = "yes"; then : +if test "$enable_embedded_mode" = "yes" +then : hwloc_graphical_lstopo_status="no (disabled in embedded mode)" -else - if test "$hwloc_windows" = "yes"; then : +else $as_nop + if test "$hwloc_windows" = "yes" +then : hwloc_graphical_lstopo_status="yes (Windows)" -else - if test "$hwloc_cairo_happy" = "yes"; then : - if test "$lstopo_have_x11" = "yes"; then : +else $as_nop + if test "$hwloc_cairo_happy" = "yes" +then : + if test "$lstopo_have_x11" = "yes" +then : hwloc_graphical_lstopo_status="yes (Cairo)" -else +else $as_nop hwloc_graphical_lstopo_status="partial (Cairo, without X11)" fi -else +else $as_nop hwloc_graphical_lstopo_status="no" fi @@ -33425,12 +36615,64 @@ fi test "x$hwloc_linuxio_happy" = "xyes" && hwloc_probeio_list="$hwloc_probeio_list LinuxIO" test "x$hwloc_opencl_happy" = "xyes" && hwloc_probeio_list="$hwloc_probeio_list OpenCL" test "x$hwloc_have_cudart" = "xyes" && hwloc_probeio_list="$hwloc_probeio_list CUDA" -test "x$hwloc_nvml_happy" = "xyes" && hwloc_probeio_list="$hwloc_probeio_list NVML" +if test "x$hwloc_nvml_happy" = "xyes" ; then + hwloc_probeio_list="$hwloc_probeio_list NVML" +fi test "x$hwloc_rsmi_happy" = "xyes" && hwloc_probeio_list="$hwloc_probeio_list RSMI" +test "x$hwloc_levelzero_happy" = "xyes" && hwloc_probeio_list="$hwloc_probeio_list LevelZero" test "x$hwloc_gl_happy" = "xyes" && hwloc_probeio_list="$hwloc_probeio_list GL" # if nothing, say "no" test "x$hwloc_probeio_list" = "x" && hwloc_probeio_list=" no" +if test "x$hwloc_nvml_happy" = "xyes" -a "x$hwloc_nvml_warning" = "xyes"; then + hwloc_nvml_status="yes, but not functional on this machine (see warning above)" + cat <0 and <3), # but it is necessary in AM 1.12.x. @@ -97,13 +98,10 @@ LT_LANG([C++]) CFLAGS_save=$CFLAGS AC_PROG_CC AM_PROG_CC_C_O +# AC_PROG_CC_C99 obsolete, detected inside AC_PROG_CC, since autoconf 2.70 +m4_version_prereq([2.70], [], [AC_PROG_CC_C99]) CFLAGS=$CFLAGS_save -AC_ARG_VAR(CC_FOR_BUILD,[build system C compiler]) -AS_IF([test -z "$CC_FOR_BUILD"],[ - AC_SUBST([CC_FOR_BUILD], [$CC]) -]) - #################################################################### # CLI arguments #################################################################### @@ -130,6 +128,7 @@ AS_IF([test "$enable_embedded_mode" != "yes"], #################################################################### AC_SUBST([libhwloc_so_version]) +AC_SUBST([libhwloc_so_name]) # Setup the hwloc core HWLOC_SETUP_CORE([], [], [AC_MSG_ERROR([Cannot build hwloc core])], [1]) @@ -141,7 +140,7 @@ HWLOC_SETUP_CORE([], [], [AC_MSG_ERROR([Cannot build hwloc core])], [1]) AC_SUBST([libnetloc_so_version]) AC_ARG_ENABLE([netloc], - [AC_HELP_STRING([--enable-netloc], + [AS_HELP_STRING([--enable-netloc], [The Netloc functionality is disabled by default. Using --enable-netloc will cause configure to abort if Netloc cannot be build (e.g., not supported on your platform).]) ]) @@ -176,6 +175,10 @@ VERSION="${PACKAGE_VERSION}" . $srcdir/VERSION +libhwloc_so_version_current=`echo $libhwloc_so_version | cut -d: -f1` +libhwloc_so_version_age=`echo $libhwloc_so_version | cut -d: -f3` +libhwloc_so_name=`expr $libhwloc_so_version_current - $libhwloc_so_version_age` + #################################################################### # Setup the rest of the infrastructure #################################################################### @@ -253,12 +256,64 @@ fi test "x$hwloc_linuxio_happy" = "xyes" && hwloc_probeio_list="$hwloc_probeio_list LinuxIO" test "x$hwloc_opencl_happy" = "xyes" && hwloc_probeio_list="$hwloc_probeio_list OpenCL" test "x$hwloc_have_cudart" = "xyes" && hwloc_probeio_list="$hwloc_probeio_list CUDA" -test "x$hwloc_nvml_happy" = "xyes" && hwloc_probeio_list="$hwloc_probeio_list NVML" +if test "x$hwloc_nvml_happy" = "xyes" ; then + hwloc_probeio_list="$hwloc_probeio_list NVML" +fi test "x$hwloc_rsmi_happy" = "xyes" && hwloc_probeio_list="$hwloc_probeio_list RSMI" +test "x$hwloc_levelzero_happy" = "xyes" && hwloc_probeio_list="$hwloc_probeio_list LevelZero" test "x$hwloc_gl_happy" = "xyes" && hwloc_probeio_list="$hwloc_probeio_list GL" # if nothing, say "no" test "x$hwloc_probeio_list" = "x" && hwloc_probeio_list=" no" +if test "x$hwloc_nvml_happy" = "xyes" -a "x$hwloc_nvml_warning" = "xyes"; then + hwloc_nvml_status="yes, but not functional on this machine (see warning above)" + cat <&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 = contrib/completion -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/config/hwloc.m4 \ - $(top_srcdir)/config/hwloc_check_attributes.m4 \ - $(top_srcdir)/config/hwloc_check_vendor.m4 \ - $(top_srcdir)/config/hwloc_check_visibility.m4 \ - $(top_srcdir)/config/hwloc_components.m4 \ - $(top_srcdir)/config/hwloc_internal.m4 \ - $(top_srcdir)/config/hwloc_pkg.m4 \ - $(top_srcdir)/config/libtool.m4 \ - $(top_srcdir)/config/ltoptions.m4 \ - $(top_srcdir)/config/ltsugar.m4 \ - $(top_srcdir)/config/ltversion.m4 \ - $(top_srcdir)/config/lt~obsolete.m4 \ - $(top_srcdir)/config/netloc.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/include/private/autogen/config.h \ - $(top_builddir)/include/hwloc/autogen/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 -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -BASH = @BASH@ -BUNZIPP = @BUNZIPP@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CC_FOR_BUILD = @CC_FOR_BUILD@ -CFLAGS = @CFLAGS@ -CONFIGURE_DEPENDENCIES = @CONFIGURE_DEPENDENCIES@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DIFF = @DIFF@ -DLLTOOL = @DLLTOOL@ -DOXYGEN = @DOXYGEN@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EPSTOPDF = @EPSTOPDF@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FIG2DEV = @FIG2DEV@ -GREP = @GREP@ -GS = @GS@ -HWLOC_CAIRO_CFLAGS = @HWLOC_CAIRO_CFLAGS@ -HWLOC_CAIRO_LIBS = @HWLOC_CAIRO_LIBS@ -HWLOC_CFLAGS = @HWLOC_CFLAGS@ -HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ -HWLOC_CUDA_LIBS = @HWLOC_CUDA_LIBS@ -HWLOC_DIFF_U = @HWLOC_DIFF_U@ -HWLOC_DIFF_W = @HWLOC_DIFF_W@ -HWLOC_DL_LIBS = @HWLOC_DL_LIBS@ -HWLOC_EMBEDDED_CFLAGS = @HWLOC_EMBEDDED_CFLAGS@ -HWLOC_EMBEDDED_CPPFLAGS = @HWLOC_EMBEDDED_CPPFLAGS@ -HWLOC_EMBEDDED_LDADD = @HWLOC_EMBEDDED_LDADD@ -HWLOC_EMBEDDED_LDFLAGS = @HWLOC_EMBEDDED_LDFLAGS@ -HWLOC_EMBEDDED_LIBS = @HWLOC_EMBEDDED_LIBS@ -HWLOC_GL_LIBS = @HWLOC_GL_LIBS@ -HWLOC_HAVE_LIBXML2 = @HWLOC_HAVE_LIBXML2@ -HWLOC_HAVE_NVML = @HWLOC_HAVE_NVML@ -HWLOC_HAVE_OPENCL = @HWLOC_HAVE_OPENCL@ -HWLOC_HAVE_RSMI = @HWLOC_HAVE_RSMI@ -HWLOC_LDFLAGS = @HWLOC_LDFLAGS@ -HWLOC_LIBS = @HWLOC_LIBS@ -HWLOC_LIBS_PRIVATE = @HWLOC_LIBS_PRIVATE@ -HWLOC_LIBXML2_CFLAGS = @HWLOC_LIBXML2_CFLAGS@ -HWLOC_LIBXML2_LIBS = @HWLOC_LIBXML2_LIBS@ -HWLOC_LTDL_LIBS = @HWLOC_LTDL_LIBS@ -HWLOC_MS_LIB = @HWLOC_MS_LIB@ -HWLOC_MS_LIB_ARCH = @HWLOC_MS_LIB_ARCH@ -HWLOC_NUMA_CFLAGS = @HWLOC_NUMA_CFLAGS@ -HWLOC_NUMA_LIBS = @HWLOC_NUMA_LIBS@ -HWLOC_NVML_LIBS = @HWLOC_NVML_LIBS@ -HWLOC_OPENCL_CFLAGS = @HWLOC_OPENCL_CFLAGS@ -HWLOC_OPENCL_LDFLAGS = @HWLOC_OPENCL_LDFLAGS@ -HWLOC_OPENCL_LIBS = @HWLOC_OPENCL_LIBS@ -HWLOC_PCIACCESS_CFLAGS = @HWLOC_PCIACCESS_CFLAGS@ -HWLOC_PCIACCESS_LIBS = @HWLOC_PCIACCESS_LIBS@ -HWLOC_PLUGINS_DIR = @HWLOC_PLUGINS_DIR@ -HWLOC_PLUGINS_PATH = @HWLOC_PLUGINS_PATH@ -HWLOC_PS_LIBS = @HWLOC_PS_LIBS@ -HWLOC_RELEASE_DATE = @HWLOC_RELEASE_DATE@ -HWLOC_REQUIRES = @HWLOC_REQUIRES@ -HWLOC_RSMI_LIBS = @HWLOC_RSMI_LIBS@ -HWLOC_TERMCAP_LIBS = @HWLOC_TERMCAP_LIBS@ -HWLOC_VERSION = @HWLOC_VERSION@ -HWLOC_W3_GENERATOR = @HWLOC_W3_GENERATOR@ -HWLOC_X11_CPPFLAGS = @HWLOC_X11_CPPFLAGS@ -HWLOC_X11_LIBS = @HWLOC_X11_LIBS@ -HWLOC_XML_LOCALIZED = @HWLOC_XML_LOCALIZED@ -HWLOC_runstatedir = @HWLOC_runstatedir@ -HWLOC_top_builddir = @HWLOC_top_builddir@ -HWLOC_top_srcdir = @HWLOC_top_srcdir@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -LYNX = @LYNX@ -MAKEINDEX = @MAKEINDEX@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -MPI_CPPFLAGS = @MPI_CPPFLAGS@ -MPI_LDADD = @MPI_LDADD@ -NETLOC_CFLAGS = @NETLOC_CFLAGS@ -NETLOC_CPPFLAGS = @NETLOC_CPPFLAGS@ -NETLOC_EMBEDDED_CFLAGS = @NETLOC_EMBEDDED_CFLAGS@ -NETLOC_EMBEDDED_CPPFLAGS = @NETLOC_EMBEDDED_CPPFLAGS@ -NETLOC_EMBEDDED_LDADD = @NETLOC_EMBEDDED_LDADD@ -NETLOC_EMBEDDED_LIBS = @NETLOC_EMBEDDED_LIBS@ -NETLOC_LDFLAGS = @NETLOC_LDFLAGS@ -NETLOC_LIBS = @NETLOC_LIBS@ -NETLOC_LIBS_PRIVATE = @NETLOC_LIBS_PRIVATE@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -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@ -PDFLATEX = @PDFLATEX@ -PKG_CONFIG = @PKG_CONFIG@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -W3M = @W3M@ -XMKMF = @XMKMF@ -XMLLINT = @XMLLINT@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -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@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -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@ -libhwloc_so_version = @libhwloc_so_version@ -libnetloc_so_version = @libnetloc_so_version@ -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@ -xz = @xz@ -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 contrib/completion/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign contrib/completion/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): - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -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 clean-libtool 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-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: - -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 mostlyclean-libtool - -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 clean-libtool \ - cscopelist-am ctags-am distclean distclean-generic \ - distclean-libtool 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 \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags-am uninstall uninstall-am - -.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: diff --git a/contrib/hwloc/contrib/hwloc-ps.www/Makefile.am b/contrib/hwloc/contrib/hwloc-ps.www/Makefile.am deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/contrib/hwloc/contrib/hwloc-ps.www/Makefile.in b/contrib/hwloc/contrib/hwloc-ps.www/Makefile.in index f66361a347..e69de29bb2 100644 --- a/contrib/hwloc/contrib/hwloc-ps.www/Makefile.in +++ b/contrib/hwloc/contrib/hwloc-ps.www/Makefile.in @@ -1,542 +0,0 @@ -# Makefile.in generated by automake 1.16.3 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 = contrib/hwloc-ps.www -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/config/hwloc.m4 \ - $(top_srcdir)/config/hwloc_check_attributes.m4 \ - $(top_srcdir)/config/hwloc_check_vendor.m4 \ - $(top_srcdir)/config/hwloc_check_visibility.m4 \ - $(top_srcdir)/config/hwloc_components.m4 \ - $(top_srcdir)/config/hwloc_internal.m4 \ - $(top_srcdir)/config/hwloc_pkg.m4 \ - $(top_srcdir)/config/libtool.m4 \ - $(top_srcdir)/config/ltoptions.m4 \ - $(top_srcdir)/config/ltsugar.m4 \ - $(top_srcdir)/config/ltversion.m4 \ - $(top_srcdir)/config/lt~obsolete.m4 \ - $(top_srcdir)/config/netloc.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/include/private/autogen/config.h \ - $(top_builddir)/include/hwloc/autogen/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 -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -BASH = @BASH@ -BUNZIPP = @BUNZIPP@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CC_FOR_BUILD = @CC_FOR_BUILD@ -CFLAGS = @CFLAGS@ -CONFIGURE_DEPENDENCIES = @CONFIGURE_DEPENDENCIES@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DIFF = @DIFF@ -DLLTOOL = @DLLTOOL@ -DOXYGEN = @DOXYGEN@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EPSTOPDF = @EPSTOPDF@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FIG2DEV = @FIG2DEV@ -GREP = @GREP@ -GS = @GS@ -HWLOC_CAIRO_CFLAGS = @HWLOC_CAIRO_CFLAGS@ -HWLOC_CAIRO_LIBS = @HWLOC_CAIRO_LIBS@ -HWLOC_CFLAGS = @HWLOC_CFLAGS@ -HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ -HWLOC_CUDA_LIBS = @HWLOC_CUDA_LIBS@ -HWLOC_DIFF_U = @HWLOC_DIFF_U@ -HWLOC_DIFF_W = @HWLOC_DIFF_W@ -HWLOC_DL_LIBS = @HWLOC_DL_LIBS@ -HWLOC_EMBEDDED_CFLAGS = @HWLOC_EMBEDDED_CFLAGS@ -HWLOC_EMBEDDED_CPPFLAGS = @HWLOC_EMBEDDED_CPPFLAGS@ -HWLOC_EMBEDDED_LDADD = @HWLOC_EMBEDDED_LDADD@ -HWLOC_EMBEDDED_LDFLAGS = @HWLOC_EMBEDDED_LDFLAGS@ -HWLOC_EMBEDDED_LIBS = @HWLOC_EMBEDDED_LIBS@ -HWLOC_GL_LIBS = @HWLOC_GL_LIBS@ -HWLOC_HAVE_LIBXML2 = @HWLOC_HAVE_LIBXML2@ -HWLOC_HAVE_NVML = @HWLOC_HAVE_NVML@ -HWLOC_HAVE_OPENCL = @HWLOC_HAVE_OPENCL@ -HWLOC_HAVE_RSMI = @HWLOC_HAVE_RSMI@ -HWLOC_LDFLAGS = @HWLOC_LDFLAGS@ -HWLOC_LIBS = @HWLOC_LIBS@ -HWLOC_LIBS_PRIVATE = @HWLOC_LIBS_PRIVATE@ -HWLOC_LIBXML2_CFLAGS = @HWLOC_LIBXML2_CFLAGS@ -HWLOC_LIBXML2_LIBS = @HWLOC_LIBXML2_LIBS@ -HWLOC_LTDL_LIBS = @HWLOC_LTDL_LIBS@ -HWLOC_MS_LIB = @HWLOC_MS_LIB@ -HWLOC_MS_LIB_ARCH = @HWLOC_MS_LIB_ARCH@ -HWLOC_NUMA_CFLAGS = @HWLOC_NUMA_CFLAGS@ -HWLOC_NUMA_LIBS = @HWLOC_NUMA_LIBS@ -HWLOC_NVML_LIBS = @HWLOC_NVML_LIBS@ -HWLOC_OPENCL_CFLAGS = @HWLOC_OPENCL_CFLAGS@ -HWLOC_OPENCL_LDFLAGS = @HWLOC_OPENCL_LDFLAGS@ -HWLOC_OPENCL_LIBS = @HWLOC_OPENCL_LIBS@ -HWLOC_PCIACCESS_CFLAGS = @HWLOC_PCIACCESS_CFLAGS@ -HWLOC_PCIACCESS_LIBS = @HWLOC_PCIACCESS_LIBS@ -HWLOC_PLUGINS_DIR = @HWLOC_PLUGINS_DIR@ -HWLOC_PLUGINS_PATH = @HWLOC_PLUGINS_PATH@ -HWLOC_PS_LIBS = @HWLOC_PS_LIBS@ -HWLOC_RELEASE_DATE = @HWLOC_RELEASE_DATE@ -HWLOC_REQUIRES = @HWLOC_REQUIRES@ -HWLOC_RSMI_LIBS = @HWLOC_RSMI_LIBS@ -HWLOC_TERMCAP_LIBS = @HWLOC_TERMCAP_LIBS@ -HWLOC_VERSION = @HWLOC_VERSION@ -HWLOC_W3_GENERATOR = @HWLOC_W3_GENERATOR@ -HWLOC_X11_CPPFLAGS = @HWLOC_X11_CPPFLAGS@ -HWLOC_X11_LIBS = @HWLOC_X11_LIBS@ -HWLOC_XML_LOCALIZED = @HWLOC_XML_LOCALIZED@ -HWLOC_runstatedir = @HWLOC_runstatedir@ -HWLOC_top_builddir = @HWLOC_top_builddir@ -HWLOC_top_srcdir = @HWLOC_top_srcdir@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -LYNX = @LYNX@ -MAKEINDEX = @MAKEINDEX@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -MPI_CPPFLAGS = @MPI_CPPFLAGS@ -MPI_LDADD = @MPI_LDADD@ -NETLOC_CFLAGS = @NETLOC_CFLAGS@ -NETLOC_CPPFLAGS = @NETLOC_CPPFLAGS@ -NETLOC_EMBEDDED_CFLAGS = @NETLOC_EMBEDDED_CFLAGS@ -NETLOC_EMBEDDED_CPPFLAGS = @NETLOC_EMBEDDED_CPPFLAGS@ -NETLOC_EMBEDDED_LDADD = @NETLOC_EMBEDDED_LDADD@ -NETLOC_EMBEDDED_LIBS = @NETLOC_EMBEDDED_LIBS@ -NETLOC_LDFLAGS = @NETLOC_LDFLAGS@ -NETLOC_LIBS = @NETLOC_LIBS@ -NETLOC_LIBS_PRIVATE = @NETLOC_LIBS_PRIVATE@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -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@ -PDFLATEX = @PDFLATEX@ -PKG_CONFIG = @PKG_CONFIG@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -W3M = @W3M@ -XMKMF = @XMKMF@ -XMLLINT = @XMLLINT@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -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@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -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@ -libhwloc_so_version = @libhwloc_so_version@ -libnetloc_so_version = @libnetloc_so_version@ -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@ -xz = @xz@ -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 contrib/hwloc-ps.www/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign contrib/hwloc-ps.www/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): - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -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 clean-libtool 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-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: - -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 mostlyclean-libtool - -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 clean-libtool \ - cscopelist-am ctags-am distclean distclean-generic \ - distclean-libtool 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 \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags-am uninstall uninstall-am - -.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: diff --git a/contrib/hwloc/contrib/misc/Makefile.am b/contrib/hwloc/contrib/misc/Makefile.am deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/contrib/hwloc/contrib/misc/Makefile.in b/contrib/hwloc/contrib/misc/Makefile.in index 523e08e630..e69de29bb2 100644 --- a/contrib/hwloc/contrib/misc/Makefile.in +++ b/contrib/hwloc/contrib/misc/Makefile.in @@ -1,542 +0,0 @@ -# Makefile.in generated by automake 1.16.3 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 = contrib/misc -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/config/hwloc.m4 \ - $(top_srcdir)/config/hwloc_check_attributes.m4 \ - $(top_srcdir)/config/hwloc_check_vendor.m4 \ - $(top_srcdir)/config/hwloc_check_visibility.m4 \ - $(top_srcdir)/config/hwloc_components.m4 \ - $(top_srcdir)/config/hwloc_internal.m4 \ - $(top_srcdir)/config/hwloc_pkg.m4 \ - $(top_srcdir)/config/libtool.m4 \ - $(top_srcdir)/config/ltoptions.m4 \ - $(top_srcdir)/config/ltsugar.m4 \ - $(top_srcdir)/config/ltversion.m4 \ - $(top_srcdir)/config/lt~obsolete.m4 \ - $(top_srcdir)/config/netloc.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/include/private/autogen/config.h \ - $(top_builddir)/include/hwloc/autogen/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 -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -BASH = @BASH@ -BUNZIPP = @BUNZIPP@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CC_FOR_BUILD = @CC_FOR_BUILD@ -CFLAGS = @CFLAGS@ -CONFIGURE_DEPENDENCIES = @CONFIGURE_DEPENDENCIES@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DIFF = @DIFF@ -DLLTOOL = @DLLTOOL@ -DOXYGEN = @DOXYGEN@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EPSTOPDF = @EPSTOPDF@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FIG2DEV = @FIG2DEV@ -GREP = @GREP@ -GS = @GS@ -HWLOC_CAIRO_CFLAGS = @HWLOC_CAIRO_CFLAGS@ -HWLOC_CAIRO_LIBS = @HWLOC_CAIRO_LIBS@ -HWLOC_CFLAGS = @HWLOC_CFLAGS@ -HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ -HWLOC_CUDA_LIBS = @HWLOC_CUDA_LIBS@ -HWLOC_DIFF_U = @HWLOC_DIFF_U@ -HWLOC_DIFF_W = @HWLOC_DIFF_W@ -HWLOC_DL_LIBS = @HWLOC_DL_LIBS@ -HWLOC_EMBEDDED_CFLAGS = @HWLOC_EMBEDDED_CFLAGS@ -HWLOC_EMBEDDED_CPPFLAGS = @HWLOC_EMBEDDED_CPPFLAGS@ -HWLOC_EMBEDDED_LDADD = @HWLOC_EMBEDDED_LDADD@ -HWLOC_EMBEDDED_LDFLAGS = @HWLOC_EMBEDDED_LDFLAGS@ -HWLOC_EMBEDDED_LIBS = @HWLOC_EMBEDDED_LIBS@ -HWLOC_GL_LIBS = @HWLOC_GL_LIBS@ -HWLOC_HAVE_LIBXML2 = @HWLOC_HAVE_LIBXML2@ -HWLOC_HAVE_NVML = @HWLOC_HAVE_NVML@ -HWLOC_HAVE_OPENCL = @HWLOC_HAVE_OPENCL@ -HWLOC_HAVE_RSMI = @HWLOC_HAVE_RSMI@ -HWLOC_LDFLAGS = @HWLOC_LDFLAGS@ -HWLOC_LIBS = @HWLOC_LIBS@ -HWLOC_LIBS_PRIVATE = @HWLOC_LIBS_PRIVATE@ -HWLOC_LIBXML2_CFLAGS = @HWLOC_LIBXML2_CFLAGS@ -HWLOC_LIBXML2_LIBS = @HWLOC_LIBXML2_LIBS@ -HWLOC_LTDL_LIBS = @HWLOC_LTDL_LIBS@ -HWLOC_MS_LIB = @HWLOC_MS_LIB@ -HWLOC_MS_LIB_ARCH = @HWLOC_MS_LIB_ARCH@ -HWLOC_NUMA_CFLAGS = @HWLOC_NUMA_CFLAGS@ -HWLOC_NUMA_LIBS = @HWLOC_NUMA_LIBS@ -HWLOC_NVML_LIBS = @HWLOC_NVML_LIBS@ -HWLOC_OPENCL_CFLAGS = @HWLOC_OPENCL_CFLAGS@ -HWLOC_OPENCL_LDFLAGS = @HWLOC_OPENCL_LDFLAGS@ -HWLOC_OPENCL_LIBS = @HWLOC_OPENCL_LIBS@ -HWLOC_PCIACCESS_CFLAGS = @HWLOC_PCIACCESS_CFLAGS@ -HWLOC_PCIACCESS_LIBS = @HWLOC_PCIACCESS_LIBS@ -HWLOC_PLUGINS_DIR = @HWLOC_PLUGINS_DIR@ -HWLOC_PLUGINS_PATH = @HWLOC_PLUGINS_PATH@ -HWLOC_PS_LIBS = @HWLOC_PS_LIBS@ -HWLOC_RELEASE_DATE = @HWLOC_RELEASE_DATE@ -HWLOC_REQUIRES = @HWLOC_REQUIRES@ -HWLOC_RSMI_LIBS = @HWLOC_RSMI_LIBS@ -HWLOC_TERMCAP_LIBS = @HWLOC_TERMCAP_LIBS@ -HWLOC_VERSION = @HWLOC_VERSION@ -HWLOC_W3_GENERATOR = @HWLOC_W3_GENERATOR@ -HWLOC_X11_CPPFLAGS = @HWLOC_X11_CPPFLAGS@ -HWLOC_X11_LIBS = @HWLOC_X11_LIBS@ -HWLOC_XML_LOCALIZED = @HWLOC_XML_LOCALIZED@ -HWLOC_runstatedir = @HWLOC_runstatedir@ -HWLOC_top_builddir = @HWLOC_top_builddir@ -HWLOC_top_srcdir = @HWLOC_top_srcdir@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -LYNX = @LYNX@ -MAKEINDEX = @MAKEINDEX@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -MPI_CPPFLAGS = @MPI_CPPFLAGS@ -MPI_LDADD = @MPI_LDADD@ -NETLOC_CFLAGS = @NETLOC_CFLAGS@ -NETLOC_CPPFLAGS = @NETLOC_CPPFLAGS@ -NETLOC_EMBEDDED_CFLAGS = @NETLOC_EMBEDDED_CFLAGS@ -NETLOC_EMBEDDED_CPPFLAGS = @NETLOC_EMBEDDED_CPPFLAGS@ -NETLOC_EMBEDDED_LDADD = @NETLOC_EMBEDDED_LDADD@ -NETLOC_EMBEDDED_LIBS = @NETLOC_EMBEDDED_LIBS@ -NETLOC_LDFLAGS = @NETLOC_LDFLAGS@ -NETLOC_LIBS = @NETLOC_LIBS@ -NETLOC_LIBS_PRIVATE = @NETLOC_LIBS_PRIVATE@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -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@ -PDFLATEX = @PDFLATEX@ -PKG_CONFIG = @PKG_CONFIG@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -W3M = @W3M@ -XMKMF = @XMKMF@ -XMLLINT = @XMLLINT@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -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@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -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@ -libhwloc_so_version = @libhwloc_so_version@ -libnetloc_so_version = @libnetloc_so_version@ -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@ -xz = @xz@ -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 contrib/misc/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign contrib/misc/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): - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -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 clean-libtool 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-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: - -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 mostlyclean-libtool - -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 clean-libtool \ - cscopelist-am ctags-am distclean distclean-generic \ - distclean-libtool 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 \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags-am uninstall uninstall-am - -.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: diff --git a/contrib/hwloc/contrib/systemd/Makefile.am b/contrib/hwloc/contrib/systemd/Makefile.am deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/contrib/hwloc/contrib/systemd/Makefile.in b/contrib/hwloc/contrib/systemd/Makefile.in index 37865b6106..e69de29bb2 100644 --- a/contrib/hwloc/contrib/systemd/Makefile.in +++ b/contrib/hwloc/contrib/systemd/Makefile.in @@ -1,542 +0,0 @@ -# Makefile.in generated by automake 1.16.3 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 = contrib/systemd -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/config/hwloc.m4 \ - $(top_srcdir)/config/hwloc_check_attributes.m4 \ - $(top_srcdir)/config/hwloc_check_vendor.m4 \ - $(top_srcdir)/config/hwloc_check_visibility.m4 \ - $(top_srcdir)/config/hwloc_components.m4 \ - $(top_srcdir)/config/hwloc_internal.m4 \ - $(top_srcdir)/config/hwloc_pkg.m4 \ - $(top_srcdir)/config/libtool.m4 \ - $(top_srcdir)/config/ltoptions.m4 \ - $(top_srcdir)/config/ltsugar.m4 \ - $(top_srcdir)/config/ltversion.m4 \ - $(top_srcdir)/config/lt~obsolete.m4 \ - $(top_srcdir)/config/netloc.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/include/private/autogen/config.h \ - $(top_builddir)/include/hwloc/autogen/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 -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -BASH = @BASH@ -BUNZIPP = @BUNZIPP@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CC_FOR_BUILD = @CC_FOR_BUILD@ -CFLAGS = @CFLAGS@ -CONFIGURE_DEPENDENCIES = @CONFIGURE_DEPENDENCIES@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DIFF = @DIFF@ -DLLTOOL = @DLLTOOL@ -DOXYGEN = @DOXYGEN@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EPSTOPDF = @EPSTOPDF@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FIG2DEV = @FIG2DEV@ -GREP = @GREP@ -GS = @GS@ -HWLOC_CAIRO_CFLAGS = @HWLOC_CAIRO_CFLAGS@ -HWLOC_CAIRO_LIBS = @HWLOC_CAIRO_LIBS@ -HWLOC_CFLAGS = @HWLOC_CFLAGS@ -HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ -HWLOC_CUDA_LIBS = @HWLOC_CUDA_LIBS@ -HWLOC_DIFF_U = @HWLOC_DIFF_U@ -HWLOC_DIFF_W = @HWLOC_DIFF_W@ -HWLOC_DL_LIBS = @HWLOC_DL_LIBS@ -HWLOC_EMBEDDED_CFLAGS = @HWLOC_EMBEDDED_CFLAGS@ -HWLOC_EMBEDDED_CPPFLAGS = @HWLOC_EMBEDDED_CPPFLAGS@ -HWLOC_EMBEDDED_LDADD = @HWLOC_EMBEDDED_LDADD@ -HWLOC_EMBEDDED_LDFLAGS = @HWLOC_EMBEDDED_LDFLAGS@ -HWLOC_EMBEDDED_LIBS = @HWLOC_EMBEDDED_LIBS@ -HWLOC_GL_LIBS = @HWLOC_GL_LIBS@ -HWLOC_HAVE_LIBXML2 = @HWLOC_HAVE_LIBXML2@ -HWLOC_HAVE_NVML = @HWLOC_HAVE_NVML@ -HWLOC_HAVE_OPENCL = @HWLOC_HAVE_OPENCL@ -HWLOC_HAVE_RSMI = @HWLOC_HAVE_RSMI@ -HWLOC_LDFLAGS = @HWLOC_LDFLAGS@ -HWLOC_LIBS = @HWLOC_LIBS@ -HWLOC_LIBS_PRIVATE = @HWLOC_LIBS_PRIVATE@ -HWLOC_LIBXML2_CFLAGS = @HWLOC_LIBXML2_CFLAGS@ -HWLOC_LIBXML2_LIBS = @HWLOC_LIBXML2_LIBS@ -HWLOC_LTDL_LIBS = @HWLOC_LTDL_LIBS@ -HWLOC_MS_LIB = @HWLOC_MS_LIB@ -HWLOC_MS_LIB_ARCH = @HWLOC_MS_LIB_ARCH@ -HWLOC_NUMA_CFLAGS = @HWLOC_NUMA_CFLAGS@ -HWLOC_NUMA_LIBS = @HWLOC_NUMA_LIBS@ -HWLOC_NVML_LIBS = @HWLOC_NVML_LIBS@ -HWLOC_OPENCL_CFLAGS = @HWLOC_OPENCL_CFLAGS@ -HWLOC_OPENCL_LDFLAGS = @HWLOC_OPENCL_LDFLAGS@ -HWLOC_OPENCL_LIBS = @HWLOC_OPENCL_LIBS@ -HWLOC_PCIACCESS_CFLAGS = @HWLOC_PCIACCESS_CFLAGS@ -HWLOC_PCIACCESS_LIBS = @HWLOC_PCIACCESS_LIBS@ -HWLOC_PLUGINS_DIR = @HWLOC_PLUGINS_DIR@ -HWLOC_PLUGINS_PATH = @HWLOC_PLUGINS_PATH@ -HWLOC_PS_LIBS = @HWLOC_PS_LIBS@ -HWLOC_RELEASE_DATE = @HWLOC_RELEASE_DATE@ -HWLOC_REQUIRES = @HWLOC_REQUIRES@ -HWLOC_RSMI_LIBS = @HWLOC_RSMI_LIBS@ -HWLOC_TERMCAP_LIBS = @HWLOC_TERMCAP_LIBS@ -HWLOC_VERSION = @HWLOC_VERSION@ -HWLOC_W3_GENERATOR = @HWLOC_W3_GENERATOR@ -HWLOC_X11_CPPFLAGS = @HWLOC_X11_CPPFLAGS@ -HWLOC_X11_LIBS = @HWLOC_X11_LIBS@ -HWLOC_XML_LOCALIZED = @HWLOC_XML_LOCALIZED@ -HWLOC_runstatedir = @HWLOC_runstatedir@ -HWLOC_top_builddir = @HWLOC_top_builddir@ -HWLOC_top_srcdir = @HWLOC_top_srcdir@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -LYNX = @LYNX@ -MAKEINDEX = @MAKEINDEX@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -MPI_CPPFLAGS = @MPI_CPPFLAGS@ -MPI_LDADD = @MPI_LDADD@ -NETLOC_CFLAGS = @NETLOC_CFLAGS@ -NETLOC_CPPFLAGS = @NETLOC_CPPFLAGS@ -NETLOC_EMBEDDED_CFLAGS = @NETLOC_EMBEDDED_CFLAGS@ -NETLOC_EMBEDDED_CPPFLAGS = @NETLOC_EMBEDDED_CPPFLAGS@ -NETLOC_EMBEDDED_LDADD = @NETLOC_EMBEDDED_LDADD@ -NETLOC_EMBEDDED_LIBS = @NETLOC_EMBEDDED_LIBS@ -NETLOC_LDFLAGS = @NETLOC_LDFLAGS@ -NETLOC_LIBS = @NETLOC_LIBS@ -NETLOC_LIBS_PRIVATE = @NETLOC_LIBS_PRIVATE@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -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@ -PDFLATEX = @PDFLATEX@ -PKG_CONFIG = @PKG_CONFIG@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -W3M = @W3M@ -XMKMF = @XMKMF@ -XMLLINT = @XMLLINT@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -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@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -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@ -libhwloc_so_version = @libhwloc_so_version@ -libnetloc_so_version = @libnetloc_so_version@ -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@ -xz = @xz@ -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 contrib/systemd/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign contrib/systemd/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): - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -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 clean-libtool 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-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: - -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 mostlyclean-libtool - -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 clean-libtool \ - cscopelist-am ctags-am distclean distclean-generic \ - distclean-libtool 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 \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags-am uninstall uninstall-am - -.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: diff --git a/contrib/hwloc/contrib/windows/Makefile.am b/contrib/hwloc/contrib/windows/Makefile.am deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/contrib/hwloc/contrib/windows/Makefile.in b/contrib/hwloc/contrib/windows/Makefile.in index 5bad11ae38..e69de29bb2 100644 --- a/contrib/hwloc/contrib/windows/Makefile.in +++ b/contrib/hwloc/contrib/windows/Makefile.in @@ -1,542 +0,0 @@ -# Makefile.in generated by automake 1.16.3 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 = contrib/windows -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/config/hwloc.m4 \ - $(top_srcdir)/config/hwloc_check_attributes.m4 \ - $(top_srcdir)/config/hwloc_check_vendor.m4 \ - $(top_srcdir)/config/hwloc_check_visibility.m4 \ - $(top_srcdir)/config/hwloc_components.m4 \ - $(top_srcdir)/config/hwloc_internal.m4 \ - $(top_srcdir)/config/hwloc_pkg.m4 \ - $(top_srcdir)/config/libtool.m4 \ - $(top_srcdir)/config/ltoptions.m4 \ - $(top_srcdir)/config/ltsugar.m4 \ - $(top_srcdir)/config/ltversion.m4 \ - $(top_srcdir)/config/lt~obsolete.m4 \ - $(top_srcdir)/config/netloc.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/include/private/autogen/config.h \ - $(top_builddir)/include/hwloc/autogen/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 -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -BASH = @BASH@ -BUNZIPP = @BUNZIPP@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CC_FOR_BUILD = @CC_FOR_BUILD@ -CFLAGS = @CFLAGS@ -CONFIGURE_DEPENDENCIES = @CONFIGURE_DEPENDENCIES@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DIFF = @DIFF@ -DLLTOOL = @DLLTOOL@ -DOXYGEN = @DOXYGEN@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EPSTOPDF = @EPSTOPDF@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FIG2DEV = @FIG2DEV@ -GREP = @GREP@ -GS = @GS@ -HWLOC_CAIRO_CFLAGS = @HWLOC_CAIRO_CFLAGS@ -HWLOC_CAIRO_LIBS = @HWLOC_CAIRO_LIBS@ -HWLOC_CFLAGS = @HWLOC_CFLAGS@ -HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ -HWLOC_CUDA_LIBS = @HWLOC_CUDA_LIBS@ -HWLOC_DIFF_U = @HWLOC_DIFF_U@ -HWLOC_DIFF_W = @HWLOC_DIFF_W@ -HWLOC_DL_LIBS = @HWLOC_DL_LIBS@ -HWLOC_EMBEDDED_CFLAGS = @HWLOC_EMBEDDED_CFLAGS@ -HWLOC_EMBEDDED_CPPFLAGS = @HWLOC_EMBEDDED_CPPFLAGS@ -HWLOC_EMBEDDED_LDADD = @HWLOC_EMBEDDED_LDADD@ -HWLOC_EMBEDDED_LDFLAGS = @HWLOC_EMBEDDED_LDFLAGS@ -HWLOC_EMBEDDED_LIBS = @HWLOC_EMBEDDED_LIBS@ -HWLOC_GL_LIBS = @HWLOC_GL_LIBS@ -HWLOC_HAVE_LIBXML2 = @HWLOC_HAVE_LIBXML2@ -HWLOC_HAVE_NVML = @HWLOC_HAVE_NVML@ -HWLOC_HAVE_OPENCL = @HWLOC_HAVE_OPENCL@ -HWLOC_HAVE_RSMI = @HWLOC_HAVE_RSMI@ -HWLOC_LDFLAGS = @HWLOC_LDFLAGS@ -HWLOC_LIBS = @HWLOC_LIBS@ -HWLOC_LIBS_PRIVATE = @HWLOC_LIBS_PRIVATE@ -HWLOC_LIBXML2_CFLAGS = @HWLOC_LIBXML2_CFLAGS@ -HWLOC_LIBXML2_LIBS = @HWLOC_LIBXML2_LIBS@ -HWLOC_LTDL_LIBS = @HWLOC_LTDL_LIBS@ -HWLOC_MS_LIB = @HWLOC_MS_LIB@ -HWLOC_MS_LIB_ARCH = @HWLOC_MS_LIB_ARCH@ -HWLOC_NUMA_CFLAGS = @HWLOC_NUMA_CFLAGS@ -HWLOC_NUMA_LIBS = @HWLOC_NUMA_LIBS@ -HWLOC_NVML_LIBS = @HWLOC_NVML_LIBS@ -HWLOC_OPENCL_CFLAGS = @HWLOC_OPENCL_CFLAGS@ -HWLOC_OPENCL_LDFLAGS = @HWLOC_OPENCL_LDFLAGS@ -HWLOC_OPENCL_LIBS = @HWLOC_OPENCL_LIBS@ -HWLOC_PCIACCESS_CFLAGS = @HWLOC_PCIACCESS_CFLAGS@ -HWLOC_PCIACCESS_LIBS = @HWLOC_PCIACCESS_LIBS@ -HWLOC_PLUGINS_DIR = @HWLOC_PLUGINS_DIR@ -HWLOC_PLUGINS_PATH = @HWLOC_PLUGINS_PATH@ -HWLOC_PS_LIBS = @HWLOC_PS_LIBS@ -HWLOC_RELEASE_DATE = @HWLOC_RELEASE_DATE@ -HWLOC_REQUIRES = @HWLOC_REQUIRES@ -HWLOC_RSMI_LIBS = @HWLOC_RSMI_LIBS@ -HWLOC_TERMCAP_LIBS = @HWLOC_TERMCAP_LIBS@ -HWLOC_VERSION = @HWLOC_VERSION@ -HWLOC_W3_GENERATOR = @HWLOC_W3_GENERATOR@ -HWLOC_X11_CPPFLAGS = @HWLOC_X11_CPPFLAGS@ -HWLOC_X11_LIBS = @HWLOC_X11_LIBS@ -HWLOC_XML_LOCALIZED = @HWLOC_XML_LOCALIZED@ -HWLOC_runstatedir = @HWLOC_runstatedir@ -HWLOC_top_builddir = @HWLOC_top_builddir@ -HWLOC_top_srcdir = @HWLOC_top_srcdir@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -LYNX = @LYNX@ -MAKEINDEX = @MAKEINDEX@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -MPI_CPPFLAGS = @MPI_CPPFLAGS@ -MPI_LDADD = @MPI_LDADD@ -NETLOC_CFLAGS = @NETLOC_CFLAGS@ -NETLOC_CPPFLAGS = @NETLOC_CPPFLAGS@ -NETLOC_EMBEDDED_CFLAGS = @NETLOC_EMBEDDED_CFLAGS@ -NETLOC_EMBEDDED_CPPFLAGS = @NETLOC_EMBEDDED_CPPFLAGS@ -NETLOC_EMBEDDED_LDADD = @NETLOC_EMBEDDED_LDADD@ -NETLOC_EMBEDDED_LIBS = @NETLOC_EMBEDDED_LIBS@ -NETLOC_LDFLAGS = @NETLOC_LDFLAGS@ -NETLOC_LIBS = @NETLOC_LIBS@ -NETLOC_LIBS_PRIVATE = @NETLOC_LIBS_PRIVATE@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -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@ -PDFLATEX = @PDFLATEX@ -PKG_CONFIG = @PKG_CONFIG@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -W3M = @W3M@ -XMKMF = @XMKMF@ -XMLLINT = @XMLLINT@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -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@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -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@ -libhwloc_so_version = @libhwloc_so_version@ -libnetloc_so_version = @libnetloc_so_version@ -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@ -xz = @xz@ -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 contrib/windows/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign contrib/windows/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): - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -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 clean-libtool 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-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: - -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 mostlyclean-libtool - -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 clean-libtool \ - cscopelist-am ctags-am distclean distclean-generic \ - distclean-libtool 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 \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags-am uninstall uninstall-am - -.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: diff --git a/contrib/hwloc/contrib/windows/test-windows-version.sh.am b/contrib/hwloc/contrib/windows/test-windows-version.sh.am deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/contrib/hwloc/contrib/windows/test-windows-version.sh.in b/contrib/hwloc/contrib/windows/test-windows-version.sh.in deleted file mode 100644 index d31eb81119..0000000000 --- a/contrib/hwloc/contrib/windows/test-windows-version.sh.in +++ /dev/null @@ -1,542 +0,0 @@ -# test-windows-version.sh.in generated by automake 1.16.3 from test-windows-version.sh.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 = contrib/windows -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/config/hwloc.m4 \ - $(top_srcdir)/config/hwloc_check_attributes.m4 \ - $(top_srcdir)/config/hwloc_check_vendor.m4 \ - $(top_srcdir)/config/hwloc_check_visibility.m4 \ - $(top_srcdir)/config/hwloc_components.m4 \ - $(top_srcdir)/config/hwloc_internal.m4 \ - $(top_srcdir)/config/hwloc_pkg.m4 \ - $(top_srcdir)/config/libtool.m4 \ - $(top_srcdir)/config/ltoptions.m4 \ - $(top_srcdir)/config/ltsugar.m4 \ - $(top_srcdir)/config/ltversion.m4 \ - $(top_srcdir)/config/lt~obsolete.m4 \ - $(top_srcdir)/config/netloc.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -DIST_COMMON = $(srcdir)/test-windows-version.sh.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/include/private/autogen/config.h \ - $(top_builddir)/include/hwloc/autogen/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)/test-windows-version.sh.in -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -BASH = @BASH@ -BUNZIPP = @BUNZIPP@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CC_FOR_BUILD = @CC_FOR_BUILD@ -CFLAGS = @CFLAGS@ -CONFIGURE_DEPENDENCIES = @CONFIGURE_DEPENDENCIES@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DIFF = @DIFF@ -DLLTOOL = @DLLTOOL@ -DOXYGEN = @DOXYGEN@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EPSTOPDF = @EPSTOPDF@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FIG2DEV = @FIG2DEV@ -GREP = @GREP@ -GS = @GS@ -HWLOC_CAIRO_CFLAGS = @HWLOC_CAIRO_CFLAGS@ -HWLOC_CAIRO_LIBS = @HWLOC_CAIRO_LIBS@ -HWLOC_CFLAGS = @HWLOC_CFLAGS@ -HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ -HWLOC_CUDA_LIBS = @HWLOC_CUDA_LIBS@ -HWLOC_DIFF_U = @HWLOC_DIFF_U@ -HWLOC_DIFF_W = @HWLOC_DIFF_W@ -HWLOC_DL_LIBS = @HWLOC_DL_LIBS@ -HWLOC_EMBEDDED_CFLAGS = @HWLOC_EMBEDDED_CFLAGS@ -HWLOC_EMBEDDED_CPPFLAGS = @HWLOC_EMBEDDED_CPPFLAGS@ -HWLOC_EMBEDDED_LDADD = @HWLOC_EMBEDDED_LDADD@ -HWLOC_EMBEDDED_LDFLAGS = @HWLOC_EMBEDDED_LDFLAGS@ -HWLOC_EMBEDDED_LIBS = @HWLOC_EMBEDDED_LIBS@ -HWLOC_GL_LIBS = @HWLOC_GL_LIBS@ -HWLOC_HAVE_LIBXML2 = @HWLOC_HAVE_LIBXML2@ -HWLOC_HAVE_NVML = @HWLOC_HAVE_NVML@ -HWLOC_HAVE_OPENCL = @HWLOC_HAVE_OPENCL@ -HWLOC_HAVE_RSMI = @HWLOC_HAVE_RSMI@ -HWLOC_LDFLAGS = @HWLOC_LDFLAGS@ -HWLOC_LIBS = @HWLOC_LIBS@ -HWLOC_LIBS_PRIVATE = @HWLOC_LIBS_PRIVATE@ -HWLOC_LIBXML2_CFLAGS = @HWLOC_LIBXML2_CFLAGS@ -HWLOC_LIBXML2_LIBS = @HWLOC_LIBXML2_LIBS@ -HWLOC_LTDL_LIBS = @HWLOC_LTDL_LIBS@ -HWLOC_MS_LIB = @HWLOC_MS_LIB@ -HWLOC_MS_LIB_ARCH = @HWLOC_MS_LIB_ARCH@ -HWLOC_NUMA_CFLAGS = @HWLOC_NUMA_CFLAGS@ -HWLOC_NUMA_LIBS = @HWLOC_NUMA_LIBS@ -HWLOC_NVML_LIBS = @HWLOC_NVML_LIBS@ -HWLOC_OPENCL_CFLAGS = @HWLOC_OPENCL_CFLAGS@ -HWLOC_OPENCL_LDFLAGS = @HWLOC_OPENCL_LDFLAGS@ -HWLOC_OPENCL_LIBS = @HWLOC_OPENCL_LIBS@ -HWLOC_PCIACCESS_CFLAGS = @HWLOC_PCIACCESS_CFLAGS@ -HWLOC_PCIACCESS_LIBS = @HWLOC_PCIACCESS_LIBS@ -HWLOC_PLUGINS_DIR = @HWLOC_PLUGINS_DIR@ -HWLOC_PLUGINS_PATH = @HWLOC_PLUGINS_PATH@ -HWLOC_PS_LIBS = @HWLOC_PS_LIBS@ -HWLOC_RELEASE_DATE = @HWLOC_RELEASE_DATE@ -HWLOC_REQUIRES = @HWLOC_REQUIRES@ -HWLOC_RSMI_LIBS = @HWLOC_RSMI_LIBS@ -HWLOC_TERMCAP_LIBS = @HWLOC_TERMCAP_LIBS@ -HWLOC_VERSION = @HWLOC_VERSION@ -HWLOC_W3_GENERATOR = @HWLOC_W3_GENERATOR@ -HWLOC_X11_CPPFLAGS = @HWLOC_X11_CPPFLAGS@ -HWLOC_X11_LIBS = @HWLOC_X11_LIBS@ -HWLOC_XML_LOCALIZED = @HWLOC_XML_LOCALIZED@ -HWLOC_runstatedir = @HWLOC_runstatedir@ -HWLOC_top_builddir = @HWLOC_top_builddir@ -HWLOC_top_srcdir = @HWLOC_top_srcdir@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -LYNX = @LYNX@ -MAKEINDEX = @MAKEINDEX@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -MPI_CPPFLAGS = @MPI_CPPFLAGS@ -MPI_LDADD = @MPI_LDADD@ -NETLOC_CFLAGS = @NETLOC_CFLAGS@ -NETLOC_CPPFLAGS = @NETLOC_CPPFLAGS@ -NETLOC_EMBEDDED_CFLAGS = @NETLOC_EMBEDDED_CFLAGS@ -NETLOC_EMBEDDED_CPPFLAGS = @NETLOC_EMBEDDED_CPPFLAGS@ -NETLOC_EMBEDDED_LDADD = @NETLOC_EMBEDDED_LDADD@ -NETLOC_EMBEDDED_LIBS = @NETLOC_EMBEDDED_LIBS@ -NETLOC_LDFLAGS = @NETLOC_LDFLAGS@ -NETLOC_LIBS = @NETLOC_LIBS@ -NETLOC_LIBS_PRIVATE = @NETLOC_LIBS_PRIVATE@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -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@ -PDFLATEX = @PDFLATEX@ -PKG_CONFIG = @PKG_CONFIG@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -W3M = @W3M@ -XMKMF = @XMKMF@ -XMLLINT = @XMLLINT@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -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@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -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@ -libhwloc_so_version = @libhwloc_so_version@ -libnetloc_so_version = @libnetloc_so_version@ -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@ -xz = @xz@ -all: all-am - -.SUFFIXES: -$(srcdir)/test-windows-version.sh.in: $(srcdir)/test-windows-version.sh.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 contrib/windows/test-windows-version.sh'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign contrib/windows/test-windows-version.sh -test-windows-version.sh: $(srcdir)/test-windows-version.sh.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): - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -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: test-windows-version.sh -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 clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -f test-windows-version.sh -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-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: - -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 test-windows-version.sh -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -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 clean-libtool \ - cscopelist-am ctags-am distclean distclean-generic \ - distclean-libtool 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 \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags-am uninstall uninstall-am - -.PRECIOUS: test-windows-version.sh - - -# 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: diff --git a/contrib/hwloc/doc/Makefile.am b/contrib/hwloc/doc/Makefile.am deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/contrib/hwloc/doc/Makefile.in b/contrib/hwloc/doc/Makefile.in index 3ac43be528..e69de29bb2 100644 --- a/contrib/hwloc/doc/Makefile.in +++ b/contrib/hwloc/doc/Makefile.in @@ -1,542 +0,0 @@ -# Makefile.in generated by automake 1.16.3 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 = doc -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/config/hwloc.m4 \ - $(top_srcdir)/config/hwloc_check_attributes.m4 \ - $(top_srcdir)/config/hwloc_check_vendor.m4 \ - $(top_srcdir)/config/hwloc_check_visibility.m4 \ - $(top_srcdir)/config/hwloc_components.m4 \ - $(top_srcdir)/config/hwloc_internal.m4 \ - $(top_srcdir)/config/hwloc_pkg.m4 \ - $(top_srcdir)/config/libtool.m4 \ - $(top_srcdir)/config/ltoptions.m4 \ - $(top_srcdir)/config/ltsugar.m4 \ - $(top_srcdir)/config/ltversion.m4 \ - $(top_srcdir)/config/lt~obsolete.m4 \ - $(top_srcdir)/config/netloc.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/include/private/autogen/config.h \ - $(top_builddir)/include/hwloc/autogen/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 -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -BASH = @BASH@ -BUNZIPP = @BUNZIPP@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CC_FOR_BUILD = @CC_FOR_BUILD@ -CFLAGS = @CFLAGS@ -CONFIGURE_DEPENDENCIES = @CONFIGURE_DEPENDENCIES@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DIFF = @DIFF@ -DLLTOOL = @DLLTOOL@ -DOXYGEN = @DOXYGEN@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EPSTOPDF = @EPSTOPDF@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FIG2DEV = @FIG2DEV@ -GREP = @GREP@ -GS = @GS@ -HWLOC_CAIRO_CFLAGS = @HWLOC_CAIRO_CFLAGS@ -HWLOC_CAIRO_LIBS = @HWLOC_CAIRO_LIBS@ -HWLOC_CFLAGS = @HWLOC_CFLAGS@ -HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ -HWLOC_CUDA_LIBS = @HWLOC_CUDA_LIBS@ -HWLOC_DIFF_U = @HWLOC_DIFF_U@ -HWLOC_DIFF_W = @HWLOC_DIFF_W@ -HWLOC_DL_LIBS = @HWLOC_DL_LIBS@ -HWLOC_EMBEDDED_CFLAGS = @HWLOC_EMBEDDED_CFLAGS@ -HWLOC_EMBEDDED_CPPFLAGS = @HWLOC_EMBEDDED_CPPFLAGS@ -HWLOC_EMBEDDED_LDADD = @HWLOC_EMBEDDED_LDADD@ -HWLOC_EMBEDDED_LDFLAGS = @HWLOC_EMBEDDED_LDFLAGS@ -HWLOC_EMBEDDED_LIBS = @HWLOC_EMBEDDED_LIBS@ -HWLOC_GL_LIBS = @HWLOC_GL_LIBS@ -HWLOC_HAVE_LIBXML2 = @HWLOC_HAVE_LIBXML2@ -HWLOC_HAVE_NVML = @HWLOC_HAVE_NVML@ -HWLOC_HAVE_OPENCL = @HWLOC_HAVE_OPENCL@ -HWLOC_HAVE_RSMI = @HWLOC_HAVE_RSMI@ -HWLOC_LDFLAGS = @HWLOC_LDFLAGS@ -HWLOC_LIBS = @HWLOC_LIBS@ -HWLOC_LIBS_PRIVATE = @HWLOC_LIBS_PRIVATE@ -HWLOC_LIBXML2_CFLAGS = @HWLOC_LIBXML2_CFLAGS@ -HWLOC_LIBXML2_LIBS = @HWLOC_LIBXML2_LIBS@ -HWLOC_LTDL_LIBS = @HWLOC_LTDL_LIBS@ -HWLOC_MS_LIB = @HWLOC_MS_LIB@ -HWLOC_MS_LIB_ARCH = @HWLOC_MS_LIB_ARCH@ -HWLOC_NUMA_CFLAGS = @HWLOC_NUMA_CFLAGS@ -HWLOC_NUMA_LIBS = @HWLOC_NUMA_LIBS@ -HWLOC_NVML_LIBS = @HWLOC_NVML_LIBS@ -HWLOC_OPENCL_CFLAGS = @HWLOC_OPENCL_CFLAGS@ -HWLOC_OPENCL_LDFLAGS = @HWLOC_OPENCL_LDFLAGS@ -HWLOC_OPENCL_LIBS = @HWLOC_OPENCL_LIBS@ -HWLOC_PCIACCESS_CFLAGS = @HWLOC_PCIACCESS_CFLAGS@ -HWLOC_PCIACCESS_LIBS = @HWLOC_PCIACCESS_LIBS@ -HWLOC_PLUGINS_DIR = @HWLOC_PLUGINS_DIR@ -HWLOC_PLUGINS_PATH = @HWLOC_PLUGINS_PATH@ -HWLOC_PS_LIBS = @HWLOC_PS_LIBS@ -HWLOC_RELEASE_DATE = @HWLOC_RELEASE_DATE@ -HWLOC_REQUIRES = @HWLOC_REQUIRES@ -HWLOC_RSMI_LIBS = @HWLOC_RSMI_LIBS@ -HWLOC_TERMCAP_LIBS = @HWLOC_TERMCAP_LIBS@ -HWLOC_VERSION = @HWLOC_VERSION@ -HWLOC_W3_GENERATOR = @HWLOC_W3_GENERATOR@ -HWLOC_X11_CPPFLAGS = @HWLOC_X11_CPPFLAGS@ -HWLOC_X11_LIBS = @HWLOC_X11_LIBS@ -HWLOC_XML_LOCALIZED = @HWLOC_XML_LOCALIZED@ -HWLOC_runstatedir = @HWLOC_runstatedir@ -HWLOC_top_builddir = @HWLOC_top_builddir@ -HWLOC_top_srcdir = @HWLOC_top_srcdir@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -LYNX = @LYNX@ -MAKEINDEX = @MAKEINDEX@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -MPI_CPPFLAGS = @MPI_CPPFLAGS@ -MPI_LDADD = @MPI_LDADD@ -NETLOC_CFLAGS = @NETLOC_CFLAGS@ -NETLOC_CPPFLAGS = @NETLOC_CPPFLAGS@ -NETLOC_EMBEDDED_CFLAGS = @NETLOC_EMBEDDED_CFLAGS@ -NETLOC_EMBEDDED_CPPFLAGS = @NETLOC_EMBEDDED_CPPFLAGS@ -NETLOC_EMBEDDED_LDADD = @NETLOC_EMBEDDED_LDADD@ -NETLOC_EMBEDDED_LIBS = @NETLOC_EMBEDDED_LIBS@ -NETLOC_LDFLAGS = @NETLOC_LDFLAGS@ -NETLOC_LIBS = @NETLOC_LIBS@ -NETLOC_LIBS_PRIVATE = @NETLOC_LIBS_PRIVATE@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -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@ -PDFLATEX = @PDFLATEX@ -PKG_CONFIG = @PKG_CONFIG@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -W3M = @W3M@ -XMKMF = @XMKMF@ -XMLLINT = @XMLLINT@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -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@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -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@ -libhwloc_so_version = @libhwloc_so_version@ -libnetloc_so_version = @libnetloc_so_version@ -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@ -xz = @xz@ -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 doc/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign doc/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): - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -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 clean-libtool 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-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: - -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 mostlyclean-libtool - -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 clean-libtool \ - cscopelist-am ctags-am distclean distclean-generic \ - distclean-libtool 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 \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags-am uninstall uninstall-am - -.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: diff --git a/contrib/hwloc/doc/doxygen-config.cfg.am b/contrib/hwloc/doc/doxygen-config.cfg.am deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/contrib/hwloc/doc/doxygen-config.cfg.in b/contrib/hwloc/doc/doxygen-config.cfg.in index 3beb9e3f3e..e69de29bb2 100644 --- a/contrib/hwloc/doc/doxygen-config.cfg.in +++ b/contrib/hwloc/doc/doxygen-config.cfg.in @@ -1,542 +0,0 @@ -# doxygen-config.cfg.in generated by automake 1.16.3 from doxygen-config.cfg.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 = doc -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/config/hwloc.m4 \ - $(top_srcdir)/config/hwloc_check_attributes.m4 \ - $(top_srcdir)/config/hwloc_check_vendor.m4 \ - $(top_srcdir)/config/hwloc_check_visibility.m4 \ - $(top_srcdir)/config/hwloc_components.m4 \ - $(top_srcdir)/config/hwloc_internal.m4 \ - $(top_srcdir)/config/hwloc_pkg.m4 \ - $(top_srcdir)/config/libtool.m4 \ - $(top_srcdir)/config/ltoptions.m4 \ - $(top_srcdir)/config/ltsugar.m4 \ - $(top_srcdir)/config/ltversion.m4 \ - $(top_srcdir)/config/lt~obsolete.m4 \ - $(top_srcdir)/config/netloc.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -DIST_COMMON = $(srcdir)/doxygen-config.cfg.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/include/private/autogen/config.h \ - $(top_builddir)/include/hwloc/autogen/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)/doxygen-config.cfg.in -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -BASH = @BASH@ -BUNZIPP = @BUNZIPP@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CC_FOR_BUILD = @CC_FOR_BUILD@ -CFLAGS = @CFLAGS@ -CONFIGURE_DEPENDENCIES = @CONFIGURE_DEPENDENCIES@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DIFF = @DIFF@ -DLLTOOL = @DLLTOOL@ -DOXYGEN = @DOXYGEN@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EPSTOPDF = @EPSTOPDF@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FIG2DEV = @FIG2DEV@ -GREP = @GREP@ -GS = @GS@ -HWLOC_CAIRO_CFLAGS = @HWLOC_CAIRO_CFLAGS@ -HWLOC_CAIRO_LIBS = @HWLOC_CAIRO_LIBS@ -HWLOC_CFLAGS = @HWLOC_CFLAGS@ -HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ -HWLOC_CUDA_LIBS = @HWLOC_CUDA_LIBS@ -HWLOC_DIFF_U = @HWLOC_DIFF_U@ -HWLOC_DIFF_W = @HWLOC_DIFF_W@ -HWLOC_DL_LIBS = @HWLOC_DL_LIBS@ -HWLOC_EMBEDDED_CFLAGS = @HWLOC_EMBEDDED_CFLAGS@ -HWLOC_EMBEDDED_CPPFLAGS = @HWLOC_EMBEDDED_CPPFLAGS@ -HWLOC_EMBEDDED_LDADD = @HWLOC_EMBEDDED_LDADD@ -HWLOC_EMBEDDED_LDFLAGS = @HWLOC_EMBEDDED_LDFLAGS@ -HWLOC_EMBEDDED_LIBS = @HWLOC_EMBEDDED_LIBS@ -HWLOC_GL_LIBS = @HWLOC_GL_LIBS@ -HWLOC_HAVE_LIBXML2 = @HWLOC_HAVE_LIBXML2@ -HWLOC_HAVE_NVML = @HWLOC_HAVE_NVML@ -HWLOC_HAVE_OPENCL = @HWLOC_HAVE_OPENCL@ -HWLOC_HAVE_RSMI = @HWLOC_HAVE_RSMI@ -HWLOC_LDFLAGS = @HWLOC_LDFLAGS@ -HWLOC_LIBS = @HWLOC_LIBS@ -HWLOC_LIBS_PRIVATE = @HWLOC_LIBS_PRIVATE@ -HWLOC_LIBXML2_CFLAGS = @HWLOC_LIBXML2_CFLAGS@ -HWLOC_LIBXML2_LIBS = @HWLOC_LIBXML2_LIBS@ -HWLOC_LTDL_LIBS = @HWLOC_LTDL_LIBS@ -HWLOC_MS_LIB = @HWLOC_MS_LIB@ -HWLOC_MS_LIB_ARCH = @HWLOC_MS_LIB_ARCH@ -HWLOC_NUMA_CFLAGS = @HWLOC_NUMA_CFLAGS@ -HWLOC_NUMA_LIBS = @HWLOC_NUMA_LIBS@ -HWLOC_NVML_LIBS = @HWLOC_NVML_LIBS@ -HWLOC_OPENCL_CFLAGS = @HWLOC_OPENCL_CFLAGS@ -HWLOC_OPENCL_LDFLAGS = @HWLOC_OPENCL_LDFLAGS@ -HWLOC_OPENCL_LIBS = @HWLOC_OPENCL_LIBS@ -HWLOC_PCIACCESS_CFLAGS = @HWLOC_PCIACCESS_CFLAGS@ -HWLOC_PCIACCESS_LIBS = @HWLOC_PCIACCESS_LIBS@ -HWLOC_PLUGINS_DIR = @HWLOC_PLUGINS_DIR@ -HWLOC_PLUGINS_PATH = @HWLOC_PLUGINS_PATH@ -HWLOC_PS_LIBS = @HWLOC_PS_LIBS@ -HWLOC_RELEASE_DATE = @HWLOC_RELEASE_DATE@ -HWLOC_REQUIRES = @HWLOC_REQUIRES@ -HWLOC_RSMI_LIBS = @HWLOC_RSMI_LIBS@ -HWLOC_TERMCAP_LIBS = @HWLOC_TERMCAP_LIBS@ -HWLOC_VERSION = @HWLOC_VERSION@ -HWLOC_W3_GENERATOR = @HWLOC_W3_GENERATOR@ -HWLOC_X11_CPPFLAGS = @HWLOC_X11_CPPFLAGS@ -HWLOC_X11_LIBS = @HWLOC_X11_LIBS@ -HWLOC_XML_LOCALIZED = @HWLOC_XML_LOCALIZED@ -HWLOC_runstatedir = @HWLOC_runstatedir@ -HWLOC_top_builddir = @HWLOC_top_builddir@ -HWLOC_top_srcdir = @HWLOC_top_srcdir@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -LYNX = @LYNX@ -MAKEINDEX = @MAKEINDEX@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -MPI_CPPFLAGS = @MPI_CPPFLAGS@ -MPI_LDADD = @MPI_LDADD@ -NETLOC_CFLAGS = @NETLOC_CFLAGS@ -NETLOC_CPPFLAGS = @NETLOC_CPPFLAGS@ -NETLOC_EMBEDDED_CFLAGS = @NETLOC_EMBEDDED_CFLAGS@ -NETLOC_EMBEDDED_CPPFLAGS = @NETLOC_EMBEDDED_CPPFLAGS@ -NETLOC_EMBEDDED_LDADD = @NETLOC_EMBEDDED_LDADD@ -NETLOC_EMBEDDED_LIBS = @NETLOC_EMBEDDED_LIBS@ -NETLOC_LDFLAGS = @NETLOC_LDFLAGS@ -NETLOC_LIBS = @NETLOC_LIBS@ -NETLOC_LIBS_PRIVATE = @NETLOC_LIBS_PRIVATE@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -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@ -PDFLATEX = @PDFLATEX@ -PKG_CONFIG = @PKG_CONFIG@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -W3M = @W3M@ -XMKMF = @XMKMF@ -XMLLINT = @XMLLINT@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -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@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -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@ -libhwloc_so_version = @libhwloc_so_version@ -libnetloc_so_version = @libnetloc_so_version@ -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@ -xz = @xz@ -all: all-am - -.SUFFIXES: -$(srcdir)/doxygen-config.cfg.in: $(srcdir)/doxygen-config.cfg.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 doc/doxygen-config.cfg'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign doc/doxygen-config.cfg -doxygen-config.cfg: $(srcdir)/doxygen-config.cfg.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): - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -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: doxygen-config.cfg -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 clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -f doxygen-config.cfg -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-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: - -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 doxygen-config.cfg -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -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 clean-libtool \ - cscopelist-am ctags-am distclean distclean-generic \ - distclean-libtool 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 \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags-am uninstall uninstall-am - -.PRECIOUS: doxygen-config.cfg - - -# 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: diff --git a/contrib/hwloc/doc/examples/Makefile.am b/contrib/hwloc/doc/examples/Makefile.am deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/contrib/hwloc/doc/examples/Makefile.in b/contrib/hwloc/doc/examples/Makefile.in index 7f8ac118d4..e69de29bb2 100644 --- a/contrib/hwloc/doc/examples/Makefile.in +++ b/contrib/hwloc/doc/examples/Makefile.in @@ -1,542 +0,0 @@ -# Makefile.in generated by automake 1.16.3 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 = doc/examples -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/config/hwloc.m4 \ - $(top_srcdir)/config/hwloc_check_attributes.m4 \ - $(top_srcdir)/config/hwloc_check_vendor.m4 \ - $(top_srcdir)/config/hwloc_check_visibility.m4 \ - $(top_srcdir)/config/hwloc_components.m4 \ - $(top_srcdir)/config/hwloc_internal.m4 \ - $(top_srcdir)/config/hwloc_pkg.m4 \ - $(top_srcdir)/config/libtool.m4 \ - $(top_srcdir)/config/ltoptions.m4 \ - $(top_srcdir)/config/ltsugar.m4 \ - $(top_srcdir)/config/ltversion.m4 \ - $(top_srcdir)/config/lt~obsolete.m4 \ - $(top_srcdir)/config/netloc.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/include/private/autogen/config.h \ - $(top_builddir)/include/hwloc/autogen/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 -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -BASH = @BASH@ -BUNZIPP = @BUNZIPP@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CC_FOR_BUILD = @CC_FOR_BUILD@ -CFLAGS = @CFLAGS@ -CONFIGURE_DEPENDENCIES = @CONFIGURE_DEPENDENCIES@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DIFF = @DIFF@ -DLLTOOL = @DLLTOOL@ -DOXYGEN = @DOXYGEN@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EPSTOPDF = @EPSTOPDF@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FIG2DEV = @FIG2DEV@ -GREP = @GREP@ -GS = @GS@ -HWLOC_CAIRO_CFLAGS = @HWLOC_CAIRO_CFLAGS@ -HWLOC_CAIRO_LIBS = @HWLOC_CAIRO_LIBS@ -HWLOC_CFLAGS = @HWLOC_CFLAGS@ -HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ -HWLOC_CUDA_LIBS = @HWLOC_CUDA_LIBS@ -HWLOC_DIFF_U = @HWLOC_DIFF_U@ -HWLOC_DIFF_W = @HWLOC_DIFF_W@ -HWLOC_DL_LIBS = @HWLOC_DL_LIBS@ -HWLOC_EMBEDDED_CFLAGS = @HWLOC_EMBEDDED_CFLAGS@ -HWLOC_EMBEDDED_CPPFLAGS = @HWLOC_EMBEDDED_CPPFLAGS@ -HWLOC_EMBEDDED_LDADD = @HWLOC_EMBEDDED_LDADD@ -HWLOC_EMBEDDED_LDFLAGS = @HWLOC_EMBEDDED_LDFLAGS@ -HWLOC_EMBEDDED_LIBS = @HWLOC_EMBEDDED_LIBS@ -HWLOC_GL_LIBS = @HWLOC_GL_LIBS@ -HWLOC_HAVE_LIBXML2 = @HWLOC_HAVE_LIBXML2@ -HWLOC_HAVE_NVML = @HWLOC_HAVE_NVML@ -HWLOC_HAVE_OPENCL = @HWLOC_HAVE_OPENCL@ -HWLOC_HAVE_RSMI = @HWLOC_HAVE_RSMI@ -HWLOC_LDFLAGS = @HWLOC_LDFLAGS@ -HWLOC_LIBS = @HWLOC_LIBS@ -HWLOC_LIBS_PRIVATE = @HWLOC_LIBS_PRIVATE@ -HWLOC_LIBXML2_CFLAGS = @HWLOC_LIBXML2_CFLAGS@ -HWLOC_LIBXML2_LIBS = @HWLOC_LIBXML2_LIBS@ -HWLOC_LTDL_LIBS = @HWLOC_LTDL_LIBS@ -HWLOC_MS_LIB = @HWLOC_MS_LIB@ -HWLOC_MS_LIB_ARCH = @HWLOC_MS_LIB_ARCH@ -HWLOC_NUMA_CFLAGS = @HWLOC_NUMA_CFLAGS@ -HWLOC_NUMA_LIBS = @HWLOC_NUMA_LIBS@ -HWLOC_NVML_LIBS = @HWLOC_NVML_LIBS@ -HWLOC_OPENCL_CFLAGS = @HWLOC_OPENCL_CFLAGS@ -HWLOC_OPENCL_LDFLAGS = @HWLOC_OPENCL_LDFLAGS@ -HWLOC_OPENCL_LIBS = @HWLOC_OPENCL_LIBS@ -HWLOC_PCIACCESS_CFLAGS = @HWLOC_PCIACCESS_CFLAGS@ -HWLOC_PCIACCESS_LIBS = @HWLOC_PCIACCESS_LIBS@ -HWLOC_PLUGINS_DIR = @HWLOC_PLUGINS_DIR@ -HWLOC_PLUGINS_PATH = @HWLOC_PLUGINS_PATH@ -HWLOC_PS_LIBS = @HWLOC_PS_LIBS@ -HWLOC_RELEASE_DATE = @HWLOC_RELEASE_DATE@ -HWLOC_REQUIRES = @HWLOC_REQUIRES@ -HWLOC_RSMI_LIBS = @HWLOC_RSMI_LIBS@ -HWLOC_TERMCAP_LIBS = @HWLOC_TERMCAP_LIBS@ -HWLOC_VERSION = @HWLOC_VERSION@ -HWLOC_W3_GENERATOR = @HWLOC_W3_GENERATOR@ -HWLOC_X11_CPPFLAGS = @HWLOC_X11_CPPFLAGS@ -HWLOC_X11_LIBS = @HWLOC_X11_LIBS@ -HWLOC_XML_LOCALIZED = @HWLOC_XML_LOCALIZED@ -HWLOC_runstatedir = @HWLOC_runstatedir@ -HWLOC_top_builddir = @HWLOC_top_builddir@ -HWLOC_top_srcdir = @HWLOC_top_srcdir@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -LYNX = @LYNX@ -MAKEINDEX = @MAKEINDEX@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -MPI_CPPFLAGS = @MPI_CPPFLAGS@ -MPI_LDADD = @MPI_LDADD@ -NETLOC_CFLAGS = @NETLOC_CFLAGS@ -NETLOC_CPPFLAGS = @NETLOC_CPPFLAGS@ -NETLOC_EMBEDDED_CFLAGS = @NETLOC_EMBEDDED_CFLAGS@ -NETLOC_EMBEDDED_CPPFLAGS = @NETLOC_EMBEDDED_CPPFLAGS@ -NETLOC_EMBEDDED_LDADD = @NETLOC_EMBEDDED_LDADD@ -NETLOC_EMBEDDED_LIBS = @NETLOC_EMBEDDED_LIBS@ -NETLOC_LDFLAGS = @NETLOC_LDFLAGS@ -NETLOC_LIBS = @NETLOC_LIBS@ -NETLOC_LIBS_PRIVATE = @NETLOC_LIBS_PRIVATE@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -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@ -PDFLATEX = @PDFLATEX@ -PKG_CONFIG = @PKG_CONFIG@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -W3M = @W3M@ -XMKMF = @XMKMF@ -XMLLINT = @XMLLINT@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -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@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -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@ -libhwloc_so_version = @libhwloc_so_version@ -libnetloc_so_version = @libnetloc_so_version@ -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@ -xz = @xz@ -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 doc/examples/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign doc/examples/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): - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -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 clean-libtool 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-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: - -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 mostlyclean-libtool - -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 clean-libtool \ - cscopelist-am ctags-am distclean distclean-generic \ - distclean-libtool 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 \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags-am uninstall uninstall-am - -.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: diff --git a/contrib/hwloc/hwloc/Makefile.am b/contrib/hwloc/hwloc/Makefile.am index 0f8d2b9e76..4b3800a187 100644 --- a/contrib/hwloc/hwloc/Makefile.am +++ b/contrib/hwloc/hwloc/Makefile.am @@ -1,4 +1,4 @@ -# Copyright © 2009-2020 Inria. All rights reserved. +# Copyright © 2009-2021 Inria. All rights reserved. # Copyright © 2009-2012 Université Bordeaux # Copyright © 2009-2014 Cisco Systems, Inc. All rights reserved. # Copyright © 2011-2012 Oracle and/or its affiliates. All rights reserved. @@ -8,7 +8,7 @@ AM_CFLAGS = $(HWLOC_CFLAGS) AM_CPPFLAGS = $(HWLOC_CPPFLAGS) -DHWLOC_INSIDE_LIBHWLOC AM_LDFLAGS = $(HWLOC_LDFLAGS) -EXTRA_DIST = dolib.c +EXTRA_DIST = # If we're in standalone mode, build the installable library. # Otherwise, build the embedded library. @@ -45,7 +45,8 @@ sources = \ topology-synthetic.c \ topology-xml.c \ topology-xml-nolibxml.c -ldflags = +ldflags = -no-undefined + # Conditionally add to the sources and ldflags @@ -55,8 +56,8 @@ sources += topology-xml-libxml.c else plugins_LTLIBRARIES += hwloc_xml_libxml.la hwloc_xml_libxml_la_SOURCES = topology-xml-libxml.c -hwloc_xml_libxml_la_CFLAGS = $(AM_CFLAGS) $(HWLOC_LIBXML2_CFLAGS) -DHWLOC_INSIDE_PLUGIN -hwloc_xml_libxml_la_LDFLAGS = $(plugins_ldflags) $(HWLOC_LIBXML2_LIBS) +hwloc_xml_libxml_la_CFLAGS = $(AM_CFLAGS) $(HWLOC_LIBXML2_CPPFLAGS) $(HWLOC_LIBXML2_CFLAGS) -DHWLOC_INSIDE_PLUGIN +hwloc_xml_libxml_la_LDFLAGS = $(plugins_ldflags) $(HWLOC_LIBXML2_LIBS) $(HWLOC_LIBXML2_LDFLAGS) endif endif HWLOC_HAVE_LIBXML2 @@ -66,8 +67,8 @@ sources += topology-pci.c else plugins_LTLIBRARIES += hwloc_pci.la hwloc_pci_la_SOURCES = topology-pci.c -hwloc_pci_la_CFLAGS = $(AM_CFLAGS) $(HWLOC_PCIACCESS_CFLAGS) -DHWLOC_INSIDE_PLUGIN -hwloc_pci_la_LDFLAGS = $(plugins_ldflags) $(HWLOC_PCIACCESS_LIBS) +hwloc_pci_la_CFLAGS = $(AM_CFLAGS) $(HWLOC_PCIACCESS_CPPFLAGS) $(HWLOC_PCIACCESS_CFLAGS) -DHWLOC_INSIDE_PLUGIN +hwloc_pci_la_LDFLAGS = $(plugins_ldflags) $(HWLOC_PCIACCESS_LIBS) $(HWLOC_PCIACCESS_LDFLAGS) endif endif HWLOC_HAVE_PCIACCESS @@ -77,7 +78,7 @@ sources += topology-opencl.c else plugins_LTLIBRARIES += hwloc_opencl.la hwloc_opencl_la_SOURCES = topology-opencl.c -hwloc_opencl_la_CFLAGS = $(AM_CFLAGS) $(HWLOC_OPENCL_CFLAGS) -DHWLOC_INSIDE_PLUGIN +hwloc_opencl_la_CFLAGS = $(AM_CFLAGS) $(HWLOC_OPENCL_CPPFLAGS) $(HWLOC_OPENCL_CFLAGS) -DHWLOC_INSIDE_PLUGIN hwloc_opencl_la_LDFLAGS = $(plugins_ldflags) $(HWLOC_OPENCL_LIBS) $(HWLOC_OPENCL_LDFLAGS) endif endif HWLOC_HAVE_OPENCL @@ -88,8 +89,8 @@ sources += topology-cuda.c else plugins_LTLIBRARIES += hwloc_cuda.la hwloc_cuda_la_SOURCES = topology-cuda.c -hwloc_cuda_la_CFLAGS = $(AM_CFLAGS) $(HWLOC_CUDA_CFLAGS) -DHWLOC_INSIDE_PLUGIN -hwloc_cuda_la_LDFLAGS = $(plugins_ldflags) $(HWLOC_CUDA_LIBS) +hwloc_cuda_la_CFLAGS = $(AM_CFLAGS) $(HWLOC_CUDART_CPPFLAGS) $(HWLOC_CUDART_CFLAGS) -DHWLOC_INSIDE_PLUGIN +hwloc_cuda_la_LDFLAGS = $(plugins_ldflags) $(HWLOC_CUDART_LIBS) $(HWLOC_CUDART_LDFLAGS) endif endif HWLOC_HAVE_CUDART @@ -99,8 +100,8 @@ sources += topology-nvml.c else plugins_LTLIBRARIES += hwloc_nvml.la hwloc_nvml_la_SOURCES = topology-nvml.c -hwloc_nvml_la_CFLAGS = $(AM_CFLAGS) $(HWLOC_NVML_CFLAGS) -DHWLOC_INSIDE_PLUGIN -hwloc_nvml_la_LDFLAGS = $(plugins_ldflags) $(HWLOC_NVML_LIBS) +hwloc_nvml_la_CFLAGS = $(AM_CFLAGS) $(HWLOC_NVML_CPPFLAGS) $(HWLOC_NVML_CFLAGS) -DHWLOC_INSIDE_PLUGIN +hwloc_nvml_la_LDFLAGS = $(plugins_ldflags) $(HWLOC_NVML_LIBS) $(HWLOC_NVML_LDFLAGS) endif endif HWLOC_HAVE_NVML @@ -110,19 +111,30 @@ sources += topology-rsmi.c else plugins_LTLIBRARIES += hwloc_rsmi.la hwloc_rsmi_la_SOURCES = topology-rsmi.c -hwloc_rsmi_la_CFLAGS = $(AM_CFLAGS) $(HWLOC_RSMI_CFLAGS) -DHWLOC_INSIDE_PLUGIN -hwloc_rsmi_la_LDFLAGS = $(plugins_ldflags) $(HWLOC_RSMI_LIBS) +hwloc_rsmi_la_CFLAGS = $(AM_CFLAGS) $(HWLOC_RSMI_CPPFLAGS) $(HWLOC_RSMI_CFLAGS) -DHWLOC_INSIDE_PLUGIN +hwloc_rsmi_la_LDFLAGS = $(plugins_ldflags) $(HWLOC_RSMI_LIBS) $(HWLOC_RSMI_LDFLAGS) endif endif HWLOC_HAVE_RSMI +if HWLOC_HAVE_LEVELZERO +if HWLOC_LEVELZERO_BUILD_STATIC +sources += topology-levelzero.c +else +plugins_LTLIBRARIES += hwloc_levelzero.la +hwloc_levelzero_la_SOURCES = topology-levelzero.c +hwloc_levelzero_la_CFLAGS = $(AM_CFLAGS) $(HWLOC_LEVELZERO_CFLAGS) -DHWLOC_INSIDE_PLUGIN +hwloc_levelzero_la_LDFLAGS = $(plugins_ldflags) $(HWLOC_LEVELZERO_LIBS) +endif +endif HWLOC_HAVE_LEVELZERO + if HWLOC_HAVE_GL if HWLOC_GL_BUILD_STATIC sources += topology-gl.c else plugins_LTLIBRARIES += hwloc_gl.la hwloc_gl_la_SOURCES = topology-gl.c -hwloc_gl_la_CFLAGS = $(AM_CFLAGS) $(HWLOC_GL_CFLAGS) -DHWLOC_INSIDE_PLUGIN -hwloc_gl_la_LDFLAGS = $(plugins_ldflags) $(HWLOC_GL_LIBS) +hwloc_gl_la_CFLAGS = $(AM_CFLAGS) $(HWLOC_GL_CPPFLAGS) $(HWLOC_GL_CFLAGS) -DHWLOC_INSIDE_PLUGIN +hwloc_gl_la_LDFLAGS = $(plugins_ldflags) $(HWLOC_GL_LIBS) $(HWLOC_GL_LDFLAGS) endif endif HWLOC_HAVE_GL @@ -155,6 +167,7 @@ endif HWLOC_HAVE_WINDOWS if HWLOC_HAVE_DARWIN sources += topology-darwin.c +ldflags += $(HWLOC_DARWIN_LDFLAGS) endif HWLOC_HAVE_DARWIN if HWLOC_HAVE_FREEBSD @@ -170,10 +183,6 @@ if HWLOC_HAVE_X86_CPUID sources += topology-x86.c endif HWLOC_HAVE_X86_CPUID -if HWLOC_HAVE_GCC -ldflags += -no-undefined -endif HWLOC_HAVE_GCC - if HWLOC_HAVE_WINDOWS # Windows specific rules @@ -183,13 +192,9 @@ export LC_MESSAGES ldflags += -Xlinker --output-def -Xlinker .libs/libhwloc.def if HWLOC_HAVE_MS_LIB -dolib$(EXEEXT): dolib.c - $(CC_FOR_BUILD) $< -o $@ -.libs/libhwloc.lib: libhwloc.la dolib$(EXEEXT) - [ ! -r .libs/libhwloc.def ] || ./dolib$(EXEEXT) "$(HWLOC_MS_LIB)" $(HWLOC_MS_LIB_ARCH) .libs/libhwloc.def $(libhwloc_so_version) .libs/libhwloc.lib +.libs/libhwloc.lib: libhwloc.la + [ ! -r .libs/libhwloc.def ] || "$(HWLOC_MS_LIB)" -machine:$(HWLOC_MS_LIB_ARCH) -def:.libs/libhwloc.def -name:libhwloc-$(libhwloc_so_name) -out:.libs/libhwloc.lib all-local: .libs/libhwloc.lib -clean-local: - $(RM) dolib$(EXEEXT) endif HWLOC_HAVE_MS_LIB install-exec-hook: diff --git a/contrib/hwloc/hwloc/Makefile.in b/contrib/hwloc/hwloc/Makefile.in index 289ea60e13..c4b3460f23 100644 --- a/contrib/hwloc/hwloc/Makefile.in +++ b/contrib/hwloc/hwloc/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.3 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -14,7 +14,7 @@ @SET_MAKE@ -# Copyright © 2009-2020 Inria. All rights reserved. +# Copyright © 2009-2021 Inria. All rights reserved. # Copyright © 2009-2012 Université Bordeaux # Copyright © 2009-2014 Cisco Systems, Inc. All rights reserved. # Copyright © 2011-2012 Oracle and/or its affiliates. All rights reserved. @@ -110,26 +110,28 @@ target_triplet = @target@ @HWLOC_HAVE_NVML_TRUE@@HWLOC_NVML_BUILD_STATIC_FALSE@am__append_10 = hwloc_nvml.la @HWLOC_HAVE_RSMI_TRUE@@HWLOC_RSMI_BUILD_STATIC_TRUE@am__append_11 = topology-rsmi.c @HWLOC_HAVE_RSMI_TRUE@@HWLOC_RSMI_BUILD_STATIC_FALSE@am__append_12 = hwloc_rsmi.la -@HWLOC_GL_BUILD_STATIC_TRUE@@HWLOC_HAVE_GL_TRUE@am__append_13 = topology-gl.c -@HWLOC_GL_BUILD_STATIC_FALSE@@HWLOC_HAVE_GL_TRUE@am__append_14 = hwloc_gl.la -@HWLOC_HAVE_SOLARIS_TRUE@am__append_15 = topology-solaris.c \ +@HWLOC_HAVE_LEVELZERO_TRUE@@HWLOC_LEVELZERO_BUILD_STATIC_TRUE@am__append_13 = topology-levelzero.c +@HWLOC_HAVE_LEVELZERO_TRUE@@HWLOC_LEVELZERO_BUILD_STATIC_FALSE@am__append_14 = hwloc_levelzero.la +@HWLOC_GL_BUILD_STATIC_TRUE@@HWLOC_HAVE_GL_TRUE@am__append_15 = topology-gl.c +@HWLOC_GL_BUILD_STATIC_FALSE@@HWLOC_HAVE_GL_TRUE@am__append_16 = hwloc_gl.la +@HWLOC_HAVE_SOLARIS_TRUE@am__append_17 = topology-solaris.c \ @HWLOC_HAVE_SOLARIS_TRUE@ topology-solaris-chiptype.c -@HWLOC_HAVE_LINUX_TRUE@am__append_16 = topology-linux.c topology-hardwired.c -@HWLOC_HAVE_BGQ_TRUE@am__append_17 = topology-bgq.c -@HWLOC_HAVE_AIX_TRUE@am__append_18 = topology-aix.c -@HWLOC_HAVE_AIX_TRUE@am__append_19 = -lpthread -@HWLOC_HAVE_HPUX_TRUE@am__append_20 = topology-hpux.c -@HWLOC_HAVE_HPUX_TRUE@am__append_21 = -lpthread -@HWLOC_HAVE_WINDOWS_TRUE@am__append_22 = topology-windows.c -@HWLOC_HAVE_DARWIN_TRUE@am__append_23 = topology-darwin.c -@HWLOC_HAVE_FREEBSD_TRUE@am__append_24 = topology-freebsd.c -@HWLOC_HAVE_NETBSD_TRUE@am__append_25 = topology-netbsd.c -@HWLOC_HAVE_NETBSD_TRUE@am__append_26 = -lpthread -@HWLOC_HAVE_X86_CPUID_TRUE@am__append_27 = topology-x86.c -@HWLOC_HAVE_GCC_TRUE@am__append_28 = -no-undefined -@HWLOC_HAVE_WINDOWS_TRUE@am__append_29 = -Xlinker --output-def -Xlinker .libs/libhwloc.def -@HWLOC_HAVE_PLUGINS_TRUE@am__append_30 = -export-dynamic -@HWLOC_BUILD_STANDALONE_TRUE@am__append_31 = hwloc.dtd hwloc2.dtd hwloc2-diff.dtd +@HWLOC_HAVE_LINUX_TRUE@am__append_18 = topology-linux.c topology-hardwired.c +@HWLOC_HAVE_BGQ_TRUE@am__append_19 = topology-bgq.c +@HWLOC_HAVE_AIX_TRUE@am__append_20 = topology-aix.c +@HWLOC_HAVE_AIX_TRUE@am__append_21 = -lpthread +@HWLOC_HAVE_HPUX_TRUE@am__append_22 = topology-hpux.c +@HWLOC_HAVE_HPUX_TRUE@am__append_23 = -lpthread +@HWLOC_HAVE_WINDOWS_TRUE@am__append_24 = topology-windows.c +@HWLOC_HAVE_DARWIN_TRUE@am__append_25 = topology-darwin.c +@HWLOC_HAVE_DARWIN_TRUE@am__append_26 = $(HWLOC_DARWIN_LDFLAGS) +@HWLOC_HAVE_FREEBSD_TRUE@am__append_27 = topology-freebsd.c +@HWLOC_HAVE_NETBSD_TRUE@am__append_28 = topology-netbsd.c +@HWLOC_HAVE_NETBSD_TRUE@am__append_29 = -lpthread +@HWLOC_HAVE_X86_CPUID_TRUE@am__append_30 = topology-x86.c +@HWLOC_HAVE_WINDOWS_TRUE@am__append_31 = -Xlinker --output-def -Xlinker .libs/libhwloc.def +@HWLOC_HAVE_PLUGINS_TRUE@am__append_32 = -export-dynamic +@HWLOC_BUILD_STANDALONE_TRUE@am__append_33 = hwloc.dtd hwloc2.dtd hwloc2-diff.dtd subdir = hwloc ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/hwloc.m4 \ @@ -216,6 +218,16 @@ hwloc_gl_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ @HWLOC_GL_BUILD_STATIC_FALSE@@HWLOC_HAVE_GL_TRUE@am_hwloc_gl_la_rpath = \ @HWLOC_GL_BUILD_STATIC_FALSE@@HWLOC_HAVE_GL_TRUE@ -rpath \ @HWLOC_GL_BUILD_STATIC_FALSE@@HWLOC_HAVE_GL_TRUE@ $(pluginsdir) +hwloc_levelzero_la_LIBADD = +am__hwloc_levelzero_la_SOURCES_DIST = topology-levelzero.c +@HWLOC_HAVE_LEVELZERO_TRUE@@HWLOC_LEVELZERO_BUILD_STATIC_FALSE@am_hwloc_levelzero_la_OBJECTS = hwloc_levelzero_la-topology-levelzero.lo +hwloc_levelzero_la_OBJECTS = $(am_hwloc_levelzero_la_OBJECTS) +hwloc_levelzero_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(hwloc_levelzero_la_CFLAGS) $(CFLAGS) \ + $(hwloc_levelzero_la_LDFLAGS) $(LDFLAGS) -o $@ +@HWLOC_HAVE_LEVELZERO_TRUE@@HWLOC_LEVELZERO_BUILD_STATIC_FALSE@am_hwloc_levelzero_la_rpath = -rpath \ +@HWLOC_HAVE_LEVELZERO_TRUE@@HWLOC_LEVELZERO_BUILD_STATIC_FALSE@ $(pluginsdir) hwloc_nvml_la_LIBADD = am__hwloc_nvml_la_SOURCES_DIST = topology-nvml.c @HWLOC_HAVE_NVML_TRUE@@HWLOC_NVML_BUILD_STATIC_FALSE@am_hwloc_nvml_la_OBJECTS = hwloc_nvml_la-topology-nvml.lo @@ -271,32 +283,33 @@ am__libhwloc_la_SOURCES_DIST = topology.c traversal.c distances.c \ pci-common.c diff.c shmem.c misc.c base64.c topology-noos.c \ topology-synthetic.c topology-xml.c topology-xml-nolibxml.c \ topology-xml-libxml.c topology-pci.c topology-opencl.c \ - topology-cuda.c topology-nvml.c topology-rsmi.c topology-gl.c \ - topology-solaris.c topology-solaris-chiptype.c \ - topology-linux.c topology-hardwired.c topology-bgq.c \ - topology-aix.c topology-hpux.c topology-windows.c \ - topology-darwin.c topology-freebsd.c topology-netbsd.c \ - topology-x86.c + topology-cuda.c topology-nvml.c topology-rsmi.c \ + topology-levelzero.c topology-gl.c topology-solaris.c \ + topology-solaris-chiptype.c topology-linux.c \ + topology-hardwired.c topology-bgq.c topology-aix.c \ + topology-hpux.c topology-windows.c topology-darwin.c \ + topology-freebsd.c topology-netbsd.c topology-x86.c @HWLOC_HAVE_LIBXML2_TRUE@@HWLOC_XML_LIBXML_BUILD_STATIC_TRUE@am__objects_1 = topology-xml-libxml.lo @HWLOC_HAVE_PCIACCESS_TRUE@@HWLOC_PCI_BUILD_STATIC_TRUE@am__objects_2 = topology-pci.lo @HWLOC_HAVE_OPENCL_TRUE@@HWLOC_OPENCL_BUILD_STATIC_TRUE@am__objects_3 = topology-opencl.lo @HWLOC_CUDA_BUILD_STATIC_TRUE@@HWLOC_HAVE_CUDART_TRUE@am__objects_4 = topology-cuda.lo @HWLOC_HAVE_NVML_TRUE@@HWLOC_NVML_BUILD_STATIC_TRUE@am__objects_5 = topology-nvml.lo @HWLOC_HAVE_RSMI_TRUE@@HWLOC_RSMI_BUILD_STATIC_TRUE@am__objects_6 = topology-rsmi.lo -@HWLOC_GL_BUILD_STATIC_TRUE@@HWLOC_HAVE_GL_TRUE@am__objects_7 = topology-gl.lo -@HWLOC_HAVE_SOLARIS_TRUE@am__objects_8 = topology-solaris.lo \ +@HWLOC_HAVE_LEVELZERO_TRUE@@HWLOC_LEVELZERO_BUILD_STATIC_TRUE@am__objects_7 = topology-levelzero.lo +@HWLOC_GL_BUILD_STATIC_TRUE@@HWLOC_HAVE_GL_TRUE@am__objects_8 = topology-gl.lo +@HWLOC_HAVE_SOLARIS_TRUE@am__objects_9 = topology-solaris.lo \ @HWLOC_HAVE_SOLARIS_TRUE@ topology-solaris-chiptype.lo -@HWLOC_HAVE_LINUX_TRUE@am__objects_9 = topology-linux.lo \ +@HWLOC_HAVE_LINUX_TRUE@am__objects_10 = topology-linux.lo \ @HWLOC_HAVE_LINUX_TRUE@ topology-hardwired.lo -@HWLOC_HAVE_BGQ_TRUE@am__objects_10 = topology-bgq.lo -@HWLOC_HAVE_AIX_TRUE@am__objects_11 = topology-aix.lo -@HWLOC_HAVE_HPUX_TRUE@am__objects_12 = topology-hpux.lo -@HWLOC_HAVE_WINDOWS_TRUE@am__objects_13 = topology-windows.lo -@HWLOC_HAVE_DARWIN_TRUE@am__objects_14 = topology-darwin.lo -@HWLOC_HAVE_FREEBSD_TRUE@am__objects_15 = topology-freebsd.lo -@HWLOC_HAVE_NETBSD_TRUE@am__objects_16 = topology-netbsd.lo -@HWLOC_HAVE_X86_CPUID_TRUE@am__objects_17 = topology-x86.lo -am__objects_18 = topology.lo traversal.lo distances.lo memattrs.lo \ +@HWLOC_HAVE_BGQ_TRUE@am__objects_11 = topology-bgq.lo +@HWLOC_HAVE_AIX_TRUE@am__objects_12 = topology-aix.lo +@HWLOC_HAVE_HPUX_TRUE@am__objects_13 = topology-hpux.lo +@HWLOC_HAVE_WINDOWS_TRUE@am__objects_14 = topology-windows.lo +@HWLOC_HAVE_DARWIN_TRUE@am__objects_15 = topology-darwin.lo +@HWLOC_HAVE_FREEBSD_TRUE@am__objects_16 = topology-freebsd.lo +@HWLOC_HAVE_NETBSD_TRUE@am__objects_17 = topology-netbsd.lo +@HWLOC_HAVE_X86_CPUID_TRUE@am__objects_18 = topology-x86.lo +am__objects_19 = topology.lo traversal.lo distances.lo memattrs.lo \ cpukinds.lo components.lo bind.lo bitmap.lo pci-common.lo \ diff.lo shmem.lo misc.lo base64.lo topology-noos.lo \ topology-synthetic.lo topology-xml.lo topology-xml-nolibxml.lo \ @@ -305,8 +318,8 @@ am__objects_18 = topology.lo traversal.lo distances.lo memattrs.lo \ $(am__objects_7) $(am__objects_8) $(am__objects_9) \ $(am__objects_10) $(am__objects_11) $(am__objects_12) \ $(am__objects_13) $(am__objects_14) $(am__objects_15) \ - $(am__objects_16) $(am__objects_17) -am_libhwloc_la_OBJECTS = $(am__objects_18) + $(am__objects_16) $(am__objects_17) $(am__objects_18) +am_libhwloc_la_OBJECTS = $(am__objects_19) libhwloc_la_OBJECTS = $(am_libhwloc_la_OBJECTS) libhwloc_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ @@ -318,13 +331,13 @@ am__libhwloc_embedded_la_SOURCES_DIST = topology.c traversal.c \ pci-common.c diff.c shmem.c misc.c base64.c topology-noos.c \ topology-synthetic.c topology-xml.c topology-xml-nolibxml.c \ topology-xml-libxml.c topology-pci.c topology-opencl.c \ - topology-cuda.c topology-nvml.c topology-rsmi.c topology-gl.c \ - topology-solaris.c topology-solaris-chiptype.c \ - topology-linux.c topology-hardwired.c topology-bgq.c \ - topology-aix.c topology-hpux.c topology-windows.c \ - topology-darwin.c topology-freebsd.c topology-netbsd.c \ - topology-x86.c -am_libhwloc_embedded_la_OBJECTS = $(am__objects_18) + topology-cuda.c topology-nvml.c topology-rsmi.c \ + topology-levelzero.c topology-gl.c topology-solaris.c \ + topology-solaris-chiptype.c topology-linux.c \ + topology-hardwired.c topology-bgq.c topology-aix.c \ + topology-hpux.c topology-windows.c topology-darwin.c \ + topology-freebsd.c topology-netbsd.c topology-x86.c +am_libhwloc_embedded_la_OBJECTS = $(am__objects_19) libhwloc_embedded_la_OBJECTS = $(am_libhwloc_embedded_la_OBJECTS) @HWLOC_BUILD_STANDALONE_FALSE@am_libhwloc_embedded_la_rpath = AM_V_P = $(am__v_P_@AM_V@) @@ -348,6 +361,7 @@ am__depfiles_remade = ./$(DEPDIR)/base64.Plo ./$(DEPDIR)/bind.Plo \ ./$(DEPDIR)/distances.Plo \ ./$(DEPDIR)/hwloc_cuda_la-topology-cuda.Plo \ ./$(DEPDIR)/hwloc_gl_la-topology-gl.Plo \ + ./$(DEPDIR)/hwloc_levelzero_la-topology-levelzero.Plo \ ./$(DEPDIR)/hwloc_nvml_la-topology-nvml.Plo \ ./$(DEPDIR)/hwloc_opencl_la-topology-opencl.Plo \ ./$(DEPDIR)/hwloc_pci_la-topology-pci.Plo \ @@ -359,10 +373,12 @@ am__depfiles_remade = ./$(DEPDIR)/base64.Plo ./$(DEPDIR)/bind.Plo \ ./$(DEPDIR)/topology-cuda.Plo ./$(DEPDIR)/topology-darwin.Plo \ ./$(DEPDIR)/topology-fake.Plo ./$(DEPDIR)/topology-freebsd.Plo \ ./$(DEPDIR)/topology-gl.Plo ./$(DEPDIR)/topology-hardwired.Plo \ - ./$(DEPDIR)/topology-hpux.Plo ./$(DEPDIR)/topology-linux.Plo \ - ./$(DEPDIR)/topology-netbsd.Plo ./$(DEPDIR)/topology-noos.Plo \ - ./$(DEPDIR)/topology-nvml.Plo ./$(DEPDIR)/topology-opencl.Plo \ - ./$(DEPDIR)/topology-pci.Plo ./$(DEPDIR)/topology-rsmi.Plo \ + ./$(DEPDIR)/topology-hpux.Plo \ + ./$(DEPDIR)/topology-levelzero.Plo \ + ./$(DEPDIR)/topology-linux.Plo ./$(DEPDIR)/topology-netbsd.Plo \ + ./$(DEPDIR)/topology-noos.Plo ./$(DEPDIR)/topology-nvml.Plo \ + ./$(DEPDIR)/topology-opencl.Plo ./$(DEPDIR)/topology-pci.Plo \ + ./$(DEPDIR)/topology-rsmi.Plo \ ./$(DEPDIR)/topology-solaris-chiptype.Plo \ ./$(DEPDIR)/topology-solaris.Plo \ ./$(DEPDIR)/topology-synthetic.Plo \ @@ -391,13 +407,15 @@ am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(hwloc_cuda_la_SOURCES) $(hwloc_fake_la_SOURCES) \ - $(hwloc_gl_la_SOURCES) $(hwloc_nvml_la_SOURCES) \ - $(hwloc_opencl_la_SOURCES) $(hwloc_pci_la_SOURCES) \ - $(hwloc_rsmi_la_SOURCES) $(hwloc_xml_libxml_la_SOURCES) \ - $(libhwloc_la_SOURCES) $(libhwloc_embedded_la_SOURCES) + $(hwloc_gl_la_SOURCES) $(hwloc_levelzero_la_SOURCES) \ + $(hwloc_nvml_la_SOURCES) $(hwloc_opencl_la_SOURCES) \ + $(hwloc_pci_la_SOURCES) $(hwloc_rsmi_la_SOURCES) \ + $(hwloc_xml_libxml_la_SOURCES) $(libhwloc_la_SOURCES) \ + $(libhwloc_embedded_la_SOURCES) DIST_SOURCES = $(am__hwloc_cuda_la_SOURCES_DIST) \ $(am__hwloc_fake_la_SOURCES_DIST) \ $(am__hwloc_gl_la_SOURCES_DIST) \ + $(am__hwloc_levelzero_la_SOURCES_DIST) \ $(am__hwloc_nvml_la_SOURCES_DIST) \ $(am__hwloc_opencl_la_SOURCES_DIST) \ $(am__hwloc_pci_la_SOURCES_DIST) \ @@ -428,14 +446,13 @@ am__define_uniq_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)/topology-aix.c \ $(srcdir)/topology-bgq.c $(srcdir)/topology-cuda.c \ $(srcdir)/topology-darwin.c $(srcdir)/topology-freebsd.c \ $(srcdir)/topology-gl.c $(srcdir)/topology-hpux.c \ - $(srcdir)/topology-netbsd.c $(srcdir)/topology-nvml.c \ - $(srcdir)/topology-opencl.c $(srcdir)/topology-rsmi.c \ + $(srcdir)/topology-levelzero.c $(srcdir)/topology-netbsd.c \ + $(srcdir)/topology-nvml.c $(srcdir)/topology-opencl.c \ + $(srcdir)/topology-rsmi.c \ $(srcdir)/topology-solaris-chiptype.c \ $(srcdir)/topology-solaris.c $(srcdir)/topology-windows.c \ $(top_srcdir)/./config/depcomp @@ -444,6 +461,7 @@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ +ARCHIVEMOUNT = @ARCHIVEMOUNT@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -453,11 +471,13 @@ BASH = @BASH@ BUNZIPP = @BUNZIPP@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ -CC_FOR_BUILD = @CC_FOR_BUILD@ CFLAGS = @CFLAGS@ CONFIGURE_DEPENDENCIES = @CONFIGURE_DEPENDENCIES@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ +CUDA_VERSION = @CUDA_VERSION@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ @@ -475,6 +495,7 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EPSTOPDF = @EPSTOPDF@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FIG2DEV = @FIG2DEV@ @@ -484,7 +505,15 @@ HWLOC_CAIRO_CFLAGS = @HWLOC_CAIRO_CFLAGS@ HWLOC_CAIRO_LIBS = @HWLOC_CAIRO_LIBS@ HWLOC_CFLAGS = @HWLOC_CFLAGS@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ +HWLOC_CUDART_CFLAGS = @HWLOC_CUDART_CFLAGS@ +HWLOC_CUDART_CPPFLAGS = @HWLOC_CUDART_CPPFLAGS@ +HWLOC_CUDART_LDFLAGS = @HWLOC_CUDART_LDFLAGS@ +HWLOC_CUDART_LIBS = @HWLOC_CUDART_LIBS@ +HWLOC_CUDA_CFLAGS = @HWLOC_CUDA_CFLAGS@ +HWLOC_CUDA_CPPFLAGS = @HWLOC_CUDA_CPPFLAGS@ +HWLOC_CUDA_LDFLAGS = @HWLOC_CUDA_LDFLAGS@ HWLOC_CUDA_LIBS = @HWLOC_CUDA_LIBS@ +HWLOC_DARWIN_LDFLAGS = @HWLOC_DARWIN_LDFLAGS@ HWLOC_DIFF_U = @HWLOC_DIFF_U@ HWLOC_DIFF_W = @HWLOC_DIFF_W@ HWLOC_DL_LIBS = @HWLOC_DL_LIBS@ @@ -494,11 +523,17 @@ HWLOC_EMBEDDED_LDADD = @HWLOC_EMBEDDED_LDADD@ HWLOC_EMBEDDED_LDFLAGS = @HWLOC_EMBEDDED_LDFLAGS@ HWLOC_EMBEDDED_LIBS = @HWLOC_EMBEDDED_LIBS@ HWLOC_GL_LIBS = @HWLOC_GL_LIBS@ +HWLOC_HAVE_LEVELZERO = @HWLOC_HAVE_LEVELZERO@ HWLOC_HAVE_LIBXML2 = @HWLOC_HAVE_LIBXML2@ +HWLOC_HAVE_LINUX = @HWLOC_HAVE_LINUX@ HWLOC_HAVE_NVML = @HWLOC_HAVE_NVML@ HWLOC_HAVE_OPENCL = @HWLOC_HAVE_OPENCL@ HWLOC_HAVE_RSMI = @HWLOC_HAVE_RSMI@ +HWLOC_HAVE_X86_CPUID = @HWLOC_HAVE_X86_CPUID@ +HWLOC_IBVERBS_LIBS = @HWLOC_IBVERBS_LIBS@ HWLOC_LDFLAGS = @HWLOC_LDFLAGS@ +HWLOC_LEVELZERO_CFLAGS = @HWLOC_LEVELZERO_CFLAGS@ +HWLOC_LEVELZERO_LIBS = @HWLOC_LEVELZERO_LIBS@ HWLOC_LIBS = @HWLOC_LIBS@ HWLOC_LIBS_PRIVATE = @HWLOC_LIBS_PRIVATE@ HWLOC_LIBXML2_CFLAGS = @HWLOC_LIBXML2_CFLAGS@ @@ -508,8 +543,10 @@ HWLOC_MS_LIB = @HWLOC_MS_LIB@ HWLOC_MS_LIB_ARCH = @HWLOC_MS_LIB_ARCH@ HWLOC_NUMA_CFLAGS = @HWLOC_NUMA_CFLAGS@ HWLOC_NUMA_LIBS = @HWLOC_NUMA_LIBS@ +HWLOC_NVML_CPPFLAGS = @HWLOC_NVML_CPPFLAGS@ +HWLOC_NVML_LDFLAGS = @HWLOC_NVML_LDFLAGS@ HWLOC_NVML_LIBS = @HWLOC_NVML_LIBS@ -HWLOC_OPENCL_CFLAGS = @HWLOC_OPENCL_CFLAGS@ +HWLOC_OPENCL_CPPFLAGS = @HWLOC_OPENCL_CPPFLAGS@ HWLOC_OPENCL_LDFLAGS = @HWLOC_OPENCL_LDFLAGS@ HWLOC_OPENCL_LIBS = @HWLOC_OPENCL_LIBS@ HWLOC_PCIACCESS_CFLAGS = @HWLOC_PCIACCESS_CFLAGS@ @@ -519,6 +556,8 @@ HWLOC_PLUGINS_PATH = @HWLOC_PLUGINS_PATH@ HWLOC_PS_LIBS = @HWLOC_PS_LIBS@ HWLOC_RELEASE_DATE = @HWLOC_RELEASE_DATE@ HWLOC_REQUIRES = @HWLOC_REQUIRES@ +HWLOC_RSMI_CPPFLAGS = @HWLOC_RSMI_CPPFLAGS@ +HWLOC_RSMI_LDFLAGS = @HWLOC_RSMI_LDFLAGS@ HWLOC_RSMI_LIBS = @HWLOC_RSMI_LIBS@ HWLOC_TERMCAP_LIBS = @HWLOC_TERMCAP_LIBS@ HWLOC_VERSION = @HWLOC_VERSION@ @@ -576,6 +615,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PDFLATEX = @PDFLATEX@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ +ROCM_VERSION = @ROCM_VERSION@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ @@ -624,6 +664,7 @@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ +libhwloc_so_name = @libhwloc_so_name@ libhwloc_so_version = @libhwloc_so_version@ libnetloc_so_version = @libnetloc_so_version@ localedir = @localedir@ @@ -655,7 +696,7 @@ AM_CPPFLAGS = $(HWLOC_CPPFLAGS) -DHWLOC_INSIDE_LIBHWLOC \ -DHWLOC_PLUGINS_PATH="\"$(HWLOC_PLUGINS_PATH)\"" \ -DRUNSTATEDIR="\"$(HWLOC_runstatedir)\"" AM_LDFLAGS = $(HWLOC_LDFLAGS) -EXTRA_DIST = dolib.c $(am__append_31) +EXTRA_DIST = $(am__append_33) # If we're in standalone mode, build the installable library. # Otherwise, build the embedded library. @@ -664,7 +705,7 @@ EXTRA_DIST = dolib.c $(am__append_31) pluginsdir = @HWLOC_PLUGINS_DIR@ plugins_LTLIBRARIES = $(am__append_2) $(am__append_4) $(am__append_6) \ $(am__append_8) $(am__append_10) $(am__append_12) \ - $(am__append_14) + $(am__append_14) $(am__append_16) plugins_ldflags = -module -avoid-version $(HWLOC_DL_LIBS) $(HWLOC_LTDL_LIBS) # Sources and ldflags @@ -674,33 +715,36 @@ sources = topology.c traversal.c distances.c memattrs.c cpukinds.c \ topology-xml.c topology-xml-nolibxml.c $(am__append_1) \ $(am__append_3) $(am__append_5) $(am__append_7) \ $(am__append_9) $(am__append_11) $(am__append_13) \ - $(am__append_15) $(am__append_16) $(am__append_17) \ - $(am__append_18) $(am__append_20) $(am__append_22) \ - $(am__append_23) $(am__append_24) $(am__append_25) \ - $(am__append_27) -ldflags = $(am__append_19) $(am__append_21) $(am__append_26) \ - $(am__append_28) $(am__append_29) + $(am__append_15) $(am__append_17) $(am__append_18) \ + $(am__append_19) $(am__append_20) $(am__append_22) \ + $(am__append_24) $(am__append_25) $(am__append_27) \ + $(am__append_28) $(am__append_30) +ldflags = -no-undefined $(am__append_21) $(am__append_23) \ + $(am__append_26) $(am__append_29) $(am__append_31) @HWLOC_HAVE_LIBXML2_TRUE@@HWLOC_XML_LIBXML_BUILD_STATIC_FALSE@hwloc_xml_libxml_la_SOURCES = topology-xml-libxml.c -@HWLOC_HAVE_LIBXML2_TRUE@@HWLOC_XML_LIBXML_BUILD_STATIC_FALSE@hwloc_xml_libxml_la_CFLAGS = $(AM_CFLAGS) $(HWLOC_LIBXML2_CFLAGS) -DHWLOC_INSIDE_PLUGIN -@HWLOC_HAVE_LIBXML2_TRUE@@HWLOC_XML_LIBXML_BUILD_STATIC_FALSE@hwloc_xml_libxml_la_LDFLAGS = $(plugins_ldflags) $(HWLOC_LIBXML2_LIBS) +@HWLOC_HAVE_LIBXML2_TRUE@@HWLOC_XML_LIBXML_BUILD_STATIC_FALSE@hwloc_xml_libxml_la_CFLAGS = $(AM_CFLAGS) $(HWLOC_LIBXML2_CPPFLAGS) $(HWLOC_LIBXML2_CFLAGS) -DHWLOC_INSIDE_PLUGIN +@HWLOC_HAVE_LIBXML2_TRUE@@HWLOC_XML_LIBXML_BUILD_STATIC_FALSE@hwloc_xml_libxml_la_LDFLAGS = $(plugins_ldflags) $(HWLOC_LIBXML2_LIBS) $(HWLOC_LIBXML2_LDFLAGS) @HWLOC_HAVE_PCIACCESS_TRUE@@HWLOC_PCI_BUILD_STATIC_FALSE@hwloc_pci_la_SOURCES = topology-pci.c -@HWLOC_HAVE_PCIACCESS_TRUE@@HWLOC_PCI_BUILD_STATIC_FALSE@hwloc_pci_la_CFLAGS = $(AM_CFLAGS) $(HWLOC_PCIACCESS_CFLAGS) -DHWLOC_INSIDE_PLUGIN -@HWLOC_HAVE_PCIACCESS_TRUE@@HWLOC_PCI_BUILD_STATIC_FALSE@hwloc_pci_la_LDFLAGS = $(plugins_ldflags) $(HWLOC_PCIACCESS_LIBS) +@HWLOC_HAVE_PCIACCESS_TRUE@@HWLOC_PCI_BUILD_STATIC_FALSE@hwloc_pci_la_CFLAGS = $(AM_CFLAGS) $(HWLOC_PCIACCESS_CPPFLAGS) $(HWLOC_PCIACCESS_CFLAGS) -DHWLOC_INSIDE_PLUGIN +@HWLOC_HAVE_PCIACCESS_TRUE@@HWLOC_PCI_BUILD_STATIC_FALSE@hwloc_pci_la_LDFLAGS = $(plugins_ldflags) $(HWLOC_PCIACCESS_LIBS) $(HWLOC_PCIACCESS_LDFLAGS) @HWLOC_HAVE_OPENCL_TRUE@@HWLOC_OPENCL_BUILD_STATIC_FALSE@hwloc_opencl_la_SOURCES = topology-opencl.c -@HWLOC_HAVE_OPENCL_TRUE@@HWLOC_OPENCL_BUILD_STATIC_FALSE@hwloc_opencl_la_CFLAGS = $(AM_CFLAGS) $(HWLOC_OPENCL_CFLAGS) -DHWLOC_INSIDE_PLUGIN +@HWLOC_HAVE_OPENCL_TRUE@@HWLOC_OPENCL_BUILD_STATIC_FALSE@hwloc_opencl_la_CFLAGS = $(AM_CFLAGS) $(HWLOC_OPENCL_CPPFLAGS) $(HWLOC_OPENCL_CFLAGS) -DHWLOC_INSIDE_PLUGIN @HWLOC_HAVE_OPENCL_TRUE@@HWLOC_OPENCL_BUILD_STATIC_FALSE@hwloc_opencl_la_LDFLAGS = $(plugins_ldflags) $(HWLOC_OPENCL_LIBS) $(HWLOC_OPENCL_LDFLAGS) @HWLOC_CUDA_BUILD_STATIC_FALSE@@HWLOC_HAVE_CUDART_TRUE@hwloc_cuda_la_SOURCES = topology-cuda.c -@HWLOC_CUDA_BUILD_STATIC_FALSE@@HWLOC_HAVE_CUDART_TRUE@hwloc_cuda_la_CFLAGS = $(AM_CFLAGS) $(HWLOC_CUDA_CFLAGS) -DHWLOC_INSIDE_PLUGIN -@HWLOC_CUDA_BUILD_STATIC_FALSE@@HWLOC_HAVE_CUDART_TRUE@hwloc_cuda_la_LDFLAGS = $(plugins_ldflags) $(HWLOC_CUDA_LIBS) +@HWLOC_CUDA_BUILD_STATIC_FALSE@@HWLOC_HAVE_CUDART_TRUE@hwloc_cuda_la_CFLAGS = $(AM_CFLAGS) $(HWLOC_CUDART_CPPFLAGS) $(HWLOC_CUDART_CFLAGS) -DHWLOC_INSIDE_PLUGIN +@HWLOC_CUDA_BUILD_STATIC_FALSE@@HWLOC_HAVE_CUDART_TRUE@hwloc_cuda_la_LDFLAGS = $(plugins_ldflags) $(HWLOC_CUDART_LIBS) $(HWLOC_CUDART_LDFLAGS) @HWLOC_HAVE_NVML_TRUE@@HWLOC_NVML_BUILD_STATIC_FALSE@hwloc_nvml_la_SOURCES = topology-nvml.c -@HWLOC_HAVE_NVML_TRUE@@HWLOC_NVML_BUILD_STATIC_FALSE@hwloc_nvml_la_CFLAGS = $(AM_CFLAGS) $(HWLOC_NVML_CFLAGS) -DHWLOC_INSIDE_PLUGIN -@HWLOC_HAVE_NVML_TRUE@@HWLOC_NVML_BUILD_STATIC_FALSE@hwloc_nvml_la_LDFLAGS = $(plugins_ldflags) $(HWLOC_NVML_LIBS) +@HWLOC_HAVE_NVML_TRUE@@HWLOC_NVML_BUILD_STATIC_FALSE@hwloc_nvml_la_CFLAGS = $(AM_CFLAGS) $(HWLOC_NVML_CPPFLAGS) $(HWLOC_NVML_CFLAGS) -DHWLOC_INSIDE_PLUGIN +@HWLOC_HAVE_NVML_TRUE@@HWLOC_NVML_BUILD_STATIC_FALSE@hwloc_nvml_la_LDFLAGS = $(plugins_ldflags) $(HWLOC_NVML_LIBS) $(HWLOC_NVML_LDFLAGS) @HWLOC_HAVE_RSMI_TRUE@@HWLOC_RSMI_BUILD_STATIC_FALSE@hwloc_rsmi_la_SOURCES = topology-rsmi.c -@HWLOC_HAVE_RSMI_TRUE@@HWLOC_RSMI_BUILD_STATIC_FALSE@hwloc_rsmi_la_CFLAGS = $(AM_CFLAGS) $(HWLOC_RSMI_CFLAGS) -DHWLOC_INSIDE_PLUGIN -@HWLOC_HAVE_RSMI_TRUE@@HWLOC_RSMI_BUILD_STATIC_FALSE@hwloc_rsmi_la_LDFLAGS = $(plugins_ldflags) $(HWLOC_RSMI_LIBS) +@HWLOC_HAVE_RSMI_TRUE@@HWLOC_RSMI_BUILD_STATIC_FALSE@hwloc_rsmi_la_CFLAGS = $(AM_CFLAGS) $(HWLOC_RSMI_CPPFLAGS) $(HWLOC_RSMI_CFLAGS) -DHWLOC_INSIDE_PLUGIN +@HWLOC_HAVE_RSMI_TRUE@@HWLOC_RSMI_BUILD_STATIC_FALSE@hwloc_rsmi_la_LDFLAGS = $(plugins_ldflags) $(HWLOC_RSMI_LIBS) $(HWLOC_RSMI_LDFLAGS) +@HWLOC_HAVE_LEVELZERO_TRUE@@HWLOC_LEVELZERO_BUILD_STATIC_FALSE@hwloc_levelzero_la_SOURCES = topology-levelzero.c +@HWLOC_HAVE_LEVELZERO_TRUE@@HWLOC_LEVELZERO_BUILD_STATIC_FALSE@hwloc_levelzero_la_CFLAGS = $(AM_CFLAGS) $(HWLOC_LEVELZERO_CFLAGS) -DHWLOC_INSIDE_PLUGIN +@HWLOC_HAVE_LEVELZERO_TRUE@@HWLOC_LEVELZERO_BUILD_STATIC_FALSE@hwloc_levelzero_la_LDFLAGS = $(plugins_ldflags) $(HWLOC_LEVELZERO_LIBS) @HWLOC_GL_BUILD_STATIC_FALSE@@HWLOC_HAVE_GL_TRUE@hwloc_gl_la_SOURCES = topology-gl.c -@HWLOC_GL_BUILD_STATIC_FALSE@@HWLOC_HAVE_GL_TRUE@hwloc_gl_la_CFLAGS = $(AM_CFLAGS) $(HWLOC_GL_CFLAGS) -DHWLOC_INSIDE_PLUGIN -@HWLOC_GL_BUILD_STATIC_FALSE@@HWLOC_HAVE_GL_TRUE@hwloc_gl_la_LDFLAGS = $(plugins_ldflags) $(HWLOC_GL_LIBS) +@HWLOC_GL_BUILD_STATIC_FALSE@@HWLOC_HAVE_GL_TRUE@hwloc_gl_la_CFLAGS = $(AM_CFLAGS) $(HWLOC_GL_CPPFLAGS) $(HWLOC_GL_CFLAGS) -DHWLOC_INSIDE_PLUGIN +@HWLOC_GL_BUILD_STATIC_FALSE@@HWLOC_HAVE_GL_TRUE@hwloc_gl_la_LDFLAGS = $(plugins_ldflags) $(HWLOC_GL_LIBS) $(HWLOC_GL_LDFLAGS) # Windows specific rules @HWLOC_HAVE_WINDOWS_TRUE@LC_MESSAGES = C @@ -711,7 +755,7 @@ ldflags = $(am__append_19) $(am__append_21) $(am__append_26) \ libhwloc_la_SOURCES = $(sources) libhwloc_la_LDFLAGS = $(ldflags) -version-info $(libhwloc_so_version) \ $(HWLOC_LIBS) $(HWLOC_DL_LIBS) $(HWLOC_LTDL_LIBS) \ - $(HWLOC_LDFLAGS) $(am__append_30) + $(HWLOC_LDFLAGS) $(am__append_32) # Embedded library (note the lack of a .so version number -- that # intentionally only appears in the installable library). Also note @@ -861,6 +905,9 @@ hwloc_fake.la: $(hwloc_fake_la_OBJECTS) $(hwloc_fake_la_DEPENDENCIES) $(EXTRA_hw hwloc_gl.la: $(hwloc_gl_la_OBJECTS) $(hwloc_gl_la_DEPENDENCIES) $(EXTRA_hwloc_gl_la_DEPENDENCIES) $(AM_V_CCLD)$(hwloc_gl_la_LINK) $(am_hwloc_gl_la_rpath) $(hwloc_gl_la_OBJECTS) $(hwloc_gl_la_LIBADD) $(LIBS) +hwloc_levelzero.la: $(hwloc_levelzero_la_OBJECTS) $(hwloc_levelzero_la_DEPENDENCIES) $(EXTRA_hwloc_levelzero_la_DEPENDENCIES) + $(AM_V_CCLD)$(hwloc_levelzero_la_LINK) $(am_hwloc_levelzero_la_rpath) $(hwloc_levelzero_la_OBJECTS) $(hwloc_levelzero_la_LIBADD) $(LIBS) + hwloc_nvml.la: $(hwloc_nvml_la_OBJECTS) $(hwloc_nvml_la_DEPENDENCIES) $(EXTRA_hwloc_nvml_la_DEPENDENCIES) $(AM_V_CCLD)$(hwloc_nvml_la_LINK) $(am_hwloc_nvml_la_rpath) $(hwloc_nvml_la_OBJECTS) $(hwloc_nvml_la_LIBADD) $(LIBS) @@ -897,6 +944,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/distances.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hwloc_cuda_la-topology-cuda.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hwloc_gl_la-topology-gl.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hwloc_levelzero_la-topology-levelzero.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hwloc_nvml_la-topology-nvml.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hwloc_opencl_la-topology-opencl.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hwloc_pci_la-topology-pci.Plo@am__quote@ # am--include-marker @@ -915,6 +963,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/topology-gl.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/topology-hardwired.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/topology-hpux.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/topology-levelzero.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/topology-linux.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/topology-netbsd.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/topology-noos.Plo@am__quote@ # am--include-marker @@ -977,6 +1026,13 @@ hwloc_gl_la-topology-gl.lo: topology-gl.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(hwloc_gl_la_CFLAGS) $(CFLAGS) -c -o hwloc_gl_la-topology-gl.lo `test -f 'topology-gl.c' || echo '$(srcdir)/'`topology-gl.c +hwloc_levelzero_la-topology-levelzero.lo: topology-levelzero.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(hwloc_levelzero_la_CFLAGS) $(CFLAGS) -MT hwloc_levelzero_la-topology-levelzero.lo -MD -MP -MF $(DEPDIR)/hwloc_levelzero_la-topology-levelzero.Tpo -c -o hwloc_levelzero_la-topology-levelzero.lo `test -f 'topology-levelzero.c' || echo '$(srcdir)/'`topology-levelzero.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/hwloc_levelzero_la-topology-levelzero.Tpo $(DEPDIR)/hwloc_levelzero_la-topology-levelzero.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='topology-levelzero.c' object='hwloc_levelzero_la-topology-levelzero.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(hwloc_levelzero_la_CFLAGS) $(CFLAGS) -c -o hwloc_levelzero_la-topology-levelzero.lo `test -f 'topology-levelzero.c' || echo '$(srcdir)/'`topology-levelzero.c + hwloc_nvml_la-topology-nvml.lo: topology-nvml.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(hwloc_nvml_la_CFLAGS) $(CFLAGS) -MT hwloc_nvml_la-topology-nvml.lo -MD -MP -MF $(DEPDIR)/hwloc_nvml_la-topology-nvml.Tpo -c -o hwloc_nvml_la-topology-nvml.lo `test -f 'topology-nvml.c' || echo '$(srcdir)/'`topology-nvml.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/hwloc_nvml_la-topology-nvml.Tpo $(DEPDIR)/hwloc_nvml_la-topology-nvml.Plo @@ -1090,7 +1146,6 @@ cscopelist-am: $(am__tagged_files) distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am @@ -1130,6 +1185,10 @@ check: check-am @HWLOC_HAVE_MS_LIB_FALSE@all-local: @HWLOC_HAVE_WINDOWS_FALSE@all-local: all-am: Makefile $(LTLIBRARIES) $(DATA) all-local +install-checkLTLIBRARIES: install-libLTLIBRARIES + +install-pluginsLTLIBRARIES: install-libLTLIBRARIES + installdirs: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pluginsdir)" "$(DESTDIR)$(xmldir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ @@ -1165,15 +1224,13 @@ distclean-generic: maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -@HWLOC_HAVE_MS_LIB_FALSE@clean-local: -@HWLOC_HAVE_WINDOWS_FALSE@clean-local: @HWLOC_HAVE_WINDOWS_FALSE@uninstall-local: @HWLOC_HAVE_WINDOWS_FALSE@install-exec-hook: clean: clean-am clean-am: clean-checkLTLIBRARIES clean-generic clean-libLTLIBRARIES \ - clean-libtool clean-local clean-noinstLTLIBRARIES \ - clean-pluginsLTLIBRARIES mostlyclean-am + clean-libtool clean-noinstLTLIBRARIES clean-pluginsLTLIBRARIES \ + mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/base64.Plo @@ -1185,6 +1242,7 @@ distclean: distclean-am -rm -f ./$(DEPDIR)/distances.Plo -rm -f ./$(DEPDIR)/hwloc_cuda_la-topology-cuda.Plo -rm -f ./$(DEPDIR)/hwloc_gl_la-topology-gl.Plo + -rm -f ./$(DEPDIR)/hwloc_levelzero_la-topology-levelzero.Plo -rm -f ./$(DEPDIR)/hwloc_nvml_la-topology-nvml.Plo -rm -f ./$(DEPDIR)/hwloc_opencl_la-topology-opencl.Plo -rm -f ./$(DEPDIR)/hwloc_pci_la-topology-pci.Plo @@ -1203,6 +1261,7 @@ distclean: distclean-am -rm -f ./$(DEPDIR)/topology-gl.Plo -rm -f ./$(DEPDIR)/topology-hardwired.Plo -rm -f ./$(DEPDIR)/topology-hpux.Plo + -rm -f ./$(DEPDIR)/topology-levelzero.Plo -rm -f ./$(DEPDIR)/topology-linux.Plo -rm -f ./$(DEPDIR)/topology-netbsd.Plo -rm -f ./$(DEPDIR)/topology-noos.Plo @@ -1275,6 +1334,7 @@ maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/distances.Plo -rm -f ./$(DEPDIR)/hwloc_cuda_la-topology-cuda.Plo -rm -f ./$(DEPDIR)/hwloc_gl_la-topology-gl.Plo + -rm -f ./$(DEPDIR)/hwloc_levelzero_la-topology-levelzero.Plo -rm -f ./$(DEPDIR)/hwloc_nvml_la-topology-nvml.Plo -rm -f ./$(DEPDIR)/hwloc_opencl_la-topology-opencl.Plo -rm -f ./$(DEPDIR)/hwloc_pci_la-topology-pci.Plo @@ -1293,6 +1353,7 @@ maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/topology-gl.Plo -rm -f ./$(DEPDIR)/topology-hardwired.Plo -rm -f ./$(DEPDIR)/topology-hpux.Plo + -rm -f ./$(DEPDIR)/topology-levelzero.Plo -rm -f ./$(DEPDIR)/topology-linux.Plo -rm -f ./$(DEPDIR)/topology-netbsd.Plo -rm -f ./$(DEPDIR)/topology-noos.Plo @@ -1333,9 +1394,9 @@ uninstall-am: uninstall-libLTLIBRARIES uninstall-local \ .PHONY: CTAGS GTAGS TAGS all all-am all-local am--depfiles check \ check-am clean clean-checkLTLIBRARIES clean-generic \ - clean-libLTLIBRARIES clean-libtool clean-local \ - clean-noinstLTLIBRARIES clean-pluginsLTLIBRARIES cscopelist-am \ - ctags ctags-am distclean distclean-compile distclean-generic \ + clean-libLTLIBRARIES clean-libtool clean-noinstLTLIBRARIES \ + clean-pluginsLTLIBRARIES cscopelist-am ctags ctags-am \ + distclean distclean-compile distclean-generic \ distclean-libtool 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 \ @@ -1354,13 +1415,9 @@ uninstall-am: uninstall-libLTLIBRARIES uninstall-local \ @HWLOC_HAVE_WINDOWS_TRUE@export LC_MESSAGES -@HWLOC_HAVE_MS_LIB_TRUE@@HWLOC_HAVE_WINDOWS_TRUE@dolib$(EXEEXT): dolib.c -@HWLOC_HAVE_MS_LIB_TRUE@@HWLOC_HAVE_WINDOWS_TRUE@ $(CC_FOR_BUILD) $< -o $@ -@HWLOC_HAVE_MS_LIB_TRUE@@HWLOC_HAVE_WINDOWS_TRUE@.libs/libhwloc.lib: libhwloc.la dolib$(EXEEXT) -@HWLOC_HAVE_MS_LIB_TRUE@@HWLOC_HAVE_WINDOWS_TRUE@ [ ! -r .libs/libhwloc.def ] || ./dolib$(EXEEXT) "$(HWLOC_MS_LIB)" $(HWLOC_MS_LIB_ARCH) .libs/libhwloc.def $(libhwloc_so_version) .libs/libhwloc.lib +@HWLOC_HAVE_MS_LIB_TRUE@@HWLOC_HAVE_WINDOWS_TRUE@.libs/libhwloc.lib: libhwloc.la +@HWLOC_HAVE_MS_LIB_TRUE@@HWLOC_HAVE_WINDOWS_TRUE@ [ ! -r .libs/libhwloc.def ] || "$(HWLOC_MS_LIB)" -machine:$(HWLOC_MS_LIB_ARCH) -def:.libs/libhwloc.def -name:libhwloc-$(libhwloc_so_name) -out:.libs/libhwloc.lib @HWLOC_HAVE_MS_LIB_TRUE@@HWLOC_HAVE_WINDOWS_TRUE@all-local: .libs/libhwloc.lib -@HWLOC_HAVE_MS_LIB_TRUE@@HWLOC_HAVE_WINDOWS_TRUE@clean-local: -@HWLOC_HAVE_MS_LIB_TRUE@@HWLOC_HAVE_WINDOWS_TRUE@ $(RM) dolib$(EXEEXT) @HWLOC_HAVE_WINDOWS_TRUE@install-exec-hook: @HWLOC_HAVE_WINDOWS_TRUE@ [ ! -r .libs/libhwloc.def ] || $(INSTALL) .libs/libhwloc.def $(DESTDIR)$(libdir) diff --git a/contrib/hwloc/hwloc/components.c b/contrib/hwloc/hwloc/components.c index 496ed23229..81e3116b34 100644 --- a/contrib/hwloc/hwloc/components.c +++ b/contrib/hwloc/hwloc/components.c @@ -1,5 +1,5 @@ /* - * Copyright © 2009-2020 Inria. All rights reserved. + * Copyright © 2009-2021 Inria. All rights reserved. * Copyright © 2012 Université Bordeaux * See COPYING in top-level directory. */ @@ -124,7 +124,7 @@ hwloc_dlforeachfile(const char *_paths, *colon = '\0'; if (hwloc_plugins_verbose) - fprintf(stderr, " Looking under %s\n", path); + fprintf(stderr, "hwloc: Looking under %s\n", path); dir = opendir(path); if (!dir) @@ -198,7 +198,7 @@ hwloc__dlforeach_cb(const char *filename, void *_data __hwloc_attribute_unused) char *componentsymbolname; if (hwloc_plugins_verbose) - fprintf(stderr, "Plugin dlforeach found `%s'\n", filename); + fprintf(stderr, "hwloc: Plugin dlforeach found `%s'\n", filename); basename = strrchr(filename, '/'); if (!basename) @@ -208,7 +208,7 @@ hwloc__dlforeach_cb(const char *filename, void *_data __hwloc_attribute_unused) if (hwloc_plugins_blacklist && strstr(hwloc_plugins_blacklist, basename)) { if (hwloc_plugins_verbose) - fprintf(stderr, "Plugin `%s' is blacklisted in the environment\n", basename); + fprintf(stderr, "hwloc: Plugin `%s' is blacklisted in the environment\n", basename); goto out; } @@ -216,14 +216,14 @@ hwloc__dlforeach_cb(const char *filename, void *_data __hwloc_attribute_unused) handle = hwloc_dlopenext(filename); if (!handle) { if (hwloc_plugins_verbose) - fprintf(stderr, "Failed to load plugin: %s\n", hwloc_dlerror()); + fprintf(stderr, "hwloc: Failed to load plugin: %s\n", hwloc_dlerror()); goto out; } componentsymbolname = malloc(strlen(basename)+10+1); if (!componentsymbolname) { if (hwloc_plugins_verbose) - fprintf(stderr, "Failed to allocation component `%s' symbol\n", + fprintf(stderr, "hwloc: Failed to allocation component `%s' symbol\n", basename); goto out_with_handle; } @@ -231,38 +231,38 @@ hwloc__dlforeach_cb(const char *filename, void *_data __hwloc_attribute_unused) component = hwloc_dlsym(handle, componentsymbolname); if (!component) { if (hwloc_plugins_verbose) - fprintf(stderr, "Failed to find component symbol `%s'\n", + fprintf(stderr, "hwloc: Failed to find component symbol `%s'\n", componentsymbolname); free(componentsymbolname); goto out_with_handle; } if (component->abi != HWLOC_COMPONENT_ABI) { if (hwloc_plugins_verbose) - fprintf(stderr, "Plugin symbol ABI %u instead of %d\n", + fprintf(stderr, "hwloc: Plugin symbol ABI %u instead of %d\n", component->abi, HWLOC_COMPONENT_ABI); free(componentsymbolname); goto out_with_handle; } if (hwloc_plugins_verbose) - fprintf(stderr, "Plugin contains expected symbol `%s'\n", + fprintf(stderr, "hwloc: Plugin contains expected symbol `%s'\n", componentsymbolname); free(componentsymbolname); if (HWLOC_COMPONENT_TYPE_DISC == component->type) { if (strncmp(basename, "hwloc_", 6)) { if (hwloc_plugins_verbose) - fprintf(stderr, "Plugin name `%s' doesn't match its type DISCOVERY\n", basename); + fprintf(stderr, "hwloc: Plugin name `%s' doesn't match its type DISCOVERY\n", basename); goto out_with_handle; } } else if (HWLOC_COMPONENT_TYPE_XML == component->type) { if (strncmp(basename, "hwloc_xml_", 10)) { if (hwloc_plugins_verbose) - fprintf(stderr, "Plugin name `%s' doesn't match its type XML\n", basename); + fprintf(stderr, "hwloc: Plugin name `%s' doesn't match its type XML\n", basename); goto out_with_handle; } } else { if (hwloc_plugins_verbose) - fprintf(stderr, "Plugin name `%s' has invalid type %u\n", + fprintf(stderr, "hwloc: Plugin name `%s' has invalid type %u\n", basename, (unsigned) component->type); goto out_with_handle; } @@ -277,7 +277,7 @@ hwloc__dlforeach_cb(const char *filename, void *_data __hwloc_attribute_unused) desc->handle = handle; desc->next = NULL; if (hwloc_plugins_verbose) - fprintf(stderr, "Plugin descriptor `%s' ready\n", basename); + fprintf(stderr, "hwloc: Plugin descriptor `%s' ready\n", basename); /* append to the list */ prevdesc = &hwloc_plugins; @@ -285,7 +285,7 @@ hwloc__dlforeach_cb(const char *filename, void *_data __hwloc_attribute_unused) prevdesc = &((*prevdesc)->next); *prevdesc = desc; if (hwloc_plugins_verbose) - fprintf(stderr, "Plugin descriptor `%s' queued\n", basename); + fprintf(stderr, "hwloc: Plugin descriptor `%s' queued\n", basename); return 0; out_with_handle: @@ -300,7 +300,7 @@ hwloc_plugins_exit(void) struct hwloc__plugin_desc *desc, *next; if (hwloc_plugins_verbose) - fprintf(stderr, "Closing all plugins\n"); + fprintf(stderr, "hwloc: Closing all plugins\n"); desc = hwloc_plugins; while (desc) { @@ -340,7 +340,7 @@ hwloc_plugins_init(void) hwloc_plugins = NULL; if (hwloc_plugins_verbose) - fprintf(stderr, "Starting plugin dlforeach in %s\n", path); + fprintf(stderr, "hwloc: Starting plugin dlforeach in %s\n", path); err = hwloc_dlforeachfile(path, hwloc__dlforeach_cb, NULL); if (err) goto out_with_init; @@ -364,14 +364,14 @@ hwloc_disc_component_register(struct hwloc_disc_component *component, /* check that the component name is valid */ if (!strcmp(component->name, HWLOC_COMPONENT_STOP_NAME)) { if (hwloc_components_verbose) - fprintf(stderr, "Cannot register discovery component with reserved name `" HWLOC_COMPONENT_STOP_NAME "'\n"); + fprintf(stderr, "hwloc: Cannot register discovery component with reserved name `" HWLOC_COMPONENT_STOP_NAME "'\n"); return -1; } if (strchr(component->name, HWLOC_COMPONENT_EXCLUDE_CHAR) || strchr(component->name, HWLOC_COMPONENT_PHASESEP_CHAR) || strcspn(component->name, HWLOC_COMPONENT_SEPS) != strlen(component->name)) { if (hwloc_components_verbose) - fprintf(stderr, "Cannot register discovery component with name `%s' containing reserved characters `%c" HWLOC_COMPONENT_SEPS "'\n", + fprintf(stderr, "hwloc: Cannot register discovery component with name `%s' containing reserved characters `%c" HWLOC_COMPONENT_SEPS "'\n", component->name, HWLOC_COMPONENT_EXCLUDE_CHAR); return -1; } @@ -386,8 +386,9 @@ hwloc_disc_component_register(struct hwloc_disc_component *component, |HWLOC_DISC_PHASE_MISC |HWLOC_DISC_PHASE_ANNOTATE |HWLOC_DISC_PHASE_TWEAK))) { - fprintf(stderr, "Cannot register discovery component `%s' with invalid phases 0x%x\n", - component->name, component->phases); + if (hwloc_hide_errors() < 2) + fprintf(stderr, "hwloc: Cannot register discovery component `%s' with invalid phases 0x%x\n", + component->name, component->phases); return -1; } @@ -398,13 +399,13 @@ hwloc_disc_component_register(struct hwloc_disc_component *component, if ((*prev)->priority < component->priority) { /* drop the existing component */ if (hwloc_components_verbose) - fprintf(stderr, "Dropping previously registered discovery component `%s', priority %u lower than new one %u\n", + fprintf(stderr, "hwloc: Dropping previously registered discovery component `%s', priority %u lower than new one %u\n", (*prev)->name, (*prev)->priority, component->priority); *prev = (*prev)->next; } else { /* drop the new one */ if (hwloc_components_verbose) - fprintf(stderr, "Ignoring new discovery component `%s', priority %u lower than previously registered one %u\n", + fprintf(stderr, "hwloc: Ignoring new discovery component `%s', priority %u lower than previously registered one %u\n", component->name, component->priority, (*prev)->priority); return -1; } @@ -412,7 +413,7 @@ hwloc_disc_component_register(struct hwloc_disc_component *component, prev = &((*prev)->next); } if (hwloc_components_verbose) - fprintf(stderr, "Registered discovery component `%s' phases 0x%x with priority %u (%s%s)\n", + fprintf(stderr, "hwloc: Registered discovery component `%s' phases 0x%x with priority %u (%s%s)\n", component->name, component->phases, component->priority, filename ? "from plugin " : "statically build", filename ? filename : ""); @@ -475,15 +476,16 @@ hwloc_components_init(void) /* hwloc_static_components is created by configure in static-components.h */ for(i=0; NULL != hwloc_static_components[i]; i++) { if (hwloc_static_components[i]->flags) { - fprintf(stderr, "Ignoring static component with invalid flags %lx\n", - hwloc_static_components[i]->flags); + if (hwloc_hide_errors() < 2) + fprintf(stderr, "hwloc: Ignoring static component with invalid flags %lx\n", + hwloc_static_components[i]->flags); continue; } /* initialize the component */ if (hwloc_static_components[i]->init && hwloc_static_components[i]->init(0) < 0) { if (hwloc_components_verbose) - fprintf(stderr, "Ignoring static component, failed to initialize\n"); + fprintf(stderr, "hwloc: Ignoring static component, failed to initialize\n"); continue; } /* queue ->finalize() callback if any */ @@ -503,15 +505,16 @@ hwloc_components_init(void) #ifdef HWLOC_HAVE_PLUGINS for(desc = hwloc_plugins; NULL != desc; desc = desc->next) { if (desc->component->flags) { - fprintf(stderr, "Ignoring plugin `%s' component with invalid flags %lx\n", - desc->name, desc->component->flags); + if (hwloc_hide_errors() < 2) + fprintf(stderr, "hwloc: Ignoring plugin `%s' component with invalid flags %lx\n", + desc->name, desc->component->flags); continue; } /* initialize the component */ if (desc->component->init && desc->component->init(0) < 0) { if (hwloc_components_verbose) - fprintf(stderr, "Ignoring plugin `%s', failed to initialize\n", desc->name); + fprintf(stderr, "hwloc: Ignoring plugin `%s', failed to initialize\n", desc->name); continue; } /* queue ->finalize() callback if any */ @@ -608,7 +611,7 @@ hwloc_disc_component_blacklist_one(struct hwloc_topology *topology, /* replace linuxpci and linuxio with linux (with IO phases) * for backward compatibility with pre-v2.0 and v2.0 respectively */ if (hwloc_components_verbose) - fprintf(stderr, "Replacing deprecated component `%s' with `linux' IO phases in blacklisting\n", name); + fprintf(stderr, "hwloc: Replacing deprecated component `%s' with `linux' IO phases in blacklisting\n", name); comp = hwloc_disc_component_find("linux", NULL); phases = HWLOC_DISC_PHASE_PCI | HWLOC_DISC_PHASE_IO | HWLOC_DISC_PHASE_MISC | HWLOC_DISC_PHASE_ANNOTATE; @@ -624,7 +627,7 @@ hwloc_disc_component_blacklist_one(struct hwloc_topology *topology, } if (hwloc_components_verbose) - fprintf(stderr, "Blacklisting component `%s` phases 0x%x\n", comp->name, phases); + fprintf(stderr, "hwloc: Blacklisting component `%s` phases 0x%x\n", comp->name, phases); for(i=0; inr_blacklisted_components; i++) { if (topology->blacklisted_components[i].component == comp) { @@ -727,7 +730,7 @@ hwloc_disc_component_try_enable(struct hwloc_topology *topology, if (hwloc_components_verbose) /* do not warn if envvar_forced since system-wide HWLOC_COMPONENTS must be silently ignored after set_xml() etc. */ - fprintf(stderr, "Excluding discovery component `%s' phases 0x%x, conflicts with excludes 0x%x\n", + fprintf(stderr, "hwloc: Excluding discovery component `%s' phases 0x%x, conflicts with excludes 0x%x\n", comp->name, comp->phases, topology->backend_excluded_phases); return -1; } @@ -735,8 +738,8 @@ hwloc_disc_component_try_enable(struct hwloc_topology *topology, backend = comp->instantiate(topology, comp, topology->backend_excluded_phases | blacklisted_phases, NULL, NULL, NULL); if (!backend) { - if (hwloc_components_verbose || envvar_forced) - fprintf(stderr, "Failed to instantiate discovery component `%s'\n", comp->name); + if (hwloc_components_verbose || (envvar_forced && hwloc_hide_errors() < 2)) + fprintf(stderr, "hwloc: Failed to instantiate discovery component `%s'\n", comp->name); return -1; } @@ -817,7 +820,7 @@ hwloc_disc_components_enable_others(struct hwloc_topology *topology) name = curenv; if (!strcmp(name, "linuxpci") || !strcmp(name, "linuxio")) { if (hwloc_components_verbose) - fprintf(stderr, "Replacing deprecated component `%s' with `linux' in envvar forcing\n", name); + fprintf(stderr, "hwloc: Replacing deprecated component `%s' with `linux' in envvar forcing\n", name); name = "linux"; } @@ -832,7 +835,8 @@ hwloc_disc_components_enable_others(struct hwloc_topology *topology) if (comp->phases & ~blacklisted_phases) hwloc_disc_component_try_enable(topology, comp, 1 /* envvar forced */, blacklisted_phases); } else { - fprintf(stderr, "Cannot find discovery component `%s'\n", name); + if (hwloc_hide_errors() < 2) + fprintf(stderr, "hwloc: Cannot find discovery component `%s'\n", name); } /* restore chars (the second loop below needs env to be unmodified) */ @@ -864,7 +868,7 @@ hwloc_disc_components_enable_others(struct hwloc_topology *topology) if (!(comp->phases & ~blacklisted_phases)) { if (hwloc_components_verbose) - fprintf(stderr, "Excluding blacklisted discovery component `%s' phases 0x%x\n", + fprintf(stderr, "hwloc: Excluding blacklisted discovery component `%s' phases 0x%x\n", comp->name, comp->phases); goto nextcomp; } @@ -879,7 +883,7 @@ hwloc_disc_components_enable_others(struct hwloc_topology *topology) /* print a summary */ int first = 1; backend = topology->backends; - fprintf(stderr, "Final list of enabled discovery components: "); + fprintf(stderr, "hwloc: Final list of enabled discovery components: "); while (backend != NULL) { fprintf(stderr, "%s%s(0x%x)", first ? "" : ",", backend->component->name, backend->phases); backend = backend->next; @@ -935,7 +939,7 @@ hwloc_backend_alloc(struct hwloc_topology *topology, /* filter-out component phases that are excluded */ backend->phases = component->phases & ~topology->backend_excluded_phases; if (backend->phases != component->phases && hwloc_components_verbose) - fprintf(stderr, "Trying discovery component `%s' with phases 0x%x instead of 0x%x\n", + fprintf(stderr, "hwloc: Trying discovery component `%s' with phases 0x%x instead of 0x%x\n", component->name, backend->phases, component->phases); backend->flags = 0; backend->discover = NULL; @@ -963,8 +967,9 @@ hwloc_backend_enable(struct hwloc_backend *backend) /* check backend flags */ if (backend->flags) { - fprintf(stderr, "Cannot enable discovery component `%s' phases 0x%x with unknown flags %lx\n", - backend->component->name, backend->component->phases, backend->flags); + if (hwloc_hide_errors() < 2) + fprintf(stderr, "hwloc: Cannot enable discovery component `%s' phases 0x%x with unknown flags %lx\n", + backend->component->name, backend->component->phases, backend->flags); return -1; } @@ -973,7 +978,7 @@ hwloc_backend_enable(struct hwloc_backend *backend) while (NULL != *pprev) { if ((*pprev)->component == backend->component) { if (hwloc_components_verbose) - fprintf(stderr, "Cannot enable discovery component `%s' phases 0x%x twice\n", + fprintf(stderr, "hwloc: Cannot enable discovery component `%s' phases 0x%x twice\n", backend->component->name, backend->component->phases); hwloc_backend_disable(backend); errno = EBUSY; @@ -983,7 +988,7 @@ hwloc_backend_enable(struct hwloc_backend *backend) } if (hwloc_components_verbose) - fprintf(stderr, "Enabling discovery component `%s' with phases 0x%x (among 0x%x)\n", + fprintf(stderr, "hwloc: Enabling discovery component `%s' with phases 0x%x (among 0x%x)\n", backend->component->name, backend->phases, backend->component->phases); /* enqueue at the end */ @@ -1067,7 +1072,7 @@ hwloc_backends_disable_all(struct hwloc_topology *topology) while (NULL != (backend = topology->backends)) { struct hwloc_backend *next = backend->next; if (hwloc_components_verbose) - fprintf(stderr, "Disabling discovery component `%s'\n", + fprintf(stderr, "hwloc: Disabling discovery component `%s'\n", backend->component->name); hwloc_backend_disable(backend); topology->backends = next; diff --git a/contrib/hwloc/hwloc/cpukinds.c b/contrib/hwloc/hwloc/cpukinds.c index ef6297d7eb..fc05f17ee9 100644 --- a/contrib/hwloc/hwloc/cpukinds.c +++ b/contrib/hwloc/hwloc/cpukinds.c @@ -42,6 +42,9 @@ hwloc_internal_cpukinds_dup(hwloc_topology_t new, hwloc_topology_t old) struct hwloc_internal_cpukind_s *kinds; unsigned i; + if (!old->nr_cpukinds) + return 0; + kinds = hwloc_tma_malloc(tma, old->nr_cpukinds * sizeof(*kinds)); if (!kinds) return -1; @@ -343,7 +346,8 @@ enum hwloc_cpukinds_ranking { HWLOC_CPUKINDS_RANKING_DEFAULT, /* forced + frequency on ARM, forced + coretype_frequency otherwise */ HWLOC_CPUKINDS_RANKING_NO_FORCED_EFFICIENCY, /* default without forced */ HWLOC_CPUKINDS_RANKING_FORCED_EFFICIENCY, - HWLOC_CPUKINDS_RANKING_CORETYPE_FREQUENCY, + HWLOC_CPUKINDS_RANKING_CORETYPE_FREQUENCY, /* either coretype or frequency or both */ + HWLOC_CPUKINDS_RANKING_CORETYPE_FREQUENCY_STRICT, /* both coretype and frequency are required */ HWLOC_CPUKINDS_RANKING_CORETYPE, HWLOC_CPUKINDS_RANKING_FREQUENCY, HWLOC_CPUKINDS_RANKING_FREQUENCY_MAX, @@ -358,9 +362,9 @@ hwloc__cpukinds_try_rank_by_info(struct hwloc_topology *topology, { unsigned i; - if (HWLOC_CPUKINDS_RANKING_CORETYPE_FREQUENCY == heuristics) { - hwloc_debug("Trying to rank cpukinds by coretype+frequency...\n"); - /* we need intel_core_type + (base or max freq) for all kinds */ + if (HWLOC_CPUKINDS_RANKING_CORETYPE_FREQUENCY_STRICT == heuristics) { + hwloc_debug("Trying to rank cpukinds by coretype+frequency_strict...\n"); + /* we need intel_core_type AND (base or max freq) for all kinds */ if (!summary->have_intel_core_type || (!summary->have_max_freq && !summary->have_base_freq)) return -1; @@ -373,6 +377,21 @@ hwloc__cpukinds_try_rank_by_info(struct hwloc_topology *topology, kind->ranking_value = (summary->summaries[i].intel_core_type << 20) + summary->summaries[i].max_freq; } + } else if (HWLOC_CPUKINDS_RANKING_CORETYPE_FREQUENCY == heuristics) { + hwloc_debug("Trying to rank cpukinds by coretype+frequency...\n"); + /* we need intel_core_type OR (base or max freq) for all kinds */ + if (!summary->have_intel_core_type + && (!summary->have_max_freq && !summary->have_base_freq)) + return -1; + /* rank first by coretype (Core>>Atom) then by frequency, base if available, max otherwise */ + for(i=0; inr_cpukinds; i++) { + struct hwloc_internal_cpukind_s *kind = &topology->cpukinds[i]; + if (summary->have_base_freq) + kind->ranking_value = (summary->summaries[i].intel_core_type << 20) + summary->summaries[i].base_freq; + else + kind->ranking_value = (summary->summaries[i].intel_core_type << 20) + summary->summaries[i].max_freq; + } + } else if (HWLOC_CPUKINDS_RANKING_CORETYPE == heuristics) { hwloc_debug("Trying to rank cpukinds by coretype...\n"); /* we need intel_core_type */ @@ -429,7 +448,9 @@ static int hwloc__cpukinds_compare_ranking_values(const void *_a, const void *_b { const struct hwloc_internal_cpukind_s *a = _a; const struct hwloc_internal_cpukind_s *b = _b; - return a->ranking_value - b->ranking_value; + uint64_t arv = a->ranking_value; + uint64_t brv = b->ranking_value; + return arv < brv ? -1 : arv > brv ? 1 : 0; } /* this function requires ranking values to be unique */ @@ -469,6 +490,8 @@ hwloc_internal_cpukinds_rank(struct hwloc_topology *topology) heuristics = HWLOC_CPUKINDS_RANKING_NONE; else if (!strcmp(env, "coretype+frequency")) heuristics = HWLOC_CPUKINDS_RANKING_CORETYPE_FREQUENCY; + else if (!strcmp(env, "coretype+frequency_strict")) + heuristics = HWLOC_CPUKINDS_RANKING_CORETYPE_FREQUENCY_STRICT; else if (!strcmp(env, "coretype")) heuristics = HWLOC_CPUKINDS_RANKING_CORETYPE; else if (!strcmp(env, "frequency")) @@ -481,16 +504,14 @@ hwloc_internal_cpukinds_rank(struct hwloc_topology *topology) heuristics = HWLOC_CPUKINDS_RANKING_FORCED_EFFICIENCY; else if (!strcmp(env, "no_forced_efficiency")) heuristics = HWLOC_CPUKINDS_RANKING_NO_FORCED_EFFICIENCY; - else if (!hwloc_hide_errors()) - fprintf(stderr, "Failed to recognize HWLOC_CPUKINDS_RANKING value %s\n", env); + else if (hwloc_hide_errors() < 2) + fprintf(stderr, "hwloc: Failed to recognize HWLOC_CPUKINDS_RANKING value %s\n", env); } if (heuristics == HWLOC_CPUKINDS_RANKING_DEFAULT || heuristics == HWLOC_CPUKINDS_RANKING_NO_FORCED_EFFICIENCY) { /* default is forced_efficiency first */ struct hwloc_cpukinds_info_summary summary; - enum hwloc_cpukinds_ranking subheuristics; - const char *arch; if (heuristics == HWLOC_CPUKINDS_RANKING_DEFAULT) hwloc_debug("Using default ranking strategy...\n"); @@ -508,16 +529,7 @@ hwloc_internal_cpukinds_rank(struct hwloc_topology *topology) goto failed; hwloc__cpukinds_summarize_info(topology, &summary); - arch = hwloc_obj_get_info_by_name(topology->levels[0][0], "Architecture"); - /* TODO: rather coretype_frequency only on x86/Intel? */ - if (arch && (!strncmp(arch, "arm", 3) || !strncmp(arch, "aarch", 5))) - /* then frequency on ARM */ - subheuristics = HWLOC_CPUKINDS_RANKING_FREQUENCY; - else - /* or coretype+frequency otherwise */ - subheuristics = HWLOC_CPUKINDS_RANKING_CORETYPE_FREQUENCY; - - err = hwloc__cpukinds_try_rank_by_info(topology, subheuristics, &summary); + err = hwloc__cpukinds_try_rank_by_info(topology, HWLOC_CPUKINDS_RANKING_CORETYPE_FREQUENCY, &summary); free(summary.summaries); if (!err) goto ready; diff --git a/contrib/hwloc/hwloc/distances.c b/contrib/hwloc/hwloc/distances.c index c4854956b1..bfc7d61d50 100644 --- a/contrib/hwloc/hwloc/distances.c +++ b/contrib/hwloc/hwloc/distances.c @@ -1,5 +1,5 @@ /* - * Copyright © 2010-2020 Inria. All rights reserved. + * Copyright © 2010-2022 Inria. All rights reserved. * Copyright © 2011-2012 Université Bordeaux * Copyright © 2011 Cisco Systems, Inc. All rights reserved. * See COPYING in top-level directory. @@ -17,6 +17,37 @@ static struct hwloc_internal_distances_s * hwloc__internal_distances_from_public(hwloc_topology_t topology, struct hwloc_distances_s *distances); +static void +hwloc__groups_by_distances(struct hwloc_topology *topology, unsigned nbobjs, struct hwloc_obj **objs, uint64_t *values, unsigned long kind, unsigned nbaccuracies, float *accuracies, int needcheck); + +static void +hwloc_internal_distances_restrict(hwloc_obj_t *objs, + uint64_t *indexes, + hwloc_obj_type_t *different_types, + uint64_t *values, + unsigned nbobjs, unsigned disappeared); + +static void +hwloc_internal_distances_print_matrix(struct hwloc_internal_distances_s *dist) +{ + unsigned nbobjs = dist->nbobjs; + hwloc_obj_t *objs = dist->objs; + hwloc_uint64_t *values = dist->values; + int gp = !HWLOC_DIST_TYPE_USE_OS_INDEX(dist->unique_type); + unsigned i, j; + + fprintf(stderr, "%s", gp ? "gp_index" : "os_index"); + for(j=0; jgp_index : objs[j]->os_index)); + fprintf(stderr, "\n"); + for(i=0; igp_index : objs[i]->os_index)); + for(j=0; jname); + free(dist->indexes); + free(dist->objs); + free(dist->different_types); + free(dist->values); + free(dist); +} -/* insert a distance matrix in the topology. - * the caller gives us the distances and objs pointers, we'll free them later. +/* prepare a distances handle for later commit in the topology. + * we duplicate the caller's name. */ -static int -hwloc_internal_distances__add(hwloc_topology_t topology, const char *name, - hwloc_obj_type_t unique_type, hwloc_obj_type_t *different_types, - unsigned nbobjs, hwloc_obj_t *objs, uint64_t *indexes, uint64_t *values, - unsigned long kind, unsigned iflags) +hwloc_backend_distances_add_handle_t +hwloc_backend_distances_add_create(hwloc_topology_t topology, + const char *name, unsigned long kind, unsigned long flags) { struct hwloc_internal_distances_s *dist; - if (different_types) { - kind |= HWLOC_DISTANCES_KIND_HETEROGENEOUS_TYPES; /* the user isn't forced to give it */ - } else if (kind & HWLOC_DISTANCES_KIND_HETEROGENEOUS_TYPES) { + if (flags) { errno = EINVAL; goto err; } @@ -273,110 +310,54 @@ hwloc_internal_distances__add(hwloc_topology_t topology, const char *name, if (!dist) goto err; - if (name) + if (name) { dist->name = strdup(name); /* ignore failure */ - - dist->unique_type = unique_type; - dist->different_types = different_types; - dist->nbobjs = nbobjs; - dist->kind = kind; - dist->iflags = iflags; - - assert(!!(iflags & HWLOC_INTERNAL_DIST_FLAG_OBJS_VALID) == !!objs); - - if (!objs) { - assert(indexes); - /* we only have indexes, we'll refresh objs from there */ - dist->indexes = indexes; - dist->objs = calloc(nbobjs, sizeof(hwloc_obj_t)); - if (!dist->objs) + if (!dist->name) goto err_with_dist; - - } else { - unsigned i; - assert(!indexes); - /* we only have objs, generate the indexes arrays so that we can refresh objs later */ - dist->objs = objs; - dist->indexes = malloc(nbobjs * sizeof(*dist->indexes)); - if (!dist->indexes) - goto err_with_dist; - if (HWLOC_DIST_TYPE_USE_OS_INDEX(dist->unique_type)) { - for(i=0; iindexes[i] = objs[i]->os_index; - } else { - for(i=0; iindexes[i] = objs[i]->gp_index; - } } - dist->values = values; + dist->kind = kind; + dist->iflags = HWLOC_INTERNAL_DIST_FLAG_NOT_COMMITTED; - dist->id = topology->next_dist_id++; + dist->unique_type = HWLOC_OBJ_TYPE_NONE; + dist->different_types = NULL; + dist->nbobjs = 0; + dist->indexes = NULL; + dist->objs = NULL; + dist->values = NULL; - if (topology->last_dist) - topology->last_dist->next = dist; - else - topology->first_dist = dist; - dist->prev = topology->last_dist; - dist->next = NULL; - topology->last_dist = dist; - return 0; + dist->id = topology->next_dist_id++; + return dist; err_with_dist: - if (name) - free(dist->name); - free(dist); + hwloc_backend_distances_add__cancel(dist); err: - free(different_types); - free(objs); - free(indexes); - free(values); - return -1; + return NULL; } -int hwloc_internal_distances_add_by_index(hwloc_topology_t topology, const char *name, - hwloc_obj_type_t unique_type, hwloc_obj_type_t *different_types, unsigned nbobjs, uint64_t *indexes, uint64_t *values, - unsigned long kind, unsigned long flags) +/* attach objects and values to a distances handle. + * on success, objs and values arrays are attached and will be freed with the distances. + * on failure, the handle is freed. + */ +int +hwloc_backend_distances_add_values(hwloc_topology_t topology __hwloc_attribute_unused, + hwloc_backend_distances_add_handle_t handle, + unsigned nbobjs, hwloc_obj_t *objs, + hwloc_uint64_t *values, + unsigned long flags) { - unsigned iflags = 0; /* objs not valid */ - - if (nbobjs < 2) { - errno = EINVAL; - goto err; - } + struct hwloc_internal_distances_s *dist = handle; + hwloc_obj_type_t unique_type, *different_types = NULL; + hwloc_uint64_t *indexes = NULL; + unsigned i, disappeared = 0; - /* cannot group without objects, - * and we don't group from XML anyway since the hwloc that generated the XML should have grouped already. - */ - if (flags & HWLOC_DISTANCES_ADD_FLAG_GROUP) { + if (dist->nbobjs || !(dist->iflags & HWLOC_INTERNAL_DIST_FLAG_NOT_COMMITTED)) { + /* target distances is already set */ errno = EINVAL; goto err; } - return hwloc_internal_distances__add(topology, name, unique_type, different_types, nbobjs, NULL, indexes, values, kind, iflags); - - err: - free(indexes); - free(values); - free(different_types); - return -1; -} - -static void -hwloc_internal_distances_restrict(hwloc_obj_t *objs, - uint64_t *indexes, - uint64_t *values, - unsigned nbobjs, unsigned disappeared); - -int hwloc_internal_distances_add(hwloc_topology_t topology, const char *name, - unsigned nbobjs, hwloc_obj_t *objs, uint64_t *values, - unsigned long kind, unsigned long flags) -{ - hwloc_obj_type_t unique_type, *different_types; - unsigned i, disappeared = 0; - unsigned iflags = HWLOC_INTERNAL_DIST_FLAG_OBJS_VALID; - - if (nbobjs < 2) { + if (flags || nbobjs < 2 || !objs || !values) { errno = EINVAL; goto err; } @@ -389,15 +370,18 @@ int hwloc_internal_distances_add(hwloc_topology_t topology, const char *name, /* some objects are NULL */ if (disappeared == nbobjs) { /* nothing left, drop the matrix */ - free(objs); - free(values); - return 0; + errno = ENOENT; + goto err; } /* restrict the matrix */ - hwloc_internal_distances_restrict(objs, NULL, values, nbobjs, disappeared); + hwloc_internal_distances_restrict(objs, NULL, NULL, values, nbobjs, disappeared); nbobjs -= disappeared; } + indexes = malloc(nbobjs * sizeof(*indexes)); + if (!indexes) + goto err; + unique_type = objs[0]->type; for(i=1; itype != unique_type) { @@ -408,16 +392,108 @@ int hwloc_internal_distances_add(hwloc_topology_t topology, const char *name, /* heterogeneous types */ different_types = malloc(nbobjs * sizeof(*different_types)); if (!different_types) - goto err; + goto err_with_indexes; for(i=0; itype; + } - } else { - /* homogeneous types */ - different_types = NULL; + dist->nbobjs = nbobjs; + dist->objs = objs; + dist->iflags |= HWLOC_INTERNAL_DIST_FLAG_OBJS_VALID; + dist->indexes = indexes; + dist->unique_type = unique_type; + dist->different_types = different_types; + dist->values = values; + + if (different_types) + dist->kind |= HWLOC_DISTANCES_KIND_HETEROGENEOUS_TYPES; + + if (HWLOC_DIST_TYPE_USE_OS_INDEX(dist->unique_type)) { + for(i=0; iindexes[i] = objs[i]->os_index; + } else { + for(i=0; iindexes[i] = objs[i]->gp_index; + } + + return 0; + + err_with_indexes: + free(indexes); + err: + hwloc_backend_distances_add__cancel(dist); + return -1; +} + +/* attach objects and values to a distance handle. + * on success, objs and values arrays are attached and will be freed with the distances. + * on failure, the handle is freed. + */ +static int +hwloc_backend_distances_add_values_by_index(hwloc_topology_t topology __hwloc_attribute_unused, + hwloc_backend_distances_add_handle_t handle, + unsigned nbobjs, hwloc_obj_type_t unique_type, hwloc_obj_type_t *different_types, hwloc_uint64_t *indexes, + hwloc_uint64_t *values) +{ + struct hwloc_internal_distances_s *dist = handle; + hwloc_obj_t *objs; + + if (dist->nbobjs || !(dist->iflags & HWLOC_INTERNAL_DIST_FLAG_NOT_COMMITTED)) { + /* target distances is already set */ + errno = EINVAL; + goto err; + } + if (nbobjs < 2 || !indexes || !values || (unique_type == HWLOC_OBJ_TYPE_NONE && !different_types)) { + errno = EINVAL; + goto err; + } + + objs = malloc(nbobjs * sizeof(*objs)); + if (!objs) + goto err; + + dist->nbobjs = nbobjs; + dist->objs = objs; + dist->indexes = indexes; + dist->unique_type = unique_type; + dist->different_types = different_types; + dist->values = values; + + if (different_types) + dist->kind |= HWLOC_DISTANCES_KIND_HETEROGENEOUS_TYPES; + + return 0; + + err: + hwloc_backend_distances_add__cancel(dist); + return -1; +} + +/* commit a distances handle. + * on failure, the handle is freed with its objects and values arrays. + */ +int +hwloc_backend_distances_add_commit(hwloc_topology_t topology, + hwloc_backend_distances_add_handle_t handle, + unsigned long flags) +{ + struct hwloc_internal_distances_s *dist = handle; + + if (!dist->nbobjs || !(dist->iflags & HWLOC_INTERNAL_DIST_FLAG_NOT_COMMITTED)) { + /* target distances not ready for commit */ + errno = EINVAL; + goto err; } - if (topology->grouping && (flags & HWLOC_DISTANCES_ADD_FLAG_GROUP) && !different_types) { + if ((flags & HWLOC_DISTANCES_ADD_FLAG_GROUP) && !dist->objs) { + /* cannot group without objects, + * and we don't group from XML anyway since the hwloc that generated the XML should have grouped already. + */ + errno = EINVAL; + goto err; + } + + if (topology->grouping && (flags & HWLOC_DISTANCES_ADD_FLAG_GROUP) && !dist->different_types) { float full_accuracy = 0.f; float *accuracies; unsigned nbaccuracies; @@ -431,26 +507,94 @@ int hwloc_internal_distances_add(hwloc_topology_t topology, const char *name, } if (topology->grouping_verbose) { - unsigned j; - int gp = !HWLOC_DIST_TYPE_USE_OS_INDEX(unique_type); fprintf(stderr, "Trying to group objects using distance matrix:\n"); - fprintf(stderr, "%s", gp ? "gp_index" : "os_index"); - for(j=0; jgp_index : objs[j]->os_index)); - fprintf(stderr, "\n"); - for(i=0; igp_index : objs[i]->os_index)); - for(j=0; jnbobjs, dist->objs, dist->values, + dist->kind, nbaccuracies, accuracies, 1 /* check the first matrix */); } - return hwloc_internal_distances__add(topology, name, unique_type, different_types, nbobjs, objs, NULL, values, kind, iflags); + if (topology->last_dist) + topology->last_dist->next = dist; + else + topology->first_dist = dist; + dist->prev = topology->last_dist; + dist->next = NULL; + topology->last_dist = dist; + + dist->iflags &= ~HWLOC_INTERNAL_DIST_FLAG_NOT_COMMITTED; + return 0; + + err: + hwloc_backend_distances_add__cancel(dist); + return -1; +} + +/* all-in-one backend function not exported to plugins, only used by XML for now */ +int hwloc_internal_distances_add_by_index(hwloc_topology_t topology, const char *name, + hwloc_obj_type_t unique_type, hwloc_obj_type_t *different_types, unsigned nbobjs, uint64_t *indexes, uint64_t *values, + unsigned long kind, unsigned long flags) +{ + hwloc_backend_distances_add_handle_t handle; + int err; + + handle = hwloc_backend_distances_add_create(topology, name, kind, 0); + if (!handle) + goto err; + + err = hwloc_backend_distances_add_values_by_index(topology, handle, + nbobjs, unique_type, different_types, indexes, + values); + if (err < 0) + goto err; + + /* arrays are now attached to the handle */ + indexes = NULL; + different_types = NULL; + values = NULL; + + err = hwloc_backend_distances_add_commit(topology, handle, flags); + if (err < 0) + goto err; + + return 0; + + err: + free(indexes); + free(different_types); + free(values); + return -1; +} + +/* all-in-one backend function not exported to plugins, used by OS backends */ +int hwloc_internal_distances_add(hwloc_topology_t topology, const char *name, + unsigned nbobjs, hwloc_obj_t *objs, uint64_t *values, + unsigned long kind, unsigned long flags) +{ + hwloc_backend_distances_add_handle_t handle; + int err; + + handle = hwloc_backend_distances_add_create(topology, name, kind, 0); + if (!handle) + goto err; + + err = hwloc_backend_distances_add_values(topology, handle, + nbobjs, objs, + values, + 0); + if (err < 0) + goto err; + + /* arrays are now attached to the handle */ + objs = NULL; + values = NULL; + + err = hwloc_backend_distances_add_commit(topology, handle, flags); + if (err < 0) + goto err; + + return 0; err: free(objs); @@ -458,44 +602,54 @@ int hwloc_internal_distances_add(hwloc_topology_t topology, const char *name, return -1; } +/******************************** + * User API for adding distances + */ + #define HWLOC_DISTANCES_KIND_FROM_ALL (HWLOC_DISTANCES_KIND_FROM_OS|HWLOC_DISTANCES_KIND_FROM_USER) #define HWLOC_DISTANCES_KIND_MEANS_ALL (HWLOC_DISTANCES_KIND_MEANS_LATENCY|HWLOC_DISTANCES_KIND_MEANS_BANDWIDTH) -#define HWLOC_DISTANCES_KIND_ALL (HWLOC_DISTANCES_KIND_FROM_ALL|HWLOC_DISTANCES_KIND_MEANS_ALL) +#define HWLOC_DISTANCES_KIND_ALL (HWLOC_DISTANCES_KIND_FROM_ALL|HWLOC_DISTANCES_KIND_MEANS_ALL|HWLOC_DISTANCES_KIND_HETEROGENEOUS_TYPES) #define HWLOC_DISTANCES_ADD_FLAG_ALL (HWLOC_DISTANCES_ADD_FLAG_GROUP|HWLOC_DISTANCES_ADD_FLAG_GROUP_INACCURATE) -/* The actual function exported to the user - */ -int hwloc_distances_add(hwloc_topology_t topology, - unsigned nbobjs, hwloc_obj_t *objs, hwloc_uint64_t *values, - unsigned long kind, unsigned long flags) +void * hwloc_distances_add_create(hwloc_topology_t topology, + const char *name, unsigned long kind, + unsigned long flags) { - unsigned i; - uint64_t *_values; - hwloc_obj_t *_objs; - int err; - - if (nbobjs < 2 || !objs || !values || !topology->is_loaded) { + if (!topology->is_loaded) { errno = EINVAL; - return -1; + return NULL; } if (topology->adopted_shmem_addr) { errno = EPERM; - return -1; + return NULL; } if ((kind & ~HWLOC_DISTANCES_KIND_ALL) || hwloc_weight_long(kind & HWLOC_DISTANCES_KIND_FROM_ALL) != 1 - || hwloc_weight_long(kind & HWLOC_DISTANCES_KIND_MEANS_ALL) != 1 - || (flags & ~HWLOC_DISTANCES_ADD_FLAG_ALL)) { + || hwloc_weight_long(kind & HWLOC_DISTANCES_KIND_MEANS_ALL) != 1) { errno = EINVAL; - return -1; + return NULL; } + return hwloc_backend_distances_add_create(topology, name, kind, flags); +} + +int hwloc_distances_add_values(hwloc_topology_t topology, + void *handle, + unsigned nbobjs, hwloc_obj_t *objs, + hwloc_uint64_t *values, + unsigned long flags) +{ + unsigned i; + uint64_t *_values; + hwloc_obj_t *_objs; + int err; + /* no strict need to check for duplicates, things shouldn't break */ for(i=1; iindexes, dist->values, nbobjs, disappeared); + hwloc_internal_distances_restrict(objs, dist->indexes, dist->different_types, dist->values, nbobjs, disappeared); dist->nbobjs -= disappeared; } @@ -647,7 +860,7 @@ struct hwloc_distances_container_s { struct hwloc_distances_s distances; }; -#define HWLOC_DISTANCES_CONTAINER_OFFSET ((char*)&((struct hwloc_distances_container_s*)NULL)->distances - (char*)NULL) +#define HWLOC_DISTANCES_CONTAINER_OFFSET ((uintptr_t)(&((struct hwloc_distances_container_s*)NULL)->distances) - (uintptr_t)NULL) #define HWLOC_DISTANCES_CONTAINER(_d) (struct hwloc_distances_container_s *) ( ((char*)_d) - HWLOC_DISTANCES_CONTAINER_OFFSET ) static struct hwloc_internal_distances_s * @@ -1087,3 +1300,210 @@ hwloc__groups_by_distances(struct hwloc_topology *topology, out_with_groupids: free(groupids); } + +static int +hwloc__distances_transform_remove_null(struct hwloc_distances_s *distances) +{ + hwloc_uint64_t *values = distances->values; + hwloc_obj_t *objs = distances->objs; + unsigned i, nb, nbobjs = distances->nbobjs; + hwloc_obj_type_t unique_type; + + for(i=0, nb=0; inbobjs = nb; + + /* update HWLOC_DISTANCES_KIND_HETEROGENEOUS_TYPES for convenience */ + unique_type = objs[0]->type; + for(i=1; itype != unique_type) { + unique_type = HWLOC_OBJ_TYPE_NONE; + break; + } + if (unique_type == HWLOC_OBJ_TYPE_NONE) + distances->kind |= HWLOC_DISTANCES_KIND_HETEROGENEOUS_TYPES; + else + distances->kind &= ~HWLOC_DISTANCES_KIND_HETEROGENEOUS_TYPES; + + return 0; +} + +static int +hwloc__distances_transform_links(struct hwloc_distances_s *distances) +{ + /* FIXME: we should look for the greatest common denominator + * but we just use the smallest positive value, that's enough for current use-cases. + * We'll return -1 in other cases. + */ + hwloc_uint64_t divider, *values = distances->values; + unsigned i, nbobjs = distances->nbobjs; + + if (!(distances->kind & HWLOC_DISTANCES_KIND_MEANS_BANDWIDTH)) { + errno = EINVAL; + return -1; + } + + for(i=0; isubtype && !strcmp(obj->subtype, "NVSwitch"); +} + +static int +hwloc__distances_transform_merge_switch_ports(hwloc_topology_t topology, + struct hwloc_distances_s *distances) +{ + struct hwloc_internal_distances_s *dist = hwloc__internal_distances_from_public(topology, distances); + hwloc_obj_t *objs = distances->objs; + hwloc_uint64_t *values = distances->values; + unsigned first, i, j, nbobjs = distances->nbobjs; + + if (strcmp(dist->name, "NVLinkBandwidth")) { + errno = EINVAL; + return -1; + } + + /* find the first port */ + first = (unsigned) -1; + for(i=0; iobjs; + hwloc_uint64_t *values = distances->values; + unsigned nbobjs = distances->nbobjs; + unsigned i, j, k; + + if (strcmp(dist->name, "NVLinkBandwidth")) { + errno = EINVAL; + return -1; + } + + for(i=0; i bw_sw2j ? bw_sw2j : bw_i2sw; + } + } + + return 0; +} + +int +hwloc_distances_transform(hwloc_topology_t topology, + struct hwloc_distances_s *distances, + enum hwloc_distances_transform_e transform, + void *transform_attr, + unsigned long flags) +{ + if (flags || transform_attr) { + errno = EINVAL; + return -1; + } + + switch (transform) { + case HWLOC_DISTANCES_TRANSFORM_REMOVE_NULL: + return hwloc__distances_transform_remove_null(distances); + case HWLOC_DISTANCES_TRANSFORM_LINKS: + return hwloc__distances_transform_links(distances); + case HWLOC_DISTANCES_TRANSFORM_MERGE_SWITCH_PORTS: + { + int err; + err = hwloc__distances_transform_merge_switch_ports(topology, distances); + if (!err) + err = hwloc__distances_transform_remove_null(distances); + return err; + } + case HWLOC_DISTANCES_TRANSFORM_TRANSITIVE_CLOSURE: + return hwloc__distances_transform_transitive_closure(topology, distances); + default: + errno = EINVAL; + return -1; + } +} diff --git a/contrib/hwloc/hwloc/dolib.c b/contrib/hwloc/hwloc/dolib.c deleted file mode 100644 index 0b2835a5da..0000000000 --- a/contrib/hwloc/hwloc/dolib.c +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright © 2009 CNRS - * Copyright © 2009 inria. All rights reserved. - * Copyright © 2009, 2012 Université Bordeaux - * See COPYING in top-level directory. - */ - -/* Wrapper to avoid msys' tendency to turn / into \ and : into ; */ - -#ifdef HAVE_UNISTD_H -#include -#endif -#include -#include - -int main(int argc, char *argv[]) { - char *prog, *arch, *def, *version, *lib; - char s[1024]; - char name[16]; - int current, age, revision; - - if (argc != 6) { - fprintf(stderr,"bad number of arguments"); - exit(EXIT_FAILURE); - } - - prog = argv[1]; - arch = argv[2]; - def = argv[3]; - version = argv[4]; - lib = argv[5]; - - if (sscanf(version, "%d:%d:%d", ¤t, &revision, &age) != 3) - exit(EXIT_FAILURE); - - _snprintf(name, sizeof(name), "libhwloc-%d", current - age); - printf("using soname %s\n", name); - - _snprintf(s, sizeof(s), "\"%s\" /machine:%s /def:%s /name:%s /out:%s", - prog, arch, def, name, lib); - if (system(s)) { - fprintf(stderr, "%s failed\n", s); - exit(EXIT_FAILURE); - } - - exit(EXIT_SUCCESS); -} diff --git a/contrib/hwloc/hwloc/hwloc2.dtd b/contrib/hwloc/hwloc/hwloc2.dtd index f751ed2e3e..adc014b163 100644 --- a/contrib/hwloc/hwloc/hwloc2.dtd +++ b/contrib/hwloc/hwloc/hwloc2.dtd @@ -1,6 +1,6 @@