tech-pkg archive

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

math/py-scikit-learn with OPENMP, at least on Linux?


I noticed that scikit-learn is forcefully not build with OpenMP in
pkgsrc. At least on Linux, that's a no-brainer with the default
toolchain. It seems that folks on Darwin might have to install libomp
for clang … so I suggest to at least enable it for Linux, what I can
test. But maybe == Darwin would be more appropriate here?

It is really not appropriate to do machine learning with just one core
nowadays. OK to apply?

Index: Makefile
RCS file: /cvsroot/pkgsrc/math/py-scikit-learn/Makefile,v
retrieving revision 1.14
diff -u -r1.14 Makefile
--- Makefile	20 Apr 2021 21:48:14 -0000	1.14
+++ Makefile	23 May 2021 20:42:48 -0000
@@ -15,8 +15,11 @@
 DEPENDS+=	${PYPKGPREFIX}-scipy>=0.17.0:../../math/py-scipy
 TEST_DEPENDS+=	${PYPKGPREFIX}-test-runner-[0-9]*:../../devel/py-test-runner
-# XXX: OpenMP is not portable
+.include "../../mk/"
+# At least on Linux, -fopenmp is available easily.
+.if ${OPSYS} != "Linux"
 USE_LANGUAGES=	c c++ fortran

(A PKGREVISION needed for that?)

Alrighty then,

Dr. Thomas Orgis
HPC @ Universität Hamburg

Home | Main Index | Thread Index | Old Index