From owner-svn-ports-all@FreeBSD.ORG Tue Jun 2 23:05:36 2015 Return-Path: Delivered-To: svn-ports-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B26A8112; Tue, 2 Jun 2015 23:05:36 +0000 (UTC) (envelope-from stephen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A054A1B0C; Tue, 2 Jun 2015 23:05:36 +0000 (UTC) (envelope-from stephen@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t52N5aAH015075; Tue, 2 Jun 2015 23:05:36 GMT (envelope-from stephen@FreeBSD.org) Received: (from stephen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t52N5ZKW015069; Tue, 2 Jun 2015 23:05:35 GMT (envelope-from stephen@FreeBSD.org) Message-Id: <201506022305.t52N5ZKW015069@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: stephen set sender to stephen@FreeBSD.org using -f From: Stephen Montgomery-Smith Date: Tue, 2 Jun 2015 23:05:35 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r388393 - in head/math/librsb: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jun 2015 23:05:36 -0000 Author: stephen Date: Tue Jun 2 23:05:35 2015 New Revision: 388393 URL: https://svnweb.freebsd.org/changeset/ports/388393 Log: - Make user of port understand information about memory heirarchy needs to be provided. - Bump portrevision. Added: head/math/librsb/files/memhinfo.txt (contents, props changed) head/math/librsb/files/patch-rsb__init.c (contents, props changed) Modified: head/math/librsb/Makefile Modified: head/math/librsb/Makefile ============================================================================== --- head/math/librsb/Makefile Tue Jun 2 22:15:48 2015 (r388392) +++ head/math/librsb/Makefile Tue Jun 2 23:05:35 2015 (r388393) @@ -3,6 +3,7 @@ PORTNAME= librsb PORTVERSION= 1.2.0r1 +PORTREVISION= 1 CATEGORIES= math MASTER_SITES= SF/librsb DISTNAME= ${PORTNAME}-${PORTVERSION:S/r/-rc/} @@ -17,12 +18,24 @@ BUILD_DEPENDS= gsed:${PORTSDIR}/textproc USES= fortran compiler:openmp gmake shebangfix GNU_CONFIGURE= yes -CFLAGS= -fPIC +CFLAGS+= -fPIC CONFIGURE_ARGS= --enable-fortran-module-install \ - --enable-matrix-types="double, double complex" + --enable-matrix-types="double, double complex" \ + --with-memhinfo="${RSB_USER_SET_MEM_HIERARCHY_INFO}" SHEBANG_FILES= scripts/*.sh +MANUAL_PACKAGE_BUILD= Optimizes for the local machine + +pre-configure: + @if [ -z "${RSB_USER_SET_MEM_HIERARCHY_INFO}" ]; then \ + ${CAT} ${FILESDIR}/memhinfo.txt; \ + exit 1; \ + fi + post-patch: @${REINPLACE_CMD} -E s/sed/gsed/g ${WRKSRC}/scripts/*.sh +check regression-test test: build + cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${GMAKE} qtests + .include Added: head/math/librsb/files/memhinfo.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/math/librsb/files/memhinfo.txt Tue Jun 2 23:05:35 2015 (r388393) @@ -0,0 +1,11 @@ + +This port needs information about the memory cache system before building. +You can set this in the variable RSB_USER_SET_MEM_HIERARCHY_INFO, for example +make RSB_USER_SET_MEM_HIERARCHY_INFO="L2:12/64/3M,L1:64/8/32K" +Finding these values is tricky, but the following steps will help: + 1. read the README file in the source code + 2. build the port misc/cpuid + 3. run the program cpuid +You are on your own in figuring out how to convert the information from the +program cpuid to the value of RSB_USER_SET_MEM_HIERARCHY_INFO. + Added: head/math/librsb/files/patch-rsb__init.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/math/librsb/files/patch-rsb__init.c Tue Jun 2 23:05:35 2015 (r388393) @@ -0,0 +1,21 @@ +--- rsb_init.c.orig 2015-05-01 21:04:42 UTC ++++ rsb_init.c +@@ -50,13 +50,15 @@ const rsb_char_t * rsb__init_get_mem_hie + if((usmhi = getenv("RSB_USER_SET_MEM_HIERARCHY_INFO"))!=NULL && *usmhi) + goto done; + #endif /* RSB_HAVE_GETENV */ ++#ifdef RSB_DETECTED_MEM_HIERARCHY_INFO ++ if(verbose) RSB_INFO("Checking hardcoded RSB_DETECTED_MEM_HIERARCHY_INFO symbol\n"); ++ usmhi = RSB_DETECTED_MEM_HIERARCHY_INFO; ++ if (*usmhi) ++ goto done; + #ifdef RSB_USER_SET_MEM_HIERARCHY_INFO + if(verbose) RSB_INFO("Checking hardcoded RSB_USER_SET_MEM_HIERARCHY_INFO symbol\n"); + usmhi = RSB_USER_SET_MEM_HIERARCHY_INFO; + #endif /* RSB_USER_SET_MEM_HIERARCHY_INFO */ +-#ifdef RSB_DETECTED_MEM_HIERARCHY_INFO +- if(verbose) RSB_INFO("Checking hardcoded RSB_DETECTED_MEM_HIERARCHY_INFO symbol\n"); +- usmhi = RSB_DETECTED_MEM_HIERARCHY_INFO; + #endif /* RSB_USER_SET_MEM_HIERARCHY_INFO */ + done: + if(verbose) RSB_INFO("Available memory hierarchy info string: \"%s\"\n",usmhi);