Merge branch 'master' of ssh://newton.binf.ku.dk:24222/home/tange/privat/parallel

This commit is contained in:
Ole Tange 2010-11-02 23:39:25 +01:00
commit 7c1fb94ddb
5 changed files with 365 additions and 277 deletions

4
aclocal.m4 vendored
View file

@ -13,8 +13,8 @@
m4_ifndef([AC_AUTOCONF_VERSION], m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.67],, m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],,
[m4_warning([this file was generated for autoconf 2.67. [m4_warning([this file was generated for autoconf 2.65.
You have another version of autoconf. It may work, but is not guaranteed to. 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. 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'.])]) To do so, use the procedure documented by the package, typically `autoreconf'.])])

243
configure vendored
View file

@ -1,13 +1,13 @@
#! /bin/sh #! /bin/sh
# Guess values for system-dependent variables and create Makefiles. # Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.67 for parallel 20100922. # Generated by GNU Autoconf 2.65 for parallel 20100922.
# #
# Report bugs to <bug-parallel@gnu.org>. # Report bugs to <bug-parallel@gnu.org>.
# #
# #
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
# Foundation, Inc. # Inc.
# #
# #
# This configure script is free software; the Free Software Foundation # This configure script is free software; the Free Software Foundation
@ -318,7 +318,7 @@ $as_echo X"$as_dir" |
test -d "$as_dir" && break test -d "$as_dir" && break
done done
test -z "$as_dirs" || eval "mkdir $as_dirs" test -z "$as_dirs" || eval "mkdir $as_dirs"
} || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
} # as_fn_mkdir_p } # as_fn_mkdir_p
@ -358,19 +358,19 @@ else
fi # as_fn_arith fi # as_fn_arith
# as_fn_error STATUS ERROR [LINENO LOG_FD] # as_fn_error ERROR [LINENO LOG_FD]
# ---------------------------------------- # ---------------------------------
# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
# provided, also output the error to LOG_FD, referencing LINENO. Then exit the # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
# script with STATUS, using 1 if that was 0. # script with status $?, using 1 if that was 0.
as_fn_error () as_fn_error ()
{ {
as_status=$1; test $as_status -eq 0 && as_status=1 as_status=$?; test $as_status -eq 0 && as_status=1
if test "$4"; then if test "$3"; then
as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
$as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
fi fi
$as_echo "$as_me: error: $2" >&2 $as_echo "$as_me: error: $1" >&2
as_fn_exit $as_status as_fn_exit $as_status
} # as_fn_error } # as_fn_error
@ -532,7 +532,7 @@ test -n "$DJDIR" || exec 7<&0 </dev/null
exec 6>&1 exec 6>&1
# Name of the host. # Name of the host.
# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
# so uname gets run too. # so uname gets run too.
ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
@ -688,8 +688,7 @@ do
fi fi
case $ac_option in case $ac_option in
*=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
*=) ac_optarg= ;;
*) ac_optarg=yes ;; *) ac_optarg=yes ;;
esac esac
@ -735,7 +734,7 @@ do
ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
# Reject names that are not valid shell variable names. # Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && 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_orig=$ac_useropt
ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in case $ac_user_opts in
@ -761,7 +760,7 @@ do
ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
# Reject names that are not valid shell variable names. # Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && 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_orig=$ac_useropt
ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in case $ac_user_opts in
@ -965,7 +964,7 @@ do
ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
# Reject names that are not valid shell variable names. # Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && 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_orig=$ac_useropt
ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in case $ac_user_opts in
@ -981,7 +980,7 @@ do
ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
# Reject names that are not valid shell variable names. # Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && 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_orig=$ac_useropt
ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in case $ac_user_opts in
@ -1011,8 +1010,8 @@ do
| --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
x_libraries=$ac_optarg ;; x_libraries=$ac_optarg ;;
-*) as_fn_error $? "unrecognized option: \`$ac_option' -*) as_fn_error "unrecognized option: \`$ac_option'
Try \`$0 --help' for more information" Try \`$0 --help' for more information."
;; ;;
*=*) *=*)
@ -1020,7 +1019,7 @@ Try \`$0 --help' for more information"
# Reject names that are not valid shell variable names. # Reject names that are not valid shell variable names.
case $ac_envvar in #( case $ac_envvar in #(
'' | [0-9]* | *[!_$as_cr_alnum]* ) '' | [0-9]* | *[!_$as_cr_alnum]* )
as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; as_fn_error "invalid variable name: \`$ac_envvar'" ;;
esac esac
eval $ac_envvar=\$ac_optarg eval $ac_envvar=\$ac_optarg
export $ac_envvar ;; export $ac_envvar ;;
@ -1038,13 +1037,13 @@ done
if test -n "$ac_prev"; then if test -n "$ac_prev"; then
ac_option=--`echo $ac_prev | sed 's/_/-/g'` ac_option=--`echo $ac_prev | sed 's/_/-/g'`
as_fn_error $? "missing argument to $ac_option" as_fn_error "missing argument to $ac_option"
fi fi
if test -n "$ac_unrecognized_opts"; then if test -n "$ac_unrecognized_opts"; then
case $enable_option_checking in case $enable_option_checking in
no) ;; no) ;;
fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
*) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
esac esac
fi fi
@ -1067,7 +1066,7 @@ do
[\\/$]* | ?:[\\/]* ) continue;; [\\/$]* | ?:[\\/]* ) continue;;
NONE | '' ) case $ac_var in *prefix ) continue;; esac;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
esac esac
as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
done done
# There might be people who depend on the old broken behavior: `$host' # There might be people who depend on the old broken behavior: `$host'
@ -1081,8 +1080,8 @@ target=$target_alias
if test "x$host_alias" != x; then if test "x$host_alias" != x; then
if test "x$build_alias" = x; then if test "x$build_alias" = x; then
cross_compiling=maybe cross_compiling=maybe
$as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
If a cross compiler is detected then cross compile mode will be used" >&2 If a cross compiler is detected then cross compile mode will be used." >&2
elif test "x$build_alias" != "x$host_alias"; then elif test "x$build_alias" != "x$host_alias"; then
cross_compiling=yes cross_compiling=yes
fi fi
@ -1097,9 +1096,9 @@ test "$silent" = yes && exec 6>/dev/null
ac_pwd=`pwd` && test -n "$ac_pwd" && ac_pwd=`pwd` && test -n "$ac_pwd" &&
ac_ls_di=`ls -di .` && ac_ls_di=`ls -di .` &&
ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
as_fn_error $? "working directory cannot be determined" as_fn_error "working directory cannot be determined"
test "X$ac_ls_di" = "X$ac_pwd_ls_di" || test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
as_fn_error $? "pwd does not report name of working directory" as_fn_error "pwd does not report name of working directory"
# Find the source files, if location was not specified. # Find the source files, if location was not specified.
@ -1138,11 +1137,11 @@ else
fi fi
if test ! -r "$srcdir/$ac_unique_file"; then if test ! -r "$srcdir/$ac_unique_file"; then
test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
fi fi
ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
ac_abs_confdir=`( ac_abs_confdir=`(
cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
pwd)` pwd)`
# When building in place, set srcdir=. # When building in place, set srcdir=.
if test "$ac_abs_confdir" = "$ac_pwd"; then if test "$ac_abs_confdir" = "$ac_pwd"; then
@ -1182,7 +1181,7 @@ Configuration:
--help=short display options specific to this package --help=short display options specific to this package
--help=recursive display the short help of all the included packages --help=recursive display the short help of all the included packages
-V, --version display version information and exit -V, --version display version information and exit
-q, --quiet, --silent do not print \`checking ...' messages -q, --quiet, --silent do not print \`checking...' messages
--cache-file=FILE cache test results in FILE [disabled] --cache-file=FILE cache test results in FILE [disabled]
-C, --config-cache alias for \`--cache-file=config.cache' -C, --config-cache alias for \`--cache-file=config.cache'
-n, --no-create do not create output files -n, --no-create do not create output files
@ -1302,9 +1301,9 @@ test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then if $ac_init_version; then
cat <<\_ACEOF cat <<\_ACEOF
parallel configure 20100922 parallel configure 20100922
generated by GNU Autoconf 2.67 generated by GNU Autoconf 2.65
Copyright (C) 2010 Free Software Foundation, Inc. Copyright (C) 2009 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it. gives unlimited permission to copy, distribute and modify it.
_ACEOF _ACEOF
@ -1319,7 +1318,7 @@ This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake. running configure, to aid debugging if configure makes a mistake.
It was created by parallel $as_me 20100922, which was It was created by parallel $as_me 20100922, which was
generated by GNU Autoconf 2.67. Invocation command line was generated by GNU Autoconf 2.65. Invocation command line was
$ $0 $@ $ $0 $@
@ -1429,9 +1428,11 @@ trap 'exit_status=$?
{ {
echo echo
$as_echo "## ---------------- ## cat <<\_ASBOX
## ---------------- ##
## Cache variables. ## ## Cache variables. ##
## ---------------- ##" ## ---------------- ##
_ASBOX
echo echo
# The following way of writing the cache mishandles newlines in values, # The following way of writing the cache mishandles newlines in values,
( (
@ -1465,9 +1466,11 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
) )
echo echo
$as_echo "## ----------------- ## cat <<\_ASBOX
## ----------------- ##
## Output variables. ## ## Output variables. ##
## ----------------- ##" ## ----------------- ##
_ASBOX
echo echo
for ac_var in $ac_subst_vars for ac_var in $ac_subst_vars
do do
@ -1480,9 +1483,11 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
echo echo
if test -n "$ac_subst_files"; then if test -n "$ac_subst_files"; then
$as_echo "## ------------------- ## cat <<\_ASBOX
## ------------------- ##
## File substitutions. ## ## File substitutions. ##
## ------------------- ##" ## ------------------- ##
_ASBOX
echo echo
for ac_var in $ac_subst_files for ac_var in $ac_subst_files
do do
@ -1496,9 +1501,11 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
fi fi
if test -s confdefs.h; then if test -s confdefs.h; then
$as_echo "## ----------- ## cat <<\_ASBOX
## ----------- ##
## confdefs.h. ## ## confdefs.h. ##
## ----------- ##" ## ----------- ##
_ASBOX
echo echo
cat confdefs.h cat confdefs.h
echo echo
@ -1553,12 +1560,7 @@ _ACEOF
ac_site_file1=NONE ac_site_file1=NONE
ac_site_file2=NONE ac_site_file2=NONE
if test -n "$CONFIG_SITE"; then if test -n "$CONFIG_SITE"; then
# We do not want a PATH search for config.site. ac_site_file1=$CONFIG_SITE
case $CONFIG_SITE in #((
-*) ac_site_file1=./$CONFIG_SITE;;
*/*) ac_site_file1=$CONFIG_SITE;;
*) ac_site_file1=./$CONFIG_SITE;;
esac
elif test "x$prefix" != xNONE; then elif test "x$prefix" != xNONE; then
ac_site_file1=$prefix/share/config.site ac_site_file1=$prefix/share/config.site
ac_site_file2=$prefix/etc/config.site ac_site_file2=$prefix/etc/config.site
@ -1573,11 +1575,7 @@ do
{ $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 { $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;} $as_echo "$as_me: loading site script $ac_site_file" >&6;}
sed 's/^/| /' "$ac_site_file" >&5 sed 's/^/| /' "$ac_site_file" >&5
. "$ac_site_file" \ . "$ac_site_file"
|| { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "failed to load site script $ac_site_file
See \`config.log' for more details" "$LINENO" 5 ; }
fi fi
done done
@ -1653,7 +1651,7 @@ if $ac_cache_corrupted; then
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} $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:${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_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 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
fi fi
## -------------------- ## ## -------------------- ##
## Main body of script. ## ## Main body of script. ##
@ -1670,22 +1668,16 @@ am__api_version='1.11'
ac_aux_dir= ac_aux_dir=
for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
if test -f "$ac_dir/install-sh"; then for ac_t in install-sh install.sh shtool; do
if test -f "$ac_dir/$ac_t"; then
ac_aux_dir=$ac_dir ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/install-sh -c" ac_install_sh="$ac_aux_dir/$ac_t -c"
break break 2
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 fi
done
done done
if test -z "$ac_aux_dir"; then if test -z "$ac_aux_dir"; then
as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
fi fi
# These three variables are undocumented and unsupported, # These three variables are undocumented and unsupported,
@ -1801,11 +1793,11 @@ am_lf='
' '
case `pwd` in case `pwd` in
*[\\\"\#\$\&\'\`$am_lf]*) *[\\\"\#\$\&\'\`$am_lf]*)
as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5 ;; as_fn_error "unsafe absolute working directory name" "$LINENO" 5;;
esac esac
case $srcdir in case $srcdir in
*[\\\"\#\$\&\'\`$am_lf\ \ ]*) *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5 ;; as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
esac esac
# Do `set' in a subshell so we don't clobber the current shell's # Do `set' in a subshell so we don't clobber the current shell's
@ -1827,7 +1819,7 @@ if (
# if, for instance, CONFIG_SHELL is bash and it inherits a # if, for instance, CONFIG_SHELL is bash and it inherits a
# broken ls alias from the environment. This has actually # broken ls alias from the environment. This has actually
# happened. Such a system could not be considered "sane". # happened. Such a system could not be considered "sane".
as_fn_error $? "ls -t appears to fail. Make sure there is not a broken as_fn_error "ls -t appears to fail. Make sure there is not a broken
alias in your environment" "$LINENO" 5 alias in your environment" "$LINENO" 5
fi fi
@ -1837,7 +1829,7 @@ then
# Ok. # Ok.
: :
else else
as_fn_error $? "newly created file is older than distributed files! as_fn_error "newly created file is older than distributed files!
Check your system clock" "$LINENO" 5 Check your system clock" "$LINENO" 5
fi fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
@ -2075,7 +2067,7 @@ done
$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
set x ${MAKE-make} set x ${MAKE-make}
ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then : if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
$as_echo_n "(cached) " >&6 $as_echo_n "(cached) " >&6
else else
cat >conftest.make <<\_ACEOF cat >conftest.make <<\_ACEOF
@ -2083,7 +2075,7 @@ SHELL = /bin/sh
all: all:
@echo '@@@%%%=$(MAKE)=@@@%%%' @echo '@@@%%%=$(MAKE)=@@@%%%'
_ACEOF _ACEOF
# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
case `${MAKE-make} -f conftest.make 2>/dev/null` in case `${MAKE-make} -f conftest.make 2>/dev/null` in
*@@@%%%=?*=@@@%%%*) *@@@%%%=?*=@@@%%%*)
eval ac_cv_prog_make_${ac_make}_set=yes;; eval ac_cv_prog_make_${ac_make}_set=yes;;
@ -2117,7 +2109,7 @@ if test "`cd $srcdir && pwd`" != "`pwd`"; then
am__isrc=' -I$(srcdir)' am__isrc=' -I$(srcdir)'
# test to see if srcdir already configured # test to see if srcdir already configured
if test -f $srcdir/config.status; then if test -f $srcdir/config.status; then
as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
fi fi
fi fi
@ -2260,7 +2252,6 @@ DEFS=-DHAVE_CONFIG_H
ac_libobjs= ac_libobjs=
ac_ltlibobjs= ac_ltlibobjs=
U=
for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
# 1. Remove the extension, and $U if already installed. # 1. Remove the extension, and $U if already installed.
ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
@ -2423,19 +2414,19 @@ export LANGUAGE
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
# as_fn_error STATUS ERROR [LINENO LOG_FD] # as_fn_error ERROR [LINENO LOG_FD]
# ---------------------------------------- # ---------------------------------
# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
# provided, also output the error to LOG_FD, referencing LINENO. Then exit the # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
# script with STATUS, using 1 if that was 0. # script with status $?, using 1 if that was 0.
as_fn_error () as_fn_error ()
{ {
as_status=$1; test $as_status -eq 0 && as_status=1 as_status=$?; test $as_status -eq 0 && as_status=1
if test "$4"; then if test "$3"; then
as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
$as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
fi fi
$as_echo "$as_me: error: $2" >&2 $as_echo "$as_me: error: $1" >&2
as_fn_exit $as_status as_fn_exit $as_status
} # as_fn_error } # as_fn_error
@ -2631,7 +2622,7 @@ $as_echo X"$as_dir" |
test -d "$as_dir" && break test -d "$as_dir" && break
done done
test -z "$as_dirs" || eval "mkdir $as_dirs" test -z "$as_dirs" || eval "mkdir $as_dirs"
} || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
} # as_fn_mkdir_p } # as_fn_mkdir_p
@ -2685,7 +2676,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# values after options handling. # values after options handling.
ac_log=" ac_log="
This file was extended by parallel $as_me 20100922, which was This file was extended by parallel $as_me 20100922, which was
generated by GNU Autoconf 2.67. Invocation command line was generated by GNU Autoconf 2.65. Invocation command line was
CONFIG_FILES = $CONFIG_FILES CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_HEADERS = $CONFIG_HEADERS
@ -2747,10 +2738,10 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\ ac_cs_version="\\
parallel config.status 20100922 parallel config.status 20100922
configured by $0, generated by GNU Autoconf 2.67, configured by $0, generated by GNU Autoconf 2.65,
with options \\"\$ac_cs_config\\" with options \\"\$ac_cs_config\\"
Copyright (C) 2010 Free Software Foundation, Inc. Copyright (C) 2009 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it." gives unlimited permission to copy, distribute and modify it."
@ -2768,16 +2759,11 @@ ac_need_defaults=:
while test $# != 0 while test $# != 0
do do
case $1 in case $1 in
--*=?*) --*=*)
ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_option=`expr "X$1" : 'X\([^=]*\)='`
ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
ac_shift=: ac_shift=:
;; ;;
--*=)
ac_option=`expr "X$1" : 'X\([^=]*\)='`
ac_optarg=
ac_shift=:
;;
*) *)
ac_option=$1 ac_option=$1
ac_optarg=$2 ac_optarg=$2
@ -2799,7 +2785,6 @@ do
$ac_shift $ac_shift
case $ac_optarg in case $ac_optarg in
*\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
'') as_fn_error $? "missing file argument" ;;
esac esac
as_fn_append CONFIG_FILES " '$ac_optarg'" as_fn_append CONFIG_FILES " '$ac_optarg'"
ac_need_defaults=false;; ac_need_defaults=false;;
@ -2812,7 +2797,7 @@ do
ac_need_defaults=false;; ac_need_defaults=false;;
--he | --h) --he | --h)
# Conflict between --help and --header # Conflict between --help and --header
as_fn_error $? "ambiguous option: \`$1' as_fn_error "ambiguous option: \`$1'
Try \`$0 --help' for more information.";; Try \`$0 --help' for more information.";;
--help | --hel | -h ) --help | --hel | -h )
$as_echo "$ac_cs_usage"; exit ;; $as_echo "$ac_cs_usage"; exit ;;
@ -2821,7 +2806,7 @@ Try \`$0 --help' for more information.";;
ac_cs_silent=: ;; ac_cs_silent=: ;;
# This is an error. # This is an error.
-*) as_fn_error $? "unrecognized option: \`$1' -*) as_fn_error "unrecognized option: \`$1'
Try \`$0 --help' for more information." ;; Try \`$0 --help' for more information." ;;
*) as_fn_append ac_config_targets " $1" *) as_fn_append ac_config_targets " $1"
@ -2874,7 +2859,7 @@ do
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
"src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
*) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;; *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
esac esac
done done
@ -2911,7 +2896,7 @@ $debug ||
{ {
tmp=./conf$$-$RANDOM tmp=./conf$$-$RANDOM
(umask 077 && mkdir "$tmp") (umask 077 && mkdir "$tmp")
} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 } || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
# Set up the scripts for CONFIG_FILES section. # Set up the scripts for CONFIG_FILES section.
# No need to generate them if there are no CONFIG_FILES. # No need to generate them if there are no CONFIG_FILES.
@ -2928,7 +2913,7 @@ if test "x$ac_cr" = x; then
fi fi
ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
ac_cs_awk_cr='\\r' ac_cs_awk_cr='\r'
else else
ac_cs_awk_cr=$ac_cr ac_cs_awk_cr=$ac_cr
fi fi
@ -2942,18 +2927,18 @@ _ACEOF
echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
echo "_ACEOF" echo "_ACEOF"
} >conf$$subs.sh || } >conf$$subs.sh ||
as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
ac_delim='%!_!# ' ac_delim='%!_!# '
for ac_last_try in false false false false false :; do for ac_last_try in false false false false false :; do
. ./conf$$subs.sh || . ./conf$$subs.sh ||
as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
if test $ac_delim_n = $ac_delim_num; then if test $ac_delim_n = $ac_delim_num; then
break break
elif $ac_last_try; then elif $ac_last_try; then
as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
else else
ac_delim="$ac_delim!$ac_delim _$ac_delim!! " ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
fi fi
@ -3042,28 +3027,20 @@ if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
else else
cat cat
fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
|| as_fn_error $? "could not setup config files machinery" "$LINENO" 5 || as_fn_error "could not setup config files machinery" "$LINENO" 5
_ACEOF _ACEOF
# VPATH may cause trouble with some makes, so we remove sole $(srcdir), # VPATH may cause trouble with some makes, so we remove $(srcdir),
# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
# trailing colons and then remove the whole line if VPATH becomes empty # trailing colons and then remove the whole line if VPATH becomes empty
# (actually we leave an empty line to preserve line numbers). # (actually we leave an empty line to preserve line numbers).
if test "x$srcdir" = x.; then if test "x$srcdir" = x.; then
ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ ac_vpsub='/^[ ]*VPATH[ ]*=/{
h s/:*\$(srcdir):*/:/
s/// s/:*\${srcdir}:*/:/
s/^/:/ s/:*@srcdir@:*/:/
s/[ ]*$/:/ s/^\([^=]*=[ ]*\):*/\1/
s/:\$(srcdir):/:/g
s/:\${srcdir}:/:/g
s/:@srcdir@:/:/g
s/^:*//
s/:*$// s/:*$//
x
s/\(=[ ]*\).*/\1/
G
s/\n//
s/^[^=]*=[ ]*$// s/^[^=]*=[ ]*$//
}' }'
fi fi
@ -3091,7 +3068,7 @@ for ac_last_try in false false :; do
if test -z "$ac_t"; then if test -z "$ac_t"; then
break break
elif $ac_last_try; then elif $ac_last_try; then
as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
else else
ac_delim="$ac_delim!$ac_delim _$ac_delim!! " ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
fi fi
@ -3176,7 +3153,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
_ACAWK _ACAWK
_ACEOF _ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 as_fn_error "could not setup config headers machinery" "$LINENO" 5
fi # test -n "$CONFIG_HEADERS" fi # test -n "$CONFIG_HEADERS"
@ -3189,7 +3166,7 @@ do
esac esac
case $ac_mode$ac_tag in case $ac_mode$ac_tag in
:[FHL]*:*);; :[FHL]*:*);;
:L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;; :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
:[FH]-) ac_tag=-:-;; :[FH]-) ac_tag=-:-;;
:[FH]*) ac_tag=$ac_tag:$ac_tag.in;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
esac esac
@ -3217,7 +3194,7 @@ do
[\\/$]*) false;; [\\/$]*) false;;
*) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
esac || esac ||
as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;; as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
esac esac
case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
as_fn_append ac_file_inputs " '$ac_f'" as_fn_append ac_file_inputs " '$ac_f'"
@ -3244,7 +3221,7 @@ $as_echo "$as_me: creating $ac_file" >&6;}
case $ac_tag in case $ac_tag in
*:-:* | *:-) cat >"$tmp/stdin" \ *:-:* | *:-) cat >"$tmp/stdin" \
|| as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
esac esac
;; ;;
esac esac
@ -3381,22 +3358,22 @@ s&@MKDIR_P@&$ac_MKDIR_P&;t t
$ac_datarootdir_hack $ac_datarootdir_hack
" "
eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
|| as_fn_error $? "could not create $ac_file" "$LINENO" 5 || as_fn_error "could not create $ac_file" "$LINENO" 5
test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
{ ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
{ ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
which seems to be undefined. Please make sure it is defined" >&5 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' $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
which seems to be undefined. Please make sure it is defined" >&2;} which seems to be undefined. Please make sure it is defined." >&2;}
rm -f "$tmp/stdin" rm -f "$tmp/stdin"
case $ac_file in case $ac_file in
-) cat "$tmp/out" && rm -f "$tmp/out";; -) cat "$tmp/out" && rm -f "$tmp/out";;
*) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
esac \ esac \
|| as_fn_error $? "could not create $ac_file" "$LINENO" 5 || as_fn_error "could not create $ac_file" "$LINENO" 5
;; ;;
:H) :H)
# #
@ -3407,19 +3384,19 @@ which seems to be undefined. Please make sure it is defined" >&2;}
$as_echo "/* $configure_input */" \ $as_echo "/* $configure_input */" \
&& eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
} >"$tmp/config.h" \ } >"$tmp/config.h" \
|| as_fn_error $? "could not create $ac_file" "$LINENO" 5 || as_fn_error "could not create $ac_file" "$LINENO" 5
if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
$as_echo "$as_me: $ac_file is unchanged" >&6;} $as_echo "$as_me: $ac_file is unchanged" >&6;}
else else
rm -f "$ac_file" rm -f "$ac_file"
mv "$tmp/config.h" "$ac_file" \ mv "$tmp/config.h" "$ac_file" \
|| as_fn_error $? "could not create $ac_file" "$LINENO" 5 || as_fn_error "could not create $ac_file" "$LINENO" 5
fi fi
else else
$as_echo "/* $configure_input */" \ $as_echo "/* $configure_input */" \
&& eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
|| as_fn_error $? "could not create -" "$LINENO" 5 || as_fn_error "could not create -" "$LINENO" 5
fi fi
# Compute "$ac_file"'s index in $config_headers. # Compute "$ac_file"'s index in $config_headers.
_am_arg="$ac_file" _am_arg="$ac_file"
@ -3468,7 +3445,7 @@ _ACEOF
ac_clean_files=$ac_clean_files_save ac_clean_files=$ac_clean_files_save
test $ac_write_fail = 0 || test $ac_write_fail = 0 ||
as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
# configure is writing to config.log, and then calls config.status. # configure is writing to config.log, and then calls config.status.
@ -3489,7 +3466,7 @@ if test "$no_create" != yes; then
exec 5>>config.log exec 5>>config.log
# Use ||, not &&, to avoid exiting from the if with $? = 1, which # Use ||, not &&, to avoid exiting from the if with $? = 1, which
# would make configure fail if this is the last instruction. # would make configure fail if this is the last instruction.
$ac_cs_success || as_fn_exit 1 $ac_cs_success || as_fn_exit $?
fi fi
if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then 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:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5

View file

@ -289,24 +289,9 @@ distribute the arguments evenly if running -X.
=head1 options =head1 options
One char options not used: A D F G J K O Q R T Z One char options not used: A F G K O Q R T Z
=head1 sem
=head2 mutex
mutex -b -n -l lockid -m max_locks [command]
mutex -u lockid
-b run command in background
-l lockfile will lock using the lockid
-n nonblocking
-m maximal number of locks (default 1)
-u unlock
If command given works like: mutex -l lockfile -n number_of_locks ; command; mutex -u lockfile
If -b given works like: mutex -l lockfile -n number_of_locks ; (command; mutex -u lockfile)&
Kan vi finde på lockid som giver mening?
Parallelize so this can be done: Parallelize so this can be done:
mdm.screen find dir -execdir mdm-run cmd {} \; mdm.screen find dir -execdir mdm-run cmd {} \;
@ -315,15 +300,6 @@ find dir -execdir par$ --communication-file /tmp/comfile cmd {} \;
find dir -execdir mutex -j4 -b cmd {} \; find dir -execdir mutex -j4 -b cmd {} \;
=head2 Comfile
This will put a lock on /tmp/comfile. The number of locks is the number of running commands.
If the number is smaller than -j then it will start a process in the background ( cmd & ),
otherwise wait.
par$ --wait /tmp/comfile will wait until no more locks on the file
=head1 Unlikely =head1 Unlikely

View file

@ -555,6 +555,19 @@ from the terminal. Only run the command line if the response starts
with 'y' or 'Y'. Implies B<-t>. with 'y' or 'Y'. Implies B<-t>.
=item B<--profile> I<profilename>
=item B<-J> I<profilename>
Use profile I<profilename> for options. This is useful if you want to
have multiple profiles. You could have one profile for running jobs in
parallel on the local machine and a different profile for running jobs
on remote machines. See the section PROFILE FILES for examples.
I<profilename> corresponds to the file ~/.parallel/I<profilename>.
Default: config
=item B<--quote> =item B<--quote>
=item B<-q> =item B<-q>
@ -1574,10 +1587,8 @@ B<seq 1 10 | parallel -N2 echo seq:'$'PARALLEL_SEQ arg1:{1} arg2:{2}>
=item $PARALLEL =item $PARALLEL
The environment variable $PARALLEL will be used as default options for The environment variable $PARALLEL will be used as default options for
GNU B<parallel>. However, because some options take arguments the GNU B<parallel>. If the variable contains special shell characters
options need to be split into groups in which only the last option (e.g. $, *, or space) then these need to be to be escaped with \.
takes an argument. Each group of options should be put on a line of its
own.
B<Example:> B<Example:>
@ -1591,16 +1602,14 @@ B<cat list | parallel -j1 -k -v -S"myssh user@server" ls>
can be written as: can be written as:
B<cat list | PARALLEL="-kvj1> B<cat list | PARALLEL='-kvj1 -S myssh\ user@server' parallel echo>
B<-Smyssh user@server" parallel echo> Notice the \ in the middle is needed because 'myssh' and 'user@server'
must be one argument.
Notice the newline in the middle is needed because both B<-S> and
B<-j> take an argument and thus both need to be at the end of a group.
=back =back
=head1 CONFIG FILE =head1 DEFAULT PROFILE (CONFIG FILE)
The file ~/.parallel/config (formerly known as .parallelrc) will be The file ~/.parallel/config (formerly known as .parallelrc) will be
read if it exists. Lines starting with '#' will be ignored. It can be read if it exists. Lines starting with '#' will be ignored. It can be
@ -1611,15 +1620,30 @@ Options on the command line takes precedence over the environment
variable $PARALLEL which takes precedence over the file variable $PARALLEL which takes precedence over the file
~/.parallel/config. ~/.parallel/config.
=head1 PROFILE FILES
The file ~/.parallel/config will be read if it exists. It should be If B<--profile> set, GNU B<parallel> will read the profile from that file instead of
formatted like the environment variable $PARALLEL. Lines starting with
'#' will be ignored.
Options on the command line takes precedence over the environment
variable $PARALLEL which takes precedence over the file
~/.parallel/config. ~/.parallel/config.
Example: Profile for running every command with B<-j+0> and B<nice>
echo -j+0 nice > ~/.parallel/nice_profile
parallel -J nice_profile bzip2 -9 ::: *
Example: Profile for running a perl script before every command:
echo "perl -e '\$a=\$\$; print \$a,\" \",'\$PARALLEL_SEQ',\" \";';" > ~/.parallel/pre_perl
parallel -J pre_perl echo ::: *
Note how the $ and " need to be quoted using \.
Example: Profile for running distributed jobs with B<nice> on the
remote machines:
echo -S .. nice > ~/.parallel/dist
parallel -J dist --trc {.}.bz2 bzip2 -9 ::: *
=head1 EXIT STATUS =head1 EXIT STATUS
If B<--halt-on-error> 0 or not specified: If B<--halt-on-error> 0 or not specified:
@ -2391,9 +2415,9 @@ B<xjobs>(1), B<prll>(1), B<dxargs>(1), B<mdm>(1)
use IPC::Open3; use IPC::Open3;
use Symbol qw(gensym); use Symbol qw(gensym);
use IO::File; use IO::File;
use POSIX qw/:sys_wait_h setsid/; use POSIX qw(:sys_wait_h setsid);
use File::Temp qw/tempfile tempdir/; use File::Temp qw(tempfile tempdir);
use Getopt::Long; use Getopt::Long qw(GetOptionsFromArray);
use strict; use strict;
do_not_reap(); do_not_reap();
@ -2442,61 +2466,16 @@ sub acquire_semaphore {
return $sem; return $sem;
} }
sub parse_options { sub get_options_from_array {
# Returns: N/A # Run GetOptionsFromArray on @array
# Defaults: # Returns:
$Global::version = 201011002; # true if parsing worked
$Global::progname = 'parallel'; # false if parsing failed
$Global::debug = 0; # @array is changed
$Global::verbose = 0; my $array_ref = shift;
$Global::grouped = 1; return GetOptionsFromArray
$Global::keeporder = 0; ($array_ref,
$Global::quoting = 0; "debug|D" => \$::opt_D,
$Global::replacestring = '{}';
$Global::replace_no_ext = '{.}';
$/="\n";
$Global::ignore_empty = 0;
$Global::argfile = *STDIN;
$Global::interactive = 0;
$Global::stderr_verbose = 0;
$Global::default_simultaneous_sshlogins = 9;
$Global::exitstatus = 0;
$Global::halt_on_error_exitstatus = 0;
$Global::total_jobs = 0;
$Global::arg_sep = ":::";
$Global::arg_file_sep = "::::";
$Global::trim = 'n';
# This must be done first as this may exec myself
if(defined $ARGV[0] and ($ARGV[0]=~/^-Y/ or $ARGV[0]=~/^--shebang / or
$ARGV[0]=~/^--hashbang /)) {
# Program is called from #! line in script
$ARGV[0]=~s/^-Y //; # remove -Y if on its own
$ARGV[0]=~s/^-Y/-/; # remove -Y if bundled with other options
$ARGV[0]=~s/^--shebang //; # remove --shebang if it is set
$ARGV[0]=~s/^--hashbang //; # remove --hashbang if it is set
my $argfile = pop @ARGV;
# exec myself to split @ARGV into separate fields
exec "$0 --skip-first-line -a $argfile @ARGV";
}
# Add options from .parallel/config
for my $parallel_config ($ENV{'HOME'}."/.parallel/config",
$ENV{'HOME'}."/.parallelrc") {
if(-r $parallel_config) {
open (IN, "<", $parallel_config) || die;
while(<IN>) {
/^\s*\#/ and next;
chomp;
unshift @ARGV, $_;
}
close IN;
}
}
# Add options from shell variable $PARALLEL
$ENV{'PARALLEL'} and unshift @ARGV, split/\n/, $ENV{'PARALLEL'};
Getopt::Long::Configure ("bundling","require_order");
GetOptions("debug|D" => \$::opt_D,
"xargs|m" => \$::opt_m, "xargs|m" => \$::opt_m,
"X" => \$::opt_X, "X" => \$::opt_X,
"v" => \@::opt_v, "v" => \@::opt_v,
@ -2531,6 +2510,7 @@ sub parse_options {
"arg-sep|argsep=s" => \$::opt_arg_sep, "arg-sep|argsep=s" => \$::opt_arg_sep,
"arg-file-sep|argfilesep=s" => \$::opt_arg_file_sep, "arg-file-sep|argfilesep=s" => \$::opt_arg_file_sep,
"trim=s" => \$::opt_trim, "trim=s" => \$::opt_trim,
"profile|J=s" => \$::opt_profile,
# xargs-compatibility - implemented, man, unittest # xargs-compatibility - implemented, man, unittest
"max-procs|P=s" => \$::opt_P, "max-procs|P=s" => \$::opt_P,
"delimiter|d=s" => \$::opt_d, "delimiter|d=s" => \$::opt_d,
@ -2561,7 +2541,36 @@ sub parse_options {
# Shebang #!/usr/bin/parallel -Yotheroptions # Shebang #!/usr/bin/parallel -Yotheroptions
"Y|shebang|hashbang" => \$::opt_shebang, "Y|shebang|hashbang" => \$::opt_shebang,
"skip-first-line" => \$::opt_skip_first_line, "skip-first-line" => \$::opt_skip_first_line,
) || die_usage(); );
}
sub parse_options {
# Returns: N/A
# Defaults:
$Global::version = 201011002;
$Global::progname = 'parallel';
$Global::debug = 0;
$Global::verbose = 0;
$Global::grouped = 1;
$Global::keeporder = 0;
$Global::quoting = 0;
$Global::replacestring = '{}';
$Global::replace_no_ext = '{.}';
$/="\n";
$Global::ignore_empty = 0;
$Global::argfile = *STDIN;
$Global::interactive = 0;
$Global::stderr_verbose = 0;
$Global::default_simultaneous_sshlogins = 9;
$Global::exitstatus = 0;
$Global::halt_on_error_exitstatus = 0;
$Global::total_jobs = 0;
$Global::arg_sep = ":::";
$Global::arg_file_sep = "::::";
$Global::trim = 'n';
@ARGV=read_options();
if(defined @::opt_v) { $Global::verbose = $#::opt_v+1; } # Convert -v -v to v=2 if(defined @::opt_v) { $Global::verbose = $#::opt_v+1; } # Convert -v -v to v=2
$Global::debug = (defined $::opt_D); $Global::debug = (defined $::opt_D);
if(defined $::opt_m) { $Global::xargs = 1; } if(defined $::opt_m) { $Global::xargs = 1; }
@ -2614,10 +2623,12 @@ sub parse_options {
} }
if(grep /^$Global::arg_sep$/o, @ARGV) { if(grep /^$Global::arg_sep$/o, @ARGV) {
# Deal with :::
@ARGV=read_args_from_command_line(); @ARGV=read_args_from_command_line();
} }
if(grep /^$Global::arg_file_sep$/o, @ARGV) { if(grep /^$Global::arg_file_sep$/o, @ARGV) {
# Deal with ::::
@ARGV=convert_argfiles_from_command_line_to_multiple_opt_a(); @ARGV=convert_argfiles_from_command_line_to_multiple_opt_a();
} }
@ -2713,6 +2724,67 @@ sub parse_options {
} }
} }
sub read_options {
# Read options from command line, profile and $PARALLEL
# Returns:
# @ARGV without --options
# This must be done first as this may exec myself
if(defined $ARGV[0] and ($ARGV[0]=~/^-Y/ or $ARGV[0]=~/^--shebang / or
$ARGV[0]=~/^--hashbang /)) {
# Program is called from #! line in script
$ARGV[0]=~s/^-Y //; # remove -Y if on its own
$ARGV[0]=~s/^-Y/-/; # remove -Y if bundled with other options
$ARGV[0]=~s/^--shebang //; # remove --shebang if it is set
$ARGV[0]=~s/^--hashbang //; # remove --hashbang if it is set
my $argfile = pop @ARGV;
# exec myself to split @ARGV into separate fields
exec "$0 --skip-first-line -a $argfile @ARGV";
}
Getopt::Long::Configure ("bundling","require_order");
# First check if there is a --profile to set $::opt_profile
my @ARGV_copy = @ARGV;
get_options_from_array (\@ARGV_copy) || die_usage();
# Add options from .parallel/config and other profiles
my @ARGV_profile = ();
my @ARGV_env = ();
my @config_profiles = ($ENV{'HOME'}."/.parallel/config",
$ENV{'HOME'}."/.parallelrc");
my @profiles = @config_profiles;
if($::opt_profile) {
# --profile overrides default profiles
@profiles = ($ENV{'HOME'}."/.parallel/".$::opt_profile);
}
for my $profile (@profiles) {
if(-r $profile) {
open (IN, "<", $profile) || die;
while(<IN>) {
/^\s*\#/ and next;
chomp;
push @ARGV_profile, shell_unquote(split/(?<![\\])\s/, $_);
}
close IN;
} else {
if(grep /^$profile$/, @config_profiles) {
# config file is not required to exist
} else {
print STDERR "$profile not readable\n";
wait_and_exit(255);
}
}
}
get_options_from_array(\@ARGV_profile) || die_usage();
# Add options from shell variable $PARALLEL
$ENV{'PARALLEL'} and @ARGV_env = shell_unquote(split/(?<![\\])\s/, $ENV{'PARALLEL'});
get_options_from_array(\@ARGV_env) || die_usage();
get_options_from_array(\@ARGV) || die_usage();
# Prepend non-options to @ARGV (such as commands like 'nice')
unshift @ARGV, @ARGV_profile, @ARGV_env;
return @ARGV;
}
sub read_args_from_command_line { sub read_args_from_command_line {
# Arguments given on the command line after ::: ($Global::arg_sep) # Arguments given on the command line after ::: ($Global::arg_sep)
# Removes the arguments from @ARGV and puts it into the argument queue # Removes the arguments from @ARGV and puts it into the argument queue

View file

@ -0,0 +1,63 @@
#!/bin/bash
echo '### Test $PARALLEL'
PARALLEL="-k
-j1
echo" parallel ::: a b c
PARALLEL="-k
--jobs
1
echo" parallel ::: a b c
PARALLEL="-k
--jobs 1
echo" parallel ::: a b c
PARALLEL="-k
--jobs
1
echo 1" parallel -v echo 2 ::: a b c
PARALLEL="-k --jobs 1 echo" parallel ::: a b c
PARALLEL="-k --jobs 1 echo 1" parallel -v echo 2 ::: a b c
echo '### Test ugly quoting from $PARALLEL'
PARALLEL="-k --jobs 1 perl -pe '\$a=1; print\$a'" parallel -v ::: <(echo a) <(echo b)
PARALLEL='-k --jobs 1 -S newton perl -pe "\\$a=1; print\\$a"' parallel -v ::: /etc/passwd
echo '### Test ugly quoting from profile file'
cat <<EOF >/tmp/parallel_profile
-k --jobs 1 perl -pe '\$a=1; print \$a'
EOF
parallel -v -J /tmp/parallel_profile ::: <(echo a) <(echo b)
PARALLEL='-k --jobs 1 echo' parallel -S ssh\ newton\ ssh\ maxwell -v ::: /etc/passwd
PARALLEL='-k --jobs 1 perl -pe "\\$a=1; print \\$a"' parallel -S ssh\ newton\ ssh\ maxwell -vv ::: /etc/passwd
echo '### Test quoting of $ in command from profile file'
cat <<EOF >/tmp/parallel_profile
-k --jobs 1 perl -pe '\\\$a=1; print \\\$a'
EOF
parallel -v -J /tmp/parallel_profile -S ssh\ newton\ ssh\ maxwell ::: /etc/passwd
echo '### Test quoting of $ in command from $PARALLEL'
PARALLEL='-k --jobs 1 perl -pe "\\$a=1; print \\$a" ' parallel -S ssh\ newton\ ssh\ maxwell -v ::: /etc/passwd
echo '### Test quoting of space in arguments (-S) from profile file'
cat <<EOF >/tmp/parallel_profile
-k --jobs 1 -S ssh\ newton\ ssh\ maxwell perl -pe '\$a=1; print \$a'
EOF
parallel -v -J /tmp/parallel_profile ::: /etc/passwd
echo '### Test quoting of space in arguments (-S) from $PARALLEL'
PARALLEL='-k --jobs 1 -S ssh\ newton\ ssh\ maxwell perl -pe "\\$a=1; print \\$a" ' parallel -v ::: /etc/passwd
echo '### Test quoting of space in long arguments (--sshlogin) from profile file'
cat <<EOF >/tmp/parallel_profile
-k --jobs 1 --sshlogin ssh\ newton\ ssh\ maxwell perl -pe '\$a=1; print \$a'
EOF
parallel -v -J /tmp/parallel_profile ::: /etc/passwd
echo '### Test quoting of space in arguments (-S) from $PARALLEL'
PARALLEL='-k --jobs 1 --sshlogin ssh\ newton\ ssh\ maxwell perl -pe "\\$a=1; print \\$a" ' parallel -v ::: /etc/passwd