tech-pkg archive

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

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



On Sun, May 23, 2021 at 10:46:22PM +0200, Dr. Thomas Orgis wrote:
> 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/bsd.prefs.mk"
> +# At least on Linux, -fopenmp is available easily.
> +.if ${OPSYS} != "Linux"
>  MAKE_ENV+=	SKLEARN_NO_OPENMP=1
> +.endif
>  
>  USE_LANGUAGES=	c c++ fortran
>  
> 
> 
> (A PKGREVISION needed for that?)

I'm confused why there is no matching buildlink3.mk include for the
openmp package.

If openmp has portability issues - some packages have 'available.mk'
files that collect the restriction in one place.
 Thomas


Home | Main Index | Thread Index | Old Index