aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPjotr Prins2020-09-28 13:52:44 +0100
committerPjotr Prins2020-09-29 13:04:09 +0100
commit1cd41f0f6f1fe401d6bdc33a5c33794adb1452a6 (patch)
tree36c5837ac135da4f2df1f53718f01030395d973b /src
parenta59bc9ac72e3edd27ff1b36a70c001c8d1949c56 (diff)
downloadpangemma-1cd41f0f6f1fe401d6bdc33a5c33794adb1452a6.tar.gz
Fixing Travis build, remove gcc warnings and bump version
Diffstat (limited to 'src')
-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
5 files changed, 32 insertions, 32 deletions
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"