[med-svn] [Git][med-team/hyphy][master] 3 commits: Refresh patches

Michael R. Crusoe gitlab at salsa.debian.org
Sat Jan 30 09:39:00 GMT 2021



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


Commits:
400d3881 by Michael R. Crusoe at 2021-01-30T10:01:06+01:00
Refresh patches

- - - - -
386e6c64 by Michael R. Crusoe at 2021-01-30T10:02:29+01:00
debian/rules: build avx and sse3 version for amd64

- - - - -
bd2e5ebf by Michael R. Crusoe at 2021-01-30T10:03:12+01:00
routine-update: Ready to upload to unstable

- - - - -


5 changed files:

- + debian/bin/simd-dispatch
- debian/changelog
- debian/patches/rm_arch_specific_flags.patch
- debian/patches/use_debian_sqlite.patch
- debian/rules


Changes:

=====================================
debian/bin/simd-dispatch
=====================================
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+DIR=/usr/lib/hyphy/bin
+EXE=${DIR}/$(basename "$0")
+CMDARGS="$@"
+
+test_and_run () {
+        if lscpu | grep -q "$1" && [ -x "${EXE}-$1" ]; then
+		echo "Using ${EXE}-$1" 1>&2
+                "${EXE}-$1" "${CMDARGS}"
+                exit
+        fi
+}
+
+
+for SIMD in avx sse3 ; do test_and_run ${SIMD} ; done
+
+# fallback to plain option
+echo "Using $EXE without SIMD support"
+"${EXE}" "${CMDARGS}" 1>&2


=====================================
debian/changelog
=====================================
@@ -1,3 +1,11 @@
+hyphy (2.5.27+dfsg-2) unstable; urgency=medium
+
+  * Team upload.
+  * Refresh patches.
+  * debian/rules: build avx and sse3 version for amd64
+
+ -- Michael R. Crusoe <crusoe at debian.org>  Sat, 30 Jan 2021 10:03:12 +0100
+
 hyphy (2.5.27+dfsg-1) unstable; urgency=medium
 
   * New upstream version


=====================================
debian/patches/rm_arch_specific_flags.patch
=====================================
@@ -7,7 +7,7 @@ Last-Update: 2020-09-28
 This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
 --- hyphy.orig/CMakeLists.txt
 +++ hyphy/CMakeLists.txt
-@@ -154,9 +154,8 @@
+@@ -181,9 +181,8 @@
      #set(DEFAULT_COMPILE_FLAGS "${DEFAULT_COMPILE_FLAGS}  -fopt-info")
  
      if(NOAVX)
@@ -18,7 +18,16 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
          else(NOSSE3)
              PCL_CHECK_FOR_SSE3()
              if(${HAVE_SSE3_EXTENSIONS})
-@@ -192,7 +191,7 @@
+@@ -194,7 +193,7 @@
+     else(NOAVX)
+        PCL_CHECK_FOR_AVX()
+        if(${HAVE_AVX_EXTENSIONS})
+-            set(DEFAULT_COMPILE_FLAGS "${DEFAULT_COMPILE_FLAGS} -march=native -mtune=native -mavx")
++            set(DEFAULT_COMPILE_FLAGS "${DEFAULT_COMPILE_FLAGS} -mavx")
+             add_definitions (-D_SLKP_USE_AVX_INTRINSICS)
+             PCL_CHECK_FOR_FMA3()
+             if (${HAVE_FMA3})
+@@ -219,7 +218,7 @@
      set(DEFAULT_COMPILE_FLAGS "-fsigned-char -O3 ")
      if(NOAVX)
          if(NOSSE3)
@@ -27,3 +36,12 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
          else(NOSSE3)
              PCL_CHECK_FOR_SSE3()
              if(${HAVE_SSE3_EXTENSIONS})
+@@ -230,7 +229,7 @@
+     else(NOAVX)
+         PCL_CHECK_FOR_AVX()
+         if(${HAVE_AVX_EXTENSIONS})
+-            set(DEFAULT_COMPILE_FLAGS "${DEFAULT_COMPILE_FLAGS} -march=native -mtune=native -mavx")
++            set(DEFAULT_COMPILE_FLAGS "${DEFAULT_COMPILE_FLAGS} -mavx")
+             add_definitions (-D_SLKP_USE_AVX_INTRINSICS)
+             PCL_CHECK_FOR_FMA3()
+             if (${HAVE_FMA3})


=====================================
debian/patches/use_debian_sqlite.patch
=====================================
@@ -4,10 +4,11 @@ Description: Use Debian packaged sqlite3
  - in src/lib/setup.py
 Reviewed-by: Étienne Mollier <etienne.mollier at mailoo.org>
 Last-Update: 2020-09-24
+Forwarded: not-needed
 
 --- hyphy.orig/CMakeLists.txt
 +++ hyphy/CMakeLists.txt
-@@ -119,12 +119,11 @@
+@@ -146,12 +146,11 @@
  file(GLOB SRC_CONTRIB src/contrib/*.cpp)
  
  set(SRC_LINK src/lib/link/THyPhy.cpp)
@@ -21,7 +22,7 @@ Last-Update: 2020-09-24
  set_source_files_properties(${SRC_CORE} ${SRC_NEW} {SRC_UTILS} PROPERTIES COMPILE_FLAGS "-Weffc++ -Wextra -Wall")
  
  #-------------------------------------------------------------------------------
-@@ -279,6 +278,35 @@
+@@ -313,6 +312,35 @@
      add_definitions (-D__HYPHYCURL__)
  endif(${CURL_FOUND} AND NOT APPLE)
  
@@ -57,7 +58,7 @@ Last-Update: 2020-09-24
  
  
  #-------------------------------------------------------------------------------
-@@ -313,11 +341,6 @@
+@@ -347,11 +375,6 @@
  )
  
  set_property(
@@ -69,7 +70,7 @@ Last-Update: 2020-09-24
      SOURCE src/core/calcnode2.cpp
      APPEND_STRING PROPERTY COMPILE_FLAGS " -fstrict-aliasing -funroll-loops"
  )
-@@ -337,7 +360,6 @@
+@@ -371,7 +394,6 @@
      src/core/include
      src/contrib
      src/lib/Link src/new/include


=====================================
debian/rules
=====================================
@@ -18,7 +18,13 @@ override_dh_auto_clean:
 	dh_auto_clean
 
 override_dh_auto_configure:
+ifeq (amd64,$(DEB_HOST_ARCH))
 	dh_auto_configure -- -DINSTALL_PREFIX=/usr -DNOAVX=ON -DNOSSE3=ON
+	dh_auto_configure --builddirectory obj_avx -- -DINSTALL_PREFIX=/usr -DNOAVX=OFF -DNOSSE3=OFF
+	dh_auto_configure --builddirectory obj_sse3 -- -DINSTALL_PREFIX=/usr -DNOAVX=ON -DNOSSE3=OFF
+else
+	dh_auto_configure -- -DINSTALL_PREFIX=/usr -DNOAVX=ON -DNOSSE3=ON
+endif
 
 override_dh_auto_build:
 	# convert a few ISO-8859-1 files to address national-encoding
@@ -27,9 +33,31 @@ override_dh_auto_build:
 	; do    iconv -f ISO-8859-1 -t UTF-8 < $${file} > "$${file}.new" \
 	;	mv "$${file}.new" "$${file}" \
 	; done
-	# no idea about the purpose of the dynamic library - executables are not simply linked against it
+ifeq (amd64,$(DEB_HOST_ARCH))
+	dh_auto_build -- MP MPI
+	dh_auto_build --builddirectory obj_avx -- MP MPI
+	dh_auto_build --builddirectory obj_sse3 -- MP MPI
+else
 	dh_auto_build -- MP MPI
-	# LIB
+endif
+
+override_dh_install:
+	dh_install
+ifeq (amd64,$(DEB_HOST_ARCH))
+	mkdir -p debian/hyphy-mpi/usr/lib/$(DEB_SOURCE)/bin
+	mkdir -p debian/hyphy-pt/usr/lib/$(DEB_SOURCE)/bin
+	cp obj_avx/HYPHYMPI debian/hyphy-mpi/usr/lib/$(DEB_SOURCE)/bin/HYPHYMPI-avx
+	cp obj_sse3/HYPHYMPI debian/hyphy-mpi/usr/lib/$(DEB_SOURCE)/bin/HYPHYMPI-sse3
+	cp obj_avx/hyphy debian/hyphy-pt/usr/lib/$(DEB_SOURCE)/bin/hyphy-avx
+	cp obj_sse3/hyphy debian/hyphy-pt/usr/lib/$(DEB_SOURCE)/bin/hyphy-sse3
+	dh_install -phyphy-common debian/bin/simd-dispatch /usr/lib/$(DEB_SOURCE)/bin
+	mv debian/hyphy-mpi/usr/bin/HYPHYMPI debian/hyphy-mpi/usr/lib/$(DEB_SOURCE)/bin/
+	mv debian/hyphy-pt/usr/bin/hyphy debian/hyphy-pt/usr/lib/$(DEB_SOURCE)/bin/
+	cd $(CURDIR)/debian/hyphy-mpi/usr/bin && \
+		ln -s ../lib/$(DEB_SOURCE)/bin/simd-dispatch HYPHYMPI
+	cd $(CURDIR)/debian/hyphy-pt/usr/bin && \
+		ln -s ../lib/$(DEB_SOURCE)/bin/simd-dispatch hyphy
+endif
 
 override_dh_auto_test:
 ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))



View it on GitLab: https://salsa.debian.org/med-team/hyphy/-/compare/335d827edf4ee4f2ae700bd95bd855ac4d44e76c...bd2e5ebf6c8f69c23ca8ff64ff3a87abfa8960de

-- 
View it on GitLab: https://salsa.debian.org/med-team/hyphy/-/compare/335d827edf4ee4f2ae700bd95bd855ac4d44e76c...bd2e5ebf6c8f69c23ca8ff64ff3a87abfa8960de
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/20210130/3392ba52/attachment-0001.html>


More information about the debian-med-commit mailing list