Thread: [Autogen-users] missing
Brought to you by:
bkorb
From: Geof S. <Geo...@ut...> - 2009-10-13 19:48:16
|
/* -*- buffer-read-only: t -*- vi: set ro: * * DO NOT EDIT THIS FILE (sched-opt.h) * * It has been AutoGen-ed Thursday October 8, 2009 at 11:18:06 AM MDT * From the definitions sched-opt.def * and the template file options * * Generated from AutoOpts 32:0:7 templates. */ /* * This file was produced by an AutoOpts template. AutoOpts is a * copyrighted work. This header file is not encumbered by AutoOpts * licensing, but is provided under the licensing terms chosen by the * isp author or copyright holder. AutoOpts is licensed under * the terms of the LGPL. The redistributable library (``libopts'') is * licensed under the terms of either the LGPL or, at the users discretion, * the BSD license. See the AutoOpts and/or libopts sources for details. * * This source file is copyrighted and licensed under the following terms: * * isp copyright 1-27-2009 University of Utah - all rights reserved * * Copyright (C) 2009 -- please see LICENSE for details. */ /* * This file contains the programmatic interface to the Automated * Options generated for the isp program. * These macros are documented in the AutoGen info file in the * "AutoOpts" chapter. Please refer to that doc for usage help. */ #ifndef AUTOOPTS_SCHED_OPT_H_GUARD #define AUTOOPTS_SCHED_OPT_H_GUARD 1 #include <autoopts/options.h> /* * Ensure that the library used for compiling this generated header is at * least as new as the version current when the header template was released * (not counting patch version increments). Also ensure that the oldest * tolerable version is at least as old as what was current when the header * template was released. */ #define AO_TEMPLATE_VERSION 131072 #if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \ || (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION) # error option template version mismatches autoopts/options.h header Choke Me. #endif /* * Enumeration of each option: */ typedef enum { INDEX_OPT_NUMPROCS = 0, INDEX_OPT_PORT = 1, INDEX_OPT_HOST = 2, INDEX_OPT_US = 3, INDEX_OPT_BLOCK = 4, INDEX_OPT_NOBLOCK = 5, INDEX_OPT_LOGFILE = 6, INDEX_OPT_MPICALLS = 7, INDEX_OPT_VERBOSE = 8, INDEX_OPT_QUIET = 9, INDEX_OPT_RPT_PROGRESS = 10, INDEX_OPT_DISTRIBUTED = 11, INDEX_OPT_FIBOPT = 12, INDEX_OPT_DISABLE_OMP = 13, INDEX_OPT_EXP_MODE = 14, INDEX_OPT_ENV = 15, INDEX_OPT_EXP_SOME = 16, INDEX_OPT_STOP_AT_DEADLOCK = 17, INDEX_OPT_VERSION = 18, INDEX_OPT_HELP = 19, INDEX_OPT_MORE_HELP = 20 } teOptIndex; #define OPTION_CT 21 #define ISP_VERSION "0.1.1" #define ISP_FULL_VERSION "isp - isp: In-Situ Partial Order - Ver. 0.1.1" /* * Interface defines for all options. Replace "n" with the UPPER_CASED * option name (as in the teOptIndex enumeration above). * e.g. HAVE_OPT( NUMPROCS ) */ #define DESC(n) (ispOptions.pOptDesc[INDEX_OPT_## n]) #define HAVE_OPT(n) (! UNUSED_OPT(& DESC(n))) #define OPT_ARG(n) (DESC(n).optArg.argString) #define STATE_OPT(n) (DESC(n).fOptState & OPTST_SET_MASK) #define COUNT_OPT(n) (DESC(n).optOccCt) #define ISSEL_OPT(n) (SELECTED_OPT(&DESC(n))) #define ISUNUSED_OPT(n) (UNUSED_OPT(& DESC(n))) #define ENABLED_OPT(n) (! DISABLED_OPT(& DESC(n))) #define STACKCT_OPT(n) (((tArgList*)(DESC(n).optCookie))->useCt) #define STACKLST_OPT(n) (((tArgList*)(DESC(n).optCookie))->apzArgs) #define CLEAR_OPT(n) STMTS( \ DESC(n).fOptState &= OPTST_PERSISTENT_MASK; \ if ( (DESC(n).fOptState & OPTST_INITENABLED) == 0) \ DESC(n).fOptState |= OPTST_DISABLED; \ DESC(n).optCookie = NULL ) /* * * * * * * * Interface defines for specific options. */ #define VALUE_OPT_NUMPROCS 'n' #define OPT_VALUE_NUMPROCS (DESC(NUMPROCS).optArg.argInt) #define VALUE_OPT_PORT 'p' #define OPT_VALUE_PORT (DESC(PORT).optArg.argInt) #define VALUE_OPT_HOST 'h' #ifndef WIN_32 #define VALUE_OPT_US 'x' #endif /* WIN_32 */ #define VALUE_OPT_BLOCK 'b' #define VALUE_OPT_NOBLOCK 'g' #define VALUE_OPT_LOGFILE 'l' #define VALUE_OPT_MPICALLS 'm' #define VALUE_OPT_VERBOSE 'O' #define VALUE_OPT_QUIET 'q' #define VALUE_OPT_RPT_PROGRESS 'r' #define OPT_VALUE_RPT_PROGRESS (DESC(RPT_PROGRESS).optArg.argInt) #define VALUE_OPT_DISTRIBUTED 'd' #ifdef FIB #define VALUE_OPT_FIBOPT 'f' #endif /* FIB */ #ifdef USE_OPENMP #define VALUE_OPT_DISABLE_OMP 'o' #endif /* USE_OPENMP */ typedef enum { EXP_MODE_ALL, EXP_MODE_RANDOM, EXP_MODE_LEFT_MOST } te_Exp_Mode; #define VALUE_OPT_EXP_MODE 'e' #define OPT_EXP_MODE_VAL2STR(_v) optionKeywordName( &DESC(EXP_MODE), (_v)) #define OPT_VALUE_EXP_MODE (DESC(EXP_MODE).optArg.argEnum) #define VALUE_OPT_ENV 's' #define VALUE_OPT_EXP_SOME 'y' #define OPT_VALUE_EXP_SOME (DESC(EXP_SOME).optArg.argInt) #define VALUE_OPT_STOP_AT_DEADLOCK 'z' #define OPT_VALUE_STOP_AT_DEADLOCK (DESC(STOP_AT_DEADLOCK).optArg.argBool) #define VALUE_OPT_HELP '?' #define VALUE_OPT_MORE_HELP '!' #define VALUE_OPT_VERSION 'v' /* * Interface defines not associated with particular options */ #define ERRSKIP_OPTERR STMTS( ispOptions.fOptSet &= ~OPTPROC_ERRSTOP ) #define ERRSTOP_OPTERR STMTS( ispOptions.fOptSet |= OPTPROC_ERRSTOP ) #define RESTART_OPT(n) STMTS( \ ispOptions.curOptIdx = (n); \ ispOptions.pzCurOpt = NULL ) #define START_OPT RESTART_OPT(1) #define USAGE(c) (*ispOptions.pUsageProc)( &ispOptions, c ) /* extracted from /usr/share/autogen/opthead.tpl near line 415 */ /* * * * * * * * Declare the isp option descriptor. */ #ifdef __cplusplus extern "C" { #endif extern tOptions ispOptions; #if defined(ENABLE_NLS) # ifndef _ # include <stdio.h> static inline char* aoGetsText( char const* pz ) { if (pz == NULL) return NULL; return (char*)gettext( pz ); } # define _(s) aoGetsText(s) # endif /* _() */ # define OPT_NO_XLAT_CFG_NAMES STMTS(ispOptions.fOptSet |= \ OPTPROC_NXLAT_OPT_CFG;) # define OPT_NO_XLAT_OPT_NAMES STMTS(ispOptions.fOptSet |= \ OPTPROC_NXLAT_OPT|OPTPROC_NXLAT_OPT_CFG;) # define OPT_XLAT_CFG_NAMES STMTS(ispOptions.fOptSet &= \ ~(OPTPROC_NXLAT_OPT|OPTPROC_NXLAT_OPT_CFG);) # define OPT_XLAT_OPT_NAMES STMTS(ispOptions.fOptSet &= \ ~OPTPROC_NXLAT_OPT;) #else /* ENABLE_NLS */ # define OPT_NO_XLAT_CFG_NAMES # define OPT_NO_XLAT_OPT_NAMES # define OPT_XLAT_CFG_NAMES # define OPT_XLAT_OPT_NAMES # ifndef _ # define _(_s) _s # endif #endif /* ENABLE_NLS */ #ifdef __cplusplus } #endif #endif /* AUTOOPTS_SCHED_OPT_H_GUARD */ /* sched-opt.h ends here */ |
From: Bruce K. <bk...@gn...> - 2009-10-13 21:16:08
|
If it isn't in stdint.h (it should be, if memory serves), then the backup is "unsigned long". If a pointer is not matching a long in size, there is a terrible lot of code that will break. So, in compat/compat.h: #ifndef HAVE_UINTPTR_T typedef unsigned long uintptr_t; #endif I guess that needs to get configured into the installed header. What a pain: ../libopts/autoopts/options.h:348: error: expected specifier-qualifier-list before ‘uintptr_t’ I have a script for installing an edited version of options.h. It needs to edit in the above typedef if HAVE_UINTPTR_T is not defined in config.h. *sigh*. Thank you. |
From: Eric B. <eb...@by...> - 2009-10-14 01:06:51
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to Bruce Korb on 10/13/2009 3:15 PM: > If it isn't in stdint.h (it should be, if memory serves), > then the backup is "unsigned long". If a pointer is > not matching a long in size, there is a terrible lot of > code that will break. But on Windows 64 bit platforms, that is exactly the case (64-bit pointers, 32-bit long). - -- Don't work too hard, make some time for fun as well! Eric Blake eb...@by... -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkrVIN4ACgkQ84KuGfSFAYCOvQCdFacdhewnQw+MuVo+NGZZH/Xl wiAAoMVlgfKy2VUX85YSdY+taRz3aZOn =cyMy -----END PGP SIGNATURE----- |
From: Bruce K. <bk...@gn...> - 2009-10-14 16:26:34
|
On Tue, Oct 13, 2009 at 5:52 PM, Eric Blake <eb...@by...> wrote: >> then the backup is "unsigned long". If a pointer is >> not matching a long in size, there is a terrible lot of >> code that will break. > > But on Windows 64 bit platforms, that is exactly the case (64-bit > pointers, 32-bit long). Hmmm. Well, I haven't done any development on windows since Windows 3.1. I read that misstatement and believed it because it was consistent with the memory models I've seen on UNIXy platforms. Windows does seem to go out of its way to be peculiar. That will just make the tweaking of the installed options.h header a tiny bit more complicated. Oh, well. Thanks. |
From: Bruce K. <bk...@gn...> - 2009-10-18 18:21:37
|
Eric Blake wrote: > > But on Windows 64 bit platforms, that is exactly the case (64-bit > pointers, 32-bit long). Thanks, Eric. More compat.h magic: > #ifndef HAVE_INTPTR_T > # if SIZEOF_CHARP == SIZEOF_LONG > typedef signed long intptr_t; > # else > typedef signed int intptr_t; > # endif > #endif > > #ifndef HAVE_UINTPTR_T > # if SIZEOF_CHARP == SIZEOF_LONG > typedef unsigned long intptr_t; > # else > typedef unsigned int intptr_t; > # endif > #endif This is in 5.9.10pre12 see: http://autogen.sourceforge.net/data/ Regards, Bruce |
From: Eric B. <eb...@by...> - 2009-10-18 21:23:18
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to Bruce Korb on 10/18/2009 12:21 PM: > Eric Blake wrote: >> But on Windows 64 bit platforms, that is exactly the case (64-bit >> pointers, 32-bit long). > > Thanks, Eric. More compat.h magic: > >> #ifndef HAVE_INTPTR_T >> # if SIZEOF_CHARP == SIZEOF_LONG >> typedef signed long intptr_t; On any platform that lacks intptr_t, this should be right - the only platforms stupid enough to provide 32-bit long but 64-bit char* (aka windows 64) should at least be sane enough to provide intptr_t. >> # else >> typedef signed int intptr_t; This arm of the #if is pointless. On windows 64, int and long are the same size. On almost every other platform, char* and long are the same size, and either int and long are the same size (32 bit platforms) or int is smaller than pointers (64 bit platforms). - -- Don't work too hard, make some time for fun as well! Eric Blake eb...@by... -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkrbhBMACgkQ84KuGfSFAYCjTACgrr02LIrudj/HD0VRo1cjTPpe nSIAniPrEV+hE1+8DhvGFL4WkR2IUUTn =UPZg -----END PGP SIGNATURE----- |
From: Bruce K. <bk...@gn...> - 2009-10-18 21:16:10
|
Hi Eric, On Sun, Oct 18, 2009 at 2:09 PM, Eric Blake <eb...@by...> wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > According to Bruce Korb on 10/18/2009 12:21 PM: >> Eric Blake wrote: >>> But on Windows 64 bit platforms, that is exactly the case (64-bit >>> pointers, 32-bit long). >> >> Thanks, Eric. More compat.h magic: >> >>> #ifndef HAVE_INTPTR_T >>> # if SIZEOF_CHARP == SIZEOF_LONG >>> typedef signed long intptr_t; > > On any platform that lacks intptr_t, this should be right - the only > platforms stupid enough to provide 32-bit long but 64-bit char* (aka > windows 64) should at least be sane enough to provide intptr_t. What started this all off is that there was some platform out there that did not define intptr_t and had a pointer size that was not that of long. Not having access to such a platform (and being uncertain that I'd even _want_ to ;), I cooked up this stuff so NTP would build on whatever it was that was that broken. My hope was to try to shoot the problem dead so I never see it again. :) Thank you! Cheers - Bruce |