[med-svn] [Git][med-team/ghmm][master] 3 commits: Try porting
Nilesh Patra (@nilesh)
gitlab at salsa.debian.org
Wed Jan 17 16:39:15 GMT 2024
Nilesh Patra pushed to branch master at Debian Med / ghmm
Commits:
d3f754e6 by Nilesh Patra at 2024-01-17T16:12:52+00:00
Try porting
- - - - -
c445059c by Nilesh Patra at 2024-01-17T16:17:39+00:00
Fixup dh-shlibs, remove atlas from builddeps
- - - - -
f0362e15 by Nilesh Patra at 2024-01-17T22:04:42+05:30
Fixup tests for the C counterpart
- - - - -
6 changed files:
- debian/control
- debian/patches/lapacke.patch
- debian/patches/series
- debian/rules
- + debian/tests/control
- + debian/tests/run-unit-test
Changes:
=====================================
debian/control
=====================================
@@ -10,8 +10,7 @@ Build-Depends: debhelper-compat (= 13),
pkg-config,
libxml2-dev,
libgsl-dev,
- libatlas-base-dev,
- liblapack-dev,
+ liblapacke-dev,
zlib1g-dev,
swig
Standards-Version: 4.6.2
=====================================
debian/patches/lapacke.patch
=====================================
@@ -6,7 +6,7 @@ FIXME: This is not sufficient and needs more changes inside the code
--- a/configure.in
+++ b/configure.in
-@@ -226,7 +226,7 @@ AC_ARG_ENABLE(atlas,
+@@ -226,7 +226,7 @@
dnl checking for clapack_dgetrf
AC_MSG_CHECKING([for clapack_dgetrf in -llapack])
@@ -15,7 +15,7 @@ FIXME: This is not sufficient and needs more changes inside the code
[
double a;
int ipiv;
-@@ -239,7 +239,7 @@ AC_ARG_ENABLE(atlas,
+@@ -239,7 +239,7 @@
dnl checking for clapack_dgetri
AC_MSG_CHECKING([for clapack_dgetri in -llapack])
@@ -24,7 +24,7 @@ FIXME: This is not sufficient and needs more changes inside the code
[
double a;
int ipiv;
-@@ -252,7 +252,7 @@ AC_ARG_ENABLE(atlas,
+@@ -252,7 +252,7 @@
dnl checking for clapack_dpotrf
AC_MSG_CHECKING([for clapack_dpotrf in -llapack])
@@ -33,6 +33,17 @@ FIXME: This is not sufficient and needs more changes inside the code
[
double a;
int x = clapack_dpotrf(0, 0, 0, &a, 0);
+@@ -312,8 +312,9 @@
+
+ LIBXML2_CFLAGS=`$PKGCONFIG --cflags libxml-2.0`
+ LIBXML2_LIBS=`$PKGCONFIG --libs libxml-2.0`
++LIBLAPACKE_LIBS=`$PKGCONFIG --libs lapacke`
+
+-LIBS="$LIBS $LIBXML2_LIBS"
++LIBS="$LIBS $LIBXML2_LIBS $LIBLAPACKE_LIBS"
+ CFLAGS="$CFLAGS $LIBXML2_CFLAGS"
+
+ dnl final configuration
--- a/ghmm/matrixop.c
+++ b/ghmm/matrixop.c
@@ -45,7 +45,7 @@
@@ -44,7 +55,7 @@ FIXME: This is not sufficient and needs more changes inside the code
#endif
/*============================================================================*/
-@@ -99,7 +99,7 @@ int ighmm_invert_det(double *sigmainv, d
+@@ -99,7 +99,7 @@
memcpy(sigmainv, cov, length * length * sizeof *cov);
/* perform in-place LU factorization of covariance matrix */
@@ -53,7 +64,7 @@ FIXME: This is not sufficient and needs more changes inside the code
/* determinant */
sign = 1;
-@@ -112,7 +112,7 @@ int ighmm_invert_det(double *sigmainv, d
+@@ -112,7 +112,7 @@
*det = det_tmp * sign;
/* use the LU factorization to get inverse */
@@ -62,12 +73,12 @@ FIXME: This is not sufficient and needs more changes inside the code
free(ipiv);
#else
-@@ -235,7 +235,7 @@ int ighmm_cholesky_decomposition (double
+@@ -235,7 +235,7 @@
int info;
/* copy cov. matrix entries to result matrix, the rest is done in-place */
memcpy(sigmacd, cov, dim * dim * sizeof *cov);
- info = clapack_dpotrf(CblasRowMajor, CblasUpper, dim, sigmacd, dim);
-+ info = LAPACK_dpotrf(LAPACK_ROW_MAJOR, LAPACK_UPPER, dim, sigmacd, dim);
++ info = LAPACKE_dpotrf(LAPACK_ROW_MAJOR, 'U', dim, sigmacd, dim);
#else
int row, j, k;
double sum;
=====================================
debian/patches/series
=====================================
@@ -3,6 +3,6 @@ pythonpaths.patch
fix_libxml2_config.patch
2to3.patch
python3_build_system.patch
-#lapacke.patch
+lapacke.patch
python3_syntax.patch
# setuptools.patch
=====================================
debian/rules
=====================================
@@ -28,6 +28,7 @@ override_dh_install:
--devunversioned \
--exclude-la \
--override s/libgsl23-dev/libgsl-dev/ \
+ --override s/liblapacke3-dev/liblapacke-dev/ \
--movedev debian/tmp/usr/include usr \
debian/tmp/usr/lib/*/*.so
cd $(CURDIR)/debian/ghmm/usr/bin/ && mv cluster ghmm-cluster
=====================================
debian/tests/control
=====================================
@@ -0,0 +1,3 @@
+Tests: run-unit-test
+Depends: @, liblapacke-dev
+Restrictions: allow-stderr
=====================================
debian/tests/run-unit-test
=====================================
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+pkg=ghmm
+
+if [ "$AUTOPKGTEST_TMP" = "" ]; then
+
+ AUTOPKGTEST_TMP=`mktemp -d /tmp/${pkg}-test.XXXX`
+ trap "rm -rf $AUTOPKG_TMP" 0 INT QUIT ABRT PIPE TERM
+
+fi
+
+cp debian/tests/ghmm_test.c $AUTOPKGTEST_TMP
+cd $AUTOPKGTEST_TMP
+
+gcc -c ghmm_test.c -o ghmm_test.o -I/usr/include/ghmm
+gcc ghmm_test.o -o ghmm_test -lghmm -llapack
+
+./ghmm_test
View it on GitLab: https://salsa.debian.org/med-team/ghmm/-/compare/f1691f8f85c66e0c1d3e03f85f22d3fec6ab26c5...f0362e15fa9fa4cc629ad6a3d5879fdaa2b119a0
--
View it on GitLab: https://salsa.debian.org/med-team/ghmm/-/compare/f1691f8f85c66e0c1d3e03f85f22d3fec6ab26c5...f0362e15fa9fa4cc629ad6a3d5879fdaa2b119a0
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/20240117/b799a16b/attachment-0001.htm>
More information about the debian-med-commit
mailing list