├── COPYING ├── IBMDCO.md ├── Makefile.am ├── Makefile.in ├── NEWS ├── README.md ├── TODO ├── _config.yml ├── aclocal.m4 ├── autoclean.sh ├── autogen.sh ├── config.h.in ├── configure ├── configure.ac ├── doc ├── Makefile.am ├── Makefile.in ├── readme.html ├── readme.pdf └── readme.tex ├── drmaa_utils ├── COPYING ├── Doxyfile.in ├── INSTALL ├── Makefile.am ├── Makefile.in ├── README ├── aclocal.m4 ├── autoclean.sh ├── autogen.sh ├── config.h.in ├── configure ├── configure.ac ├── drmaa_utils │ ├── Makefile.am │ ├── Makefile.in │ ├── common.h │ ├── compat.c │ ├── compat.h │ ├── conf.c │ ├── conf.h │ ├── conf_impl.h │ ├── conf_tab.c │ ├── conf_tab.h │ ├── conf_tab.y │ ├── datetime.c │ ├── datetime.h │ ├── datetime_impl.h │ ├── datetime_tab.c │ ├── datetime_tab.h │ ├── datetime_tab.y │ ├── drmaa.h │ ├── drmaa_attrib.c │ ├── drmaa_attrib.gperf │ ├── drmaa_attrib.h │ ├── drmaa_base.c │ ├── drmaa_base.h │ ├── drmaa_util.c │ ├── drmaa_util.h │ ├── environ.c │ ├── environ.h │ ├── exception.c │ ├── exception.h │ ├── fsd_job.c │ ├── fsd_session.c │ ├── fsd_util.c │ ├── iter.c │ ├── iter.h │ ├── job.h │ ├── logging.c │ ├── logging.h │ ├── lookup3.c │ ├── lookup3.h │ ├── session.h │ ├── template.c │ ├── template.h │ ├── thread.c │ ├── thread.h │ ├── timedelta.c │ ├── timedelta.rl │ ├── util.h │ ├── xmalloc.c │ └── xmalloc.h ├── m4 │ ├── ac_c_bigendian_cross.m4 │ ├── acx_pthread.m4 │ ├── ax_docutils.m4 │ ├── ax_func_gettid.m4 │ ├── ax_func_va_copy.m4 │ ├── ax_gcc_warnings.m4 │ ├── ax_gperf.m4 │ ├── bison_ylwrap.sh │ └── missing-dev-prog.sh ├── scripts │ ├── config.guess │ ├── config.sub │ ├── depcomp │ ├── install-sh │ ├── ltmain.sh │ ├── missing │ └── ylwrap └── test │ ├── Makefile.am │ ├── Makefile.in │ └── exception_test.c ├── lsf_drmaa ├── Makefile.am ├── Makefile.in ├── drmaa.c ├── job.c ├── job.h ├── lsf_drmaa.conf.example ├── m4 │ ├── acx_pthread.m4 │ ├── ax_docutils.m4 │ ├── ax_gcc_warnings.m4 │ ├── ax_lsf.m4 │ └── missing-dev-prog.sh ├── native.c ├── native.h ├── native.rl ├── session.c ├── session.h ├── util.c └── util.h ├── m4 ├── acx_pthread.m4 ├── ax_docutils.m4 ├── ax_gcc_warnings.m4 ├── ax_lsf.m4 └── missing-dev-prog.sh ├── sample ├── Makefile.am ├── Makefile.in └── sub.c └── scripts ├── config.guess ├── config.sub ├── depcomp ├── install-sh ├── ltmain.sh └── missing /IBMDCO.md: -------------------------------------------------------------------------------- 1 | # IBM Process For Accepting Third Party Code Contributions 2 | 3 | To improve tracking of contributions to this project we will use a process modeled on the modified DCO 1.1 and use a "sign-off" procedure on patches that are being emailed around or contributed in any other way. 4 | 5 | The sign-off is a simple line within the pull requests comments section, which certifies that you wrote it or otherwise have the right to pass it on as an open-source patch. The rules are pretty simple, if you can certify the below: 6 | 7 | By making a contribution to this project, I certify that: 8 | 9 | (a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or 10 | 11 | (b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source License and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or 12 | 13 | (c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it. 14 | 15 | (d) The contribution is made free of any other party's intellectual property claims or rights. 16 | 17 | (e) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved. 18 | 19 | Then you just add a line saying: 20 | 21 | Signed-off-by: Random J Developer random@developer.org> 22 | -------------------------------------------------------------------------------- /Makefile.am: -------------------------------------------------------------------------------- 1 | # $Id: Makefile.am 1467 2008-10-06 10:18:17Z lukasz $ 2 | # 3 | # FedStage DRMAA for LSF 4 | # Copyright (C) 2007-2008 FedStage Systems 5 | # 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | # 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | # 19 | 20 | ACLOCAL_AMFLAGS = -I m4 21 | EXTRA_DIST = \ 22 | autoclean.sh \ 23 | autogen.sh \ 24 | m4/missing-dev-prog.sh 25 | 26 | SUBDIRS = drmaa_utils lsf_drmaa doc 27 | -------------------------------------------------------------------------------- /NEWS: -------------------------------------------------------------------------------- 1 | FedStage DRMAA for LSF Release Notes 2 | 3 | ==================================== 4 | 5 | 6 | 7 | Changes in 1.1.1 release 8 | 9 | ------------------------ 10 | 11 | 12 | * This is an IBM Platform Computing fork of the original lsf-drmaa 13 | 14 | which can be found at http://sourceforge.net/projects/lsf-drmaa/. 15 | 16 | 17 | 18 | * IBM Platform Computing will provide formal support for this software 19 | to entitled clients, via the normal IBM support channels. 20 | 21 | 22 | 23 | * Tested on LSF 9.1.2. 24 | 25 | 26 | 27 | 28 | Changes in 1.0.2 release 29 | 30 | ------------------------ 31 | 32 | 33 | 34 | * ``drmaa_remote_command`` and ``drmaa_v_argv`` are quoted and not interpreted 35 | by shell (e.g. spaces are allowed in command and 36 | arguments). Jobs are created 37 | with ``exec`` command (i.e. unnecessary 38 | shell process dangling for duration of 39 | job were eliminated 40 | 41 | ). 42 | 43 | * ``drmaa_wifexited`` follows refinement on DRMAA Working Group mailing 44 | list. 45 | Returns 1 only for exit statuses not greater than 128. 46 | Previously it returned 1 for all jobs which were run (not aborted). 47 | 48 | 49 | 50 | * It has been reported that in some situations a job which was recently 51 | submitted 52 | is not always immediately visible through the LSF API. There is 53 | now workaround 54 | for such behaviour. 55 | 56 | 57 | 58 | * Bugfixes: Segfault when ``drmaa_v_argv`` is not set. 59 | Native specification parsing bugs. 60 | Various other segfaults and 61 | memory leaks fixed. 62 | 63 | 64 | 65 | 66 | Changes in 1.0.1 release 67 | 68 | ------------------------ 69 | 70 | 71 | 72 | * Many attributes implemented: 73 | 74 | 75 | - ``drmaa_start_time``, 76 | 77 | - ``drmaa_native_specification``, 78 | 79 | - ``drmaa_transfer_files``, 80 | 81 | - job limits. 82 | 83 | 84 | 85 | * Integrates with `FedStage Advance Reservation Library for LSF`_. 86 | 87 | 88 | 89 | * Job category now points to native specification string in configuration file instead of job group. 90 | 91 | 92 | 93 | * Thread safe design. 94 | 95 | 96 | 97 | * Configuration file(s). 98 | 99 | 100 | 101 | * Lots of bug fixes. 102 | 103 | 104 | 105 | * More robust code. 106 | 107 | 108 | 109 | * Meaningful logging, error messages and codes. 110 | 111 | 112 | .. _FedStage Advance Reservation Library for LSF: 113 | 114 | http://www.fedstage.com/wiki/AdvanceReservation 115 | 116 | .. vim700: spell spelllang=en 117 | .. 118 | vim: ft=rest 119 | .. vim: ts=2 sw=2 et 120 | -------------------------------------------------------------------------------- /TODO: -------------------------------------------------------------------------------- 1 | TODO: 2 | * test file joining, native specification 3 | * test sending and blocking e-mails. 4 | * ST_SUBMIT_KILL_SIG fails on SIGHUP (any other signal works fine) (?), 5 | * consider removing -ar and/or --arid from NATIVE_SPECIFICATION and use only -U 6 | -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | theme: jekyll-theme-cayman -------------------------------------------------------------------------------- /autoclean.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # $Id: autoclean.sh 1655 2008-11-18 17:08:10Z lukasz $ 3 | 4 | echo "Removing all generated files. ($PWD)" 5 | 6 | make maintainer-clean 7 | 8 | rm -f aclocal.m4 configure configure.scan config.h.in confdefs.h libtool 9 | 10 | rm -rf autom4te.cache 11 | rm -rf scripts 12 | 13 | find . -name Makefile.in -exec rm -f {} \; 14 | find . -name Makefile -exec rm -f {} \; 15 | find . -name \*~ -exec rm -f {} \; 16 | find . -name \.#* -exec rm -f {} \; 17 | find . -name \*.core -exec rm -f {} \; 18 | find . -name \*.log -exec rm -f {} \; 19 | find . -name \*.a -exec rm -f {} \; 20 | find . -name \*.o -exec rm -f {} \; 21 | find . -name \*.lo* -exec rm -f {} \; 22 | find . -name \*.la* -exec rm -f {} \; 23 | 24 | (cd drmaa_utils && sh autoclean.sh "$@") 25 | echo "done." 26 | -------------------------------------------------------------------------------- /autogen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # $Id: autogen.sh 1655 2008-11-18 17:08:10Z lukasz $ 3 | 4 | run() { 5 | echo "running $@ ($PWD)" 6 | eval "$@" 7 | } 8 | 9 | check() 10 | { 11 | printf "checking for $1... " 12 | if ($1 --version < /dev/null > /dev/null 2>&1); then 13 | echo "yes" 14 | else 15 | echo "no" 16 | exit 1 17 | fi 18 | } 19 | 20 | ACLOCAL=${ACLOCAL:=aclocal} 21 | AUTOHEADER=${AUTOHEADER:=autoheader} 22 | AUTOCONF=${AUTOCONF:=autoconf} 23 | LIBTOOLIZE=${LIBTOOLIZE:=libtoolize} 24 | AUTOMAKE=${AUTOMAKE:=automake} 25 | 26 | check $ACLOCAL 27 | check $AUTOHEADER 28 | check $AUTOCONF 29 | check $LIBTOOLIZE 30 | check $AUTOMAKE 31 | 32 | mkdir -p scripts 33 | 34 | run ${ACLOCAL} -I m4 | grep -v ^/usr/share/aclocal || exit 1 35 | run ${LIBTOOLIZE} --automake --copy --force || exit 1 36 | run ${AUTOHEADER} --warnings=all || exit 1 37 | run ${AUTOMAKE} --foreign --add-missing --copy --warnings=all || exit 1 38 | run ${AUTOCONF} --warnings=all -Wno-obsolete || exit 1 39 | 40 | if [ -n "$*" ]; then 41 | args="$*" 42 | elif [ -f config.log ]; then 43 | args=`grep '\$ *\./configure ' config.log \ 44 | | sed 's:^ *\$ *\./configure ::;s:--no-create::;s:--no-recursion::' \ 45 | 2>/dev/null` 46 | fi 47 | 48 | (cd drmaa_utils && run sh autogen.sh "$@") 49 | run ./configure ${args} 50 | -------------------------------------------------------------------------------- /config.h.in: -------------------------------------------------------------------------------- 1 | /* config.h.in. Generated from configure.ac by autoheader. */ 2 | 3 | /* Produce debugging code */ 4 | #undef DEBUGGING 5 | 6 | /* Development mode */ 7 | #undef DEVELOPMENT 8 | 9 | /* Define to 1 if you have the `asprintf' function. */ 10 | #undef HAVE_ASPRINTF 11 | 12 | /* Define to 1 if you have the header file. */ 13 | #undef HAVE_DLFCN_H 14 | 15 | /* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ 16 | #undef HAVE_DOPRNT 17 | 18 | /* Define to 1 if you have the `fstat' function. */ 19 | #undef HAVE_FSTAT 20 | 21 | /* Define to 1 if you have the `getcwd' function. */ 22 | #undef HAVE_GETCWD 23 | 24 | /* Define to 1 if you have the `gettimeofday' function. */ 25 | #undef HAVE_GETTIMEOFDAY 26 | 27 | /* Define to 1 if you have the header file. */ 28 | #undef HAVE_INTTYPES_H 29 | 30 | /* Define to 1 if you have the `localtime_r' function. */ 31 | #undef HAVE_LOCALTIME_R 32 | 33 | /* Define to 1 if your system has a GNU libc compatible `malloc' function, and 34 | to 0 otherwise. */ 35 | #undef HAVE_MALLOC 36 | 37 | /* Define to 1 if you have the header file. */ 38 | #undef HAVE_MEMORY_H 39 | 40 | /* Define to 1 if you have the `memset' function. */ 41 | #undef HAVE_MEMSET 42 | 43 | /* Define if you have POSIX threads libraries and header files. */ 44 | #undef HAVE_PTHREAD 45 | 46 | /* Define to 1 if you have the `setenv' function. */ 47 | #undef HAVE_SETENV 48 | 49 | /* Define to 1 if you have the header file. */ 50 | #undef HAVE_STDDEF_H 51 | 52 | /* Define to 1 if you have the header file. */ 53 | #undef HAVE_STDINT_H 54 | 55 | /* Define to 1 if you have the header file. */ 56 | #undef HAVE_STDLIB_H 57 | 58 | /* Define to 1 if you have the `strcasecmp' function. */ 59 | #undef HAVE_STRCASECMP 60 | 61 | /* Define to 1 if you have the `strchr' function. */ 62 | #undef HAVE_STRCHR 63 | 64 | /* Define to 1 if you have the `strdup' function. */ 65 | #undef HAVE_STRDUP 66 | 67 | /* Define to 1 if you have the `strerror' function. */ 68 | #undef HAVE_STRERROR 69 | 70 | /* Define to 1 if you have the `strftime' function. */ 71 | #undef HAVE_STRFTIME 72 | 73 | /* Define to 1 if you have the header file. */ 74 | #undef HAVE_STRINGS_H 75 | 76 | /* Define to 1 if you have the header file. */ 77 | #undef HAVE_STRING_H 78 | 79 | /* Define to 1 if you have the `strlcpy' function. */ 80 | #undef HAVE_STRLCPY 81 | 82 | /* Define to 1 if you have the `strndup' function. */ 83 | #undef HAVE_STRNDUP 84 | 85 | /* Define to 1 if you have the `strstr' function. */ 86 | #undef HAVE_STRSTR 87 | 88 | /* Define to 1 if you have the `strtol' function. */ 89 | #undef HAVE_STRTOL 90 | 91 | /* Define to 1 if you have the header file. */ 92 | #undef HAVE_SYS_STAT_H 93 | 94 | /* Define to 1 if you have the header file. */ 95 | #undef HAVE_SYS_TIME_H 96 | 97 | /* Define to 1 if you have the header file. */ 98 | #undef HAVE_SYS_TYPES_H 99 | 100 | /* Define to 1 if you have the header file. */ 101 | #undef HAVE_UNISTD_H 102 | 103 | /* Define to 1 if you have the `vasprintf' function. */ 104 | #undef HAVE_VASPRINTF 105 | 106 | /* Define to 1 if you have the `vprintf' function. */ 107 | #undef HAVE_VPRINTF 108 | 109 | /* Define to the sub-directory in which libtool stores uninstalled libraries. 110 | */ 111 | #undef LT_OBJDIR 112 | 113 | /* Name of package */ 114 | #undef PACKAGE 115 | 116 | /* Define to the address where bug reports for this package should be sent. */ 117 | #undef PACKAGE_BUGREPORT 118 | 119 | /* Define to the full name of this package. */ 120 | #undef PACKAGE_NAME 121 | 122 | /* Define to the full name and version of this package. */ 123 | #undef PACKAGE_STRING 124 | 125 | /* Define to the one symbol short name of this package. */ 126 | #undef PACKAGE_TARNAME 127 | 128 | /* Define to the version of this package. */ 129 | #undef PACKAGE_VERSION 130 | 131 | /* Define to necessary symbol if this constant uses a non-standard name on 132 | your system. */ 133 | #undef PTHREAD_CREATE_JOINABLE 134 | 135 | /* Define to 1 if you have the ANSI C header files. */ 136 | #undef STDC_HEADERS 137 | 138 | /* Define to 1 if you can safely include both and . */ 139 | #undef TIME_WITH_SYS_TIME 140 | 141 | /* Define to 1 if your declares `struct tm'. */ 142 | #undef TM_IN_SYS_TIME 143 | 144 | /* Version number of package */ 145 | #undef VERSION 146 | 147 | /* Define to empty if `const' does not conform to ANSI C. */ 148 | #undef const 149 | 150 | /* Define to `__inline__' or `__inline' if that's what the C compiler 151 | calls it, or to nothing if 'inline' is not supported under any name. */ 152 | #ifndef __cplusplus 153 | #undef inline 154 | #endif 155 | 156 | /* Define to rpl_malloc if the replacement function should be used. */ 157 | #undef malloc 158 | 159 | /* Define to `unsigned int' if does not define. */ 160 | #undef size_t 161 | 162 | /* Define to empty if the keyword `volatile' does not work. Warning: valid 163 | code using `volatile' can become incorrect without. Disable with care. */ 164 | #undef volatile 165 | 166 | 167 | #ifndef __GNUC__ 168 | # define __attribute__ /* nothing */ 169 | #endif 170 | 171 | -------------------------------------------------------------------------------- /configure.ac: -------------------------------------------------------------------------------- 1 | AC_INIT([FedStage DRMAA for LSF], [1.1.1], [drmaa-lsf-users@lists.fedstage.com], [lsf_drmaa]) 2 | AC_PREREQ(2.59) 3 | AC_REVISION([$Id: configure.ac 2305 2009-04-09 16:30:43Z lukasz $]) 4 | AC_COPYRIGHT([ 5 | FedStage DRMAA for LSF 6 | Copyright (C) 2007-2008 FedStage Systems 7 | 8 | This program is free software: you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation, either version 3 of the License, or 11 | (at your option) any later version. 12 | 13 | This program is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with this program. If not, see . 20 | 21 | ]) 22 | 23 | LSF_DRMAA_MAJOR=1 24 | LSF_DRMAA_MINOR=1 25 | LSF_DRMAA_MICRO=1 26 | LSF_DRMAA_VERSION_INFO=1:1:1 27 | AC_SUBST([LSF_DRMAA_MAJOR]) 28 | AC_SUBST([LSF_DRMAA_MINOR]) 29 | AC_SUBST([LSF_DRMAA_MICRO]) 30 | AC_SUBST([LSF_DRMAA_VERSION_INFO]) 31 | 32 | AC_CONFIG_SRCDIR([lsf_drmaa/drmaa.c]) 33 | AC_CONFIG_MACRO_DIR([m4]) 34 | AC_CONFIG_AUX_DIR([scripts]) 35 | 36 | AM_INIT_AUTOMAKE 37 | DEVELOPER_MODE="yes" 38 | AM_CONDITIONAL([DEVELOPER_MODE], [test "x$DEVELOPER_MODE" = "xyes"]) 39 | 40 | # command-line arguments: 41 | AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug], 42 | [produce code suiteable for debugging and print logs at runtime])) 43 | AC_ARG_ENABLE(development, AC_HELP_STRING([--enable-development], 44 | [enable development mode: make additional checks (suiteable for FedStage DRMAA for LSF developers)])) 45 | 46 | # programs: 47 | AC_PROG_CC 48 | AC_PROG_CPP 49 | AC_PROG_RANLIB 50 | AC_PROG_INSTALL 51 | AC_PROG_LIBTOOL 52 | AC_PROG_MAKE_SET 53 | AC_PROG_LN_S 54 | 55 | AC_CHECK_PROGS([RAGEL], [ragel], [sh m4/missing-dev-prog.sh ragel]) 56 | AX_DOCUTILS() 57 | if test x$RST2HTML = x; then 58 | RST2HTML="sh m4/missing-dev-prog.sh docutils" 59 | fi 60 | if test x$RST2LATEX = x; then 61 | RST2LATEX="sh m4/missing-dev-prog.sh docutils" 62 | fi 63 | 64 | # check compiler / set basic flags: 65 | if test x$ac_cv_prog_cc_stdc = xno; then 66 | AC_MSG_ERROR([ANSI C compiler is required]) 67 | fi 68 | 69 | if test x$GCC = xyes; then 70 | CFLAGS="-pedantic ${CFLAGS}" 71 | fi 72 | AM_CONDITIONAL([GCC], [test x$GCC = xyes]) 73 | 74 | AX_GCC_WARNINGS() 75 | 76 | AH_TEMPLATE([DEBUGGING], [Produce debugging code]) 77 | if test x$enable_debug = xyes; then 78 | AC_DEFINE(DEBUGGING,[1]) 79 | CFLAGS="${CFLAGS} -O0" 80 | else 81 | CPPFLAGS="-DNDEBUG ${CPPFLAGS}" 82 | fi 83 | 84 | AH_TEMPLATE([DEVELOPMENT], [Development mode]) 85 | if test x$enable_development = xyes; then 86 | AC_DEFINE(DEVELOPMENT, [1]) 87 | fi 88 | 89 | AH_BOTTOM([ 90 | #ifndef __GNUC__ 91 | # define __attribute__ /* nothing */ 92 | #endif 93 | ]) 94 | 95 | # system: 96 | CPPFLAGS="-D_REENTRANT -D_THREAD_SAFE ${CPPFLAGS}" 97 | 98 | AC_CANONICAL_HOST 99 | case "$host_os" in 100 | *linux*) 101 | CPPFLAGS="${CPPFLAGS} -D_GNU_SOURCE" 102 | ;; 103 | *solaris*) 104 | CPPFLAGS="${CPPFLAGS} -D_XOPEN_SOURCE=500 -D__EXTENSIONS__" 105 | ;; 106 | *freebsd*) 107 | ;; 108 | *darwin*) 109 | CPPFLAGS="${CPPFLAGS} -D_XOPEN_SOURCE=400" 110 | ;; 111 | *) 112 | CPPFLAGS="${CPPFLAGS} -D_XOPEN_SOURCE=500" 113 | ;; 114 | esac 115 | 116 | # project prerequisites: 117 | 118 | # libraries: 119 | ACX_PTHREAD([CFLAGS="$CFLAGS $PTHREAD_CFLAGS" LIBS="$PTHREAD_LIBS $LIBS"], 120 | [AC_MSG_ERROR([POSIX threads library is required.])]) 121 | 122 | AX_LSF([:], [AC_MSG_ERROR([ 123 | LSF libraries/headers not found; 124 | add --with-lsf-inc and --with-lsf-lib with appropriate locations.]) ]) 125 | if ! echo $ac_configure_args | ${EGREP} -q '(--)(exec-)?prefix'; then 126 | if test x$LSF_ENVDIR != x; then 127 | . ${LSF_ENVDIR}/lsf.conf 128 | libdir=$LSF_LIBDIR 129 | includedir=$LSF_INCLUDEDIR 130 | sysconfdir=$LSF_CONFDIR 131 | mandir=$LSF_MANDIR 132 | ac_configure_args="${ac_configure_args} --libdir=${libdir} \ 133 | --includedir=${includedir} --sysconfdir=${sysconfdir} \ 134 | --mandir=${mandir}" 135 | elif test ${sysconfdir} == '${prefix}/etc'; then 136 | # do not install configuration in /usr/local/etc 137 | sysconfdir='/etc' 138 | ac_configure_args="${ac_configure_args} --sysconfdir=${sysconfdir}" 139 | fi 140 | fi 141 | CPPFLAGS="${CPPFLAGS} -DCONFDIR=${sysconfdir}" 142 | 143 | # headers: 144 | AC_HEADER_STDC 145 | AC_HEADER_TIME 146 | AC_CHECK_HEADERS([stddef.h stdlib.h string.h strings.h sys/time.h unistd.h]) 147 | 148 | # types and structures: 149 | AC_TYPE_SIZE_T 150 | AC_STRUCT_TM 151 | 152 | # compiler characteristic 153 | AC_C_CONST 154 | AC_C_INLINE 155 | AC_C_VOLATILE 156 | 157 | # functions: 158 | AC_FUNC_MALLOC 159 | AC_FUNC_STRFTIME 160 | AC_FUNC_VPRINTF 161 | AC_CHECK_FUNCS([ \ 162 | asprintf \ 163 | fstat \ 164 | getcwd \ 165 | gettimeofday \ 166 | localtime_r \ 167 | memset \ 168 | setenv \ 169 | strcasecmp \ 170 | strchr \ 171 | strdup \ 172 | strerror \ 173 | strlcpy \ 174 | strndup \ 175 | strstr \ 176 | strtol \ 177 | vasprintf \ 178 | ]) 179 | 180 | # system services: 181 | 182 | # turn on warning after all tests 183 | if test x$GCC = xyes; then 184 | if test x$enable_development = xyes; then 185 | CFLAGS="-Werror ${CFLAGS}" 186 | fi 187 | CFLAGS="-Wall -W -Wno-unused-parameter $GCC_W_NO_FORMAT_ZERO_LENGTH ${CFLAGS}" 188 | fi 189 | 190 | AC_CONFIG_FILES([ 191 | Makefile 192 | lsf_drmaa/Makefile 193 | sample/Makefile 194 | doc/Makefile 195 | ]) 196 | AC_CONFIG_HEADERS([config.h]) 197 | AC_CONFIG_SUBDIRS([drmaa_utils]) 198 | AC_OUTPUT 199 | 200 | echo 201 | echo "Run 'make' now." 202 | 203 | -------------------------------------------------------------------------------- /doc/Makefile.am: -------------------------------------------------------------------------------- 1 | # $Id: Makefile.am 1467 2008-10-06 10:18:17Z lukasz $ 2 | # 3 | # FedStage DRMAA for LSF 4 | # Copyright (C) 2007-2008 FedStage Systems 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | 19 | DOCUTILSFLAGS = \ 20 | -i utf-8 \ 21 | -o utf-8 \ 22 | --language=en \ 23 | --file-insertion-enabled \ 24 | --no-generator \ 25 | --tab-width=4 26 | RST2HTMLFLAGS = $(DOCUTILSFLAGS) \ 27 | --stylesheet=stylesheet.css \ 28 | --link-stylesheet 29 | RST2LATEXFLAGS = $(DOCUTILSFLAGS) \ 30 | --documentclass=article \ 31 | --documentoptions=a4paper,10pt \ 32 | --font-encoding=OT4 \ 33 | --graphicx-option=pdftex \ 34 | --use-latex-footnotes \ 35 | --footnote-references=superscript \ 36 | --use-latex-citations \ 37 | --use-latex-toc 38 | 39 | readme.html: $(top_srcdir)/README.md 40 | $(RST2HTML) $(RST2HTMLFLAGS) $< $@ 41 | readme.tex: $(top_srcdir)/README.md 42 | $(RST2LATEX) $(RST2LATEXFLAGS) $< $@ 43 | .tex.pdf: 44 | -pdflatex $< && -pdflatex $< 45 | 46 | noinst_DATA = readme.html readme.pdf 47 | EXTRA_DIST = readme.html readme.tex readme.pdf 48 | 49 | clean-local: 50 | -rm -rf *.log *.aux *.toc *.out 51 | MAINTAINERCLEANFILES = readme.html readme.tex readme.pdf 52 | 53 | -------------------------------------------------------------------------------- /doc/readme.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBMSpectrumComputing/lsf-drmaa/a486a467380d4667190cf8f8605197c1aaad5a60/doc/readme.pdf -------------------------------------------------------------------------------- /drmaa_utils/Doxyfile.in: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = "@PACKAGE_NAME@" 2 | PROJECT_NUMBER = @PACKAGE_VERSION@ 3 | INPUT = @top_srcdir@/drmaa_utils 4 | EXCLUDE = \ 5 | @top_srcdir@/drmaa_utils/datetime_tab.c \ 6 | @top_srcdir@/drmaa_utils/datetime_tab.h \ 7 | @top_srcdir@/drmaa_utils/conf_tab.c \ 8 | @top_srcdir@/drmaa_utils/conf_tab.h \ 9 | @top_srcdir@/drmaa_utils/drmaa_attrib.c 10 | OUTPUT_DIRECTORY = apidoc 11 | 12 | ENABLE_PREPROCESSING = YES 13 | PREDEFINED = __GNUC__ 14 | 15 | JAVADOC_AUTOBRIEF = YES 16 | EXTRACT_ALL = NO 17 | HIDE_UNDOC_MEMBERS = NO 18 | SORT_BRIEF_DOCS = NO 19 | SORT_MEMBER_DOCS = NO 20 | DETAILS_AT_TOP = YES 21 | OPTIMIZE_OUTPUT_FOR_C = YES 22 | TAB_SIZE = 2 23 | GENERATE_TODOLIST = YES 24 | SHOW_DIRECTORIES = NO 25 | 26 | HAVE_DOT = @HAVE_DOT@ 27 | CALL_GRAPH = YES 28 | 29 | GENERATE_HTML = YES 30 | GENERATE_LATEX = NO 31 | -------------------------------------------------------------------------------- /drmaa_utils/Makefile.am: -------------------------------------------------------------------------------- 1 | # $Id: Makefile.am 2248 2009-03-20 14:20:56Z lukasz $ 2 | # 3 | # FedStage DRMAA utilities library 4 | # Copyright (C) 2006-2008 FedStage Systems 5 | # 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | # 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | # 19 | 20 | ACLOCAL_AMFLAGS = -I m4 21 | EXTRA_DIST = \ 22 | autoclean.sh \ 23 | autogen.sh \ 24 | m4/bison_ylwrap.sh \ 25 | m4/missing-dev-prog.sh 26 | 27 | SUBDIRS = drmaa_utils test 28 | 29 | -------------------------------------------------------------------------------- /drmaa_utils/README: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBMSpectrumComputing/lsf-drmaa/a486a467380d4667190cf8f8605197c1aaad5a60/drmaa_utils/README -------------------------------------------------------------------------------- /drmaa_utils/autoclean.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # $Id: autoclean.sh 1656 2008-11-18 17:11:58Z lukasz $ 3 | 4 | echo "Removing all generated files. ($PWD)" 5 | 6 | make maintainer-clean 7 | 8 | rm -f aclocal.m4 configure configure.scan config.h.in confdefs.h libtool 9 | 10 | rm -rf autom4te.cache 11 | rm -rf scripts 12 | 13 | find . -name Makefile.in -exec rm -f {} \; 14 | find . -name Makefile -exec rm -f {} \; 15 | find . -name \*~ -exec rm -f {} \; 16 | find . -name \.#* -exec rm -f {} \; 17 | find . -name \*.core -exec rm -f {} \; 18 | find . -name \*.log -exec rm -f {} \; 19 | find . -name \*.a -exec rm -f {} \; 20 | find . -name \*.o -exec rm -f {} \; 21 | find . -name \*.lo* -exec rm -f {} \; 22 | find . -name \*.la* -exec rm -f {} \; 23 | 24 | echo "done." 25 | -------------------------------------------------------------------------------- /drmaa_utils/autogen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # $Id: autogen.sh 1656 2008-11-18 17:11:58Z lukasz $ 3 | 4 | run() { 5 | echo "running $@ ($PWD)" 6 | eval "$@" 7 | } 8 | 9 | check() 10 | { 11 | printf "checking for $1... " 12 | if ($1 --version < /dev/null > /dev/null 2>&1); then 13 | echo "yes" 14 | else 15 | echo "no" 16 | exit 1 17 | fi 18 | } 19 | 20 | ACLOCAL=${ACLOCAL:=aclocal} 21 | AUTOHEADER=${AUTOHEADER:=autoheader} 22 | AUTOCONF=${AUTOCONF:=autoconf} 23 | LIBTOOLIZE=${LIBTOOLIZE:=libtoolize} 24 | AUTOMAKE=${AUTOMAKE:=automake} 25 | 26 | check $ACLOCAL 27 | check $AUTOHEADER 28 | check $AUTOCONF 29 | check $LIBTOOLIZE 30 | check $AUTOMAKE 31 | 32 | mkdir -p scripts 33 | 34 | run ${ACLOCAL} -I m4 | grep -v ^/usr/share/aclocal || exit 1 35 | run ${LIBTOOLIZE} --automake --copy --force || exit 1 36 | run ${AUTOHEADER} --warnings=all || exit 1 37 | run ${AUTOMAKE} --foreign --add-missing --copy --warnings=all || exit 1 38 | run ${AUTOCONF} --warnings=all -Wno-obsolete || exit 1 39 | 40 | if [ -n "$*" ]; then 41 | args="$*" 42 | elif [ -f config.log ]; then 43 | args=`grep '\$ *\./configure ' config.log \ 44 | | sed 's:^ *\$ *\./configure ::;s:--no-create::;s:--no-recursion::' \ 45 | 2>/dev/null` 46 | fi 47 | 48 | run ./configure ${args} 49 | -------------------------------------------------------------------------------- /drmaa_utils/config.h.in: -------------------------------------------------------------------------------- 1 | /* config.h.in. Generated from configure.ac by autoheader. */ 2 | 3 | /* 1234 = LIL_ENDIAN, 4321 = BIGENDIAN */ 4 | #undef BYTEORDER 5 | 6 | /* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP 7 | systems. This function is required for `alloca.c' support on those systems. 8 | */ 9 | #undef CRAY_STACKSEG_END 10 | 11 | /* Define to 1 if using `alloca.c'. */ 12 | #undef C_ALLOCA 13 | 14 | /* Produce debugging code */ 15 | #undef DEBUGGING 16 | 17 | /* Development mode */ 18 | #undef DEVELOPMENT 19 | 20 | /* Define to 1 if you have `alloca', as a function or macro. */ 21 | #undef HAVE_ALLOCA 22 | 23 | /* Define to 1 if you have and it should be used (not on Ultrix). 24 | */ 25 | #undef HAVE_ALLOCA_H 26 | 27 | /* Define to 1 if you have the `asprintf' function. */ 28 | #undef HAVE_ASPRINTF 29 | 30 | /* Define to 1 if you have the declaration of `strerror_r', and to 0 if you 31 | don't. */ 32 | #undef HAVE_DECL_STRERROR_R 33 | 34 | /* Define to 1 if you have the header file. */ 35 | #undef HAVE_DLFCN_H 36 | 37 | /* Define to 1 if you have the header file. */ 38 | #undef HAVE_EXECINFO_H 39 | 40 | /* Define to 1 if you have the header file. */ 41 | #undef HAVE_FCNTL_H 42 | 43 | /* Define to 1 if you have the `fstat' function. */ 44 | #undef HAVE_FSTAT 45 | 46 | /* Define to 1 if you have the `getcwd' function. */ 47 | #undef HAVE_GETCWD 48 | 49 | /* Define to 1 if you have the gettid() syscall. */ 50 | #undef HAVE_GETTID 51 | 52 | /* Define to 1 if you have the `gettimeofday' function. */ 53 | #undef HAVE_GETTIMEOFDAY 54 | 55 | /* Define to 1 if you have the header file. */ 56 | #undef HAVE_INTTYPES_H 57 | 58 | /* Define to 1 if you have the header file. */ 59 | #undef HAVE_LIBINTL_H 60 | 61 | /* Define to 1 if you have the header file. */ 62 | #undef HAVE_LIMITS_H 63 | 64 | /* Define to 1 if you have the `localtime_r' function. */ 65 | #undef HAVE_LOCALTIME_R 66 | 67 | /* Define to 1 if you have the header file. */ 68 | #undef HAVE_MALLOC_H 69 | 70 | /* Define to 1 if you have the header file. */ 71 | #undef HAVE_MEMORY_H 72 | 73 | /* Define to 1 if you have the `memset' function. */ 74 | #undef HAVE_MEMSET 75 | 76 | /* Define if you have POSIX threads libraries and header files. */ 77 | #undef HAVE_PTHREAD 78 | 79 | /* Define to 1 if stdbool.h conforms to C99. */ 80 | #undef HAVE_STDBOOL_H 81 | 82 | /* Define to 1 if you have the header file. */ 83 | #undef HAVE_STDDEF_H 84 | 85 | /* Define to 1 if you have the header file. */ 86 | #undef HAVE_STDINT_H 87 | 88 | /* Define to 1 if you have the header file. */ 89 | #undef HAVE_STDLIB_H 90 | 91 | /* Define to 1 if you have the `strchr' function. */ 92 | #undef HAVE_STRCHR 93 | 94 | /* Define to 1 if you have the `strdup' function. */ 95 | #undef HAVE_STRDUP 96 | 97 | /* Define to 1 if you have the `strerror' function. */ 98 | #undef HAVE_STRERROR 99 | 100 | /* Define to 1 if you have the `strerror_r' function. */ 101 | #undef HAVE_STRERROR_R 102 | 103 | /* Define to 1 if you have the `strftime' function. */ 104 | #undef HAVE_STRFTIME 105 | 106 | /* Define to 1 if you have the header file. */ 107 | #undef HAVE_STRINGS_H 108 | 109 | /* Define to 1 if you have the header file. */ 110 | #undef HAVE_STRING_H 111 | 112 | /* Define to 1 if you have the `strlcpy' function. */ 113 | #undef HAVE_STRLCPY 114 | 115 | /* Define to 1 if you have the `strndup' function. */ 116 | #undef HAVE_STRNDUP 117 | 118 | /* Define to 1 if you have the `strstr' function. */ 119 | #undef HAVE_STRSTR 120 | 121 | /* gmtoff in struct tm */ 122 | #undef HAVE_STRUCT_TM_GMTOFF 123 | 124 | /* Define to 1 if you have the header file. */ 125 | #undef HAVE_SYS_STAT_H 126 | 127 | /* Define to 1 if you have the header file. */ 128 | #undef HAVE_SYS_TIME_H 129 | 130 | /* Define to 1 if you have the header file. */ 131 | #undef HAVE_SYS_TYPES_H 132 | 133 | /* Define to 1 if you have the header file. */ 134 | #undef HAVE_UNISTD_H 135 | 136 | /* Define to 1 if you have the `vasprintf' function. */ 137 | #undef HAVE_VASPRINTF 138 | 139 | /* Define to 1 if you have the va_copy function. */ 140 | #undef HAVE_VA_COPY 141 | 142 | /* Define to 1 if the system has the type `_Bool'. */ 143 | #undef HAVE__BOOL 144 | 145 | /* Define to 1 if you have the __va_copy function. */ 146 | #undef HAVE___VA_COPY 147 | 148 | /* Define to the sub-directory in which libtool stores uninstalled libraries. 149 | */ 150 | #undef LT_OBJDIR 151 | 152 | /* Name of package */ 153 | #undef PACKAGE 154 | 155 | /* Define to the address where bug reports for this package should be sent. */ 156 | #undef PACKAGE_BUGREPORT 157 | 158 | /* Define to the full name of this package. */ 159 | #undef PACKAGE_NAME 160 | 161 | /* Define to the full name and version of this package. */ 162 | #undef PACKAGE_STRING 163 | 164 | /* Define to the one symbol short name of this package. */ 165 | #undef PACKAGE_TARNAME 166 | 167 | /* Define to the version of this package. */ 168 | #undef PACKAGE_VERSION 169 | 170 | /* Define to necessary symbol if this constant uses a non-standard name on 171 | your system. */ 172 | #undef PTHREAD_CREATE_JOINABLE 173 | 174 | /* If using the C implementation of alloca, define if you know the 175 | direction of stack growth for your system; otherwise it will be 176 | automatically deduced at runtime. 177 | STACK_DIRECTION > 0 => grows toward higher addresses 178 | STACK_DIRECTION < 0 => grows toward lower addresses 179 | STACK_DIRECTION = 0 => direction of growth unknown */ 180 | #undef STACK_DIRECTION 181 | 182 | /* Define to 1 if you have the ANSI C header files. */ 183 | #undef STDC_HEADERS 184 | 185 | /* Define to 1 if strerror_r returns char *. */ 186 | #undef STRERROR_R_CHAR_P 187 | 188 | /* Define to 1 if you can safely include both and . */ 189 | #undef TIME_WITH_SYS_TIME 190 | 191 | /* Define to 1 if your declares `struct tm'. */ 192 | #undef TM_IN_SYS_TIME 193 | 194 | /* Version number of package */ 195 | #undef VERSION 196 | 197 | /* whether byteorder is bigendian */ 198 | #undef WORDS_BIGENDIAN 199 | 200 | /* Define to empty if `const' does not conform to ANSI C. */ 201 | #undef const 202 | 203 | /* Define to `__inline__' or `__inline' if that's what the C compiler 204 | calls it, or to nothing if 'inline' is not supported under any name. */ 205 | #ifndef __cplusplus 206 | #undef inline 207 | #endif 208 | 209 | /* Define to `int' if does not define. */ 210 | #undef mode_t 211 | 212 | /* Define to `int' if does not define. */ 213 | #undef pid_t 214 | 215 | /* Define to `unsigned int' if does not define. */ 216 | #undef size_t 217 | 218 | /* Define to empty if the keyword `volatile' does not work. Warning: valid 219 | code using `volatile' can become incorrect without. Disable with care. */ 220 | #undef volatile 221 | 222 | 223 | #ifndef __GNUC__ 224 | # define __attribute__ /* nothing */ 225 | #endif 226 | 227 | 228 | 229 | #ifndef HAVE_VA_COPY 230 | # define va_copy(a,b) __va_copy(a,b) 231 | # define HAVE_VA_COPY 1 232 | #endif 233 | 234 | -------------------------------------------------------------------------------- /drmaa_utils/configure.ac: -------------------------------------------------------------------------------- 1 | AC_INIT([FedStage DRMAA utilities library], [2.0.1], [drmaa-pbspro-users@lists.fedstage.com], [drmaa_utils]) 2 | AC_PREREQ(2.59) 3 | AC_REVISION([$Id: configure.ac 1673 2008-11-21 20:17:05Z lukasz $]) 4 | AC_COPYRIGHT([ 5 | FedStage DRMAA utilities library 6 | Copyright (C) 2006-2008 FedStage Systems 7 | 8 | This program is free software: you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation, either version 3 of the License, or 11 | (at your option) any later version. 12 | 13 | This program is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with this program. If not, see . 20 | ]) 21 | 22 | DRMAA_UTILS_MAJOR=2 23 | DRMAA_UTILS_MINOR=0 24 | DRMAA_UTILS_MICRO=1 25 | DRMAA_UTILS_VERSION_INFO=2:1:0 26 | AC_SUBST([DRMAA_UTILS_MAJOR]) 27 | AC_SUBST([DRMAA_UTILS_MINOR]) 28 | AC_SUBST([DRMAA_UTILS_MICRO]) 29 | AC_SUBST([DRMAA_UTILS_VERSION_INFO]) 30 | 31 | AC_CONFIG_SRCDIR([drmaa_utils/xmalloc.c]) 32 | AC_CONFIG_MACRO_DIR([m4]) 33 | AC_CONFIG_AUX_DIR([scripts]) 34 | 35 | AM_INIT_AUTOMAKE 36 | DEVELOPER_MODE="no" 37 | AM_CONDITIONAL([DEVELOPER_MODE], [test "x$DEVELOPER_MODE" = "xyes"]) 38 | 39 | # command-line arguments: 40 | AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug], 41 | [produce code suiteable for debugging and print logs at runtime])) 42 | AC_ARG_ENABLE(development, AC_HELP_STRING([--enable-development], 43 | [enable development mode: make additional checks (suiteable for FedStage DRMAA utilities library developers)])) 44 | 45 | AC_ARG_WITH(drmaa-utils, AC_HELP_STRING([--with-drmaa-utils=...], 46 | [used only to detect that drmaa utils is sub packaged])) 47 | AM_CONDITIONAL([DRMAA_UTILS_STANDALONE], 48 | [test x$with_drmaa_utils = x]) 49 | 50 | # programs: 51 | AC_PROG_CC 52 | AC_PROG_CPP 53 | AC_PROG_RANLIB 54 | AC_PROG_INSTALL 55 | AC_PROG_LIBTOOL 56 | AC_PROG_MAKE_SET 57 | AC_PROG_LN_S 58 | 59 | 60 | # code generation tools: 61 | AC_PROG_YACC 62 | AX_GPERF 63 | AC_CHECK_PROGS([RAGEL], [ragel], [sh m4/missing-dev-prog.sh ragel]) 64 | 65 | # reStructuredText processing: 66 | AX_DOCUTILS 67 | # documentation generation: 68 | AC_CHECK_PROGS([DOT], [dot]) 69 | if test x$DOT != x; then 70 | HAVE_DOT=yes 71 | else 72 | HAVE_DOT=no 73 | fi 74 | AC_SUBST([HAVE_DOT]) 75 | 76 | # check compiler / set basic flags: 77 | if test x$ac_cv_prog_cc_stdc = xno; then 78 | AC_MSG_ERROR([ANSI C compiler is required]) 79 | fi 80 | 81 | if test x$GCC = xyes; then 82 | CFLAGS="-pedantic ${CFLAGS}" 83 | fi 84 | AM_CONDITIONAL([GCC], [test x$GCC = xyes]) 85 | 86 | AX_GCC_WARNINGS() 87 | 88 | AH_TEMPLATE([DEBUGGING], [Produce debugging code]) 89 | if test x$enable_debug = xyes; then 90 | AC_DEFINE(DEBUGGING,[1]) 91 | CFLAGS="${CFLAGS} -O0" 92 | else 93 | CPPFLAGS="-DNDEBUG ${CPPFLAGS}" 94 | fi 95 | 96 | AH_TEMPLATE([DEVELOPMENT], [Development mode]) 97 | if test x$enable_development = xyes; then 98 | AC_DEFINE(DEVELOPMENT, [1]) 99 | fi 100 | 101 | AH_BOTTOM([ 102 | #ifndef __GNUC__ 103 | # define __attribute__ /* nothing */ 104 | #endif 105 | ]) 106 | 107 | # system: 108 | CPPFLAGS="-D_REENTRANT -D_THREAD_SAFE ${CPPFLAGS}" 109 | 110 | AC_CANONICAL_HOST 111 | case "$host_os" in 112 | *linux*) 113 | CPPFLAGS="${CPPFLAGS} -D_GNU_SOURCE" 114 | ;; 115 | *solaris*) 116 | CPPFLAGS="${CPPFLAGS} -D_XOPEN_SOURCE=500 -D__EXTENSIONS__" 117 | ;; 118 | *freebsd*) 119 | ;; 120 | *darwin*) 121 | CPPFLAGS="${CPPFLAGS} -D_XOPEN_SOURCE=400" 122 | ;; 123 | *aix*) 124 | CPPFLAGS="${CPPFLAGS} -D_XOPEN_SOURCE=500 -D_XOPEN_SOURCE_EXTENDED=1 -D__linux__" 125 | ;; 126 | *) 127 | CPPFLAGS="${CPPFLAGS} -D_XOPEN_SOURCE=500 -D__USE_BSD" 128 | ;; 129 | esac 130 | 131 | 132 | AC_C_BIGENDIAN_CROSS 133 | 134 | # project prerequisites: 135 | 136 | # libraries: 137 | ACX_PTHREAD([CFLAGS="$CFLAGS $PTHREAD_CFLAGS" LIBS="$PTHREAD_LIBS $LIBS"], 138 | [AC_MSG_ERROR([POSIX threads library is required by DRMAA.])]) 139 | 140 | # headers: 141 | AC_CHECK_HEADERS([execinfo.h fcntl.h inttypes.h libintl.h limits.h malloc.h stddef.h stdint.h stdlib.h string.h sys/time.h unistd.h]) 142 | AC_HEADER_STDBOOL 143 | AC_HEADER_TIME 144 | 145 | # types and structures: 146 | AC_TYPE_PID_T 147 | AC_TYPE_SIZE_T 148 | #AC_TYPE_SSIZE_T 149 | AC_TYPE_MODE_T 150 | #AC_TYPE_UINT16_T 151 | #AC_TYPE_UINT32_T 152 | #AC_TYPE_UINT8_T 153 | AC_STRUCT_TM 154 | AC_CHECK_MEMBER(struct tm.tm_gmtoff,[AC_DEFINE([HAVE_STRUCT_TM_GMTOFF],[1],[gmtoff in struct tm])],,[#include ]) 155 | 156 | # compiler characteristic 157 | AC_C_CONST 158 | AC_C_INLINE 159 | AC_C_VOLATILE 160 | 161 | # functions: 162 | AC_FUNC_ALLOCA 163 | AC_FUNC_STRERROR_R 164 | AC_FUNC_STRFTIME 165 | AC_CHECK_FUNCS([ \ 166 | asprintf \ 167 | fstat \ 168 | getcwd \ 169 | gettimeofday \ 170 | localtime_r \ 171 | memset \ 172 | strchr \ 173 | strdup \ 174 | strerror \ 175 | strlcpy \ 176 | strndup \ 177 | strstr \ 178 | vasprintf]) 179 | AX_FUNC_GETTID 180 | AX_FUNC_VA_COPY 181 | AC_SEARCH_LIBS([backtrace], [execinfo]) 182 | 183 | # system services: 184 | 185 | # turn on warning after all tests 186 | if test x$GCC = xyes; then 187 | if test x$enable_development = xyes; then 188 | CFLAGS="-Werror ${CFLAGS}" 189 | fi 190 | CFLAGS="-Wall -W -Wno-unused-parameter $GCC_W_NO_FORMAT_ZERO_LENGTH ${CFLAGS}" 191 | fi 192 | 193 | AC_CONFIG_FILES([ 194 | Makefile 195 | drmaa_utils/Makefile 196 | test/Makefile 197 | Doxyfile 198 | ]) 199 | AC_CONFIG_HEADERS([config.h]) 200 | AC_OUTPUT 201 | 202 | echo 203 | echo "Run 'make' now." 204 | 205 | -------------------------------------------------------------------------------- /drmaa_utils/drmaa_utils/Makefile.am: -------------------------------------------------------------------------------- 1 | # $Id: Makefile.am 1656 2008-11-18 17:11:58Z lukasz $ 2 | # 3 | # FedStage DRMAA utilities library 4 | # Copyright (C) 2006-2008 FedStage Systems 5 | # 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | # 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | # 19 | 20 | GPERF = @GPERF@ 21 | GPERFFLAGS = --readonly-tables 22 | RAGEL = @RAGEL@ 23 | RAGELFLAGS = 24 | 25 | YLWRAP = $(top_srcdir)/m4/bison_ylwrap.sh 26 | AM_YFLAGS = -d 27 | 28 | noinst_LTLIBRARIES = libdrmaa_utils.la 29 | 30 | libdrmaa_utils_la_SOURCES = \ 31 | compat.c compat.h \ 32 | common.h \ 33 | conf.c conf.h \ 34 | conf_impl.h conf_tab.y \ 35 | datetime.c datetime.h \ 36 | datetime_impl.h datetime_tab.y \ 37 | drmaa_attrib.c drmaa_attrib.h \ 38 | environ.c environ.h \ 39 | exception.c exception.h \ 40 | iter.c iter.h \ 41 | fsd_job.c job.h \ 42 | logging.c logging.h \ 43 | lookup3.c lookup3.h \ 44 | fsd_session.c session.h \ 45 | template.c template.h \ 46 | timedelta.c \ 47 | thread.c thread.h \ 48 | fsd_util.c util.h \ 49 | drmaa_util.c drmaa_util.h \ 50 | xmalloc.c xmalloc.h \ 51 | drmaa_base.c drmaa_base.h 52 | 53 | libdrmaa_utils_la_LDFLAGS = -static 54 | libdrmaa_utils_la_CPPFLAGS = -fPIC 55 | 56 | if GCC 57 | if !DEVELOPER_MODE 58 | # allow `%m` in printf-like format string 59 | # Bison and Ragel generated code have many unused symbols 60 | libdrmaa_utils_la_CPPFLAGS += -Wno-unused 61 | endif 62 | endif 63 | 64 | include_HEADERS = drmaa.h 65 | 66 | BUILT_SOURCES = \ 67 | datetime_tab.c datetime_tab.h \ 68 | conf_tab.c conf_tab.h \ 69 | drmaa_attrib.c \ 70 | timedelta.c 71 | 72 | EXTRA_DIST = drmaa_attrib.gperf timedelta.rl 73 | 74 | if DEVELOPER_MODE 75 | CLEANFILES = $(BUILT_SOURCES) 76 | endif 77 | 78 | drmaa_attrib.c: drmaa_attrib.gperf 79 | $(GPERF) $(GPERFFLAGS) --output-file=drmaa_attrib.c drmaa_attrib.gperf 80 | timedelta.c: timedelta.rl 81 | $(RAGEL) $(RAGELFLAGS) -o timedelta.c timedelta.rl 82 | 83 | -------------------------------------------------------------------------------- /drmaa_utils/drmaa_utils/common.h: -------------------------------------------------------------------------------- 1 | /* $Id: common.h 2 2009-10-12 09:51:22Z mamonski $ */ 2 | /* 3 | * FedStage DRMAA utilities library 4 | * Copyright (C) 2006-2008 FedStage Systems 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | #ifndef __DRMAA_UTILS__COMMON_H 21 | #define __DRMAA_UTILS__COMMON_H 22 | 23 | #ifdef HAVE_CONFIG_H 24 | # include 25 | #endif 26 | 27 | #include 28 | #include 29 | #include 30 | #include 31 | 32 | #define FSD_SAFE_STR(str) ( str != NULL ? str : "(null)" ) 33 | 34 | /* configuration */ 35 | typedef struct fsd_conf_option_s fsd_conf_option_t; 36 | typedef struct fsd_conf_dict_s fsd_conf_dict_t; 37 | 38 | /* iterator */ 39 | typedef struct fsd_iter_s fsd_iter_t; 40 | 41 | /* template type */ 42 | typedef struct fsd_attribute_s fsd_attribute_t; 43 | typedef struct fsd_template_s fsd_template_t; 44 | 45 | /* DRMAA structures */ 46 | typedef struct fsd_drmaa_singletone_s fsd_drmaa_singletone_t; 47 | typedef struct fsd_drmaa_session_s fsd_drmaa_session_t; 48 | typedef struct fsd_job_set_s fsd_job_set_t; 49 | typedef struct fsd_job_s fsd_job_t; 50 | typedef struct fsd_expand_drmaa_ph_s fsd_expand_drmaa_ph_t; 51 | 52 | #endif /* __DRMAA_UTILS__COMMON_H */ 53 | 54 | -------------------------------------------------------------------------------- /drmaa_utils/drmaa_utils/compat.c: -------------------------------------------------------------------------------- 1 | /* $Id: compat.c 138 2010-04-29 17:13:31Z mamonski $ */ 2 | /* 3 | * FedStage DRMAA utilities library 4 | * Copyright (C) 2006-2008 FedStage Systems 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | #ifdef HAVE_CONFIG_H 21 | # include 22 | #endif 23 | 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | #include 32 | 33 | 34 | #ifndef lint 35 | static char rcsid[] 36 | # ifdef __GNUC__ 37 | __attribute__ ((unused)) 38 | # endif 39 | = "$Id: compat.c 138 2010-04-29 17:13:31Z mamonski $"; 40 | #endif 41 | 42 | 43 | #ifndef HAVE_STRLCPY 44 | size_t 45 | strlcpy( char *dest, const char *src, size_t size ) 46 | { 47 | size_t result = 0; 48 | if( size == 0 ) 49 | return 0; 50 | while( *src && --size > 0 ) 51 | { 52 | *dest++ = *src++; 53 | result++; 54 | } 55 | *dest++ = '\0'; 56 | return result; 57 | } 58 | #endif /* ! HAVE_STRLCPY */ 59 | 60 | 61 | #ifndef HAVE_STRNDUP 62 | char * 63 | strndup( const char *s, size_t n ) 64 | { 65 | char *result; 66 | if( s == NULL ) 67 | return NULL; 68 | result = calloc( n + 1, sizeof(char) ); 69 | 70 | if( result == NULL ) 71 | { 72 | errno = ENOMEM; 73 | return NULL; 74 | } 75 | 76 | strlcpy( result, s, n + 1 ); 77 | return result; 78 | } 79 | #endif /* ! HAVE_STRNDUP */ 80 | 81 | 82 | #ifndef HAVE_ASPRINTF 83 | int 84 | asprintf( char **strp, const char *fmt, ... ) 85 | { 86 | va_list args; 87 | int result; 88 | va_start( args, fmt ); 89 | result = vasprintf( strp, fmt, args ); 90 | va_end( args ); 91 | return result; 92 | } 93 | #endif /* ! HAVE_ASPRINTF */ 94 | 95 | 96 | #ifndef HAVE_VASPRINTF 97 | int 98 | vasprintf( char **strp, const char *format, va_list ap ) 99 | { 100 | int size, check_size; 101 | char *buf = NULL; 102 | 103 | #ifdef HAVE_VA_COPY 104 | va_list aq; 105 | 106 | va_copy(aq, ap); 107 | #else 108 | # ifdef HAVE___VA_COPY 109 | va_list aq; 110 | 111 | __va_copy(aq, ap); 112 | # endif 113 | #endif 114 | 115 | *strp = NULL; 116 | 117 | #ifndef HAVE_C99_VSNPRINTF 118 | { 119 | int res; 120 | char *tmp; 121 | 122 | size = 128; 123 | do { 124 | size *= 2; 125 | if (!(tmp = realloc(buf, size))) { 126 | if (buf) 127 | free(buf); 128 | return -1; 129 | } 130 | buf = tmp; 131 | /* XXX we're assuming here there's no va_copy on this system */ 132 | res = vsnprintf(buf, size, format, ap); 133 | } while (res == -1); 134 | } 135 | #else 136 | { 137 | char tmp[2]; 138 | 139 | /* on Solaris vsnprintf fails if buf is empty, so use a small one */ 140 | size = vsnprintf(tmp, sizeof(tmp), format, ap); 141 | if (!(buf = malloc(size + 1))) 142 | return -1; 143 | } 144 | #endif 145 | 146 | #ifdef HAVE_VA_COPY 147 | check_size = vsnprintf(buf, size + 1, format, aq); 148 | va_end(aq); 149 | #else 150 | # ifdef HAVE___VA_COPY 151 | check_size = vsnprintf(buf, size + 1, format, aq); 152 | va_end(aq); 153 | # else 154 | check_size = vsnprintf(buf, size + 1, format, ap); 155 | # endif 156 | #endif 157 | assert(check_size <= size); 158 | *strp = buf; 159 | return 0; 160 | } 161 | #endif 162 | 163 | -------------------------------------------------------------------------------- /drmaa_utils/drmaa_utils/compat.h: -------------------------------------------------------------------------------- 1 | /* $Id: compat.h 2 2009-10-12 09:51:22Z mamonski $ */ 2 | /* 3 | * FedStage DRMAA utilities library 4 | * Copyright (C) 2006-2008 FedStage Systems 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | #ifndef __DRMAA_UTILS__COMPAT_H 21 | #define __DRMAA_UTILS__COMPAT_H 22 | 23 | #ifdef HAVE_CONFIG_H 24 | # include 25 | #endif 26 | 27 | #include 28 | 29 | #include 30 | #include 31 | 32 | #ifdef HAVE_STDINT_H 33 | # include 34 | #else 35 | # ifdef HAVE_INTTYPES_H 36 | # include 37 | # else 38 | # warning "no stdint.h nor inttypes.h found" 39 | # endif 40 | #endif /* ! HAVE_STDINT_H */ 41 | 42 | #ifdef HAVE_STDBOOL_H 43 | # include 44 | #else 45 | # ifndef bool 46 | # define bool int 47 | # endif 48 | # ifndef true 49 | # define true 1 50 | # endif 51 | # ifndef false 52 | # define false 0 53 | # endif 54 | #endif /* ! HAVE_STDBOOL_H */ 55 | 56 | #ifndef HAVE_STRLCPY 57 | size_t strlcpy( char *dest, const char *src, size_t size ) 58 | __attribute__(( weak )); 59 | #endif 60 | 61 | #ifndef HAVE_STRNDUP 62 | char *strndup( const char *s, size_t n ) 63 | __attribute__(( weak )); 64 | #endif 65 | 66 | #ifndef HAVE_ASPRINTF 67 | int asprintf( char **strp, const char *fmt, ... ) 68 | __attribute__(( weak )); 69 | #endif 70 | 71 | #ifndef HAVE_VASPRINTF 72 | int vasprintf( char **strp, const char *fmt, va_list ap ) 73 | __attribute__(( weak )); 74 | #endif 75 | 76 | #endif /* __DRMAA_UTILS__COMPAT_H */ 77 | 78 | -------------------------------------------------------------------------------- /drmaa_utils/drmaa_utils/conf.h: -------------------------------------------------------------------------------- 1 | /* $Id: conf.h 2 2009-10-12 09:51:22Z mamonski $ */ 2 | /* 3 | * FedStage DRMAA utilities library 4 | * Copyright (C) 2006-2008 FedStage Systems 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | #ifndef __DRMAA_UTILS__CONF_H 21 | #define __DRMAA_UTILS__CONF_H 22 | 23 | #ifdef HAVE_CONFIG_H 24 | # include 25 | #endif 26 | 27 | #include 28 | 29 | typedef enum { 30 | FSD_CONF_INTEGER, 31 | FSD_CONF_STRING, 32 | FSD_CONF_DICT 33 | } fsd_conf_type_t; 34 | 35 | struct fsd_conf_option_s { 36 | fsd_conf_type_t type; 37 | union { 38 | int integer; 39 | char *string; 40 | fsd_conf_dict_t *dict; 41 | } val; 42 | }; 43 | 44 | 45 | /** 46 | * Read configuration. 47 | */ 48 | fsd_conf_dict_t * 49 | fsd_conf_read( 50 | fsd_conf_dict_t *configuration, 51 | const char *filename, bool must_exist, 52 | const char *content, size_t content_len 53 | ); 54 | 55 | 56 | fsd_conf_dict_t * 57 | fsd_conf_load( const char *filename ); 58 | 59 | fsd_conf_option_t * 60 | fsd_conf_option_create( fsd_conf_type_t type, void *value ); 61 | 62 | void 63 | fsd_conf_option_destroy( fsd_conf_option_t *option ); 64 | 65 | fsd_conf_option_t * 66 | fsd_conf_option_merge( fsd_conf_option_t *lhs, fsd_conf_option_t *rhs ); 67 | 68 | void 69 | fsd_conf_option_dump( fsd_conf_option_t *option ); 70 | 71 | 72 | 73 | fsd_conf_dict_t * 74 | fsd_conf_dict_create(void); 75 | 76 | void 77 | fsd_conf_dict_destroy( fsd_conf_dict_t *dict ); 78 | 79 | fsd_conf_option_t * 80 | fsd_conf_dict_get( fsd_conf_dict_t *dict, const char *key ); 81 | 82 | void 83 | fsd_conf_dict_set( 84 | fsd_conf_dict_t *dict, const char *key, fsd_conf_option_t *value 85 | ); 86 | 87 | fsd_conf_dict_t * 88 | fsd_conf_dict_merge( fsd_conf_dict_t *lhs, fsd_conf_dict_t *rhs ); 89 | 90 | void 91 | fsd_conf_dict_dump( fsd_conf_dict_t *dict ); 92 | 93 | 94 | /* 95 | * Versions of functions above which do not raise exceptions. 96 | * Needed in conf_tab.y 97 | */ 98 | 99 | fsd_conf_option_t * 100 | fsd_conf_option_create_noraise( fsd_conf_type_t type, void *value ); 101 | 102 | fsd_conf_dict_t * 103 | fsd_conf_dict_create_noraise(void); 104 | 105 | int 106 | fsd_conf_dict_set_noraise( 107 | fsd_conf_dict_t *dict, const char *key, fsd_conf_option_t *value ); 108 | 109 | #endif /* __DRMAA_UTILS__CONF_H */ 110 | 111 | -------------------------------------------------------------------------------- /drmaa_utils/drmaa_utils/conf_impl.h: -------------------------------------------------------------------------------- 1 | /* $Id: conf_impl.h 2 2009-10-12 09:51:22Z mamonski $ */ 2 | /* 3 | * FedStage DRMAA utilities library 4 | * Copyright (C) 2006-2008 FedStage Systems 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | #ifndef __DRMAA_UTILS__CONF_IMPL_H 21 | #define __DRMAA_UTILS__CONF_IMPL_H 22 | 23 | #ifdef HAVE_CONFIG_H 24 | # include 25 | #endif 26 | 27 | #include 28 | 29 | typedef struct fsd_conf_parser_s fsd_conf_parser_t; 30 | typedef struct fsd_conf_lexer_s fsd_conf_lexer_t; 31 | union YYSTYPE; 32 | struct YYLTYPE; 33 | typedef unsigned char uchar; 34 | 35 | 36 | int 37 | fsd_conf_parse( fsd_conf_parser_t *parser, fsd_conf_lexer_t *lexer ); 38 | 39 | int 40 | fsd_conf_lex( union YYSTYPE *lvalp, struct YYLTYPE *locp, 41 | fsd_conf_lexer_t *lexer ); 42 | 43 | void 44 | fsd_conf_error( 45 | struct YYLTYPE *locp, 46 | fsd_conf_parser_t *parser, fsd_conf_lexer_t *lexer, 47 | const char *fmt, ... 48 | ); 49 | 50 | 51 | /** DRMAA configuration file parser data. */ 52 | struct fsd_conf_parser_s { 53 | fsd_conf_lexer_t *lexer; 54 | 55 | /** Parsing result - root of syntax tree. */ 56 | fsd_conf_dict_t *result; 57 | 58 | int n_errors; /**< Number of parse/lexical errors. */ 59 | char **errors; 60 | }; 61 | 62 | /** DRMAA configuration file lexical analyzer data. */ 63 | struct fsd_conf_lexer_s { 64 | fsd_conf_parser_t *parser; /**< Parser which use this lexer. */ 65 | const char *filename; /**< Name of configuration file. */ 66 | 67 | const uchar *buffer; /**< Entire content of parsed configuration file. */ 68 | size_t buflen; /**< Length of \a buffer. */ 69 | 70 | const uchar *pos; /**< Current position of lexical analyzer. */ 71 | int lineno; /**< Current line number (counted from 1). */ 72 | const uchar *cline; /**< Points to first character (byte) of current line. */ 73 | }; 74 | 75 | typedef struct fsd_conf_pair_s { 76 | char *key; 77 | fsd_conf_option_t *value; 78 | } fsd_conf_pair_t; 79 | 80 | #endif /* __DRMAA_UTILS__CONF_IMPL_H */ 81 | 82 | -------------------------------------------------------------------------------- /drmaa_utils/drmaa_utils/conf_tab.h: -------------------------------------------------------------------------------- 1 | 2 | /* A Bison parser, made by GNU Bison 2.4.1. */ 3 | 4 | /* Skeleton interface for Bison's Yacc-like parsers in C 5 | 6 | Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 7 | Free Software Foundation, Inc. 8 | 9 | This program is free software: you can redistribute it and/or modify 10 | it under the terms of the GNU General Public License as published by 11 | the Free Software Foundation, either version 3 of the License, or 12 | (at your option) any later version. 13 | 14 | This program is distributed in the hope that it will be useful, 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | GNU General Public License for more details. 18 | 19 | You should have received a copy of the GNU General Public License 20 | along with this program. If not, see . */ 21 | 22 | /* As a special exception, you may create a larger work that contains 23 | part or all of the Bison parser skeleton and distribute that work 24 | under terms of your choice, so long as that work isn't itself a 25 | parser generator using the skeleton or a modified version thereof 26 | as a parser skeleton. Alternatively, if you modify or redistribute 27 | the parser skeleton itself, you may (at your option) remove this 28 | special exception, which will cause the skeleton and the resulting 29 | Bison output files to be licensed under the GNU General Public 30 | License without this special exception. 31 | 32 | This special exception was added by the Free Software Foundation in 33 | version 2.2 of Bison. */ 34 | 35 | 36 | /* Tokens. */ 37 | #ifndef YYTOKENTYPE 38 | # define YYTOKENTYPE 39 | /* Put the tokens into the symbol table, so that GDB and other debuggers 40 | know about them. */ 41 | enum yytokentype { 42 | INTEGER = 258, 43 | STRING = 259, 44 | LEXER_ERROR = 260 45 | }; 46 | #endif 47 | 48 | 49 | 50 | #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED 51 | typedef union YYSTYPE 52 | { 53 | 54 | /* Line 1676 of yacc.c */ 55 | #line 36 "conf_tab.y" 56 | 57 | int integer; 58 | char *string; 59 | fsd_conf_option_t *option; 60 | fsd_conf_dict_t *dictionary; 61 | fsd_conf_pair_t pair; 62 | 63 | 64 | 65 | /* Line 1676 of yacc.c */ 66 | #line 67 "conf_tab.h" 67 | } YYSTYPE; 68 | # define YYSTYPE_IS_TRIVIAL 1 69 | # define yystype YYSTYPE /* obsolescent; will be withdrawn */ 70 | # define YYSTYPE_IS_DECLARED 1 71 | #endif 72 | 73 | 74 | 75 | #if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED 76 | typedef struct YYLTYPE 77 | { 78 | int first_line; 79 | int first_column; 80 | int last_line; 81 | int last_column; 82 | } YYLTYPE; 83 | # define yyltype YYLTYPE /* obsolescent; will be withdrawn */ 84 | # define YYLTYPE_IS_DECLARED 1 85 | # define YYLTYPE_IS_TRIVIAL 1 86 | #endif 87 | 88 | 89 | 90 | -------------------------------------------------------------------------------- /drmaa_utils/drmaa_utils/conf_tab.y: -------------------------------------------------------------------------------- 1 | /* $Id: conf_tab.y 2172 2009-02-28 14:26:23Z lukasz $ */ 2 | /* 3 | * FedStage DRMAA utilities library 4 | * Copyright (C) 2006-2008 FedStage Systems 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | %{ 21 | #ifdef HAVE_MALLOC_H 22 | # include 23 | #endif 24 | #include 25 | #include 26 | %} 27 | 28 | %pure-parser 29 | %locations 30 | %name-prefix="fsd_conf_" 31 | %parse-param { fsd_conf_parser_t *parser } 32 | %parse-param { fsd_conf_lexer_t *lexer } 33 | %lex-param { fsd_conf_lexer_t *lexer } 34 | 35 | 36 | %union { 37 | int integer; 38 | char *string; 39 | fsd_conf_option_t *option; 40 | fsd_conf_dict_t *dictionary; 41 | fsd_conf_pair_t pair; 42 | } 43 | 44 | %type