about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPjotr Prins2020-09-28 13:52:44 +0100
committerPjotr Prins2020-09-29 13:04:09 +0100
commit1cd41f0f6f1fe401d6bdc33a5c33794adb1452a6 (patch)
tree36c5837ac135da4f2df1f53718f01030395d973b
parenta59bc9ac72e3edd27ff1b36a70c001c8d1949c56 (diff)
downloadpangemma-1cd41f0f6f1fe401d6bdc33a5c33794adb1452a6.tar.gz
Fixing Travis build, remove gcc warnings and bump version
-rw-r--r--.guix-dev-gcc-older2
-rw-r--r--.travis.yml34
-rw-r--r--INSTALL.md2
-rw-r--r--RELEASE-NOTES.md5
-rw-r--r--VERSION2
-rw-r--r--src/fastblas.cpp43
-rw-r--r--src/fastblas.h3
-rw-r--r--src/lmm.cpp8
-rw-r--r--src/mathfunc.cpp2
-rw-r--r--src/version.h8
10 files changed, 43 insertions, 66 deletions
diff --git a/.guix-dev-gcc-older b/.guix-dev-gcc-older
new file mode 100644
index 0000000..7d37f7d
--- /dev/null
+++ b/.guix-dev-gcc-older
@@ -0,0 +1,2 @@
+# Typical Guix container invocation
+~/opt/guix/bin/guix environment -C guix --ad-hoc gcc-toolchain@6.5.0 gdb gsl openblas zlib bash ld-wrapper perl vim which
diff --git a/.travis.yml b/.travis.yml
index 6fd48bd..5bc64eb 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,8 +1,5 @@
 language: C++
 matrix:
-  # OSX testing is under development
-  # allow_failures:
-  #   - os: osx
   include:
     - os: linux
       compiler: gcc
@@ -11,36 +8,11 @@ matrix:
           sources:
             - ubuntu-toolchain-r-test
           packages:
-            # Our dev environment is a more recent GNU C++ and GSL2
-            - g++-4.9
+            - libgsl-dev
             - libopenblas-dev
-            - zlib1g-dev
-            - libgsl0-dev
-    - os: osx
-      compiler: clang
-#     - os: linux
-#       addons:
-#         apt:
-#           sources:
-#             - ubuntu-toolchain-r-test
-#           packages:
-#             - g++-6
-#       env:
-#         - MATRIX_EVAL="CC=gcc-6 && CXX=g++-6"
-before_install:
-  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update && brew install gsl openblas zlib eigen lapack ; fi
 script:
   - echo $MATRIX_EVAL
   - eval "${MATRIX_EVAL}"
   - $CXX --version
-  # build and test debug version
-  - make      CXX=$CXX OPENBLAS_LEGACY=1 WITH_GSLCBLAS=1 -j 4 -k
-  - time make CXX=$CXX OPENBLAS_LEGACY=1 WITH_GSLCBLAS=1 check
-  # - make clean
-  # build and test release version (integration test mostly)
-  # - make CXX=$CXX EIGEN_INCLUDE_PATH=$EIGEN_INCLUDE_PATH DEBUG= FORCE_DYNAMIC=1 WITH_OPENBLAS=1 OPENBLAS_LEGACY=1 -j 4
-  # - time make CXX=$CXX DEBUG= WITH_OPENBLAS=1 fast-check
-  # build static release (fast-check only)
-  # - make clean
-  # - make CXX=$CXX TRAVIS_CI=1 -j 4 fast-check
-  # - ldd ./bin/gemma
+  - make -j 4 OPENBLAS_LEGACY=1 
+  - make OPENBLAS_LEGACY=1 fast-check
diff --git a/INSTALL.md b/INSTALL.md
index 29b50d6..f807a7b 100644
--- a/INSTALL.md
+++ b/INSTALL.md
@@ -13,7 +13,7 @@ and it should give you the version.
 GEMMA runs on Linux and MAC OSX and the runtime has the following
 dependencies:
 
-* C++ tool chain >= 4.9
+* C++ tool chain >= 6.5.0 (we test with file .guix-dev-gcc-older)
 * GNU Science library (GSL) 1.x (GEMMA does not currently work with GSL >= 2).
 * blas/openblas
 * lapack
diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md
index 53674d8..4345c27 100644
--- a/RELEASE-NOTES.md
+++ b/RELEASE-NOTES.md
@@ -4,7 +4,10 @@ see
 and
 [commits](https://github.com/genetics-statistics/GEMMA/commits/master).
 
-## ChangeLog v0.98.2 (2018/05/28)
+## ChangeLog v0.98.3 (2020/?)
+
+
+## ChangeLog v0.98.2 (2019/05/28)
 
 GCC 10.1 fix release
 
diff --git a/VERSION b/VERSION
index 85b51db..cb48b48 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-0.98.2
+0.98.3
diff --git a/src/fastblas.cpp b/src/fastblas.cpp
index 41ee741..efa8412 100644
--- a/src/fastblas.cpp
+++ b/src/fastblas.cpp
@@ -2,7 +2,7 @@
     Genome-wide Efficient Mixed Model Association (GEMMA)
     Copyright © 2011-2017, Xiang Zhou
     Copyright © 2017, Peter Carbonetto
-    Copyright © 2017, Pjotr Prins
+    Copyright © 2017-2020, Pjotr Prins
 
     This program is free software: you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -25,6 +25,7 @@
 #include "debug.h"
 #include "mathfunc.h"
 #include <string.h>
+#include "fastblas.h"
 
 const char *FastblasTrans = "T";
 const char *FastblasNoTrans = "N";
@@ -246,29 +247,27 @@ extern "C" {
   int gsl_linalg_LU_decomp(gsl_matrix * A, gsl_permutation * p, int * signum);
 }
 
-void gsl_matrix_inv(gsl_matrix *m)  
-{  
-    size_t n=m->size1;  
-  
-    gsl_matrix *temp1=gsl_matrix_calloc(n,n);  
-    gsl_matrix_memcpy(temp1,m);  
-  
-    gsl_permutation *p=gsl_permutation_calloc(n);  
-    int sign=0;  
-    gsl_linalg_LU_decomp(temp1,p,&sign);  
-    gsl_matrix *inverse=gsl_matrix_calloc(n,n);  
-  
-    gsl_linalg_LU_invert(temp1,p,inverse);  
-    gsl_matrix_memcpy(m,inverse);  
-  
-    gsl_permutation_free(p);  
-    gsl_matrix_free(temp1);  
-    gsl_matrix_free(inverse);  
-  
+void gsl_matrix_inv(gsl_matrix *m)
+{
+    size_t n=m->size1;
+
+    gsl_matrix *temp1=gsl_matrix_calloc(n,n);
+    gsl_matrix_memcpy(temp1,m);
+
+    gsl_permutation *p=gsl_permutation_calloc(n);
+    int sign=0;
+    gsl_linalg_LU_decomp(temp1,p,&sign);
+    gsl_matrix *inverse=gsl_matrix_calloc(n,n);
+
+    gsl_linalg_LU_invert(temp1,p,inverse);
+    gsl_matrix_memcpy(m,inverse);
+
+    gsl_permutation_free(p);
+    gsl_matrix_free(temp1);
+    gsl_matrix_free(inverse);
+
 }
 
 void fast_inverse(gsl_matrix *m) {
     gsl_matrix_inv(m);
 }
-
-  
diff --git a/src/fastblas.h b/src/fastblas.h
index 32253b3..b36506d 100644
--- a/src/fastblas.h
+++ b/src/fastblas.h
@@ -23,7 +23,8 @@
 
 #include <assert.h>
 #include <iostream>
-// #include "gsl/gsl_matrix.h"
+#include "gsl/gsl_cblas.h"
+#include "gsl/gsl_matrix.h"
 
 gsl_matrix *fast_copy(gsl_matrix *m, const double *mem);
 
diff --git a/src/lmm.cpp b/src/lmm.cpp
index b811594..6337116 100644
--- a/src/lmm.cpp
+++ b/src/lmm.cpp
@@ -278,8 +278,8 @@ void CalcPab(const size_t n_cvt, const size_t e_mode, const gsl_vector *Hi_eval,
              const gsl_matrix *Uab, const gsl_vector *unused, gsl_matrix *Pab) {
 
 
-  size_t n_index = (n_cvt + 2 + 1) * (n_cvt + 2) / 2; // result size
-  auto ni_test = Uab->size1; // inds
+  // size_t n_index = (n_cvt + 2 + 1) * (n_cvt + 2) / 2; // result size
+  // auto ni_test = Uab->size1; // inds
   assert(Uab->size1 == Hi_eval->size);
   assert(Uab->size2 == n_index);
 
@@ -593,8 +593,8 @@ $7 = 3
 $8 = 6
   */
 
-  auto Uab = p->Uab;
-  auto ab = p->ab;
+    // auto Uab = p->Uab;
+    // auto ab = p->ab;
   assert(n_index == (n_cvt + 2 + 1) * (n_cvt + 2) / 2);
   assert(Uab->size1 == ni_test);
   assert(Uab->size2 == n_index); // n_cvt == 1 -> n_index == 6?
diff --git a/src/mathfunc.cpp b/src/mathfunc.cpp
index cd74e09..aaa9431 100644
--- a/src/mathfunc.cpp
+++ b/src/mathfunc.cpp
@@ -400,7 +400,7 @@ uint count_abs_small_values(const gsl_vector *v, double min) {
 // and the ratio of max and min but one (min is expected to be zero).
 bool isMatrixIllConditioned(const gsl_vector *eigenvalues, double max_ratio) {
   auto t = abs_minmax(eigenvalues);
-  auto absmin = get<0>(t);
+  // auto absmin = get<0>(t);
   auto absmin1 = get<1>(t);
   auto absmax = get<2>(t);
   if (absmax/absmin1 > max_ratio) {
diff --git a/src/version.h b/src/version.h
index f97c9f1..6c22a1b 100644
--- a/src/version.h
+++ b/src/version.h
@@ -1,5 +1,5 @@
-// version.h generated by GEMMA ./scripts/gen_version_info.sh
-#define GEMMA_VERSION "0.98.2"
-#define GEMMA_DATE "2020-05-28"
+// version.h generated by GEMMA scripts/gen_version_info.sh
+#define GEMMA_VERSION "0.98.3"
+#define GEMMA_DATE "2020-09-29"
 #define GEMMA_YEAR "2020"
-#define GEMMA_PROFILE ""
+#define GEMMA_PROFILE "/gnu/store/a7a35vv75zk9k23k8ws4v2wrs123dln1-profile"