diff options
| author | Pjotr Prins | 2025-11-26 13:26:54 +0100 |
|---|---|---|
| committer | Pjotr Prins | 2025-11-26 13:26:54 +0100 |
| commit | cf4f018bd350c8202aef2ee085a2c536097895b4 (patch) | |
| tree | de59a01f23d98ab523e2ae9450b278ad0dae3fde | |
| parent | 806a01c27a1fd366c120820de0c38caea1d4cdcd (diff) | |
| download | pangemma-cf4f018bd350c8202aef2ee085a2c536097895b4.tar.gz | |
Fix progress bar and test larger file
| -rw-r--r-- | premake5.lua | 2 | ||||
| -rw-r--r-- | src/gemma_io.cpp | 4 | ||||
| -rw-r--r-- | src/lmm.cpp | 3 | ||||
| -rw-r--r-- | test/performance/releases.org | 7 |
4 files changed, 11 insertions, 5 deletions
diff --git a/premake5.lua b/premake5.lua index 1f70694..0a20977 100644 --- a/premake5.lua +++ b/premake5.lua @@ -61,7 +61,7 @@ project "gemma" files { "src/*.h src/*.c src/**.hpp", "src/**.cpp" } removefiles { "src/gemma_api.cpp" } includedirs { "src/" } - links { "openblas" } + links { } filter "configurations:Debug" defines { "DEBUG" } diff --git a/src/gemma_io.cpp b/src/gemma_io.cpp index 3bec483..3826cea 100644 --- a/src/gemma_io.cpp +++ b/src/gemma_io.cpp @@ -61,7 +61,7 @@ void ProgressBar(string str, double p, double total, double ratio) { const double progress = (100.0 * p / total); const uint barsize = (int)(progress / 2.0); // characters // cout << barsize << endl; - // cout << str << " "; + cout << str << " "; // cout << p << "/" << total << endl; assert(barsize < 101); // corrupted data somehow if (barsize > 0) { @@ -1348,7 +1348,7 @@ void ReadFile_kin(const string &file_kin, vector<int> &indicator_idv, infile.close(); infile.clear(); - checkpoint("read-kinship-file",file_kin); + checkpoint("end-read-file-kin",file_kin); return; } diff --git a/src/lmm.cpp b/src/lmm.cpp index fb3a255..1ef3990 100644 --- a/src/lmm.cpp +++ b/src/lmm.cpp @@ -1723,6 +1723,7 @@ void LMM::Analyze(std::function< SnpNameValues(size_t) >& fetch_snp, gsl_matrix_set_zero(Xlarge); for (size_t i = 0; i < l; i++) { + ProgressBar("GWA compute ", i, l - 1); // for each snp batch item extract transformed genotype: gsl_vector_view UtXlarge_col = gsl_matrix_column(UtXlarge, i); gsl_vector_safe_memcpy(Utx, &UtXlarge_col.vector); @@ -1850,7 +1851,7 @@ void LMM::Analyze(std::function< SnpNameValues(size_t) >& fetch_snp, } batch_compute(c % msize); - ProgressBar("Reading SNPs", num_snps - 1, num_snps - 1); + ProgressBar("Computed ", num_snps - 1, num_snps - 1); // cout << "Counted SNPs " << c << " sumStat " << sumStat.size() << endl; cout << endl; checkpoint_nofile("end-lmm-analyze"); diff --git a/test/performance/releases.org b/test/performance/releases.org index 792cb2e..ff18287 100644 --- a/test/performance/releases.org +++ b/test/performance/releases.org @@ -9,7 +9,7 @@ We are facing a time regression. premake5 gmake2 && make verbose=1 config=release -j 8 gemma && time LD_LIBRARY_PATH=$GUIX_ENVIRONMENT/lib ./build/bin/Release/gemma -g ./example/mouse_hs1940.geno.txt.gz -p ./example/mouse_hs1940.pheno.txt -n 1 -a ./example/mouse_hs1940.anno.txt -k ./output/result.cXX.txt -lmm -no-check -debug -With openblas 0.3.21 we go a bit faster. Still 10% behind though, there is room for tweaking. But I want to run some bigger files first. +With openblas 0.3.21 we go a bit faster. Still 10% behind though, there is room for tweaking. It may actually be a new SSD. I want to run some bigger files first. #+begin_src sh Pangemma --- GEMMA 0.98.5 compatible executable 1.0.0 (2025-11-22) with guile 3.0.9 by Xiang Zhou, Pjotr Prins and team (C) 2012-2025 @@ -82,8 +82,13 @@ to ``` time LD_LIBRARY_PATH=$GUIX_ENVIRONMENT/lib ./build/bin/Release/gemma -g tmp/pangenome-13M-genotypes.txt -p tmp/pheno.json.txt -n 1 -a tmp/snps-matched.txt -k tmp/93f6b39ec06c09fb9ba9ca628b5fb990921b6c60.3.cXX.txt.cXX.txt -lmm 9 -no-check +real 20m4.687s +user 23m42.508s +sys 9m51.929s ``` +On my AMD Ryzen 7 3700X it uses about ~10Gb of RAM. With the -debug switch it clapped out because of sqrt(NaN). There is a lot that can be gained with better IO and multi-core use. + ** GEMMA 0.98.5-pre1 Measurements taken on a recent AMD Ryzen 7 3700X 8-Core Processor @2.195GHz. |
