From owner-svn-ports-head@freebsd.org Sun Aug 4 23:48:24 2019 Return-Path: Delivered-To: svn-ports-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 15FDBB529E; Sun, 4 Aug 2019 23:48:24 +0000 (UTC) (envelope-from jwb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 461yJl6ngnz41qn; Sun, 4 Aug 2019 23:48:23 +0000 (UTC) (envelope-from jwb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CAC55B1DA; Sun, 4 Aug 2019 23:48:23 +0000 (UTC) (envelope-from jwb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x74NmN0Y051622; Sun, 4 Aug 2019 23:48:23 GMT (envelope-from jwb@FreeBSD.org) Received: (from jwb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x74NmMht051616; Sun, 4 Aug 2019 23:48:22 GMT (envelope-from jwb@FreeBSD.org) Message-Id: <201908042348.x74NmMht051616@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jwb set sender to jwb@FreeBSD.org using -f From: "Jason W. Bacon" Date: Sun, 4 Aug 2019 23:48:22 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r508135 - in head/biology/bolt-lmm: . files X-SVN-Group: ports-head X-SVN-Commit-Author: jwb X-SVN-Commit-Paths: in head/biology/bolt-lmm: . files X-SVN-Commit-Revision: 508135 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Aug 2019 23:48:24 -0000 Author: jwb Date: Sun Aug 4 23:48:22 2019 New Revision: 508135 URL: https://svnweb.freebsd.org/changeset/ports/508135 Log: PR: 239613 Submitted by: pkubaj Added: head/biology/bolt-lmm/files/patch-src_Jackknife.cpp (contents, props changed) head/biology/bolt-lmm/files/patch-src_LDscoreCalibration.cpp (contents, props changed) head/biology/bolt-lmm/files/patch-src_SnpData.cpp (contents, props changed) head/biology/bolt-lmm/files/patch-src_StatsUtils.cpp (contents, props changed) head/biology/bolt-lmm/files/patch-src_Timer.cpp (contents, props changed) Modified: head/biology/bolt-lmm/Makefile Modified: head/biology/bolt-lmm/Makefile ============================================================================== --- head/biology/bolt-lmm/Makefile Sun Aug 4 23:35:15 2019 (r508134) +++ head/biology/bolt-lmm/Makefile Sun Aug 4 23:48:22 2019 (r508135) @@ -2,7 +2,7 @@ PORTNAME= bolt-lmm DISTVERSION= 2.3.2 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= biology MASTER_SITES= https://data.broadinstitute.org/alkesgroup/BOLT-LMM/downloads/ DISTNAME= BOLT-LMM_v${PORTVERSION} @@ -25,6 +25,7 @@ BUILD_WRKSRC= ${WRKDIR}/${DISTNAME}/src INSTALL_WRKSRC= ${WRKDIR}/${DISTNAME}/src CXXFLAGS_i386= -DUSE_SSE -msse -msse2 CXXFLAGS_amd64= -DUSE_SSE +CXXFLAGS_powerpc64= -DNO_WARN_X86_INTRINSICS -mvsx PORTEXAMPLES= * Added: head/biology/bolt-lmm/files/patch-src_Jackknife.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/biology/bolt-lmm/files/patch-src_Jackknife.cpp Sun Aug 4 23:48:22 2019 (r508135) @@ -0,0 +1,13 @@ +--- src/Jackknife.cpp.orig 2019-08-03 00:15:27 UTC ++++ src/Jackknife.cpp +@@ -28,8 +28,8 @@ namespace Jackknife { + using std::make_pair; + + double stddev(const vector &x, int n) { +- for (int i = 0; i < n; i++) if (isnan(x[i])) return NAN; +- for (int i = 0; i < n; i++) if (isinf(x[i])) return INFINITY; ++ for (int i = 0; i < n; i++) if (std::isnan(x[i])) return NAN; ++ for (int i = 0; i < n; i++) if (std::isinf(x[i])) return INFINITY; + double s = 0.0, s2 = 0.0; + for (int i = 0; i < n; i++) { + s += x[i]; Added: head/biology/bolt-lmm/files/patch-src_LDscoreCalibration.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/biology/bolt-lmm/files/patch-src_LDscoreCalibration.cpp Sun Aug 4 23:48:22 2019 (r508135) @@ -0,0 +1,24 @@ +--- src/LDscoreCalibration.cpp.orig 2019-08-03 00:18:05 UTC ++++ src/LDscoreCalibration.cpp +@@ -201,8 +201,8 @@ namespace LDscoreCalibration { + snps[m].MAF >= minMAF && // MAF threshold + statsRef[m] > 0 && // ref stat available + statsCur[m] > 0 && // cur stat available +- !isnan(LDscores[m]) && // LD Score available +- !isnan(LDscoresChip[m]); // LD Score weight available ++ !std::isnan(LDscores[m]) && // LD Score available ++ !std::isnan(LDscoresChip[m]); // LD Score weight available + + // perform outlier removal + double outlierChisqThresh = std::max(MIN_OUTLIER_CHISQ_THRESH, N * outlierVarFracThresh); +@@ -256,8 +256,8 @@ namespace LDscoreCalibration { + maskSnps[m] = + snps[m].MAF >= minMAF && // MAF threshold + stats[m] > 0 && // stat available +- !isnan(LDscores[m]) && // LD Score available +- !isnan(LDscoresChip[m]); // LD Score weight available ++ !std::isnan(LDscores[m]) && // LD Score available ++ !std::isnan(LDscoresChip[m]); // LD Score weight available + + // perform outlier removal + double outlierChisqThresh = std::max(MIN_OUTLIER_CHISQ_THRESH, N * outlierVarFracThresh); Added: head/biology/bolt-lmm/files/patch-src_SnpData.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/biology/bolt-lmm/files/patch-src_SnpData.cpp Sun Aug 4 23:48:22 2019 (r508135) @@ -0,0 +1,20 @@ +--- src/SnpData.cpp.orig 2019-08-03 00:23:17 UTC ++++ src/SnpData.cpp +@@ -996,7 +996,7 @@ namespace LMM { + for (int w = 0; w < W; w++) + if (isProximal(m, mp, windows[w].first, windows[w].second)) { + foundProximal = true; +- if (!isnan(r2)) { ++ if (!std::isnan(r2)) { + for (int a = 0; a < A; a++) { + double weight = pow((snps[mp].MAF * (1-snps[mp].MAF)), alphaMAFdeps[a]); + LDscores[w*A+a] += weight * r2; +@@ -1048,7 +1048,7 @@ namespace LMM { + if (snps[mp].chrom != snps[m].chrom) { + fillSnpRow(&mpRow[0], mp); + double r2 = compute_r2(&mRow[0], &mpRow[0], Nstride); +- if (!isnan(r2)) { ++ if (!std::isnan(r2)) { + totOffChrom_r2s += r2; + numOffChrom_r2s++; + } Added: head/biology/bolt-lmm/files/patch-src_StatsUtils.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/biology/bolt-lmm/files/patch-src_StatsUtils.cpp Sun Aug 4 23:48:22 2019 (r508135) @@ -0,0 +1,13 @@ +--- src/StatsUtils.cpp.orig 2019-08-03 00:24:37 UTC ++++ src/StatsUtils.cpp +@@ -33,8 +33,8 @@ namespace StatsUtils { + if (n <= 1) return NAN; + double s = 0.0, s2 = 0.0; + for (uint64 i = 0; i < n; i++) { +- if (isnan(x[i])) return NAN; +- if (isinf(x[i])) return INFINITY; ++ if (std::isnan(x[i])) return NAN; ++ if (std::isinf(x[i])) return INFINITY; + s += x[i]; + s2 += x[i]*x[i]; + } Added: head/biology/bolt-lmm/files/patch-src_Timer.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/biology/bolt-lmm/files/patch-src_Timer.cpp Sun Aug 4 23:48:22 2019 (r508135) @@ -0,0 +1,22 @@ +--- src/Timer.cpp.orig 2019-08-03 00:25:18 UTC ++++ src/Timer.cpp +@@ -35,7 +35,19 @@ double Timer::update_time(void) { + + unsigned long long Timer::rdtsc(void) { + unsigned int hi, lo; ++#ifdef __amd64__ + __asm__ __volatile__ ("rdtsc" : "=a"(lo), "=d"(hi)); ++#elif __powerpc__ ++ unsigned int tmp; ++ __asm__ ("0:" ++ "mftbu %[hi32]\n" ++ "mftb %[lo32]\n" ++ "mftbu %[tmp]\n" ++ "cmpw %[tmp],%[hi32]\n" ++ "bne 0b\n" ++ : [hi32] "=r"(hi), [lo32] "=r"(lo), ++ [tmp] "=r"(tmp)); ++#endif + return ((unsigned long long) lo) | (((unsigned long long) hi)<<32); + } +