biology/mmseqs2: Enable at least SSE2 by default
Hangs when built with clang and minimal optimizations, so build with GCC temporarily. Upstream is investigating.
This commit is contained in:
parent
4e585706c9
commit
b8bf1cfd41
6 changed files with 90 additions and 4 deletions
|
@ -1,5 +1,6 @@
|
|||
PORTNAME= MMseqs2
|
||||
DISTVERSION= 13-45111
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= biology
|
||||
|
||||
MAINTAINER= jwb@FreeBSD.org
|
||||
|
@ -8,15 +9,34 @@ COMMENT= Ultra fast and sensitive sequence search and clustering suite
|
|||
LICENSE= GPLv3
|
||||
LICENSE_FILE= ${WRKSRC}/LICENSE.md
|
||||
|
||||
BROKEN_i386= https://github.com/soedinglab/MMseqs2/issues/418
|
||||
|
||||
LIB_DEPENDS= libzstd.so:archivers/zstd
|
||||
|
||||
USES= cmake perl5 shebangfix
|
||||
USE_GITHUB= yes
|
||||
USE_PERL5= build
|
||||
|
||||
SHEBANG_GLOB= *.sh
|
||||
|
||||
USE_GITHUB= yes
|
||||
GH_ACCOUNT= soedinglab
|
||||
|
||||
CMAKE_ARGS+= -DUSE_SYSTEM_ZSTD:BOOL=ON
|
||||
LDFLAGS+= -lpthread
|
||||
|
||||
PLIST_FILES= bin/mmseqs ${DATADIR}/bash-completion.sh
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
# Hangs when built with clang and SSE or x86-64 only. Works fine with
|
||||
# -march=native. Upstream is investigating. To build fully optimized,
|
||||
# non-portable binary with clang: env CFLAGS='-O2 -march=native' make
|
||||
.if ${ARCH} == "amd64" && empty(CFLAGS:M*march=native*)
|
||||
USE_GCC= yes
|
||||
# Need at least SSE2 for decent performance. x86-64 groups SSE2 with other
|
||||
# common features in low-end AMD64 CPUs.
|
||||
CFLAGS+= -march=x86-64
|
||||
.endif
|
||||
|
||||
post-patch:
|
||||
@${REINPLACE_CMD} -e 's|MMSEQS_HOME/util|${DATADIR}|g' \
|
||||
${WRKSRC}/src/commons/Application.cpp
|
||||
|
@ -24,4 +44,4 @@ post-patch:
|
|||
post-stage:
|
||||
${MV} ${STAGEDIR}${PREFIX}/util ${STAGEDIR}${DATADIR}
|
||||
|
||||
.include <bsd.port.mk>
|
||||
.include <bsd.port.post.mk>
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
TIMESTAMP = 1624543564
|
||||
TIMESTAMP = 1624667730
|
||||
SHA256 (soedinglab-MMseqs2-13-45111_GH0.tar.gz) = 6444bb682ebf5ced54b2eda7a301fa3e933c2a28b7661f96ef5bdab1d53695a2
|
||||
SIZE (soedinglab-MMseqs2-13-45111_GH0.tar.gz) = 10196433
|
||||
|
|
21
biology/mmseqs2/files/patch-data_workflow_createtaxdb.sh
Normal file
21
biology/mmseqs2/files/patch-data_workflow_createtaxdb.sh
Normal file
|
@ -0,0 +1,21 @@
|
|||
--- data/workflow/createtaxdb.sh.orig 2021-06-25 01:33:07 UTC
|
||||
+++ data/workflow/createtaxdb.sh
|
||||
@@ -27,6 +27,8 @@ STRATEGY=""
|
||||
if hasCommand aria2c; then STRATEGY="$STRATEGY ARIA"; fi
|
||||
if hasCommand curl; then STRATEGY="$STRATEGY CURL"; fi
|
||||
if hasCommand wget; then STRATEGY="$STRATEGY WGET"; fi
|
||||
+# Part of FreeBSD base, need not be installed separately
|
||||
+if hasCommand fetch; then STRATEGY="$STRATEGY FETCH"; fi
|
||||
if [ "$STRATEGY" = "" ]; then
|
||||
fail "No download tool found in PATH. Please install aria2c, curl or wget."
|
||||
fi
|
||||
@@ -47,6 +49,9 @@ downloadFile() {
|
||||
;;
|
||||
WGET)
|
||||
wget -O "$OUTPUT" "$URL" && return 0
|
||||
+ ;;
|
||||
+ FETCH)
|
||||
+ fetch -o "$OUTPUT" "$URL" && return 0
|
||||
;;
|
||||
esac
|
||||
done
|
21
biology/mmseqs2/files/patch-data_workflow_databases.sh
Normal file
21
biology/mmseqs2/files/patch-data_workflow_databases.sh
Normal file
|
@ -0,0 +1,21 @@
|
|||
--- data/workflow/databases.sh.orig 2021-06-25 01:34:08 UTC
|
||||
+++ data/workflow/databases.sh
|
||||
@@ -27,6 +27,8 @@ STRATEGY=""
|
||||
if hasCommand aria2c; then STRATEGY="$STRATEGY ARIA"; fi
|
||||
if hasCommand curl; then STRATEGY="$STRATEGY CURL"; fi
|
||||
if hasCommand wget; then STRATEGY="$STRATEGY WGET"; fi
|
||||
+# Part of FreeBSD base, need not be installed separately
|
||||
+if hasCommand fetch; then STRATEGY="$STRATEGY FETCH"; fi
|
||||
if [ "$STRATEGY" = "" ]; then
|
||||
fail "No download tool found in PATH. Please install aria2c, curl or wget."
|
||||
fi
|
||||
@@ -47,6 +49,9 @@ downloadFile() {
|
||||
;;
|
||||
WGET)
|
||||
wget -O "$OUTPUT" "$URL" && return 0
|
||||
+ ;;
|
||||
+ FETCH)
|
||||
+ fetch -o "$OUTPUT" "$URL" && return 0
|
||||
;;
|
||||
esac
|
||||
done
|
11
biology/mmseqs2/files/patch-src_commons_DBReader.cpp
Normal file
11
biology/mmseqs2/files/patch-src_commons_DBReader.cpp
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- src/commons/DBReader.cpp.orig 2021-06-25 22:40:36 UTC
|
||||
+++ src/commons/DBReader.cpp
|
||||
@@ -1004,7 +1004,7 @@ void DBReader<T>::setSequentialAdvice() {
|
||||
#ifdef HAVE_POSIX_MADVISE
|
||||
for(size_t i = 0; i < dataFileCnt; i++){
|
||||
size_t dataSize = dataSizeOffset[i+1] - dataSizeOffset[i];
|
||||
- if (posix_madvise (dataFiles[i], dataSize, POSIX_MADV_SEQUENTIAL) != 0){
|
||||
+ if (dataSize > 0 && posix_madvise (dataFiles[i], dataSize, POSIX_MADV_SEQUENTIAL) != 0){
|
||||
Debug(Debug::ERROR) << "posix_madvise returned an error " << dataFileName << "\n";
|
||||
}
|
||||
}
|
13
biology/mmseqs2/pkg-message
Normal file
13
biology/mmseqs2/pkg-message
Normal file
|
@ -0,0 +1,13 @@
|
|||
[
|
||||
{ type: install
|
||||
message: <<EOM
|
||||
|
||||
MMseqs2 can benefit greatly from advanced CPU features such as AVX.
|
||||
Consider setting additional optimizations such as -march=native (e.g.
|
||||
in make.conf) and reinstalling from source via
|
||||
|
||||
cd ${PORTSDIR}/biology/mmseqs2 && make install
|
||||
|
||||
EOM
|
||||
}
|
||||
]
|
Loading…
Reference in a new issue