Hello community, here is the log from the commit of package mpibash for openSUSE:Factory checked in at 2017-11-23 09:45:05 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/mpibash (Old) and /work/SRC/openSUSE:Factory/.mpibash.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "mpibash" Thu Nov 23 09:45:05 2017 rev:2 rq:544496 version:1.3 Changes: -------- --- /work/SRC/openSUSE:Factory/mpibash/mpibash.changes 2017-11-15 17:00:58.849044668 +0100 +++ /work/SRC/openSUSE:Factory/.mpibash.new/mpibash.changes 2017-11-23 09:45:29.774144817 +0100 @@ -1,0 +2,9 @@ +Wed Nov 22 23:26:48 UTC 2017 - jungh...@votca.org + +- Version bump to v1.3 + * drop 8.patch - got merge upstream + * "This release includes a few bug fixes, a few improvements to + the build process, and some extra information added to the + documentation." + +------------------------------------------------------------------- Old: ---- 8.patch mpibash-1.2.tar.gz New: ---- mpibash-1.3.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ mpibash.spec ++++++ --- /var/tmp/diff_new_pack.KjTKlc/_old 2017-11-23 09:45:30.718110369 +0100 +++ /var/tmp/diff_new_pack.KjTKlc/_new 2017-11-23 09:45:30.722110223 +0100 @@ -22,15 +22,13 @@ %endif Name: mpibash -Version: 1.2 +Version: 1.3 Release: 0 Summary: Parallel scripting right from the Bourne-Again Shell License: GPL-3.0+ Group: Productivity/Networking/Other Url: https://github.com/lanl/MPI-Bash Source0: https://github.com/lanl/MPI-Bash/releases/download/v%{version}/mpibash-%{version}.tar.gz -#PATCH-FIX-UPSTREAM - 8.patch - circle_init_builtin: fix return value -Patch0: https://patch-diff.githubusercontent.com/raw/lanl/MPI-Bash/pull/8.patch BuildRequires: bash-devel >= 4.4 BuildRequires: %{mpi_implem} BuildRequires: %{mpi_implem}-devel @@ -60,11 +58,10 @@ %prep %setup -q -%patch0 -p1 %build . %{_libdir}/mpi/gcc/%{mpi_implem}/bin/mpivars.sh -%configure --with-bashdir=/usr/include/bash --docdir=%{_docdir}/%{name} --with-plugindir=%{_libdir}/%{name}/ CC=mpicc +%configure --docdir=%{_docdir}/%{name} --with-plugindir=%{_libdir}/%{name}/ CC=mpicc %make_build %install ++++++ mpibash-1.2.tar.gz -> mpibash-1.3.tar.gz ++++++ ++++ 22767 lines of diff (skipped) ++++ retrying with extended exclude list diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/mpibash-1.2/README.md new/mpibash-1.3/README.md --- old/mpibash-1.2/README.md 2015-02-17 19:40:22.000000000 +0100 +++ new/mpibash-1.3/README.md 2017-11-21 22:39:13.000000000 +0100 @@ -13,24 +13,7 @@ Installation ------------ -1. Download the [Bash source code](http://www.gnu.org/software/bash/). As of this writing, MPI-Bash is being tested primarily with Bash v4.3. On a Debian Linux system (or derivative such as Ubuntu), the following is a convenient approach: - - apt-get source bash - -2. Build Bash as normal. There is no need to install it if you already have Bash on your system. - - ./configure - make - -3. Go into the MPI-Bash source directory. If you're building MPI-Bash from a Git clone rather than a release you'll have to generate the MPI-Bash `configure` script: - - autoreconf -fvi - -4. Configure, build, and install MPI-Bash, pointing it to your Bash source tree: - - ./configure --with-bashdir=$HOME/bash-4.3.30 --prefix=$HOME/mpibash CC=mpicc - make - make install +[Installation instructions](https://github.com/lanl/MPI-Bash/blob/master/INSTALL.md) are provided in a separate file. Usage ----- @@ -50,17 +33,19 @@ mpirun -np 16 ./my-script.sh -If MPI-Bash is run on a large number of nodes, a parallel filesystem (e.g., [Lustre](http://lustre.opensfs.org/)) is essential for performance. Otherwise, most of the parallelism that a script exposes will be lost as file operations are serialized during writes to a non-parallel filesystem. +If `MPI_Init` fails, it may because your system is unable to `mpirun` one script (`mpibash`) that itself runs another script (your program) that dynamically loads the MPI libraries. See if the workaround discussed in [issue #6](https://github.com/lanl/MPI-Bash/issues/6) applies in your situation. + +When running MPI-Bash on a large number of nodes, a parallel filesystem (e.g., [Lustre](http://lustre.opensfs.org/)) is essential for performance. Otherwise, most of the parallelism that a script exposes will be lost as file operations are serialized during writes to a non-parallel filesystem. Documentation ------------- -MPI-Bash documentation is available on the [MPI-Bash wiki](https://github.com/losalamos/MPI-Bash/wiki). +MPI-Bash documentation is available on the [MPI-Bash wiki](https://github.com/lanl/MPI-Bash/wiki). Copyright and license --------------------- -Los Alamos National Security, LLC (LANS) owns the copyright to MPI-Bash, which it identifies internally as CODE-2015-8. MPI-Bash is licensed under the [GNU General Public License](http://www.gnu.org/licenses/gpl-3.0.html), version 3. +Los Alamos National Security, LLC (LANS) owns the copyright to MPI-Bash, which it identifies internally as LA-CC-14-101. MPI-Bash is licensed under the [GNU General Public License](http://www.gnu.org/licenses/gpl-3.0.html), version 3. ![GPLv3 logo](https://gnu.org/graphics/gplv3-127x51.png "GNU General Public License, version 3") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/mpibash-1.2/ar-lib new/mpibash-1.3/ar-lib --- old/mpibash-1.2/ar-lib 2015-02-18 00:10:04.000000000 +0100 +++ new/mpibash-1.3/ar-lib 2017-11-21 22:51:04.000000000 +0100 @@ -4,7 +4,7 @@ me=ar-lib scriptversion=2012-03-01.08; # UTC -# Copyright (C) 2010-2013 Free Software Foundation, Inc. +# Copyright (C) 2010-2014 Free Software Foundation, Inc. # Written by Peter Rosin <p...@lysator.liu.se>. # # This program is free software; you can redistribute it and/or modify diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/mpibash-1.2/commands/mbcp new/mpibash-1.3/commands/mbcp --- old/mpibash-1.2/commands/mbcp 2015-02-17 19:39:56.000000000 +0100 +++ new/mpibash-1.3/commands/mbcp 2017-05-11 18:07:32.000000000 +0200 @@ -26,7 +26,7 @@ # Define a function to issue an warning message. function warn () { - if [ "$1" = "*" -o $rank -eq "$1" ] ; then + if [ "$1" = "*" ] || [ "$rank" -eq "$1" ] ; then shift echo "${progname}: $*" 1>&2 fi @@ -78,8 +78,8 @@ done shift $((OPTIND-1)) if [ $# -lt 2 ] ; then - if [ $rank -eq 0 ] ; then - echo $usagestr 1>&2 + if [ "$rank" -eq 0 ] ; then + echo "$usagestr" 1>&2 fi exit 1 fi @@ -88,7 +88,7 @@ # Determine if we're copying one file to another or one or more files # into a directory. -target_name="${@: -1}" +target_name="${*: -1}" if [ ${#source_names[@]} -eq 1 ] ; then if [ -d "${source_names[0]}" ] ; then source_type=dir @@ -118,7 +118,7 @@ dir-to-file) if [ $recursive = yes ] ; then - abend 0 "cannot overwrite non-directory '$target_name' with directory '${source_name[0]}'" + abend 0 "cannot overwrite non-directory '$target_name' with directory '${source_names[0]}'" fi ;; @@ -146,35 +146,36 @@ fi # Analyze the input file. - local insize=$(stat -L -c%s "$infile") + local insize + insize=$(stat -L -c%s "$infile") if [ $? -ne 0 ] ; then return fi local segments - if [ $insize -eq 0 ] ; then + if [ "$insize" -eq 0 ] ; then segments=1 else - (( segments = ($insize + $maxblocksize - 1)/$maxblocksize )) + (( segments = (insize + maxblocksize - 1)/maxblocksize )) fi # Delete the output file. Otherwise, we might overwrite a piece # of a large, existing target but never truncate it to its new # size. - if [ ! -d "$infile" -a -d "$outfile" ] ; then + if [ ! -d "$infile" ] && [ -d "$outfile" ] ; then warn "*" "cannot overwrite directory ‘$outfile’ with non-directory '$infile'" 1>&2 return - elif [ -d "$infile" -a -e "$outfile" -a ! -d "$outfile" ] ; then + elif [ -d "$infile" ] && [ -e "$outfile" ] && [ ! -d "$outfile" ] ; then warn "*" "cannot overwrite non-directory ‘$outfile’ with directory '$infile'" 1>&2 return fi - if [ $clobber = no -a -e "$outfile" ] ; then + if [ $clobber = no ] && [ -e "$outfile" ] ; then return fi rm -rf "$outfile" # Enqueue $segments segments of work. local ofs - for (( ofs=0; ofs < $insize; ofs += $maxblocksize )) ; do + for (( ofs=0; ofs < insize; ofs += maxblocksize )) ; do circle_enqueue "$ofs$sep$segments$sep$insize$sep$infile$sep$outfile" done } @@ -183,7 +184,7 @@ function initialize_copying () { local infile outfile for infile in "${source_names[@]}" ; do - if [ -d "$infile" -a $recursive = no ] ; then + if [ -d "$infile" ] && [ $recursive = no ] ; then warn 0 "omitting directory '$infile'" else if [ $copy_type = dir-to-dir ] ; then @@ -204,7 +205,7 @@ # Dequeue and parse a work item. circle_dequeue work_item local fields - IFS="$sep" read -a fields <<< "$work_item" + IFS="$sep" read -r -a fields <<< "$work_item" local ofs="${fields[0]}" local nsegs="${fields[1]}" local size="${fields[2]}" @@ -213,13 +214,13 @@ # Complain if the input and output file types don't match. if [ -e "$outfile" ] ; then - if [ -d "$infile" -a ! -d "$outfile" ] ; then - if [ $ofs -eq 0 ] ; then + if [ -d "$infile" ] && [ ! -d "$outfile" ] ; then + if [ "$ofs" -eq 0 ] ; then warn "*" "${progname}: cannot overwrite non-directory '$outfile' with directory '$infile'" fi return - elif [ ! -d "$infile" -a -d "$outfile" ] ; then - if [ $ofs -eq 0 ] ; then + elif [ ! -d "$infile" ] && [ -d "$outfile" ] ; then + if [ "$ofs" -eq 0 ] ; then warn "*" "${progname}: cannot overwrite directory '$outfile' with non-directory '$infile'" fi return @@ -246,7 +247,7 @@ # The input file is not a directory. If it's a symbolic link and # we were asked to preserve links, copy the link. - if [ -L "$infile" -a $dereference = no ] ; then + if [ -L "$infile" ] && [ $dereference = no ] ; then if [ $verbosity -ge 1 ] ; then echo "'$infile' -> '$outfile' (symbolic link)" fi @@ -257,16 +258,16 @@ # The input file is not a directory. Copy whatever segment we # were assigned. local blocksize=$size - if [ $blocksize -gt $maxblocksize ] ; then + if [ "$blocksize" -gt "$maxblocksize" ] ; then blocksize=$maxblocksize fi if [ $verbosity -ge 1 ] ; then - (( seg = $ofs/$maxblocksize + 1 )) + (( seg = ofs/maxblocksize + 1 )) echo "'$infile' -> '$outfile' (fragment $seg of $nsegs)" fi infile=$(readlink -e "$infile") - dd status=none conv=notrunc bs=$blocksize iflag=skip_bytes,count_bytes skip=$ofs count=$blocksize oflag=seek_bytes seek=$ofs if="$infile" of="$outfile" - if [ $ofs -eq 0 ] ; then + dd status=none conv=notrunc bs=$blocksize iflag=skip_bytes,count_bytes skip="$ofs" count="$blocksize" oflag=seek_bytes seek="$ofs" if="$infile" of="$outfile" + if [ "$ofs" -eq 0 ] ; then maybe_copy_attrs "$infile" "$outfile" fi } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/mpibash-1.2/commands/mbcp.1 new/mpibash-1.3/commands/mbcp.1 --- old/mpibash-1.2/commands/mbcp.1 2015-02-17 19:30:14.000000000 +0100 +++ new/mpibash-1.3/commands/mbcp.1 2017-10-30 22:51:54.000000000 +0100 @@ -1,4 +1,4 @@ -.TH MBCP 1 2015-02-12 "LANL" "User Commands" +.TH MBCP 1 2017-05-11 "LANL" "User Commands" .SH NAME mbcp \- Copy files in parallel with MPI-Bash .SH SYNOPSIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/mpibash-1.2/commands/mbtar new/mpibash-1.3/commands/mbtar --- old/mpibash-1.2/commands/mbtar 2015-02-17 19:40:03.000000000 +0100 +++ new/mpibash-1.3/commands/mbtar 2016-10-11 18:14:52.000000000 +0200 @@ -9,7 +9,6 @@ enable -f mpibash.so mpi_init mpi_init mpi_comm_rank rank -mpi_comm_size nranks enable -f circlebash.so circle_init circle_init @@ -26,7 +25,6 @@ verbose=no create=no workdir=. -origargs=("$@") while getopts cC:T:vf: optname ; do case $optname in \?) @@ -52,14 +50,14 @@ esac done shift $((OPTIND-1)) -if [ -z "$tarfile" -o $create = no -o \( $# -eq 0 -a -z "$listfile" \) ] ; then - if [ $rank -eq 0 ] ; then - echo $usagestr 1>&2 +if [ -z "$tarfile" ] || [ $create = no ] || [[ $# -eq 0 && -z "$listfile" ]] ; then + if [ "$rank" -eq 0 ] ; then + echo "$usagestr" 1>&2 fi exit 1 fi arglist=("$@") -cd "$workdir" +cd "$workdir" || exit 1 # Given a file name and file size, return the expected tar header + data size. declare -A -x header_size_cache @@ -75,7 +73,7 @@ header_bytes=512 fi local size="$2" - (( total_size = (($header_bytes + $size + 511)/512)*512 )) + (( total_size = ((header_bytes + size + 511)/512)*512 )) echo $total_size } @@ -96,7 +94,7 @@ done fi if [ "$listfile" ] ; then - while read arg ; do + while read -r arg ; do circle_enqueue "$arg" done < "$listfile" fi @@ -114,7 +112,7 @@ local dname="$fname" dnamelist+=("$dname") total_size=$(get_tar_size "$dname" 0) - (( local_dsize += $total_size )) + (( local_dsize += total_size )) header_size_cache["$dname"]=$total_size local dircontents=($(ls -A "$dname")) for cname in "${dircontents[@]}" ; do @@ -125,12 +123,12 @@ # Locally process a non-directrory. local fsize=0 - if [ -f "$fname" -a ! -L "$fname" ] ; then + if [ -f "$fname" ] && [ ! -L "$fname" ] ; then fsize=$(stat -c%s "$fname") fi fname2size["$fname"]=$fsize - total_size=$(get_tar_size "$fname" $fsize) - (( local_fsize += $total_size )) + total_size=$(get_tar_size "$fname" "$fsize") + (( local_fsize += total_size )) header_size_cache["$fname"]=$(get_tar_size "$fname" 0) } @@ -145,7 +143,7 @@ mpi_allreduce $local_dsize global_dsize local_foffset=0 mpi_exscan $local_fsize local_foffset -(( local_foffset += $global_dsize )) +(( local_foffset += global_dsize )) # Define a function to enqueue tarring of each rank's set of # directories and files. The message format is as follows: @@ -156,7 +154,7 @@ # - file/directory name function enqueue_tar_work () { # Enqueue directory work. Directories always occupy a single segment. - local dname dsize total_size tsize + local dname total_size tsize local cumulative_doffset=$local_doffset for dname in "${dnamelist[@]}" ; do tsize=${header_size_cache["$dname"]} @@ -171,15 +169,15 @@ tsize=$(get_tar_size "$fname" 0) fsize=${fname2size["$fname"]} segment=0 - if [ $fsize -eq 0 ] ; then + if [ "$fsize" -eq 0 ] ; then circle_enqueue "$tsize$sep$fsize$sep$cumulative_foffset$sep$segment$sep$fname" else - for (( fofs=0; fofs<$fsize; fofs+=$maxblocksize )) ; do + for (( fofs=0; fofs<fsize; fofs+=maxblocksize )) ; do circle_enqueue "$tsize$sep$fsize$sep$cumulative_foffset$sep$segment$sep$fname" (( segment++ )) done fi - (( cumulative_foffset += $(get_tar_size "$fname" $fsize) )) + (( cumulative_foffset += $(get_tar_size "$fname" "$fsize") )) done } @@ -188,36 +186,37 @@ # Determine what we need to do. local msg fields circle_dequeue msg - IFS="$sep" read -a fields <<< "$msg" + IFS="$sep" read -r -a fields <<< "$msg" local tsize="${fields[0]}" local size="${fields[1]}" local offset="${fields[2]}" local segment="${fields[3]}" local name="${fields[4]}" if [ $verbose = yes ] ; then - local nsegs=$(( ($size + $maxblocksize - 1)/$maxblocksize )) + local nsegs=$(( (size + maxblocksize - 1)/maxblocksize )) if [ $nsegs -eq 0 ] ; then nsegs=1 fi - echo "$name (fragment $(($segment+1)) of $nsegs)" + echo "$name (fragment $((segment+1)) of $nsegs)" fi # Segment 0: Inject the tar header. - if [ $segment -eq 0 ] ; then + if [ "$segment" -eq 0 ] ; then tar --no-recursion -cf - "$name" | \ - dd of="$tarfile" bs=$tsize count=1 oflag=seek_bytes seek=$offset conv=notrunc status=none + dd of="$tarfile" bs="$tsize" count=1 oflag=seek_bytes seek="$offset" conv=notrunc status=none fi - # All subsequent segments: Inject one segment's worth of data. - if [ $size -gt $tsize ] ; then - local seek_bytes=$(( $offset + $tsize + $segment*$maxblocksize )) - dd if="$name" of="$tarfile" bs=$maxblocksize count=1 skip=$segment oflag=seek_bytes seek=$seek_bytes conv=notrunc status=none + # All segments: Inject up to one segment's worth of data. + if [ "$size" -gt 0 ] ; then + local seek_bytes=$(( offset + tsize + segment*maxblocksize )) + dd if="$name" of="$tarfile" bs="$maxblocksize" count=1 skip="$segment" oflag=seek_bytes seek="$seek_bytes" conv=notrunc status=none fi + } # Use Libcircle to include all specified files and directories in the # target tarball. -if [ $rank -eq 0 ] ; then +if [ "$rank" -eq 0 ] ; then rm -f "$tarfile" fi circle_set_options create_global @@ -227,7 +226,7 @@ # Pad the file to a multiple of the block size (512 bytes) and include # two all-zero EOF blocks. -if [ $rank -eq 0 ] ; then +if [ "$rank" -eq 0 ] ; then truncate --size=%512 "$tarfile" truncate --size=+1024 "$tarfile" fi diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/mpibash-1.2/commands/mbtar.1 new/mpibash-1.3/commands/mbtar.1 --- old/mpibash-1.2/commands/mbtar.1 2015-02-17 19:30:56.000000000 +0100 +++ new/mpibash-1.3/commands/mbtar.1 2017-10-30 22:51:38.000000000 +0100 @@ -1,4 +1,4 @@ -.TH MBTAR 1 2015-02-12 "LANL" "User Commands" +.TH MBTAR 1 2017-05-11 "LANL" "User Commands" .SH NAME mbtar \- Archive files in parallel with MPI-Bash .SH SYNOPSIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/mpibash-1.2/commands/mbxz new/mpibash-1.3/commands/mbxz --- old/mpibash-1.2/commands/mbxz 2015-02-17 19:39:46.000000000 +0100 +++ new/mpibash-1.3/commands/mbxz 2017-05-11 18:19:26.000000000 +0200 @@ -11,11 +11,6 @@ mpi_comm_rank rank mpi_comm_size nranks -# Define the maximum number of bytes to read/write at once. This -# should be large enough to get good performance from a parallel -# filesystem but not so large that it thrashes the TLB. -maxblocksize=104857600 - # Parse the command line. We accept only a few, specific, xz options. # The rest don't make sense in the context of this script. usagestr="Usage: $0 [xz options] <file>..." @@ -47,7 +42,7 @@ done shift $((OPTIND-1)) if [ $# -eq 0 ] ; then - echo $usagestr 1>&2 + echo "$usagestr" 1>&2 exit 1 fi @@ -58,7 +53,7 @@ origfile="$1" compfile="${origfile}${suffix}" shift - if [ $rank -eq 0 ] ; then + if [ "$rank" -eq 0 ] ; then # Rank 0 -- tell everyone the file size or "skip" to skip this file. file_ok=yes if [ ! -e "$origfile" ] ; then @@ -70,13 +65,13 @@ elif [ ! -r "$origfile" ] ; then echo "${0}: Input file $origfile is not readble" 1>&2 file_ok=no - elif [ -e "$compfile" -a "$force" = no ] ; then + elif [ -e "$compfile" ] && [ "$force" = no ] ; then echo "${0}: Output file $compfile already exists" 1>&2 file_ok=no fi if [ "$file_ok" = yes ] ; then origsize=$(stat -c%s "$origfile") - mpi_bcast $origsize msg + mpi_bcast "$origsize" msg else mpi_bcast skip msg continue @@ -84,17 +79,17 @@ else # Not rank 0 -- await a filesize or "skip" to skip to the next file. mpi_bcast origsize - if [ $origsize = skip ] ; then + if [ "$origsize" = skip ] ; then continue fi fi # Split the input file into nranks pieces. - let lastrank=($nranks - 1) - let blocksize=($origsize / $nranks) - let rank_offset=($rank * $blocksize) + lastrank=$((nranks - 1)) + blocksize=$((origsize / nranks)) + rank_offset=$((rank * blocksize)) rankfile="${origfile}.${rank}" - if [ $rank -eq $lastrank ] ; then + if [ "$rank" -eq "$lastrank" ] ; then # The last rank copies exactly to the end of the file, making # up for any "lost" bytes caused by rounding down blocksize to # the nearest integer. @@ -105,26 +100,26 @@ fi # Compress each piece. - xz -f "${xzopts[@]}" "$rankfile" + ${XZ_COMMAND:-xz} -f "${xzopts[@]}" "$rankfile" # Concatenate the compressed pieces. compfile="${origfile}${suffix}" rankcompfile="$rankfile.xz" rankcompsize=$(stat -c%s "$rankcompfile") - mpi_exscan $rankcompsize rank_offset - if [ $rank -eq 0 ] ; then + mpi_exscan "$rankcompsize" rank_offset + if [ "$rank" -eq 0 ] ; then rank_offset=0 rm -f "$compfile" fi mpi_barrier - dd status=none conv=notrunc iflag=count_bytes oflag=seek_bytes seek=$rank_offset bs=$blocksize count=$rankcompsize if="$rankcompfile" of="$compfile" + dd status=none conv=notrunc iflag=count_bytes oflag=seek_bytes seek=$rank_offset bs=$blocksize count="$rankcompsize" if="$rankcompfile" of="$compfile" # Delete all of the per-rank compressed files. rm -f "$rankcompfile" # Delete the original file. mpi_barrier - if [ "$keep" = no -a $rank -eq 0 ] ; then + if [ "$keep" = no ] && [ "$rank" -eq 0 ] ; then rm -f "$origfile" fi done diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/mpibash-1.2/commands/mbxz.1 new/mpibash-1.3/commands/mbxz.1 --- old/mpibash-1.2/commands/mbxz.1 2015-02-13 18:06:29.000000000 +0100 +++ new/mpibash-1.3/commands/mbxz.1 2017-10-30 22:52:01.000000000 +0100 @@ -1,4 +1,4 @@ -.TH MBXZ 1 2015-02-12 "LANL" "User Commands" +.TH MBXZ 1 2017-05-11 "LANL" "User Commands" .SH NAME mbxz \- Compress a file in parallel with MPI-Bash .SH SYNOPSIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/mpibash-1.2/compile new/mpibash-1.3/compile --- old/mpibash-1.2/compile 2015-02-18 00:10:04.000000000 +0100 +++ new/mpibash-1.3/compile 2017-11-21 22:51:04.000000000 +0100 @@ -3,7 +3,7 @@ scriptversion=2012-10-14.11; # UTC -# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# Copyright (C) 1999-2014 Free Software Foundation, Inc. # Written by Tom Tromey <tro...@cygnus.com>. # # This program is free software; you can redistribute it and/or modify diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/mpibash-1.2/configure.ac new/mpibash-1.3/configure.ac --- old/mpibash-1.2/configure.ac 2015-02-18 00:09:47.000000000 +0100 +++ new/mpibash-1.3/configure.ac 2017-11-21 22:50:08.000000000 +0100 @@ -5,7 +5,7 @@ # Initialize the GNU Autotools. AC_PREREQ([2.69]) -AC_INIT([mpibash], [1.2], [pa...@lanl.gov]) +AC_INIT([mpibash], [1.3], [pa...@lanl.gov]) AC_CONFIG_SRCDIR([src/init.c]) AM_INIT_AUTOMAKE([-Wall -Werror foreign]) AM_PROG_AR @@ -25,18 +25,25 @@ [directory containing preconfigured bash sources])], [bashdir="$withval"], [bashdir=no]) -AC_CACHE_CHECK([for a bash source tree], +AC_CACHE_CHECK([for a directory containing bash header files], [ax_cv_dir_bash_sources], [ ax_cv_dir_bash_sources=no if test "x$bashdir" = xno ; then - # --with-bashdir was not specified; look in the current directory. + # --with-bashdir was not specified; look in the current directory for a + # bash source directory. if test `echo bash*` != "bash*" ; then for dname in `ls -d bash* | sort -r` ; do if test -d "$dname" ; then - ax_cv_dir_bash_sources="`readlink -f $dname`" - break + ax_cv_dir_bash_sources="`readlink -f $dname`" + break fi done + # bash was not found in the current directory. See if pkg-config can + # find the bash headers. + elif test "x$PKG_CONFIG" != xno ; then + PKG_CHECK_EXISTS([bash], [ + ax_cv_dir_bash_sources=`$PKG_CONFIG --variable=headersdir bash` + ]) fi else # --with-bashdir was specified; ensure it's valid. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/mpibash-1.2/missing new/mpibash-1.3/missing --- old/mpibash-1.2/missing 2015-02-18 00:10:04.000000000 +0100 +++ new/mpibash-1.3/missing 2017-11-21 22:51:04.000000000 +0100 @@ -3,7 +3,7 @@ scriptversion=2013-10-28.13; # UTC -# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# Copyright (C) 1996-2014 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard <pin...@iro.umontreal.ca>, 1996. # This program is free software; you can redistribute it and/or modify diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/mpibash-1.2/src/circle-init.c new/mpibash-1.3/src/circle-init.c --- old/mpibash-1.2/src/circle-init.c 2015-02-11 23:19:31.000000000 +0100 +++ new/mpibash-1.3/src/circle-init.c 2017-11-10 17:30:10.000000000 +0100 @@ -171,6 +171,8 @@ for (func = all_circle_builtins; *func; func++) if (load_circle_builtin(*func) != EXECUTION_SUCCESS) return EXECUTION_FAILURE; + + return EXECUTION_SUCCESS; } /* Define the documentation for the circle_init builtin. */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/mpibash-1.2/src/coll.c new/mpibash-1.3/src/coll.c --- old/mpibash-1.2/src/coll.c 2015-02-12 22:31:49.000000000 +0100 +++ new/mpibash-1.3/src/coll.c 2017-10-30 23:01:31.000000000 +0100 @@ -124,6 +124,49 @@ /* Define a reduction-type function (allreduce, scan, exscan, etc.). */ typedef int (*reduction_func_t)(void *, void *, int, MPI_Datatype, MPI_Op, MPI_Comm); +/* Parse an operation name into an MPI_Op. Return 1 on success, 0 on + * failure. */ +static int +parse_operation (char *name, MPI_Op *op) +{ + /* Define a mapping from operator names to MPI_Op values. */ + typedef struct { + char *name; /* Operation name (e.g., "sum") */ + MPI_Op value; /* Operation value (e.g., MPI_SUM) */ + } opname2value_t; + static opname2value_t oplist[] = { + {"max", MPI_MAX}, + {"min", MPI_MIN}, + {"sum", MPI_SUM}, + {"prod", MPI_PROD}, + {"land", MPI_LAND}, + {"band", MPI_BAND}, + {"lor", MPI_LOR}, + {"bor", MPI_BOR}, + {"lxor", MPI_LXOR}, + {"bxor", MPI_BXOR}, + {"maxloc", MPI_MAXLOC}, + {"minloc", MPI_MINLOC} + }; + size_t i; + + for (i = 0; i < sizeof(oplist)/sizeof(opname2value_t); i++) + if (!strcmp(name, oplist[i].name)) + { + *op = oplist[i].value; + if (i > 0) + { + /* As a performance optimization, bubble up the value we + * just found. */ + opname2value_t prev = oplist[i - 1]; + oplist[i - 1] = oplist[i]; + oplist[i] = prev; + } + return 1; + } + return 0; +} + /* Perform any reduction-type operation (allreduce, scan, exscan, etc.). */ static int reduction_like (WORD_LIST *list, char *funcname, reduction_func_t func)