[med-svn] [Git][med-team/mmseqs2][master] 5 commits: Install binaries only in the mmseqs2 binary package

Michael R. Crusoe gitlab at salsa.debian.org
Fri Apr 24 21:22:24 BST 2020



Michael R. Crusoe pushed to branch master at Debian Med / mmseqs2


Commits:
6512ceb9 by Michael R. Crusoe at 2020-04-24T10:54:29+02:00
Install binaries only in the mmseqs2 binary package

not also the mmseqs2-examples binary package

- - - - -
b65c534d by Michael R. Crusoe at 2020-04-24T11:03:07+02:00
Report the Debian package version instead of "GITDIR-NOTFOUND"

- - - - -
e5ae3d4c by Michael R. Crusoe at 2020-04-24T16:42:50+02:00
Small tweak to simde patch

- - - - -
1144f313 by Michael R. Crusoe at 2020-04-24T21:52:00+02:00
Use a newer libsimde-dev that fixes a bug found by this package

- - - - -
c274189a by Michael R. Crusoe at 2020-04-24T22:21:22+02:00
release 11-e1a1c+ds-2 to unstable

- - - - -


4 changed files:

- debian/changelog
- debian/control
- debian/patches/simde
- debian/rules


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,14 @@
+mmseqs2 (11-e1a1c+ds-2) unstable; urgency=medium
+
+  * Team upload.
+  * Install binaries only in the mmseqs2 binary package, not also the
+    mmseqs2-examples binary package
+  * Report the Debian package version instead of "GITDIR-NOTFOUND"
+  * Small tweak to simde patch
+  * Use a newer libsimde-dev that fixes a bug found by this package
+
+ -- Michael R. Crusoe <michael.crusoe at gmail.com>  Fri, 24 Apr 2020 22:21:06 +0200
+
 mmseqs2 (11-e1a1c+ds-1) unstable; urgency=medium
 
   * Team upload.


=====================================
debian/control
=====================================
@@ -3,13 +3,13 @@ Maintainer: Debian Med Packaging Team <debian-med-packaging at lists.alioth.debian.
 Uploaders: Shayan Doust <hello at shayandoust.me>
 Section: science
 Priority: optional
-Build-Depends: debhelper-compat (= 12),
-               cmake,
-               libgzstream-dev,
-               libzstd-dev,
-               zlib1g-dev,
-               libbz2-dev,
-               libsimde-dev
+Build-Depends: debhelper-compat (= 12)
+Build-Depends-arch: cmake,
+                    libgzstream-dev,
+                    libzstd-dev,
+                    zlib1g-dev,
+                    libbz2-dev,
+                    libsimde-dev (>= 0.0.0.git.20200424)
 Standards-Version: 4.5.0
 Vcs-Browser: https://salsa.debian.org/med-team/mmseqs2
 Vcs-Git: https://salsa.debian.org/med-team/mmseqs2.git


=====================================
debian/patches/simde
=====================================
@@ -55,6 +55,24 @@ Subject: Enable building on non-x86 and less than SSE4.1
  
  #ifdef AVX512
  #include <zmmintrin.h.h> // AVX512
+@@ -164,7 +161,7 @@
+ // integer support  (usable with AVX2)
+ #ifndef SIMD_INT
+ #define SIMD_INT
+-#include <immintrin.h> // AVX
++#include <simde/x86/avx2.h>
+ #define ALIGN_INT           AVX2_ALIGN_INT
+ #define VECSIZE_INT         AVX2_VECSIZE_INT
+ //function header
+@@ -231,7 +228,7 @@
+ #endif //AVX2
+ 
+ #ifdef AVX
+-#include <immintrin.h> // AVX
++#include <simde/x86/avx.h>
+ // double support (usable with AVX1)
+ #ifndef SIMD_DOUBLE
+ #define SIMD_DOUBLE
 @@ -284,11 +281,9 @@
  #endif //AVX_SUPPORT
  
@@ -76,15 +94,56 @@ Subject: Enable building on non-x86 and less than SSE4.1
  
  // float support
  #ifndef SIMD_FLOAT
-@@ -395,7 +389,6 @@
+@@ -395,40 +389,7 @@
  #define simdi32_i2f(x) 	    _mm_cvtepi32_ps(x)  // convert integer to s.p. float
  #define simdi_i2fcast(x)    _mm_castsi128_ps(x)
  #endif //SIMD_INT
 -#endif //SSE
+-
+-#ifdef NEON
+-inline uint16_t simd_hmax16(const __m128i buffer) {
+-    uint16x4_t tmp;
+-    tmp = vmax_u16(vget_low_u16(vreinterpretq_u16_m128i(buffer)), vget_high_u16(vreinterpretq_u16_m128i(buffer)));
+-    tmp = vpmax_u16(tmp, tmp);
+-    tmp = vpmax_u16(tmp, tmp);
+-    return vget_lane_u16(tmp, 0);
+-}
+-
+-inline uint8_t simd_hmax8(const __m128i buffer) {
+-    uint8x8_t tmp;
+-    tmp = vmax_u8(vget_low_u8(vreinterpretq_u8_m128i(buffer)), vget_high_u8(vreinterpretq_u8_m128i(buffer)));
+-    tmp = vpmax_u8(tmp, tmp);
+-    tmp = vpmax_u8(tmp, tmp);
+-    tmp = vpmax_u8(tmp, tmp);
+-    return vget_lane_u8(tmp, 0);
+-}
+-#if 0
+-template <typename F>
+-inline F simd_hmax(const F * in, unsigned int n);
+-
+-inline uint16_t simd_hmax16(const __m128i buffer) {
+-    SIMDVec* tmp = (SIMDVec*)&buffer;
+-    return simd_hmax<uint16_t>((uint16_t*)tmp->m128_u16, 8);
+-}
  
- #ifdef NEON
- inline uint16_t simd_hmax16(const __m128i buffer) {
-@@ -488,7 +481,6 @@
+-inline uint8_t simd_hmax8(const __m128i buffer) {
+-    SIMDVec* tmp = (SIMDVec*)&buffer;
+-    return simd_hmax<uint8_t>((uint8_t*)tmp->m128_u8, 16);
+-}
+-#endif
+-#else
+ inline uint16_t simd_hmax16(const __m128i buffer)
+ {
+     __m128i tmp1 = _mm_subs_epu16(_mm_set1_epi16((short)65535), buffer);
+@@ -443,7 +404,6 @@
+     __m128i tmp3 = _mm_minpos_epu16(tmp2);
+     return (int8_t)(255 -(int8_t) _mm_cvtsi128_si32(tmp3));
+ }
+-#endif
+ 
+ #ifdef AVX2
+ inline uint16_t simd_hmax16_avx(const __m256i buffer){
+@@ -488,7 +448,6 @@
      return 0;
  }
  #else
@@ -92,7 +151,7 @@ Subject: Enable building on non-x86 and less than SSE4.1
  inline unsigned short extract_epi16(__m128i v, int pos) {
      switch(pos){
          case 0: return _mm_extract_epi16(v, 0);
-@@ -503,7 +495,6 @@
+@@ -503,7 +462,6 @@
      return 0;
  }
  #endif
@@ -100,7 +159,7 @@ Subject: Enable building on non-x86 and less than SSE4.1
  
  
  /* horizontal max */
-@@ -608,7 +599,6 @@
+@@ -608,7 +566,6 @@
  //
  //
  //TODO fix this
@@ -108,7 +167,7 @@ Subject: Enable building on non-x86 and less than SSE4.1
      float __attribute__((aligned(16))) res;
      __m128 P; // query 128bit SSE2 register holding 4 floats
      __m128 R;// result
-@@ -637,7 +627,6 @@
+@@ -637,7 +594,6 @@
      R = _mm_add_ps(R,P);
      _mm_store_ss(&res, R);
      return res;
@@ -150,20 +209,19 @@ Subject: Enable building on non-x86 and less than SSE4.1
  if (CMAKE_COMPILER_IS_CLANG)
 --- mmseqs2.orig/src/prefiltering/UngappedAlignment.cpp
 +++ mmseqs2/src/prefiltering/UngappedAlignment.cpp
-@@ -71,12 +71,8 @@
-     simd_int vscore        = simdi_setzero();
+@@ -72,11 +72,9 @@
      simd_int vMaxScore     = simdi_setzero();
      const simd_int vBias   = simdi8_set(bias);
--#ifndef AVX2
+ #ifndef AVX2
 -    #ifdef SSE
      const simd_int sixten  = simdi8_set(16);
      const simd_int fiveten = simdi8_set(15);
--#endif
+ #endif
 -#endif
      for(unsigned int pos = 0; pos < seqLen; pos++){
          simd_int template01 = simdi_load((simd_int *)&dbSeq[pos*VECSIZE_INT*4]);
  #ifdef AVX2
-@@ -85,7 +81,7 @@
+@@ -85,7 +83,7 @@
          //        __m256i score_vec_8bit = _mm256_shuffle_epi8(score_matrix_vec01, template01);
          //        __m256i lookup_mask01  = _mm256_cmpgt_epi8(sixten, template01); // 16 > t
          //        score_vec_8bit = _mm256_and_si256(score_vec_8bit, lookup_mask01);
@@ -172,7 +230,7 @@ Subject: Enable building on non-x86 and less than SSE4.1
          // each position has 32 byte
          // 20 scores and 12 zeros
          // load score 0 - 15
-@@ -96,16 +92,8 @@
+@@ -96,16 +94,8 @@
          // _mm_shuffle_epi8
          // for i ... 16
          //   score01[i] = score_matrix_vec01[template01[i]%16]
@@ -189,7 +247,7 @@ Subject: Enable building on non-x86 and less than SSE4.1
          // t[i] < 16 => 0 - 15
          // example: template01: 02 15 12 18 < 16 16 16 16 => FF FF FF 00
          __m128i lookup_mask01 = _mm_cmplt_epi8(template01, sixten);
-@@ -292,7 +280,7 @@
+@@ -292,7 +282,7 @@
      EXTRACT_AVX(24);  EXTRACT_AVX(25);  EXTRACT_AVX(26);  EXTRACT_AVX(27);
      EXTRACT_AVX(28);  EXTRACT_AVX(29);  EXTRACT_AVX(30);  EXTRACT_AVX(31);
  #undef EXTRACT_AVX
@@ -283,7 +341,12 @@ Subject: Enable building on non-x86 and less than SSE4.1
  				tmp = _mm_andnot_si128(mask, tmp);
  				_mm_storeu_si128((__m128i*)((uint8_t*)s + t), tmp);
  			}
-@@ -186,22 +166,10 @@
+@@ -181,27 +161,14 @@
+ 		x1_ = _mm_cvtsi32_si128(x1);
+ 		v1_ = _mm_cvtsi32_si128(v1);
+ 		st_ = st / 16, en_ = en / 16;
+-		assert(en_ - st_ + 1 <= n_col_);
+ 		if (!with_cigar) { // score only
  			for (t = st_; t <= en_; ++t) {
  				__m128i z, a, b, xt1, vt1, ut, tmp;
  				__dp_code_block1;
@@ -306,7 +369,7 @@ Subject: Enable building on non-x86 and less than SSE4.1
  			}
  		} else if (!(flag&KSW_EZ_RIGHT)) { // gap left-alignment
  			__m128i *pr = p + r * n_col_ - st_;
-@@ -210,16 +178,9 @@
+@@ -210,16 +177,9 @@
  				__m128i d, z, a, b, xt1, vt1, ut, tmp;
  				__dp_code_block1;
  				d = _mm_and_si128(_mm_cmpgt_epi8(a, z), flag1_); // d = a > z? 1 : 0
@@ -323,7 +386,7 @@ Subject: Enable building on non-x86 and less than SSE4.1
  				__dp_code_block2;
  				tmp = _mm_cmpgt_epi8(a, zero_);
  				_mm_store_si128(&x[t], _mm_and_si128(tmp, a));
-@@ -236,16 +197,9 @@
+@@ -236,16 +196,9 @@
  				__m128i d, z, a, b, xt1, vt1, ut, tmp;
  				__dp_code_block1;
  				d = _mm_andnot_si128(_mm_cmpgt_epi8(z, a), flag1_); // d = z > a? 0 : 1
@@ -340,7 +403,7 @@ Subject: Enable building on non-x86 and less than SSE4.1
  				__dp_code_block2;
  				tmp = _mm_cmpgt_epi8(zero_, a);
  				_mm_store_si128(&x[t], _mm_andnot_si128(tmp, a));
-@@ -276,13 +230,8 @@
+@@ -276,13 +229,8 @@
  					_mm_storeu_si128((__m128i*)&H[t], H1);
  					t_ = _mm_set1_epi32(t);
  					tmp = _mm_cmpgt_epi32(H1, max_H_);
@@ -354,8 +417,41 @@ Subject: Enable building on non-x86 and less than SSE4.1
  				}
  				_mm_storeu_si128((__m128i*)HH, max_H_);
  				_mm_storeu_si128((__m128i*)tt, max_t_);
-@@ -334,4 +283,3 @@
+@@ -334,4 +282,3 @@
  		kfree(km, mem2); kfree(km, off);
  	}
  }
 -#endif // __SSE2__
+--- mmseqs2.orig/src/commons/Util.cpp
++++ mmseqs2/src/commons/Util.cpp
+@@ -620,18 +620,10 @@
+ #undef c
+ 
+     // use _mm_shuffle_epi8 to look up reverse complement
+-#ifdef NEON
+-    kmer1 = vreinterpretq_m128i_u8(vqtbl1q_u8(vreinterpretq_u8_m128i(lookup1),vreinterpretq_u8_m128i(kmer1)));
+-#else
+     kmer1 =_mm_shuffle_epi8(lookup1, kmer1);
+-#endif
+ 
+ 
+-#ifdef NEON
+-    kmer2 = vreinterpretq_m128i_u8(vqtbl1q_u8(vreinterpretq_u8_m128i(lookup2),vreinterpretq_u8_m128i(kmer2)));
+-#else
+     kmer2 = _mm_shuffle_epi8(lookup2, kmer2);
+-#endif
+ 
+ 
+     // _mm_or_si128: bitwise OR
+@@ -639,11 +631,7 @@
+ 
+     // set upper 8 bytes to 0 and revert order of lower 8 bytes
+ 
+-#ifdef NEON
+-    x = vreinterpretq_m128i_u8(vqtbl1q_u8(vreinterpretq_u8_m128i(x),vreinterpretq_u8_m128i(upper)));
+-#else
+     x = _mm_shuffle_epi8(x, upper);
+-#endif
+ 
+     // shift out the unused nucleotide positions (1 <= k <=32 )
+     // broadcast 128 bit to 64 bit


=====================================
debian/rules
=====================================
@@ -17,24 +17,26 @@ libexecdir=$(prefix)/lib/$(DEB_SOURCE)
 %:
 	dh $@
 
-override_dh_auto_configure:
+override_dh_auto_configure-arch:
 ifeq (amd64,$(DEB_HOST_ARCH))
 	for SIMD in avx2 avx sse4.1 ssse3 sse3 sse2 ; do \
 	        export CXXFLAGS="$(CXXFLAGS) -m$${SIMD}" && export CFLAGS="$(CFLAGS) -m$${SIMD}" && \
-	        dh_auto_configure --builddirectory build_$${SIMD} -- -DEXE_SUFFIX=-$${SIMD} ; \
+	        dh_auto_configure --builddirectory build_$${SIMD} -- -DEXE_SUFFIX=-$${SIMD} -DVERSION_OVERRIDE=$(DEB_VERSION) ; \
 	done
 else ifeq (i386,$(DEB_HOST_ARCH))
 	for SIMD in ssse3 sse3 sse2 ; do \
 	        export CXXFLAGS="$(CXXFLAGS) -m$${SIMD}" && export CFLAGS="$(CFLAGS) -m$${SIMD}" && \
-	        dh_auto_configure --builddirectory build_$${SIMD} -- -DEXE_SUFFIX=-$${SIMD} ; \
+	        dh_auto_configure --builddirectory build_$${SIMD} -- -DEXE_SUFFIX=-$${SIMD} -DVERSION_OVERRIDE=$(DEB_VERSION) ; \
 	done
 	export CXXFLAGS="$(CXXFLAGS)" && export CFLAGS="$(CFLAGS)" && \
-		dh_auto_configure --builddirectory build_plain -- -DEXE_SUFFIX=-plain
+		dh_auto_configure --builddirectory build_plain -- -DEXE_SUFFIX=-plain -DVERSION_OVERRIDE=$(DEB_VERSION)
 else
-	dh_auto_configure
+	dh_auto_configure -- -DVERSION_OVERRIDE=$(DEB_VERSION)
 endif
 
-override_dh_auto_build:
+override_dh_auto_configure-indep:
+
+override_dh_auto_build-arch:
 ifeq (amd64,$(DEB_HOST_ARCH))
 	mkdir -p $(binprefix)
 	for SIMD in avx2 avx sse4.1 ssse3 sse3 sse2 ; do \
@@ -50,37 +52,41 @@ else
 	dh_auto_build
 endif
 
-override_dh_auto_install:
+override_dh_auto_build-indep:
+
+override_dh_auto_install-arch:
 ifeq (amd64,$(DEB_HOST_ARCH))
-	dh_install debian/bin/simd-dispatch /usr/lib/$(DEB_SOURCE)/
+	dh_install -pmmseqs2 debian/bin/simd-dispatch /usr/lib/$(DEB_SOURCE)/
 	for SIMD in avx2 avx sse4.1 ssse3 sse3 sse2 ; do \
 		dh_auto_install --builddirectory build_$${SIMD} ; \
 	done
-	dh_install usr/bin/mmseqs-* usr/bin/
+	dh_install -pmmseqs2 usr/bin/mmseqs-* usr/bin/
 	cd $(binprefix) \
 		&& for prog in mmseqs ; do \
 		ln -s ../lib/$(DEB_SOURCE)/simd-dispatch $${prog} ; done
 else ifeq (i386,$(DEB_HOST_ARCH))
-	dh_install debian/bin/simd-dispatch /usr/lib/$(DEB_SOURCE)/
+	dh_install -pmmseqs2 debian/bin/simd-dispatch /usr/lib/$(DEB_SOURCE)/
 	for SIMD in ssse3 sse3 sse2 ; do \
 	        dh_auto_install --builddirectory build_$${SIMD} ; \
 	done
 	dh_auto_install --builddirectory build_plain
-	dh_install usr/bin/mmseqs-* usr/bin/
+	dh_install -pmmseqs2 usr/bin/mmseqs-* usr/bin/
 	cd $(binprefix) \
 		&& for prog in mmseqs ; do \
 		ln -s ../lib/$(DEB_SOURCE)/simd-dispatch $${prog} ; done
 else
 	dh_auto_install
-	dh_install usr/bin/mmseqs usr/bin/
+	dh_install -pmmseqs2 usr/bin/mmseqs usr/bin/
 endif
 
+override_dh_auto_install-indep:
+
 override_dh_auto_clean:
 	dh_auto_clean
 	rm -Rf build-*
 
-override_dh_install:
-	dh_install
+override_dh_install-arch:
+	dh_install --arch
 	mkdir -p debian/mmseqs2/usr/lib/mmseqs2/test
 	cp src/test/*.index debian/mmseqs2/usr/lib/mmseqs2/test/
 	cp src/test/dataGap debian/mmseqs2/usr/lib/mmseqs2/test/
@@ -88,12 +94,17 @@ override_dh_install:
 	#cp -r obj-$(DEB_HOST_MULTIARCH)/src/test debian/mmseqs2/usr/lib/mmseqs2/
 
 	# We also remove unneeded files & folders like CMake
-	rm -r debian/mmseqs2/usr/lib/mmseqs2/test/CMakeFiles \
+	rm -rf debian/mmseqs2/usr/lib/mmseqs2/test/CMakeFiles \
 		debian/mmseqs2/usr/lib/mmseqs2/test/*.cmake \
-		debian/mmseqs2/usr/lib/mmseqs2/test/Makefile \
-		debian/mmseqs2-examples/usr/share/doc/mmseqs2/example-data/*.lib \
+		debian/mmseqs2/usr/lib/mmseqs2/test/Makefile
+
+override_dh_install-indep:
+	dh_install --indep
+
+	# We also remove unneeded files & folders like CMake
+	rm -rf debian/mmseqs2-examples/usr/share/doc/mmseqs2/example-data/*.lib \
 		debian/mmseqs2-examples/usr/share/doc/mmseqs2/example-data/CovSeqidQscPercMinDiag.out \
-		debian/mmseqs2-examples/usr/share/doc/mmseqs2/example-data/CovSeqidQscPercMinDiagTargetCov.out || true
+		debian/mmseqs2-examples/usr/share/doc/mmseqs2/example-data/CovSeqidQscPercMinDiagTargetCov.out
 
 override_dh_gencontrol:
 	dh_gencontrol -- -Vsimde:Built-Using="$(shell dpkg-query -f '$${source:Package} (= $${source:Version}), ' -W "libsimde-dev")"



View it on GitLab: https://salsa.debian.org/med-team/mmseqs2/-/compare/e3a820ccee85263953c989e2ca31fd1b14c8d06d...c274189adac033cda0e895146c1f92b6996df313

-- 
View it on GitLab: https://salsa.debian.org/med-team/mmseqs2/-/compare/e3a820ccee85263953c989e2ca31fd1b14c8d06d...c274189adac033cda0e895146c1f92b6996df313
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20200424/49d3ed8d/attachment-0001.html>


More information about the debian-med-commit mailing list