[med-svn] [Git][med-team/plink2][upstream] New upstream version 2.00~a3-200511+dfsg

Dylan Aïssi gitlab at salsa.debian.org
Fri May 29 10:49:33 BST 2020



Dylan Aïssi pushed to branch upstream at Debian Med / plink2


Commits:
b5c5ffd9 by Dylan Aïssi at 2020-05-29T11:49:00+02:00
New upstream version 2.00~a3-200511+dfsg
- - - - -


6 changed files:

- Makefile
- build_dynamic/Makefile
- plink2.cc
- plink2_glm.cc
- plink2_matrix.cc
- plink2_matrix.h


Changes:

=====================================
Makefile
=====================================
@@ -36,9 +36,12 @@ DESTDIR		?= .
 
 UNAME := $(shell uname)
 ifeq ($(UNAME), Darwin)
+  # argh
+  CFLAGS += -I/usr/local/include
+  CXXFLAGS += -I/usr/local/include
   BLASFLAGS=-framework Accelerate
   BLASFLAGS64=-framework Accelerate
-  LDFLAGS=-ldl -lpthread -lz -lzstd
+  LDFLAGS=-ldl -lpthread -lz -lzstd -L/usr/local/lib
 endif
 
 %.o: %.c


=====================================
build_dynamic/Makefile
=====================================
@@ -113,7 +113,9 @@ ifeq ($(UNAME), Darwin)
     $(error MKL is not currently supported on OS X)
   endif
   BLASFLAGS=-framework Accelerate
-  CXXFLAGS += -stdlib=libc++
+  CFLAGS += -I/usr/local/include
+  CXXFLAGS += -I/usr/local/include -stdlib=libc++
+  LINKFLAGS += -L/usr/local/lib
 else
   ifdef DYNAMIC_MKL
     ifdef NO_LAPACK


=====================================
plink2.cc
=====================================
@@ -66,10 +66,10 @@ static const char ver_str[] = "PLINK v2.00a3"
 #ifdef USE_MKL
   " Intel"
 #endif
-  " (9 Apr 2020)";
+  " (11 May 2020)";
 static const char ver_str2[] =
   // include leading space if day < 10, so character length stays the same
-  " "
+  ""
 #ifndef LAPACK_ILP64
   "  "
 #endif


=====================================
plink2_glm.cc
=====================================
@@ -1521,12 +1521,13 @@ PglErr GlmFillAndTestCovars(const uintptr_t* sample_include, const uintptr_t* co
           bigstack_alloc_d(new_nonlocal_covar_ct * new_nonlocal_covar_ct, &dbl_2d_buf))) {
     return kPglRetNomem;
   }
-  uint32_t* cat_obs_buf = nullptr;
-  if (extra_cat_ct) {
-    if (unlikely(
-            bigstack_alloc_u32(covar_max_nonnull_cat_ct + 1, &cat_obs_buf))) {
-      return kPglRetNomem;
-    }
+  uint32_t* cat_obs_buf;
+  // bugfix (11 May 2020): we were previously only initializing cat_obs_buf
+  // when extra_cat_ct > 0; this resulted in segfaults when every categorical
+  // covariate had only two categories.
+  if (unlikely(
+          bigstack_alloc_u32(covar_max_nonnull_cat_ct + 1, &cat_obs_buf))) {
+    return kPglRetNomem;
   }
   unsigned char* alloc_base = g_bigstack_base;
   unsigned char* new_covar_name_alloc = g_bigstack_end;


=====================================
plink2_matrix.cc
=====================================
@@ -869,6 +869,8 @@ void ColMajorFvectorMatrixMultiplyStrided(const float* in_fvec1, const float* in
 }
 
 // Briefly experimented with trying to speed this up, didn't make any progress.
+// Tried vDSP_mtransD() on macOS and mkl_domatcopy() on Linux, neither of those
+// helped, so it's likely there's no progress to be made.
 void MatrixTransposeCopy(const double* old_matrix, uint32_t old_maj, uint32_t new_maj, double* new_matrix_iter) {
   for (uint32_t new_maj_idx = 0; new_maj_idx != new_maj; ++new_maj_idx) {
     const double* old_matrix_col_iter = &(old_matrix[new_maj_idx]);


=====================================
plink2_matrix.h
=====================================
@@ -95,9 +95,9 @@ extern "C" {
 #        endif
 static_assert(sizeof(MKL_INT) == 8, "Unexpected MKL_INT size.");
 #      else
-  // If you want 64-bit index support, but not MKL (e.g. you're targeting an
-  // AMD processor), modify the Makefile to link to a LAPACK library recompiled
-  // with -fdefault-integer-8.
+// If you want 64-bit index support, but not MKL (e.g. you're targeting an
+// AMD processor), modify the Makefile to link to a LAPACK library recompiled
+// with -fdefault-integer-8.
 
 #        ifdef USE_CBLAS_XGEMM
 #          include <cblas.h>
@@ -133,6 +133,9 @@ static_assert(sizeof(MKL_INT) == 8, "Unexpected MKL_INT size.");
                           float* sy, __CLPK_integer* incy);
 #        endif
 #      endif  // !USE_MKL
+#      ifdef USE_CUDA
+#        include "cuda/plink2_matrix_cuda.h"
+#      endif
 #    endif
 
   void xerbla_(void);



View it on GitLab: https://salsa.debian.org/med-team/plink2/-/commit/b5c5ffd9aa7fc65c0c8761c1630f4c5223910016

-- 
View it on GitLab: https://salsa.debian.org/med-team/plink2/-/commit/b5c5ffd9aa7fc65c0c8761c1630f4c5223910016
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20200529/bac60f9c/attachment-0001.html>


More information about the debian-med-commit mailing list