Skip to content

Commit bbd17a0

Browse files
committed
VSEARCH 2.29.3: Avoid alignment bug with g++ -O3 on x86_64
1 parent 04a4b4e commit bbd17a0

File tree

6 files changed

+27
-15
lines changed

6 files changed

+27
-15
lines changed

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ RUN apk add --no-cache \
55
libstdc++ zlib-dev bzip2-dev \
66
autoconf automake make g++ && \
77
./autogen.sh && \
8-
./configure CFLAGS="-O3" CXXFLAGS="-O3" && \
8+
./configure CFLAGS="-O2" CXXFLAGS="-O2" && \
99
make clean && \
1010
make && \
1111
make install && \

README.md

+12-10
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Most of the nucleotide based commands and options in USEARCH version 7 are suppo
3939

4040
## Getting Help
4141

42-
If you can't find an answer in the [VSEARCH documentation](https://github.com/torognes/vsearch/releases/download/v2.29.2/vsearch_manual.pdf), please visit the [VSEARCH Web Forum](https://groups.google.com/forum/#!forum/vsearch-forum) to post a question or start a discussion.
42+
If you can't find an answer in the [VSEARCH documentation](https://github.com/torognes/vsearch/releases/download/v2.29.3/vsearch_manual.pdf), please visit the [VSEARCH Web Forum](https://groups.google.com/forum/#!forum/vsearch-forum) to post a question or start a discussion.
4343

4444
## Example
4545

@@ -52,16 +52,18 @@ In the example below, VSEARCH will identify sequences in the file database.fsa t
5252
**Source distribution** To download the source distribution from a [release](https://github.com/torognes/vsearch/releases) and build the executable and the documentation, use the following commands:
5353

5454
```
55-
wget https://github.com/torognes/vsearch/archive/v2.29.2.tar.gz
56-
tar xzf v2.29.2.tar.gz
57-
cd vsearch-2.29.2
55+
wget https://github.com/torognes/vsearch/archive/v2.29.3.tar.gz
56+
tar xzf v2.29.3.tar.gz
57+
cd vsearch-2.29.3
5858
./autogen.sh
59-
./configure CFLAGS="-O3" CXXFLAGS="-O3"
59+
./configure CFLAGS="-O2" CXXFLAGS="-O2"
6060
make ARFLAGS="cr"
6161
sudo make install
6262
```
6363

64-
You may customize the installation directory using the `--prefix=DIR` option to `configure`. If the compression libraries [zlib](https://www.zlib.net) and/or [bzip2](https://www.sourceware.org/bzip2/) are installed on the system, they will be detected automatically and support for compressed files will be included in vsearch (see section **Dependencies** below). Support for compressed files may be disabled using the `--disable-zlib` and `--disable-bzip2` options to `configure`. A PDF version of the manual will be created from the `vsearch.1` manual file if `ps2pdf` is available, unless disabled using the `--disable-pdfman` option to `configure`. It is recommended to run configure with the options `CFLAGS="-O3"` and `CXXFLAGS="-O3"`. Other options may also be applied to `configure`, please run `configure -h` to see them all. GNU autoconf (version 2.63 or later), automake and the GCC C++ (`g++`) compiler is required to build vsearch. Version 3.82 or later of `make` may be required on Linux, while version 3.81 is sufficient on macOS.
64+
You may customize the installation directory using the `--prefix=DIR` option to `configure`. If the compression libraries [zlib](https://www.zlib.net) and/or [bzip2](https://www.sourceware.org/bzip2/) are installed on the system, they will be detected automatically and support for compressed files will be included in vsearch (see section **Dependencies** below). Support for compressed files may be disabled using the `--disable-zlib` and `--disable-bzip2` options to `configure`. A PDF version of the manual will be created from the `vsearch.1` manual file if `ps2pdf` is available, unless disabled using the `--disable-pdfman` option to `configure`. It is recommended to run configure with the options `CFLAGS="-O2"` and `CXXFLAGS="-O2"`. Other options may also be applied to `configure`, please run `configure -h` to see them all. GNU autoconf (version 2.63 or later), automake and the GCC C++ (`g++`) compiler is required to build vsearch. Version 3.82 or later of `make` may be required on Linux, while version 3.81 is sufficient on macOS.
65+
66+
Warning: Compiling the `align_simd.cc` file on x86_64 systems with the GNU C++ compiler version 9 or later with the `-O3` optimization option results in incorrect code that may cause bad alignments in some circumstances. We are investigating this issue further, but for now we recommend compiling with the `-O2` flag.
6567

6668
To build VSEARCH on Debian and similar Linux distributions (Ubuntu etc) you'll need the following packages: autoconf, automake, g++, ghostscript, groff, libbz2-dev, make, zlib1g-dev. Include libsimde-dev to build on riscv64 or mips64el.
6769

@@ -73,7 +75,7 @@ Instead of downloading the source distribution as a compressed archive, you coul
7375
git clone https://github.com/torognes/vsearch.git
7476
cd vsearch
7577
./autogen.sh
76-
./configure CFLAGS="-O3" CXXFLAGS="-O3"
78+
./configure CFLAGS="-O2" CXXFLAGS="-O2"
7779
make ARFLAGS="cr"
7880
sudo make install
7981
```
@@ -89,7 +91,7 @@ wget https://github.com/torognes/vsearch/releases/download/v{VERSION}/vsearch-{V
8991
tar xzf vsearch-{VERSION}-{OS}-{ARCH}.tar.gz
9092
```
9193

92-
Replace `{VERSION}` with the VSEARCH version number (e.g. `2.29.2`), `{OS}` with the target operating system (`linux` or `macos`), and `{ARCH}` with the architecture (`x86_64`, `aarch64`, `ppc64le`, `riscv64`, or `mips64el`). You could add `-static` after `{ARCH}` to get a statically compiled version for Linux (except x86_64). The name of the binary for the RHEL 7 and CentOS 7 Linux distributions ends in `-ubi7`.
94+
Replace `{VERSION}` with the VSEARCH version number (e.g. `2.29.3`), `{OS}` with the target operating system (`linux` or `macos`), and `{ARCH}` with the architecture (`x86_64`, `aarch64`, `ppc64le`, `riscv64`, or `mips64el`). You could add `-static` after `{ARCH}` to get a statically compiled version for Linux (except x86_64). The name of the binary for the RHEL 7 and CentOS 7 Linux distributions ends in `-ubi7`.
9395

9496
Or, if you are using Windows, download and extract (unzip) the contents of this file:
9597

@@ -113,7 +115,7 @@ and `zlib1.dll` files required for reading compressed input
113115
files. These DLL's have been obtained for mingw-w64 from the MSYS2
114116
platform.
115117

116-
**Documentation:** The VSEARCH user's manual is available in the `man` folder in the form of a [man page](https://github.com/torognes/vsearch/blob/master/man/vsearch.1). A pdf version ([vsearch_manual.pdf](https://github.com/torognes/vsearch/releases/download/v2.29.2/vsearch_manual.pdf)) will be generated by `make`. To install the manpage manually, copy the `vsearch.1` file or a create a symbolic link to `vsearch.1` in a folder included in your `$MANPATH`. The manual in both formats is also available with the binary distribution. The manual in PDF form ([vsearch_manual.pdf](https://github.com/torognes/vsearch/releases/download/v2.29.2/vsearch_manual.pdf)) is also attached to the latest [release](https://github.com/torognes/vsearch/releases).
118+
**Documentation:** The VSEARCH user's manual is available in the `man` folder in the form of a [man page](https://github.com/torognes/vsearch/blob/master/man/vsearch.1). A pdf version ([vsearch_manual.pdf](https://github.com/torognes/vsearch/releases/download/v2.29.3/vsearch_manual.pdf)) will be generated by `make`. To install the manpage manually, copy the `vsearch.1` file or a create a symbolic link to `vsearch.1` in a folder included in your `$MANPATH`. The manual in both formats is also available with the binary distribution. The manual in PDF form ([vsearch_manual.pdf](https://github.com/torognes/vsearch/releases/download/v2.29.3/vsearch_manual.pdf)) is also attached to the latest [release](https://github.com/torognes/vsearch/releases).
117119

118120

119121
## Packages, plugins, and wrappers
@@ -157,7 +159,7 @@ Compiling VSEARCH requires either GCC (`g++`) or `clang`, `make` and the autotoo
157159

158160
VSEARCH will automatically check whether these libraries are available and load them dynamically.
159161

160-
On Windows these libraries are called `zlib1.dll` and `libbz2.dll`. These DLL's are included with the released distribution of vsearch 2.29.2 and later.
162+
On Windows these libraries are called `zlib1.dll` and `libbz2.dll`. These DLL's are included with the released distribution of vsearch 2.29.3 and later.
161163

162164
To create the PDF file with the manual the ps2pdf tool is required. It is part of the `ghostscript` package.
163165

configure.ac

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Process this file with autoconf to produce a configure script.
33

44
AC_PREREQ([2.63])
5-
AC_INIT([vsearch], [2.29.2], [torognes@ifi.uio.no], [vsearch], [https://github.com/torognes/vsearch])
5+
AC_INIT([vsearch], [2.29.3], [torognes@ifi.uio.no], [vsearch], [https://github.com/torognes/vsearch])
66
AC_CANONICAL_TARGET
77
AM_INIT_AUTOMAKE([subdir-objects])
88
AC_LANG([C++])

dockerfiles/Dockerfile.debian

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ RUN apt-get -y install \
1212
make \
1313
zlib1g-dev
1414
RUN ./autogen.sh
15-
RUN ./configure CFLAGS="-O3" CXXFLAGS="-O3"
15+
RUN ./configure CFLAGS="-O2" CXXFLAGS="-O2"
1616
RUN make clean
1717
RUN make ARFLAGS="cr"
1818
RUN make install

dockerfiles/Dockerfile.fedora

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ RUN yum -y install \
1212
make \
1313
zlib-devel
1414
RUN ./autogen.sh
15-
RUN ./configure CFLAGS="-O3" CXXFLAGS="-O3"
15+
RUN ./configure CFLAGS="-O2" CXXFLAGS="-O2"
1616
RUN make clean
1717
RUN make ARFLAGS="cr"
1818
RUN make install

man/vsearch.1

+11-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.\" import www macros (URL, TAG, MTO)
22
.mso www.tmac
33
.\" ============================================================================
4-
.TH vsearch 1 "December 20, 2024" "version 2.29.2" "USER COMMANDS"
4+
.TH vsearch 1 "February 3, 2025" "version 2.29.3" "USER COMMANDS"
55
.\" ============================================================================
66
.SH NAME
77
vsearch \(em a versatile open-source tool for microbiome analysis,
@@ -4998,6 +4998,16 @@ documentation.
49984998
.BR v2.29.2\~ "released December 20th, 2024"
49994999
Fix a segmentation fault during clustering when the set of clusters is empty.
50005000
Initial documentation in markdown format available on GitHub Pages.
5001+
.TP
5002+
.BR v2.29.3\~ "released February 3rd, 2025"
5003+
This version is released in order to mitigate a bug that occurs when
5004+
compiling the `align_simd.cc` file on x86_64 systems with the GNU C++
5005+
compiler version 9 or later with the `-O3` optimization option. It
5006+
results in incorrect code that may cause bad alignments in some
5007+
circumstances. We are investigating this issue further, but for now we
5008+
recommend compiling with the `-O2` flag. The README.md file and the
5009+
Dockerfiles have been updated to reflect this. The binaries released
5010+
with this version will include this fix.
50015011
.\" ============================================================================
50025012
.\" TODO:
50035013
.\"

0 commit comments

Comments
 (0)