svn commit: r414432 - head/math/openblas

Cy Schubert Cy.Schubert at komquats.com
Tue May 3 13:20:03 UTC 2016


In message <201605020528.u425S3iW054408 at repo.freebsd.org>, Kurt Jaeger 
writes:
> Author: pi
> Date: Mon May  2 05:28:03 2016
> New Revision: 414432
> URL: https://svnweb.freebsd.org/changeset/ports/414432
> 
> Log:
>   math/openblas: fix poudriere builds: setting DYNAMIC_ARCH when BULK is defi
> ned
>   
>   PR:		209190
>   Submitted by:	Joseph Mingrone <jrm at ftfl.ca>
>   Approved by:	<phd_kimberlite at yahoo.co.jp> (maintainer)
> 
> Modified:
>   head/math/openblas/Makefile
> 
> Modified: head/math/openblas/Makefile
> =============================================================================
> =
> --- head/math/openblas/Makefile	Mon May  2 05:22:58 2016	(r41443
> 1)
> +++ head/math/openblas/Makefile	Mon May  2 05:28:03 2016	(r41443
> 2)
> @@ -40,7 +40,7 @@ OPENMP_DESC=		Use OpenMP for threading
>  AVX_DESC=		Support Advanced Vector Extensions (AVX)
>  AVX2_DESC=		Support Advanced Vector Extensions 2 (AVX2)
>  
> -.if defined(PACKAGE_BUILDING)
> +.if defined(BATCH) || defined(PACKAGE_BUILDING)
>  OPTIONS_DEFAULT=	DYNAMIC_ARCH
>  .endif
>  
> @@ -76,11 +76,6 @@ USES+=		compiler:openmp
>  BUILDFLAGS_THREAD+=	USE_OPENMP=1
>  .endif
>  
> -.if ${PORT_OPTIONS:MQUAD_PRECISION}
> -BROKEN=		QUAD_PRECISION is broken; please disable this option
> -BUILDFLAGS+=	QUAD_PRECISION=1
> -.endif
> -
>  .if ! ${PORT_OPTIONS:MAVX}
>  BUILDFLAGS+=	NO_AVX=1
>  .endif
> @@ -123,7 +118,7 @@ post-patch:
>  	-e 's+%%FIND%%+${FIND}+' \
>  	-e 's+%%XARGS%%+${XARGS}+' \
>  	-e 's+%%REINPLACE_CMD%%+${REINPLACE_CMD}+' \
> -	-e 's+$$(CROSS_SUFFIX)+${LOCALBASE}/bin/+' \
> +	-e 's+$${CROSS_SUFFIX}+${LOCALBASE}/bin/+' \
>  		${WRKSRC}/Makefile.system
>  .if ${PORT_OPTIONS:MOPENMP}
>  	${REINPLACE_CMD} -e "s+OPENBLAS_NUM_THREADS+OMP_NUM_THREADS+g" \
> 
> 

This still doesn't completely fix the problem. Builds on i386 architecture 
and builds on amd64 using Intel processors build fine whereas builds on 
amd64 architecture using AMD CPUs (BARCELONA and BULLDOZER) still fail.

This discusses the problem. https://github.com/xianyi/OpenBLAS/issues/786. 
Unfortunately it doesn't discuss a fix, my builds on my BARCELONA processor 
still fail. The following patch does workaround the problem but I don't 
think it's suitable for inclusion in ports.

Index: Makefile
===================================================================
--- Makefile	(revision 414476)
+++ Makefile	(working copy)
@@ -42,6 +42,7 @@
 
 .if defined(BATCH) || defined(PACKAGE_BUILDING)
 OPTIONS_DEFAULT=	DYNAMIC_ARCH
+MAKE_ARGS=		MAX_STACK_ALLOC=0
 .endif
 
 .include <bsd.port.options.mk>
 
I'm only seeing this on my BARCELONA machine performing amd64 builds. My 
other BARCELONA machine performing i386 builds does not experience this, 
neither does my Sandy Bridge laptop performing amd64 builds experience it 
either. There is something specific to AMD CPUs (at least discussed in the 
URL above, mine included) in 64-bit mode that exposes this bug.


-- 
Cheers,
Cy Schubert <Cy.Schubert at komquats.com> or <Cy.Schubert at cschubert.com>
FreeBSD UNIX:  <cy at FreeBSD.org>   Web:  http://www.FreeBSD.org

	The need of the many outweighs the greed of the few.





More information about the svn-ports-all mailing list