mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-29 05:38:00 +00:00
biology/gcta: chase the upgrade of OpenBLAS
GCTA should modify the LAPACK functios calls, this is a temporary fix. See <https://github.com/jianyangqt/gcta/issues/59>. PR: 273219 Approved by: jwb@
This commit is contained in:
parent
84ca7effd3
commit
22df0dbcfa
@ -1,6 +1,7 @@
|
||||
PORTNAME= gcta
|
||||
DISTVERSIONPREFIX= v
|
||||
DISTVERSION= 1.94.1
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= biology
|
||||
|
||||
MAINTAINER= jwb@FreeBSD.org
|
||||
|
24
biology/gcta/files/patch-include_Matrix.hpp
Normal file
24
biology/gcta/files/patch-include_Matrix.hpp
Normal file
@ -0,0 +1,24 @@
|
||||
--- include/Matrix.hpp.orig 2022-08-03 06:01:52 UTC
|
||||
+++ include/Matrix.hpp
|
||||
@@ -32,7 +32,9 @@ bool _LLT(MatrixType &A, double &logdet){
|
||||
#if GCTA_CPU_x86
|
||||
dpotrf(&uplo, &cols, vi, &cols, &info);
|
||||
#else
|
||||
- dpotrf_(&uplo, &cols, vi, &cols, &info);
|
||||
+ // OpenBLAS 0.3.25 requires a length argument. Is 1 the right value?
|
||||
+ // Should all dgeqrf_() calls be patched?
|
||||
+ dpotrf_(&uplo, &cols, vi, &cols, &info, 1);
|
||||
#endif
|
||||
//LOGGER << " LLT time: " << LOGGER.tp("LLT") << std::endl;
|
||||
if(info == 0){
|
||||
@@ -41,7 +43,9 @@ bool _LLT(MatrixType &A, double &logdet){
|
||||
#if GCTA_CPU_x86
|
||||
dpotri(&uplo, &cols, vi, &cols, &info);
|
||||
#else
|
||||
- dpotri_(&uplo, &cols, vi, &cols, &info);
|
||||
+ // OpenBLAS 0.3.25 requires a length argument. Is 1 the right value?
|
||||
+ // Should all doptri_() calls be patched?
|
||||
+ dpotri_(&uplo, &cols, vi, &cols, &info, 1);
|
||||
#endif
|
||||
//LOGGER << " LLT inverse time: " << LOGGER.tp("LLT_INV") << std::endl;
|
||||
if(info == 0){
|
@ -1,15 +1,16 @@
|
||||
--- include/cpu.h.orig 2023-10-13 13:09:13 UTC
|
||||
--- include/cpu.h.orig 2022-08-03 06:01:52 UTC
|
||||
+++ include/cpu.h
|
||||
@@ -13,7 +13,7 @@
|
||||
@@ -13,7 +13,8 @@
|
||||
#define GCTA_ARCH_i386 0
|
||||
#endif
|
||||
|
||||
-#if GCTA_ARCH_x86_64 || GCTA_ARCH_i386
|
||||
+// GCTA_ARCH_x86 is used (mostly) to enable Intel's MKL library
|
||||
+#if !defined(__FreeBSD__) && (GCTA_ARCH_x86_64 || GCTA_ARCH_i386)
|
||||
#define GCTA_CPU_x86 1
|
||||
#else
|
||||
#define GCTA_CPU_x86 0
|
||||
@@ -50,4 +50,4 @@
|
||||
@@ -50,4 +51,4 @@
|
||||
#include <lapack.h>
|
||||
#endif
|
||||
|
||||
|
24
biology/gcta/files/patch-main_mkl.cpp
Normal file
24
biology/gcta/files/patch-main_mkl.cpp
Normal file
@ -0,0 +1,24 @@
|
||||
--- main/mkl.cpp.orig 2023-11-20 14:09:49 UTC
|
||||
+++ main/mkl.cpp
|
||||
@@ -365,7 +365,9 @@ bool gcta::comput_inverse_logdet_LDLT_mkl(eigenMatrix
|
||||
#if GCTA_CPU_x86
|
||||
dpotrf(&uplo, &int_n, Vi_mkl, &int_n, &info);
|
||||
#else
|
||||
- dpotrf_(&uplo, &int_n, Vi_mkl, &int_n, &info);
|
||||
+ // OpenBLAS 0.3.25 requires a length argument. Is 1 the right value?
|
||||
+ // Should all dpotrf_() calls be patched?
|
||||
+ dpotrf_(&uplo, &int_n, Vi_mkl, &int_n, &info, 1);
|
||||
#endif
|
||||
//LOGGER << "Finished decompose" << endl;
|
||||
//spotrf( &uplo, &n, Vi_mkl, &n, &info );
|
||||
@@ -386,7 +388,9 @@ bool gcta::comput_inverse_logdet_LDLT_mkl(eigenMatrix
|
||||
#if GCTA_CPU_x86
|
||||
dpotri(&uplo, &int_n, Vi_mkl, &int_n, &info);
|
||||
#else
|
||||
- dpotri_(&uplo, &int_n, Vi_mkl, &int_n, &info);
|
||||
+ // OpenBLAS 0.3.25 requires a length argument. Is 1 the right value?
|
||||
+ // Should all dpotri_() calls be patched?
|
||||
+ dpotri_(&uplo, &int_n, Vi_mkl, &int_n, &info, 1);
|
||||
#endif
|
||||
//LOGGER << "Inverse finished" << endl;
|
||||
//spotri( &uplo, &n, Vi_mkl, &n, &info );
|
19
biology/gcta/files/patch-src_StatLib.cpp
Normal file
19
biology/gcta/files/patch-src_StatLib.cpp
Normal file
@ -0,0 +1,19 @@
|
||||
--- src/StatLib.cpp.orig 2022-08-03 06:01:52 UTC
|
||||
+++ src/StatLib.cpp
|
||||
@@ -1,3 +1,4 @@
|
||||
+
|
||||
/*
|
||||
GCTA: a tool for Genome-wide Complex Trait Analysis
|
||||
|
||||
@@ -117,8 +118,10 @@ namespace StatLib{
|
||||
dormqr(&side, &t, &n, &n, &n, X, &lda, tau, c,
|
||||
&lda, work, &lwork, &info);
|
||||
#else
|
||||
+ // OpenBLAS 0.3.25 requires a length argument. Is 1 the right value?
|
||||
+ // Should all dormqr_() calls be patched?
|
||||
dormqr_(&side, &t, &n, &n, &n, X, &lda, tau, c,
|
||||
- &lda, work, &lwork, &info);
|
||||
+ &lda, work, &lwork, &info, 1, 1);
|
||||
#endif
|
||||
if(info != 0){
|
||||
return false;
|
Loading…
Reference in New Issue
Block a user