Skip to content

Commit 7b2b935

Browse files
committed
Merge commit '6e22be2514d02aeee3e58ae72028842c83584849'
2 parents 25cb885 + 6e22be2 commit 7b2b935

356 files changed

Lines changed: 1001 additions & 35586 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

lib/mmseqs/.cirrus.yml

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,10 @@ task:
55
name: FreeBSD
66
freebsd_instance:
77
image_family: freebsd-14-2-snap
8-
install_script: |
9-
# pkg update -f
10-
pkg install -y cmake git samtools rust
11-
export PATH=/usr/local/bin:$PATH
8+
install_script: pkg install -y cmake git samtools
129
compile_script: |
1310
mkdir build && cd build
14-
cmake -DCMAKE_BUILD_TYPE=Release -DHAVE_TESTS=1 -DENABLE_WERROR=1 -DHAVE_SSE4_1=1 -DRust_COMPILER=/usr/local/bin/rustc ..
11+
cmake -DCMAKE_BUILD_TYPE=Release -DHAVE_TESTS=1 -DENABLE_WERROR=1 -DHAVE_SSE4_1=1 ..
1512
make -j $(sysctl -n hw.ncpu)
1613
test_script: ./util/regression/run_regression.sh ./build/src/mmseqs SCRATCH
1714

@@ -27,9 +24,7 @@ task:
2724
echo "deb [trusted=yes] http://archive.debian.org/debian jessie main" > /etc/apt/sources.list
2825
echo "deb [trusted=yes] http://archive.debian.org/debian-security jessie/updates main" >> /etc/apt/sources.list
2926
apt-get update --yes --force-yes || true
30-
apt-get install -y --no-install-suggests --no-install-recommends wget clang-4.0 libc++-dev make git ca-certificates curl
31-
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
32-
export PATH=/root/.cargo/bin:$PATH
27+
apt-get install wget clang-4.0 libc++-dev make git ca-certificates --yes --force-yes --no-install-suggests --no-install-recommends
3328
env:
3429
CC: clang-4.0
3530
CXX: clang++-4.0
@@ -38,24 +33,20 @@ task:
3833
echo "deb [trusted=yes] http://archive.debian.org/debian jessie main" > /etc/apt/sources.list
3934
echo "deb [trusted=yes] http://archive.debian.org/debian-security jessie/updates main" >> /etc/apt/sources.list
4035
apt-get update --yes --force-yes || true
41-
apt-get install -y --no-install-suggests --no-install-recommends wget gcc-4.9 g++-4.9 make git ca-certificates curl
42-
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
43-
export PATH=/root/.cargo/bin:$PATH
36+
apt-get install wget gcc-4.9 g++-4.9 make git ca-certificates --yes --force-yes --no-install-suggests --no-install-recommends
4437
env:
4538
CC: gcc-4.9
4639
CXX: g++-4.9
47-
4840
compile_script: |
4941
mkdir -p /opt/cmake-3.31.0
5042
wget https://cmake.org/files/v3.31/cmake-3.31.0-linux-x86_64.sh
5143
chmod +x cmake-3.31.0-linux-x86_64.sh
5244
./cmake-3.31.0-linux-x86_64.sh --skip-license --prefix=/opt/cmake-3.31.0
5345
export PATH=/opt/cmake-3.31.0/bin/:$PATH
54-
export PATH=/root/.cargo/bin:$PATH
5546
mkdir build && cd build
56-
cmake -DCMAKE_BUILD_TYPE=Release -DHAVE_TESTS=1 -DENABLE_WERROR=0 -DHAVE_SSE4_1=1 -DREQUIRE_OPENMP=0 -DRust_COMPILER=/root/.cargo/bin/rustc ..
47+
cmake -DCMAKE_BUILD_TYPE=Release -DHAVE_TESTS=1 -DENABLE_WERROR=0 -DHAVE_SSE4_1=1 -DREQUIRE_OPENMP=0 ..
5748
make -j $(nproc --all)
5849
test_script: |
5950
export PATH=/opt/cmake-3.31.0/bin/:$PATH
60-
export PATH=/root/.cargo/bin:$PATH
6151
MMSEQS_NUM_THREADS=4 ./util/regression/run_regression.sh ./build/src/mmseqs SCRATCH SEARCH
52+
13.3 KB
Loading

lib/mmseqs/.github/workflows/Dockerfile.GPU-buster-cross-sbsa

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,10 @@ RUN mkdir -p /work/build && cd /work/build; \
77
-DCMAKE_TOOLCHAIN_FILE=/opt/toolchain.cmake \
88
-DOpenMP_C_FLAGS="-Xpreprocessor -fopenmp -I${LIBOMP_AARCH64}" -DOpenMP_C_LIB_NAMES=omp -DOpenMP_CXX_FLAGS="-Xpreprocessor -fopenmp -I${LIBOMP_AARCH64}" -DOpenMP_CXX_LIB_NAMES=omp -DOpenMP_omp_LIBRARY=${LIBOMP_AARCH64}/libomp.a \
99
-DCMAKE_POLICY_DEFAULT_CMP0074=NEW -DCMAKE_POLICY_DEFAULT_CMP0144=NEW \
10-
-DRust_TOOLCHAIN=stable-x86_64-unknown-linux-gnu \
11-
-DRust_CARGO_TARGET=aarch64-unknown-linux-gnu \
1210
-DFORCE_STATIC_DEPS=1 -DENABLE_CUDA=1 -DCMAKE_CUDA_ARCHITECTURES="75-real;80-real;86-real;89-real;90" ..; \
1311
cmake --build . -j$(nproc --all) -v;
1412

15-
RUN if readelf -a /work/build/src/mmseqs | grep -i "Shared library" | grep -P -v "(linux-vdso|ld-linux-aarch64|libc|libm|libdl|librt|libpthread|libutil).so" | grep -q .; then \
13+
RUN if readelf -a /work/build/src/mmseqs | grep -i "Shared library" | grep -P -v "(linux-vdso|ld-linux-aarch64|libc|libm|libdl|librt|libpthread).so" | grep -q .; then \
1614
echo "Error: unwanted libraries found"; \
1715
readelf -a /work/build/src/mmseqs | grep -i "Shared library"; \
1816
exit 1; \

lib/mmseqs/.github/workflows/Dockerfile.GPU-manylinux2014

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ RUN mkdir -p /work/build && cd /work/build; \
1414
-DFORCE_STATIC_DEPS=1 -DENABLE_CUDA=1 -DCMAKE_CUDA_ARCHITECTURES="75-real;80-real;86-real;89-real;90" ..; \
1515
cmake --build . -j$(nproc --all) -v;
1616

17-
RUN if ldd /work/build/src/mmseqs | grep -P -v "linux-vdso.so|/lib64/(ld-linux-x86-64|libc|libm|libdl|librt|libpthread|libutil).so" | grep -q .; then \
17+
RUN if ldd /work/build/src/mmseqs | grep -P -v "linux-vdso.so|/lib64/(ld-linux-x86-64|libc|libm|libdl|librt|libpthread).so" | grep -q .; then \
1818
echo "Error: unwanted libraries found"; \
1919
ldd /work/build/src/mmseqs; \
2020
exit 1; \

lib/mmseqs/.github/workflows/docker.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,10 @@ jobs:
128128
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
129129
with:
130130
context: .
131-
platforms: linux/amd64,linux/arm64
131+
platforms: linux/amd64
132132
push: true
133-
no-cache: true
133+
cache-from: type=gha
134+
cache-to: type=gha,mode=max
134135
build-args: |
135136
GPU=1
136137
tags: |

lib/mmseqs/.github/workflows/mac-arm64.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ jobs:
2020
- name: Build
2121
run: |
2222
mkdir -p build
23-
rustup update
2423
cd build
2524
LIBOMP=$(brew --prefix libomp)
2625
cmake \

lib/mmseqs/CMakeLists.txt

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ set(HAVE_ARM8 0 CACHE BOOL "Have ARMv8 CPU")
1818
set(HAVE_S390X 0 CACHE BOOL "Have s390x architecture")
1919
set(NATIVE_ARCH 1 CACHE BOOL "Assume native architecture for SIMD. Use one of the HAVE_* options or set CMAKE_CXX_FLAGS to the appropriate flags if you disable this.")
2020
set(USE_SYSTEM_ZSTD 0 CACHE BOOL "Use zstd provided by system instead of bundled version")
21-
set(IGNORE_RUST_VERSION 0 CACHE BOOL "Ignore Rust version check")
2221
set(ENABLE_CUDA 0 CACHE BOOL "Enable CUDA")
2322
set(FORCE_STATIC_DEPS 0 CACHE BOOL "Force static linking of deps")
2423

@@ -197,53 +196,6 @@ set(MMSEQS_CXX_FLAGS "${MMSEQS_CXX_FLAGS} -std=c++1y")
197196
# set(MMSEQS_CXX_FLAGS "${MMSEQS_CXX_FLAGS} -stdlib=libc++")
198197
# endif ()
199198

200-
set(ENV{CARGO_NET_OFFLINE} true)
201-
add_subdirectory(lib/corrosion)
202-
# don't try to link to gcc_s, its not needed anyway
203-
list(REMOVE_ITEM Rust_CARGO_TARGET_LINK_NATIVE_LIBS "gcc_s")
204-
set(Rust_CARGO_TARGET_LINK_NATIVE_LIBS ${Rust_CARGO_TARGET_LINK_NATIVE_LIBS} CACHE INTERNAL "")
205-
206-
if(Rust_VERSION VERSION_LESS "1.68.0" AND NOT IGNORE_RUST_VERSION)
207-
message(FATAL_ERROR "Rust >= 1.68.0 is required")
208-
endif()
209-
210-
set(RUST_FEATURE "" CACHE INTERNAL "")
211-
if(HAVE_AVX2)
212-
set(RUST_FEATURE simd_avx2 CACHE INTERNAL "")
213-
elseif(HAVE_SSE4_1 OR HAVE_SSE2)
214-
set(RUST_FEATURE simd_sse2 CACHE INTERNAL "")
215-
elseif(HAVE_ARM8)
216-
set(RUST_FEATURE simd_neon CACHE INTERNAL "")
217-
endif()
218-
219-
if (NATIVE_ARCH AND (RUST_FEATURE STREQUAL ""))
220-
if(EMSCRIPTEN)
221-
set(RUST_FEATURE simd_wasm CACHE INTERNAL "")
222-
elseif(ARM)
223-
set(RUST_FEATURE simd_neon CACHE INTERNAL "")
224-
elseif(X86 OR X64)
225-
if (HAVE_AVX2_EXTENSIONS)
226-
set(RUST_FEATURE simd_avx2 CACHE INTERNAL "")
227-
elseif (HAVE_SSE2_EXTENSIONS)
228-
set(RUST_FEATURE simd_sse2 CACHE INTERNAL "")
229-
endif()
230-
endif()
231-
endif()
232-
if(RUST_FEATURE STREQUAL "")
233-
message(WARNING "No SIMD support for this architecture. Alignment performance will be bad")
234-
set(RUST_FEATURE no_simd CACHE INTERNAL "")
235-
endif()
236-
message("-- Rust Feature: ${RUST_FEATURE}")
237-
corrosion_import_crate(
238-
MANIFEST_PATH lib/block-aligner/c/Cargo.toml
239-
FEATURES "${RUST_FEATURE}"
240-
CRATE_TYPES staticlib
241-
)
242-
include_directories(lib/block-aligner/c)
243-
if(EMSCRIPTEN)
244-
corrosion_add_target_local_rustflags(block_aligner_c "-Clink-args=--no-entry -sRELOCATABLE=1")
245-
endif()
246-
247199
if (USE_SYSTEM_ZSTD)
248200
include(FindPackageHandleStandardArgs)
249201
find_path(ZSTD_INCLUDE_DIRS NAMES zstd.h REQUIRED)

lib/mmseqs/Dockerfile

Lines changed: 60 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,78 @@
1-
ARG TARGETARCH
21
ARG APP=mmseqs
3-
ARG GPU=0
4-
5-
FROM --platform=$BUILDPLATFORM ghcr.io/steineggerlab/build-containers:main-sbsa AS builder-arm64
6-
7-
FROM --platform=$BUILDPLATFORM ghcr.io/steineggerlab/build-containers:main-x86_64 AS builder-amd64
8-
9-
FROM builder-${TARGETARCH} AS builder
2+
FROM --platform=$BUILDPLATFORM debian:bookworm-slim AS builder
103
ARG TARGETARCH
114
ARG APP
125
ARG GPU
136

7+
RUN dpkg --add-architecture $TARGETARCH \
8+
&& apt-get update \
9+
&& apt-get install -y \
10+
build-essential cmake xxd git wget \
11+
zlib1g-dev libbz2-dev libatomic1 \
12+
crossbuild-essential-$TARGETARCH zlib1g-dev:$TARGETARCH libbz2-dev:$TARGETARCH; \
13+
if [ "$GPU" = "1" ]; then \
14+
wget https://developer.download.nvidia.com/compute/cuda/repos/debian12/x86_64/cuda-keyring_1.1-1_all.deb; \
15+
dpkg -i cuda-keyring_1.1-1_all.deb; \
16+
apt-get update && apt-get install -y cuda-nvcc-12-6 cuda-cudart-dev-12-6 ninja-build; \
17+
fi; \
18+
rm -rf /var/lib/apt/lists/*;
19+
1420
WORKDIR /opt/build
1521
ADD . .
16-
RUN set -x; \
17-
mkdir -p build/src; \
18-
cd /opt/build/build; \
19-
if [ "$TARGETARCH" = "arm64" ]; then \
20-
/usr/local/bin/cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DHAVE_TESTS=1 -DENABLE_WERROR=1 -DHAVE_ARM8=1 \
21-
-DCMAKE_TOOLCHAIN_FILE=/opt/toolchain.cmake \
22-
-DOpenMP_C_FLAGS="-Xpreprocessor -fopenmp -I${LIBOMP_AARCH64} -pthread" -DOpenMP_C_LIB_NAMES=omp \
23-
-DOpenMP_CXX_FLAGS="-Xpreprocessor -fopenmp -I${LIBOMP_AARCH64} -pthread" -DOpenMP_CXX_LIB_NAMES=omp \
24-
-DOpenMP_C_LIB_NAMES="libomp;dl" \
25-
-DOpenMP_CXX_LIB_NAMES="libomp;dl" \
26-
-DOpenMP_libomp_LIBRARY=${LIBOMP_AARCH64}/libomp.a \
27-
-DOpenMP_dl_LIBRARY=dl \
28-
-DRust_TOOLCHAIN=stable-x86_64-unknown-linux-gnu \
29-
-DRust_CARGO_TARGET=aarch64-unknown-linux-gnu \
30-
-DCMAKE_POLICY_DEFAULT_CMP0074=NEW -DCMAKE_POLICY_DEFAULT_CMP0144=NEW \
31-
-DFORCE_STATIC_DEPS=1 -DENABLE_CUDA=${GPU} -DCMAKE_CUDA_ARCHITECTURES="75-real;80-real;86-real;89-real;90" ..; \
32-
/usr/local/bin/cmake --build . -j$(nproc --all) -v; \
22+
23+
RUN if [ "$TARGETARCH" = "arm64" ]; then \
24+
mkdir -p build_$TARGETARCH/src; \
25+
cd /opt/build/build_$TARGETARCH; \
26+
CC=aarch64-linux-gnu-gcc CXX=aarch64-linux-gnu-g++ cmake -DHAVE_ARM8=1 -DHAVE_MPI=0 -DHAVE_TESTS=0 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=. ..; \
27+
make -j $(nproc --all); \
28+
mv src/${APP} /opt/build/${APP}_arch; \
29+
touch /opt/build/${APP}_sse2 /opt/build/${APP}_sse41 /opt/build/${APP}_avx2; \
3330
else \
34-
if [ -e "${LIBGCC}/libgomp.so" ]; then \
35-
mv -f -- "${LIBGCC}/libgomp.so" "${LIBGCC}/libgomp.so.disabled"; \
31+
if [ "$GPU" = "1" ]; then \
32+
export CUDACXX=/usr/local/cuda/bin/nvcc; \
33+
mkdir -p build_avx2/src; \
34+
cd /opt/build/build_avx2; \
35+
LIBGOMP=/usr/lib/gcc/x86_64-linux-gnu/12/; \
36+
cmake -GNinja -DHAVE_AVX2=1 -DHAVE_MPI=0 -DHAVE_TESTS=0 -DFORCE_STATIC_DEPS=1 \
37+
-DENABLE_CUDA=1 -DCMAKE_CUDA_ARCHITECTURES="75-real;80-real;86-real;89-real;90" \
38+
-DOpenMP_C_FLAGS="-fopenmp -I${LIBGOMP}" -DOpenMP_C_LIB_NAMES=gomp -DOpenMP_CXX_FLAGS="-fopenmp -I${LIBGOMP}" -DOpenMP_CXX_LIB_NAMES=gomp -DOpenMP_gomp_LIBRARY=${LIBGOMP}/libgomp.a \
39+
-DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=. ..; \
40+
cmake --build . -j$(nproc --all); \
41+
mv src/${APP} /opt/build/${APP}_avx2; \
42+
touch /opt/build/${APP}_arch /opt/build/${APP}_sse41 /opt/build/${APP}_sse2; \
43+
else \
44+
mkdir -p build_sse2/src && mkdir -p build_sse41/src && mkdir -p build_avx2/src; \
45+
cd /opt/build/build_sse2; \
46+
cmake -DHAVE_SSE2=1 -DHAVE_MPI=0 -DHAVE_TESTS=0 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=. ..; \
47+
make -j $(nproc --all); \
48+
mv src/${APP} /opt/build/${APP}_sse2; \
49+
cd /opt/build/build_sse41; \
50+
cmake -DHAVE_SSE4_1=1 -DHAVE_MPI=0 -DHAVE_TESTS=0 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=. ..; \
51+
make -j $(nproc --all); \
52+
mv src/${APP} /opt/build/${APP}_sse41; \
53+
cd /opt/build/build_avx2; \
54+
cmake -DHAVE_AVX2=1 -DHAVE_MPI=0 -DHAVE_TESTS=0 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=. ..; \
55+
make -j $(nproc --all); \
56+
mv src/${APP} /opt/build/${APP}_avx2; \
57+
touch /opt/build/${APP}_arch; \
3658
fi; \
37-
/usr/local/bin/cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DHAVE_TESTS=1 -DENABLE_WERROR=1 -DHAVE_AVX2=1 \
38-
-DOpenMP_C_FLAGS="-fopenmp -I${LIBGCC} -L${LIBGCC}" -DOpenMP_C_LIB_NAMES=gomp \
39-
-DOpenMP_CXX_FLAGS="-fopenmp -I${LIBGCC} -L${LIBGCC}" -DOpenMP_CXX_LIB_NAMES=gomp \
40-
-DOpenMP_gomp_LIBRARY="${LIBGCC}/libgomp.a" \
41-
-DATOMIC_LIB_OVERRIDE="${LIBGCC}/libatomic.a" \
42-
-DCMAKE_POLICY_DEFAULT_CMP0074=NEW -DCMAKE_POLICY_DEFAULT_CMP0144=NEW \
43-
-DZLIB_ROOT=/deps -DBZIP2_ROOT=/deps \
44-
-DFORCE_STATIC_DEPS=1 -DENABLE_CUDA=${GPU} -DCMAKE_CUDA_ARCHITECTURES="75-real;80-real;86-real;89-real;90" ..; \
45-
/usr/local/bin/cmake --build . -j$(nproc --all) -v; \
46-
fi; \
47-
mv src/${APP} /opt/build/${APP};
59+
fi
4860

49-
FROM debian:trixie-slim
61+
FROM debian:bookworm-slim
5062
ARG TARGETARCH
5163
ARG APP
5264
ARG GPU
5365

54-
COPY --from=builder /opt/build/${APP} /usr/local/bin/
66+
COPY --from=builder /opt/build/${APP}_arch /opt/build/${APP}_sse2 /opt/build/${APP}_sse41 /opt/build/${APP}_avx2 /usr/local/bin/
67+
ADD util/${APP}_wrapper.sh /usr/local/bin/entrypoint
5568

5669
RUN apt-get update && apt-get install -y \
57-
gawk bash grep wget tar aria2 \
58-
&& rm -rf /var/lib/apt/lists/*;
70+
gawk bash grep libstdc++6 libgomp1 libatomic1 zlib1g libbz2-1.0 wget tar aria2 \
71+
&& rm -rf /var/lib/apt/lists/*; \
72+
if [ "$TARGETARCH" = "arm64" ]; then \
73+
rm -f /usr/local/bin/entrypoint; ln -s /usr/local/bin/${APP}_arch /usr/local/bin/entrypoint; \
74+
elif [ "$GPU" = "1" ]; then \
75+
rm -f /usr/local/bin/entrypoint; ln -s /usr/local/bin/${APP}_avx2 /usr/local/bin/entrypoint; \
76+
fi
5977

60-
RUN echo "#!/bin/sh\nexec /usr/local/bin/$APP \"\${@}\"" > /usr/local/bin/entrypoint && chmod +x /usr/local/bin/entrypoint
61-
RUN cat /usr/local/bin/entrypoint
6278
ENTRYPOINT ["/usr/local/bin/entrypoint"]

0 commit comments

Comments
 (0)