tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: hotfix for py-scipy (Re: Stumped on pytest issue)



On 12/27/23 07:49, Dr. Thomas Orgis wrote:
Am Wed, 27 Dec 2023 07:29:58 -0600
schrieb Jason Bacon <jtocino%gmx.com@localhost>:

Nothing's changed on my NetBSD 9 installation, even after my overnight
updates and successful pkg_chk run.  I still don't get proper blas linkage:

Yeah, sorry … something changed on my end. I have tested this and forgot:

Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/math/py-scipy/Makefile,v
retrieving revision 1.74
diff -u -r1.74 Makefile
--- Makefile	7 Dec 2023 20:47:13 -0000	1.74
+++ Makefile	27 Dec 2023 13:45:07 -0000
@@ -53,10 +53,11 @@
LDFLAGS.Darwin+= -headerpad_max_install_names -# Same as for py-numpy.
+# Same as for py-numpy. Or maybe not. Vendored superlu needs
+# direct linking with -lblas, not -lcblas.
  BLAS_ACCEPTED=		${_BLAS_TYPES}
  BLAS_C_INTERFACE=	yes
-WHEEL_ARGS+=		-Csetup-args=-Dblas=${CBLAS_PC}
+WHEEL_ARGS+=		-Csetup-args=-Dblas=${BLAS_PC}
  WHEEL_ARGS+=		-Csetup-args=-Dlapack=${LAPACK_PC}
PYTHON_VERSIONS_INCOMPATIBLE= 27 38


It _seems_ that scipy doesn't actually call CBLAS API, as opposed to
numpy. Observe:

$ find /data/pkg/lib/python3.11/site-packages/scipy/ -name '*.so' | xargs -L 1 nm -g |grep cblas_
$ find /data/pkg/lib/python3.11/site-packages/numpy/ -name '*.so' | xargs -L 1 nm -g |grep cblas_
                  U cblas_caxpy
                  U cblas_cdotc_sub
                  U cblas_cdotu_sub
                  U cblas_cgemm
                  U cblas_cgemv
                  U cblas_csyrk
                  U cblas_daxpy
                  U cblas_ddot
                  U cblas_dgemm
                  U cblas_dgemv
                  U cblas_dsyrk
                  U cblas_saxpy
                  U cblas_sdot
                  U cblas_sgemm
                  U cblas_sgemv
                  U cblas_ssyrk
                  U cblas_zaxpy
                  U cblas_zdotc_sub
                  U cblas_zdotu_sub
                  U cblas_zgemm
                  U cblas_zgemv
                  U cblas_zsyrk

So the above could be a hotfix for the current version of scipy.

The wip/hmmlearn package will have to be fixed then, but has time for
after the branching.


Alrighty then,

Thomas


"Seems" does not fill me with confidence. ;-) Maybe leave the cblas linkage in as well, and add a comment that it's probably not be needed? We can test that hypothesis thoroughly after the branch.

Home | Main Index | Thread Index | Old Index