Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 4 Aug 2019 23:48:22 +0000 (UTC)
From:      "Jason W. Bacon" <jwb@FreeBSD.org>
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
Message-ID:  <201908042348.x74NmMht051616@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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 <double> &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);
+ }
+ 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201908042348.x74NmMht051616>