Date: Sat, 14 Oct 2023 12:58:53 GMT From: "Jason W. Bacon" <jwb@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: 9d8c5cb3ebf2 - main - biology/gcta: Update to 1.94.1 Message-ID: <202310141258.39ECwrfw031079@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by jwb: URL: https://cgit.FreeBSD.org/ports/commit/?id=9d8c5cb3ebf27b3f044cc0755dcc71727e1261be commit 9d8c5cb3ebf27b3f044cc0755dcc71727e1261be Author: Jason W. Bacon <jwb@FreeBSD.org> AuthorDate: 2023-10-14 12:52:46 +0000 Commit: Jason W. Bacon <jwb@FreeBSD.org> CommitDate: 2023-10-14 12:52:46 +0000 biology/gcta: Update to 1.94.1 Too many changes since v1.26 to list here Changes: https://yanglab.westlake.edu.cn/software/gcta/#Download Reported by: pkg-fallout --- biology/gcta/Makefile | 42 ++++++----- biology/gcta/distinfo | 10 +-- biology/gcta/files/patch-CMakeLists.txt | 98 +++++++++++++++++++++++++ biology/gcta/files/patch-Makefile | 59 --------------- biology/gcta/files/patch-eigen__func.h | 15 ---- biology/gcta/files/patch-gcta.h | 29 -------- biology/gcta/files/patch-include_cpu.h | 18 +++++ biology/gcta/files/patch-include_cpu__f77blas.h | 18 +++++ biology/gcta/files/patch-ld.cpp | 13 ---- biology/gcta/files/patch-main_option.cpp | 28 +++++++ biology/gcta/files/patch-mkl.cpp | 56 -------------- biology/gcta/files/patch-src_Geno.cpp | 11 +++ biology/gcta/files/patch-src_main.cpp | 11 +++ biology/gcta/pkg-descr | 10 +-- 14 files changed, 218 insertions(+), 200 deletions(-) diff --git a/biology/gcta/Makefile b/biology/gcta/Makefile index f3ae8d589b4a..5599f5c22fee 100644 --- a/biology/gcta/Makefile +++ b/biology/gcta/Makefile @@ -1,34 +1,40 @@ PORTNAME= gcta -DISTVERSION= 1.26.0 -PORTREVISION= 4 +DISTVERSIONPREFIX= v +DISTVERSION= 1.94.1 CATEGORIES= biology -MASTER_SITES= https://cnsgenomics.com/software/gcta/pre_gcta/:main \ - https://gitlab.com/libeigen/eigen/-/archive/${EIGEN_VERSION}/:eigen -DISTFILES= ${PORTNAME}_${DISTVERSION}_src${EXTRACT_SUFX}:main \ - eigen-${EIGEN_VERSION}.tar.gz:eigen MAINTAINER= jwb@FreeBSD.org COMMENT= Genome-wide Complex Trait Analysis WWW= https://cnsgenomics.com/software/gcta/index.html LICENSE= GPLv3 -LICENSE_FILE= ${WRKSRC}/GNU_General_Public_License_v3.txt +LICENSE_FILE= ${WRKSRC}/LICENSE -LIB_DEPENDS= libopenblas.so:math/openblas +BUILD_DEPENDS= boost-libs>0:devel/boost-libs \ + spectra>0:math/spectra +LIB_DEPENDS= libgsl.so:math/gsl \ + libopenblas.so:math/openblas \ + libsqlite3.so:databases/sqlite3 \ + libzstd.so:archivers/zstd -USES= compiler:c++11-lang dos2unix gmake localbase:ldflags zip +USES= cmake eigen:3 localbase:ldflags +USE_GITHUB= yes -CXXFLAGS+= -I${WRKDIR}/eigen-${EIGEN_VERSION} -fopenmp -LDFLAGS+= -lopenblas +GH_ACCOUNT= jianyangqt +GH_TUPLE= zhilizheng:plink-ng:3744540:plink/submods/plink-ng -INSTALL_TARGET= install-strip -PLIST_FILES= bin/gcta +CONFIGURE_ENV+= EIGEN3_INCLUDE_DIR=${LOCALBASE}/include/eigen3 \ + BOOST_INCLUDE_DIR=${LOCALBASE}/include/boost \ + OPENBLAS=${LOCALBASE} \ + SPECTRA_INCLUDE_DIR=${LOCALBASE}/include/Spectra -EIGEN_VERSION= 3.3.9 +LDFLAGS+= -fopenmp -do-extract: - @${UNZIP_NATIVE_CMD} -d ${WRKSRC} ${DISTDIR}/${PORTNAME}_${DISTVERSION}_src${EXTRACT_SUFX} - @cd ${WRKDIR} && \ - ${TAR} xzf ${DISTDIR}/eigen-${EIGEN_VERSION}.tar.gz +PLIST_FILES= bin/gcta64 bin/gcta + +do-install: + @${MKDIR} ${STAGEDIR}${PREFIX}/bin + ${INSTALL_PROGRAM} ${BUILD_WRKSRC}/gcta64 ${STAGEDIR}${PREFIX}/bin + ${RLN} ${STAGEDIR}${PREFIX}/bin/gcta64 ${STAGEDIR}${PREFIX}/bin/gcta .include <bsd.port.mk> diff --git a/biology/gcta/distinfo b/biology/gcta/distinfo index 91c72879eac1..9bda3ffe28e6 100644 --- a/biology/gcta/distinfo +++ b/biology/gcta/distinfo @@ -1,5 +1,5 @@ -TIMESTAMP = 1657137653 -SHA256 (gcta_1.26.0_src.zip) = 554c48f421c93cbaf64b1c300ca507d8e7a56086b5c7d857227fbd4048f42acf -SIZE (gcta_1.26.0_src.zip) = 198045 -SHA256 (eigen-3.3.9.tar.gz) = 7985975b787340124786f092b3a07d594b2e9cd53bbfe5f3d9b1daee7d55f56f -SIZE (eigen-3.3.9.tar.gz) = 2142379 +TIMESTAMP = 1697202096 +SHA256 (jianyangqt-gcta-v1.94.1_GH0.tar.gz) = d38841587bef016d7885cc1b3287d7ed0373bd370674130e814e2c5e6a90bfbf +SIZE (jianyangqt-gcta-v1.94.1_GH0.tar.gz) = 1101577 +SHA256 (zhilizheng-plink-ng-3744540_GH0.tar.gz) = dfa4879bc6bcbe24411451748c7c5dc803e42cafa55b008134f0d123cd933222 +SIZE (zhilizheng-plink-ng-3744540_GH0.tar.gz) = 3222588 diff --git a/biology/gcta/files/patch-CMakeLists.txt b/biology/gcta/files/patch-CMakeLists.txt new file mode 100644 index 000000000000..886a9591c652 --- /dev/null +++ b/biology/gcta/files/patch-CMakeLists.txt @@ -0,0 +1,98 @@ +--- CMakeLists.txt.orig 2022-08-03 06:01:52 UTC ++++ CMakeLists.txt +@@ -3,7 +3,7 @@ SET(CMAKE_INCLUDE_CURRENT_DIR ON) + SET(PROJECT_NAME_STR GCTA2) + PROJECT(${PROJECT_NAME_STR} C CXX) + SET(CMAKE_INCLUDE_CURRENT_DIR ON) +-SET(CMAKE_CXX_STANDARD 11) ++SET(CMAKE_CXX_STANDARD 14) + SET(CMAKE_C_STANDARD 11) + + # get system architecture +@@ -16,8 +16,8 @@ endif() + MESSAGE(FATAL_ERROR "Use the Visual Studio project file which located in gcta_win64 directory") + endif() + +-if("${CMAKE_SYSTEM_NAME}" MATCHES "Linux" OR "${CMAKE_SYSTEM_NAME}" MATCHES "Darwin") +- MESSAGE("Linux and Mac are supported.") ++if("${CMAKE_SYSTEM_NAME}" MATCHES "FreeBSD" OR "${CMAKE_SYSTEM_NAME}" MATCHES "Linux" OR "${CMAKE_SYSTEM_NAME}" MATCHES "Darwin") ++ MESSAGE("FreeBSD, Linux and Mac are supported.") + else() + MESSAGE("Your system: ${CMAKE_SYSTEM_NAME}") + MESSAGE(FATAL_ERROR "Only Linux and Mac are currently supported.") +@@ -43,18 +43,18 @@ INCLUDE_DIRECTORIES("${EIGEN3_INCLUDE_DIR}") + ENDIF() + INCLUDE_DIRECTORIES("${EIGEN3_INCLUDE_DIR}") + +-SET(SPECTRA_LIB "$ENV{SPECTRA_LIB}") +-IF(NOT SPECTRA_LIB) +- MESSAGE(FATAL_ERROR "Specify environment variable SPECTRA_LIB to the location of Spectra package") ++SET(SPECTRA_INCLUDE_DIR "$ENV{SPECTRA_INCLUDE_DIR}") ++IF(NOT SPECTRA_INCLUDE_DIR) ++ MESSAGE(FATAL_ERROR "Specify environment variable SPECTRA_INCLUDE_DIR to the location of Spectra package") + ENDIF() +-INCLUDE_DIRECTORIES("${SPECTRA_LIB}") ++INCLUDE_DIRECTORIES("${SPECTRA_INCLUDE_DIR}") + + +-SET(BOOST_LIB "$ENV{BOOST_LIB}") +-IF(NOT BOOST_LIB) +- MESSAGE(FATAL_ERROR "Specify environment variable BOOST_LIB to the location of BOOST library") ++SET(BOOST_INCLUDE_DIR "$ENV{BOOST_INCLUDE_DIR}") ++IF(NOT BOOST_INCLUDE_DIR) ++ MESSAGE(FATAL_ERROR "Specify environment variable BOOST_INCLUDE_DIR to the location of BOOST headers") + ENDIF() +-INCLUDE_DIRECTORIES("${BOOST_LIB}") ++INCLUDE_DIRECTORIES("${BOOST_INCLUDE_DIR}") + + + # PLINK2.0 pgen library; +@@ -63,13 +63,28 @@ message(STATUS "ARCHITECTURE:${CMAKE_LIBRARY_ARCHITECT + + + message(STATUS "ARCHITECTURE:${CMAKE_LIBRARY_ARCHITECTURE}") +-if(CMAKE_LIBRARY_ARCHITECTURE STREQUAL "aarch64") ++if("${CMAKE_SYSTEM_NAME}" MATCHES "FreeBSD") + SET(OPENBLAS "$ENV{OPENBLAS}") + IF(NOT OPENBLAS) + MESSAGE(FATAL_ERROR "Specify environment variable OPENBLAS to the location of OPENBLAS package") + ENDIF() + INCLUDE_DIRECTORIES("${OPENBLAS}/include") + ++ find_library(lib_openblas NAMES openblas PATHS "${OPENBLAS}" "${LOCALBASE}/lib") ++ set(BLAS_LIB ${lib_openblas}) ++ ++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread") ++ set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DNDEBUG") ++ set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -g") ++ add_compile_options(-fopenmp) ++ ++elseif(CMAKE_LIBRARY_ARCHITECTURE STREQUAL "aarch64") ++ SET(OPENBLAS "$ENV{OPENBLAS}") ++ IF(NOT OPENBLAS) ++ MESSAGE(FATAL_ERROR "Specify environment variable OPENBLAS to the location of OPENBLAS package") ++ ENDIF() ++ INCLUDE_DIRECTORIES("${OPENBLAS}/include") ++ + find_library(lib_openblas NAMES openblas PATHS "${OPENBLAS}" "${OPENBLAS}/lib") + set(BLAS_LIB ${lib_openblas}) + +@@ -169,6 +184,8 @@ if(APPLE) + if(APPLE) + link_directories(${MKLROOT}/lib) + link_directories(/usr/local/lib) ++elseif("${CMAKE_SYSTEM_NAME}" MATCHES "FreeBSD") ++ link_directories(${LOCALBASE}/lib) + else(CMAKE_CXX_COMPILER_ID MATCHES "Clang") + #linux + link_directories(${MKLROOT}/../../../lib/intel64) +@@ -179,6 +196,9 @@ if(APPLE) + if(APPLE) + # iomp5 + target_link_libraries(gcta64 ${libs_list} Pgenlib mainV1 z ${BLAS_LIB} sqlite3 zstd_s omp pthread m dl ) ++elseif("${CMAKE_SYSTEM_NAME}" MATCHES "FreeBSD") ++ # FIXME: Clean this up ++ target_link_libraries(gcta64 mainV1 ${libs_list} Pgenlib gsl z sqlite3 zstd -Wl,--start-group ${BLAS_LIB} -Wl,--end-group -Wl,--whole-archive -lpthread -Wl,--no-whole-archive m dl) + else() + if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") + # error keeps only diff --git a/biology/gcta/files/patch-Makefile b/biology/gcta/files/patch-Makefile deleted file mode 100644 index b4844e0f9cee..000000000000 --- a/biology/gcta/files/patch-Makefile +++ /dev/null @@ -1,59 +0,0 @@ ---- Makefile.orig 2020-04-15 01:43:44 UTC -+++ Makefile -@@ -6,21 +6,27 @@ - # --------------------------------------------------------------------- - - # Directory of the target --OUTPUT = gcta64 -+OUTPUT = gcta - - # Compiler --CXX = g++ -+CXX ?= g++ - - # EIGEN library --EIGEN_PATH = ../../../Lib/eigen -+EIGEN_PATH ?= ../../../Lib/eigen - - # Intel MKL library --MKL_PATH = /opt/intel/mkl -+MKL_PATH ?= /opt/intel/mkl - - # Compiler flags --CXXFLAGS = -w -O3 -m64 -static -fopenmp -I $(EIGEN_PATH) -DEIGEN_NO_DEBUG -I $(MKL_PATH)/include --LIB += -static -lz -Wl,--start-group $(MKL_PATH)/lib/intel64/libmkl_intel_lp64.a $(MKL_PATH)/lib/intel64/libmkl_gnu_thread.a $(MKL_PATH)/lib/intel64/libmkl_core.a -Wl,--end-group -lpthread -lm -ldl -+CXXFLAGS ?= -w -O3 -m64 -static -fopenmp -I $(EIGEN_PATH) -DEIGEN_NO_DEBUG -I $(MKL_PATH)/include -+LDFLAGS += -lz -Wl,--start-group -lpthread -lm -ldl - -+MKDIR ?= mkdir -+DESTDIR ?= . -+PREFIX ?= /usr/local -+INSTALL ?= install -+STRIP ?= strip -+ - HDR += CommFunc.h \ - cdflib.h \ - dcdflib.h \ -@@ -58,7 +64,7 @@ OBJ = $(SRC:.cpp=.o) - all : $(OUTPUT) - - $(OUTPUT) : -- $(CXX) $(CXXFLAGS) -o $(OUTPUT) $(OBJ) $(LIB) -+ $(CXX) $(CXXFLAGS) -o $(OUTPUT) $(OBJ) $(LDFLAGS) - - $(OBJ) : $(HDR) - -@@ -69,6 +75,13 @@ $(OBJ) : $(HDR) - $(OUTPUT) : $(OBJ) - - FORCE: -+ -+install: -+ ${MKDIR} -p ${DESTDIR}${PREFIX}/bin -+ ${INSTALL} -c ${OUTPUT} ${DESTDIR}${PREFIX}/bin -+ -+install-strip: install -+ ${STRIP} ${DESTDIR}${PREFIX}/bin/${OUTPUT} - - clean: - rm -f *.o diff --git a/biology/gcta/files/patch-eigen__func.h b/biology/gcta/files/patch-eigen__func.h deleted file mode 100644 index 5325c5975685..000000000000 --- a/biology/gcta/files/patch-eigen__func.h +++ /dev/null @@ -1,15 +0,0 @@ ---- eigen_func.h.orig 2016-06-22 03:11:01 UTC -+++ eigen_func.h -@@ -12,9 +12,9 @@ - #ifndef _EIGENFUNC_H - #define _EIGENFUNC_H - --#ifndef EIGEN_USE_MKL_ALL --#define EIGEN_USE_MKL_ALL --#endif -+//#ifndef EIGEN_USE_MKL_ALL -+//#define EIGEN_USE_MKL_ALL -+//#endif - - #include "CommFunc.h" - #include "StatFunc.h" diff --git a/biology/gcta/files/patch-gcta.h b/biology/gcta/files/patch-gcta.h deleted file mode 100644 index 07c889655082..000000000000 --- a/biology/gcta/files/patch-gcta.h +++ /dev/null @@ -1,29 +0,0 @@ ---- gcta.h.orig 2016-06-22 03:11:01 UTC -+++ gcta.h -@@ -17,9 +17,9 @@ - #define EIGEN_YES_I_KNOW_SPARSE_MODULE_IS_NOT_STABLE_YET - #endif - --#ifndef EIGEN_USE_MKL_ALL --#define EIGEN_USE_MKL_ALL --#endif -+//#ifndef EIGEN_USE_MKL_ALL -+//#define EIGEN_USE_MKL_ALL -+//#endif - - #include "CommFunc.h" - #include "StrFunc.h" -@@ -36,8 +36,11 @@ - #include <unsupported/Eigen/SparseExtra> - #include <unsupported/Eigen/IterativeSolvers> - #include <omp.h> --#include <mkl_cblas.h> --#include <mkl_lapack.h> -+#include <cblas.h> -+#include <lapacke.h> -+// Looks like openblas, cblas and lapacke are all that's needed -+//#include <blaspp.h> -+//#include <lapackpp.h> - - using namespace Eigen; - using namespace std; diff --git a/biology/gcta/files/patch-include_cpu.h b/biology/gcta/files/patch-include_cpu.h new file mode 100644 index 000000000000..41c192d4c5f7 --- /dev/null +++ b/biology/gcta/files/patch-include_cpu.h @@ -0,0 +1,18 @@ +--- include/cpu.h.orig 2023-10-13 13:09:13 UTC ++++ include/cpu.h +@@ -13,7 +13,7 @@ + #define GCTA_ARCH_i386 0 + #endif + +-#if GCTA_ARCH_x86_64 || GCTA_ARCH_i386 ++#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 @@ + #include <lapack.h> + #endif + +-#endif //END GCTA_CPU_H +\ No newline at end of file ++#endif //END GCTA_CPU_H diff --git a/biology/gcta/files/patch-include_cpu__f77blas.h b/biology/gcta/files/patch-include_cpu__f77blas.h new file mode 100644 index 000000000000..d887c81d9ade --- /dev/null +++ b/biology/gcta/files/patch-include_cpu__f77blas.h @@ -0,0 +1,18 @@ +--- include/cpu_f77blas.h.orig 2023-10-13 13:10:15 UTC ++++ include/cpu_f77blas.h +@@ -13,7 +13,7 @@ + #define GCTA_ARCH_i386 0 + #endif + +-#if GCTA_ARCH_x86_64 || GCTA_ARCH_i386 ++#if !defined(__FreeBSD__) && (GCTA_ARCH_x86_64 || GCTA_ARCH_i386) + #define GCTA_CPU_x86 1 + #else + #define GCTA_CPU_x86 0 +@@ -46,4 +46,4 @@ + #include <f77blas.h> + #endif + +-#endif //END GCTA_F77BLAS_CPU_H +\ No newline at end of file ++#endif //END GCTA_F77BLAS_CPU_H diff --git a/biology/gcta/files/patch-ld.cpp b/biology/gcta/files/patch-ld.cpp deleted file mode 100644 index c806493c1c30..000000000000 --- a/biology/gcta/files/patch-ld.cpp +++ /dev/null @@ -1,13 +0,0 @@ ---- ld.cpp.orig 2020-04-15 12:56:27 UTC -+++ ld.cpp -@@ -1004,7 +1004,9 @@ void gcta::calcu_max_ld_rsq_blk(eigenVector &multi_rsq - } - - -- SelfAdjointEigenSolver<MatrixXf> pca(rsq_sub.array()); -+ // Fixed compile by removing .array(). Not sure about the validity -+ // of this change, but it seemed reasonable based on constructor docs. -+ SelfAdjointEigenSolver<MatrixXf> pca(rsq_sub); - - // debug - // ofstream tmp("tmp_R.txt"); diff --git a/biology/gcta/files/patch-main_option.cpp b/biology/gcta/files/patch-main_option.cpp new file mode 100644 index 000000000000..fbf3f6c80d69 --- /dev/null +++ b/biology/gcta/files/patch-main_option.cpp @@ -0,0 +1,28 @@ +--- main/option.cpp.orig 2023-10-13 13:49:25 UTC ++++ main/option.cpp +@@ -1112,10 +1112,10 @@ void option(int option_num, char* option_str[]) + + #ifdef _WIN32 + if(chbuf != '\\') ref_ld_dirt = ref_ld_dirt + '\\'; +-#elif defined __linux__ || defined __APPLE__ ++#elif defined __FreeBSD__ || defined __linux__ || defined __APPLE__ + if(chbuf != '/') ref_ld_dirt = ref_ld_dirt + '/'; + #else +-#error Only Windows, Mac and Linux are supported. ++#error Only FreeBSD, Windows, Mac and Linux are supported. + #endif + LOGGER << "--ref-ld-chr " << ref_ld_dirt << endl; + } else if (strcmp(argv[i], "--w-ld-chr") == 0) { +@@ -1124,10 +1124,10 @@ void option(int option_num, char* option_str[]) + chbuf = w_ld_dirt.back(); + #ifdef _WIN32 + if(chbuf != '\\') w_ld_dirt = w_ld_dirt + '\\'; +-#elif defined __linux__ || defined __APPLE__ ++#elif defined __FreeBSD__ || defined __linux__ || defined __APPLE__ + if(chbuf != '/') w_ld_dirt = w_ld_dirt + '/'; + #else +-#error Only Windows, Mac and Linux are supported. ++#error Only FreeBSD, Windows, Mac and Linux are supported. + #endif + + LOGGER << "--w-ld-chr " << w_ld_dirt << endl; diff --git a/biology/gcta/files/patch-mkl.cpp b/biology/gcta/files/patch-mkl.cpp deleted file mode 100644 index b27b6dabfbce..000000000000 --- a/biology/gcta/files/patch-mkl.cpp +++ /dev/null @@ -1,56 +0,0 @@ ---- mkl.cpp.orig 2020-04-15 00:54:40 UTC -+++ mkl.cpp -@@ -357,7 +357,7 @@ bool gcta::comput_inverse_logdet_LDLT_mkl(eigenMatrix - // MKL's Cholesky decomposition - int info = 0, int_n = (int) n; - char uplo = 'L'; -- dpotrf(&uplo, &int_n, Vi_mkl, &int_n, &info); -+ dpotrf_(&uplo, &int_n, Vi_mkl, &int_n, &info); - //spotrf( &uplo, &n, Vi_mkl, &n, &info ); - if (info < 0) throw ("Error: Cholesky decomposition failed. Invalid values found in the matrix.\n"); - else if (info > 0) return false; -@@ -369,7 +369,7 @@ bool gcta::comput_inverse_logdet_LDLT_mkl(eigenMatrix - } - - // Calcualte V inverse -- dpotri(&uplo, &int_n, Vi_mkl, &int_n, &info); -+ dpotri_(&uplo, &int_n, Vi_mkl, &int_n, &info); - //spotri( &uplo, &n, Vi_mkl, &n, &info ); - if (info < 0) throw ("Error: invalid values found in the varaince-covaraince (V) matrix.\n"); - else if (info > 0) return false; -@@ -405,7 +405,7 @@ bool gcta::comput_inverse_logdet_LU_mkl(eigenMatrix &V - int LWORK = N*N; - double *WORK = new double[n * n]; - int INFO; -- dgetrf(&N, &N, Vi_mkl, &N, IPIV, &INFO); -+ dgetrf_(&N, &N, Vi_mkl, &N, IPIV, &INFO); - if (INFO < 0) throw ("Error: LU decomposition failed. Invalid values found in the matrix.\n"); - else if (INFO > 0) { - delete[] Vi_mkl; -@@ -418,7 +418,7 @@ bool gcta::comput_inverse_logdet_LU_mkl(eigenMatrix &V - } - - // Calcualte V inverse -- dgetri(&N, Vi_mkl, &N, IPIV, WORK, &LWORK, &INFO); -+ dgetri_(&N, Vi_mkl, &N, IPIV, WORK, &LWORK, &INFO); - if (INFO < 0) throw ("Error: invalid values found in the varaince-covaraince (V) matrix.\n"); - else if (INFO > 0) return false; - else { -@@ -453,7 +453,7 @@ bool gcta::comput_inverse_logdet_LU_mkl_array(int n, f - int LWORK = N*N; - double *WORK = new double[n * n]; - int INFO; -- dgetrf(&N, &N, Vi_mkl, &N, IPIV, &INFO); -+ dgetrf_(&N, &N, Vi_mkl, &N, IPIV, &INFO); - if (INFO < 0) throw ("Error: LU decomposition failed. Invalid values found in the matrix.\n"); - else if (INFO > 0) { - delete[] Vi_mkl; -@@ -467,7 +467,7 @@ bool gcta::comput_inverse_logdet_LU_mkl_array(int n, f - } - - // Calcualte V inverse -- dgetri(&N, Vi_mkl, &N, IPIV, WORK, &LWORK, &INFO); -+ dgetri_(&N, Vi_mkl, &N, IPIV, WORK, &LWORK, &INFO); - if (INFO < 0) throw ("Error: invalid values found in the varaince-covaraince (V) matrix.\n"); - else if (INFO > 0) return (false); // Vi.diagonal()=Vi.diagonal().array()+Vi.diagonal().mean()*1e-3; - else { diff --git a/biology/gcta/files/patch-src_Geno.cpp b/biology/gcta/files/patch-src_Geno.cpp new file mode 100644 index 000000000000..5b51b5533764 --- /dev/null +++ b/biology/gcta/files/patch-src_Geno.cpp @@ -0,0 +1,11 @@ +--- src/Geno.cpp.orig 2022-08-03 06:01:52 UTC ++++ src/Geno.cpp +@@ -2948,7 +2948,7 @@ void Geno::bgen2bed(const vector<uint32_t> &raw_marker + } + //LOGGER.i(0, "MIDDLE: " + to_string(index) + "NUM_thread: " + to_string(omp_get_max_threads())); + +- #pragma omp ordered ++ // Conflict with previous on 2759 #pragma omp ordered + save_bed(buf, num_marker); + delete[] buf; + delete[] dec_data; diff --git a/biology/gcta/files/patch-src_main.cpp b/biology/gcta/files/patch-src_main.cpp new file mode 100644 index 000000000000..9c2db2b74814 --- /dev/null +++ b/biology/gcta/files/patch-src_main.cpp @@ -0,0 +1,11 @@ +--- src/main.cpp.orig 2023-10-13 13:46:01 UTC ++++ src/main.cpp +@@ -226,7 +226,7 @@ int main(int argc, char *argv[]){ + + #ifdef _WIN32 + _putenv_s("OMP_NUM_THREADS", to_string(thread_num).c_str()); +- #elif defined __linux__ || defined __APPLE__ ++ #elif defined __FreeBSD__ || defined __linux__ || defined __APPLE__ + setenv("OMP_NUM_THREADS", to_string(thread_num).c_str(), 1); + #else + #error Only Windows, Mac and Linux are supported. diff --git a/biology/gcta/pkg-descr b/biology/gcta/pkg-descr index 6c177f5eb311..6704dff92f83 100644 --- a/biology/gcta/pkg-descr +++ b/biology/gcta/pkg-descr @@ -1,5 +1,5 @@ -GCTA (Genome-wide Complex Trait Analysis) was originally designed to estimate -the proportion of phenotypic variance explained by genome- or chromosome-wide -SNPs for complex traits (the GREML method), and has subsequently extended for -many other analyses to better understand the genetic architecture of complex -traits. +GCTA (Genome-wide Complex Trait Analysis) was originally designed to +estimate the proportion of phenotypic variance explained by genome- or +chromosome-wide SNPs for complex traits (the GREML method), and has +subsequently extended for many other analyses to better understand the +genetic architecture of complex traits.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202310141258.39ECwrfw031079>