[med-svn] [Git][med-team/bolt-lmm][master] Attempt building on more archs

Nilesh Patra (@nilesh) gitlab at salsa.debian.org
Sun Jul 31 19:51:52 BST 2022



Nilesh Patra pushed to branch master at Debian Med / bolt-lmm


Commits:
50badf33 by Nilesh Patra at 2022-07-31T18:51:09+00:00
Attempt building on more archs

It doesn't seem to work on arm64 as of yet, log below.
Don't know why it triggers bolt again, but * sigh *

./bolt \
    --bfile=EUR_subset \
    --phenoFile=EUR_subset.pheno2.covars \
    --exclude=EUR_subset.exclude2 \
    --phenoCol=PHENO \
    --phenoCol=QCOV1 \
    --modelSnps=EUR_subset.modelSnps2 \
    --reml \
    --numThreads=2
                      +-----------------------------+
                      |                       ___   |
                      |   BOLT-LMM, v2.3.6   /_ /   |
                      |   October 29, 2021    /_/   |
                      |   Po-Ru Loh            //   |
                      |                        /    |
                      +-----------------------------+

Copyright (C) 2014-2021 Harvard University.
Distributed under the GNU GPLv3 open source license.

Boost version: 1_74

Command line options:

./bolt \
    --bfile=EUR_subset \
    --phenoFile=EUR_subset.pheno2.covars \
    --exclude=EUR_subset.exclude2 \
    --phenoCol=PHENO \
    --phenoCol=QCOV1 \
    --modelSnps=EUR_subset.modelSnps2 \
    --reml \
    --numThreads=2

Setting number of threads to 2
fam: EUR_subset.fam
bim(s): EUR_subset.bim
bed(s): EUR_subset.bed

=== Reading genotype data ===

Total indivs in PLINK data: Nbed = 379
Total indivs stored in memory: N = 379
Reading bim file #1: EUR_subset.bim
    Read 54051 snps
Total snps in PLINK data: Mbed = 54051
Reading exclude file (SNPs to exclude): EUR_subset.exclude2
Excluded 47959 SNP(s)
Reading list of SNPs to include in model (i.e., GRM): EUR_subset.modelSnps2
WARNING: SNP has been excluded: rs2176153
WARNING: SNP has been excluded: rs77036651
WARNING: SNP has been excluded: rs189917831
WARNING: SNP has been excluded: rs76452819
WARNING: SNP has been excluded: rs77203822
Included 1331 SNP(s) in model in 2 variance component(s)
WARNING: 10420 SNP(s) had been excluded

Breakdown of SNP pre-filtering results:
  1331 SNPs to include in model (i.e., GRM)
  0 additional non-GRM SNPs loaded
  52720 excluded SNPs
Allocating 1331 x 380/4 bytes to store genotypes
Reading genotypes and performing QC filtering on snps and indivs...
Reading bed file #1: EUR_subset.bed
    Expecting 5134845 (+3) bytes for 379 indivs, 54051 snps
Total indivs after QC: 379
Total post-QC SNPs: M = 1331
  Variance component 1: 660 post-QC SNPs (name: 'chr21')
  Variance component 2: 671 post-QC SNPs (name: 'chr22')
Time for SnpData setup = 0.630153 sec

=== Reading phenotype and covariate data ===

Read data for 373 indivs (ignored 0 without genotypes) from:
  EUR_subset.pheno2.covars
Number of indivs with no missing phenotype(s) to use: 369
NOTE: Using all-1s vector (constant term) in addition to specified covariates
    Using quantitative covariate: CONST_ALL_ONES
Number of individuals used in analysis: Nused = 369
Singular values of covariate matrix:
    S[0] = 19.2094
Total covariate vectors: C = 1
Total independent covariate vectors: Cindep = 1

=== Initializing Bolt object: projecting and normalizing SNPs ===

Number of chroms with >= 1 good SNP: 2
Average norm of projected SNPs:           368.000000
Dimension of all-1s proj space (Nused-1): 368
Time for covariate data setup + Bolt initialization = 0.0125201 sec

Phenotype 1:   N = 369   mean = -0.000706532   std = 1.02606
Phenotype 2:   N = 369   mean = 1.53117   std = 0.499705

=== Estimating variance parameters ===

=== Making initial guesses for phenotype 1 ===

Using 3 random trials

                      +-----------------------------+
                      |                       ___   |
                      |   BOLT-LMM, v2.3.6   /_ /   |
                      |   October 29, 2021    /_/   |
                      |   Po-Ru Loh            //   |
                      |                        /    |
                      +-----------------------------+

Copyright (C) 2014-2021 Harvard University.
Distributed under the GNU GPLv3 open source license.

Boost version: 1_74

Command line options:

(null)

ERROR: Use exactly one of the --bfile, --bfilegz, or --fam,bim,bed input formats
Aborting due to error processing command line arguments
For list of arguments, run with -h (--help) option

- - - - -


1 changed file:

- + debian/patches/simde.patch


Changes:

=====================================
debian/patches/simde.patch
=====================================
@@ -0,0 +1,86 @@
+--- a/src/MemoryUtils.hpp
++++ b/src/MemoryUtils.hpp
+@@ -25,14 +25,17 @@
+ 
+ //#define ALIGNED_MALLOC(size) mkl_malloc(size, MEM_ALIGNMENT)
+ //#define ALIGNED_MALLOC(size) _mm_malloc(size, MEM_ALIGNMENT)
++
+ void *ALIGNED_MALLOC(uint64 size);
+ 
+ #ifdef USE_MKL_MALLOC
+ #include <mkl.h>
+ #define ALIGNED_FREE mkl_free
+-#else
+-#include <xmmintrin.h>
++#elif defined(__SSE__)
++ #include <xmmintrin.h>
+ #define ALIGNED_FREE _mm_free
++#else
++#define ALIGNED_FREE free
+ #endif
+ 
+ #define ALIGNED_MALLOC_DOUBLES(numDoubles) (double *) ALIGNED_MALLOC((numDoubles)*sizeof(double))
+--- a/src/SnpData.cpp
++++ b/src/SnpData.cpp
+@@ -25,9 +25,8 @@
+ #include <sstream>
+ #include <map>
+ 
+-#ifdef USE_SSE
+-#include <emmintrin.h> // SSE2 for packed doubles
+-#endif
++#define SIMDE_ENABLE_NATIVE_ALIASES
++#include <simde/x86/sse2.h>
+ 
+ #include "Types.hpp"
+ #include "SnpData.hpp"
+@@ -892,26 +891,12 @@
+ 
+     uchar *ptr = genotypes + m * (Nstride>>2);
+     for (uint64 n4 = 0; n4 < Nstride; n4 += 4) {
+-#ifdef USE_SSE // todo: add AVX instructions to do all at once?
+-      __m128d x01 = _mm_load_pd(&work[*ptr][0]);
+-      __m128d x23 = _mm_load_pd(&work[*ptr][2]);
+-      __m128d mask01 = _mm_load_pd(&subMaskIndivs[n4]);
+-      __m128d mask23 = _mm_load_pd(&subMaskIndivs[n4+2]);
+-      _mm_store_pd(&out[n4], _mm_mul_pd(x01, mask01));
+-      _mm_store_pd(&out[n4+2], _mm_mul_pd(x23, mask23));
+-#else
+-      // non-lookup approach
+-      /*
+-      uchar g = *ptr;
+-      out[n4] = lookupBedCode[g&3] * subMaskIndivs[n4];
+-      out[n4+1] = lookupBedCode[(g>>2)&3] * subMaskIndivs[n4+1];
+-      out[n4+2] = lookupBedCode[(g>>4)&3] * subMaskIndivs[n4+2];
+-      out[n4+3] = lookupBedCode[(g>>6)&3] * subMaskIndivs[n4+3];
+-      */
+-      memcpy(out + n4, work[*ptr], sizeof(work[0]));
+-      for (int k = 0; k < 4; k++)
+-	out[n4+k] *= subMaskIndivs[n4+k];
+-#endif
++      simde__m128d x01 = simde_mm_load_pd(&work[*ptr][0]);
++      simde__m128d x23 = simde_mm_load_pd(&work[*ptr][2]);
++      simde__m128d mask01 = simde_mm_load_pd(&subMaskIndivs[n4]);
++      simde__m128d mask23 = simde_mm_load_pd(&subMaskIndivs[n4+2]);
++      simde_mm_store_pd(&out[n4], simde_mm_mul_pd(x01, mask01));
++      simde_mm_store_pd(&out[n4+2], simde_mm_mul_pd(x23, mask23));
+       ptr++;
+     }
+   }
+--- a/src/MemoryUtils.cpp
++++ b/src/MemoryUtils.cpp
+@@ -25,8 +25,11 @@
+ void *ALIGNED_MALLOC(uint64 size) {
+ #ifdef USE_MKL_MALLOC
+   void *p = mkl_malloc(size, MEM_ALIGNMENT);
+-#else
++#elif defined(__SSE__)
+   void *p = _mm_malloc(size, MEM_ALIGNMENT);
++#else
++#include <stdlib.h>
++  void *p = aligned_alloc(MEM_ALIGNMENT, size);
+ #endif
+   // TODO: change to assert() or dispense with altogether and change ALIGNED_MALLOC to macro?
+   if (p == NULL) {
+
+



View it on GitLab: https://salsa.debian.org/med-team/bolt-lmm/-/commit/50badf3338741e739b2bb591a8930d177fa6de6c

-- 
View it on GitLab: https://salsa.debian.org/med-team/bolt-lmm/-/commit/50badf3338741e739b2bb591a8930d177fa6de6c
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/20220731/cd2f7487/attachment-0001.htm>


More information about the debian-med-commit mailing list