From 806a01c27a1fd366c120820de0c38caea1d4cdcd Mon Sep 17 00:00:00 2001 From: Pjotr Prins Date: Wed, 26 Nov 2025 12:01:37 +0100 Subject: openblas speed on par --- src/lmm.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/lmm.cpp') diff --git a/src/lmm.cpp b/src/lmm.cpp index 87b9e1e..fb3a255 100644 --- a/src/lmm.cpp +++ b/src/lmm.cpp @@ -55,6 +55,7 @@ using namespace std; void LMM::CopyFromParam(PARAM &cPar) { + checkpoint_nofile("lmm-copy-from-param"); a_mode = cPar.a_mode; d_pace = cPar.d_pace; @@ -91,6 +92,7 @@ void LMM::CopyFromParam(PARAM &cPar) { } void LMM::CopyToParam(PARAM &cPar) { + checkpoint_nofile("lmm-copy-to-param"); cPar.time_UtX = time_UtX; cPar.time_opt = time_opt; @@ -105,6 +107,7 @@ void LMM::WriteFiles() { file_str = path_out + "/" + file_out; file_str += ".assoc.txt"; + checkpoint("lmm-write-files",file_str.c_str()); ofstream outfile(file_str.c_str(), ofstream::out); if (!outfile) { @@ -1668,6 +1671,7 @@ void LMM::Analyze(std::function< SnpNameValues(size_t) >& fetch_snp, bool process_gwasnps = gwasnps.size(); if (process_gwasnps) debug_msg("Analyze subset of SNPs (LOCO)"); + checkpoint_nofile("start-lmm-analyze"); // Calculate basic quantities. size_t n_index = (n_cvt + 2 + 1) * (n_cvt + 2) / 2; @@ -1704,6 +1708,7 @@ void LMM::Analyze(std::function< SnpNameValues(size_t) >& fetch_snp, auto batch_compute = [&](size_t l) { // using a C++ closure // Compute SNPs in batch, note the computations are independent per SNP // debug_msg("enter batch_compute"); + checkpoint_nofile("\nstart-batch_compute"); gsl_matrix_view Xlarge_sub = gsl_matrix_submatrix(Xlarge, 0, 0, inds, l); gsl_matrix_view UtXlarge_sub = gsl_matrix_submatrix(UtXlarge, 0, 0, inds, l); @@ -1763,6 +1768,7 @@ void LMM::Analyze(std::function< SnpNameValues(size_t) >& fetch_snp, sumStat.push_back(SNPs); } // debug_msg("exit batch_compute"); + checkpoint_nofile("end-batch_compute"); }; const auto num_snps = indicator_snp.size(); @@ -1847,6 +1853,7 @@ void LMM::Analyze(std::function< SnpNameValues(size_t) >& fetch_snp, ProgressBar("Reading SNPs", num_snps - 1, num_snps - 1); // cout << "Counted SNPs " << c << " sumStat " << sumStat.size() << endl; cout << endl; + checkpoint_nofile("end-lmm-analyze"); gsl_vector_safe_free(x); gsl_vector_safe_free(x_miss); -- cgit 1.4.1