FreeBSD Bugzilla – Attachment 206236 Details for
Bug 239613
biology/bolt-lmm: fix build on powerpc64
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch
bolt-lmm.patch (text/plain), 6.60 KB, created by
Piotr Kubaj
on 2019-08-03 12:47:49 UTC
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Piotr Kubaj
Created:
2019-08-03 12:47:49 UTC
Size:
6.60 KB
patch
obsolete
>Index: Makefile >=================================================================== >--- Makefile (revision 507525) >+++ Makefile (working copy) >@@ -25,6 +25,7 @@ > INSTALL_WRKSRC= ${WRKDIR}/${DISTNAME}/src > CXXFLAGS_i386= -DUSE_SSE -msse -msse2 > CXXFLAGS_amd64= -DUSE_SSE >+CXXFLAGS_powerpc64= -DNO_WARN_X86_INTRINSICS -mvsx > > PORTEXAMPLES= * > >Index: files/patch-src_Jackknife.cpp >=================================================================== >--- files/patch-src_Jackknife.cpp (nonexistent) >+++ files/patch-src_Jackknife.cpp (working copy) >@@ -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]; > >Property changes on: files/patch-src_Jackknife.cpp >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: files/patch-src_LDscoreCalibration.cpp >=================================================================== >--- files/patch-src_LDscoreCalibration.cpp (nonexistent) >+++ files/patch-src_LDscoreCalibration.cpp (working copy) >@@ -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); > >Property changes on: files/patch-src_LDscoreCalibration.cpp >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: files/patch-src_SnpData.cpp >=================================================================== >--- files/patch-src_SnpData.cpp (nonexistent) >+++ files/patch-src_SnpData.cpp (working copy) >@@ -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++; >+ } > >Property changes on: files/patch-src_SnpData.cpp >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: files/patch-src_StatsUtils.cpp >=================================================================== >--- files/patch-src_StatsUtils.cpp (nonexistent) >+++ files/patch-src_StatsUtils.cpp (working copy) >@@ -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]; >+ } > >Property changes on: files/patch-src_StatsUtils.cpp >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: files/patch-src_Timer.cpp >=================================================================== >--- files/patch-src_Timer.cpp (nonexistent) >+++ files/patch-src_Timer.cpp (working copy) >@@ -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); >+ } >+ > >Property changes on: files/patch-src_Timer.cpp >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
pkubaj
:
maintainer-approval?
(
jwb
)
Actions:
View
|
Diff
Attachments on
bug 239613
: 206236