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/gemma_io.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/gemma_io.cpp') diff --git a/src/gemma_io.cpp b/src/gemma_io.cpp index 7d1f0ca..3bec483 100644 --- a/src/gemma_io.cpp +++ b/src/gemma_io.cpp @@ -153,6 +153,7 @@ std::istream &safeGetline(std::istream &is, std::string &t) { // Read SNP file. A single column of SNP names. bool ReadFile_snps(const string file_snps, set &setSnps) { debug_msg("enter ReadFile_snps"); + checkpoint("read-file-snps",file_snps); setSnps.clear(); igzstream infile(file_snps.c_str(), igzstream::in); @@ -182,6 +183,7 @@ bool ReadFile_snps(const string file_snps, set &setSnps) { bool ReadFile_snps_header(const string &file_snps, set &setSnps) { debug_msg("entered"); setSnps.clear(); + checkpoint("read-file-header",file_snps); igzstream infile(file_snps.c_str(), igzstream::in); if (!infile) { @@ -239,6 +241,7 @@ bool ReadFile_snps_header(const string &file_snps, set &setSnps) { // Read log file. bool ReadFile_log(const string &file_log, double &pheno_mean) { debug_msg("ReadFile_log"); + checkpoint("read-file-log",file_log); ifstream infile(file_log.c_str(), ifstream::in); if (!infile) { cout << "error! fail to open log file: " << file_log << endl; @@ -282,6 +285,8 @@ bool ReadFile_anno(const string &file_anno, map &mapRS2chr, map &mapRS2bp, map &mapRS2cM) { debug_msg("ReadFile_anno"); + checkpoint("read-file-anno",file_anno); + mapRS2chr.clear(); mapRS2bp.clear(); @@ -345,6 +350,7 @@ bool ReadFile_anno(const string &file_anno, map &mapRS2chr, bool ReadFile_column(const string &file_pheno, vector &indicator_idv, vector &pheno, const int &p_column) { debug_msg("entered"); + checkpoint("read-file-column",file_pheno); indicator_idv.clear(); pheno.clear(); @@ -389,6 +395,7 @@ bool ReadFile_pheno(const string &file_pheno, vector> &pheno, const vector &p_column) { debug_msg("entered"); + checkpoint("read-file-pheno",file_pheno); indicator_pheno.clear(); pheno.clear(); @@ -448,6 +455,7 @@ bool ReadFile_pheno(const string &file_pheno, bool ReadFile_cvt(const string &file_cvt, vector &indicator_cvt, vector> &cvt, size_t &n_cvt) { debug_msg("entered"); + checkpoint("read-file-cvt",file_cvt); indicator_cvt.clear(); ifstream infile(file_cvt.c_str(), ifstream::in); @@ -515,6 +523,7 @@ bool ReadFile_cvt(const string &file_cvt, vector &indicator_cvt, // Read .bim file. bool ReadFile_bim(const string &file_bim, vector &snpInfo) { + checkpoint("read-file-bim",file_bim); debug_msg("entered"); snpInfo.clear(); @@ -563,6 +572,7 @@ bool ReadFile_bim(const string &file_bim, vector &snpInfo) { bool ReadFile_fam(const string &file_fam, vector> &indicator_pheno, vector> &pheno, map &mapID2num, const vector &p_column) { + checkpoint("read-file-fam",file_fam); debug_msg("entered"); indicator_pheno.clear(); pheno.clear(); @@ -686,6 +696,7 @@ bool ReadFile_geno(const string &file_geno, const set &setSnps, map &mapRS2bp, map &mapRS2cM, vector &snpInfo, size_t &ns_test) { + checkpoint("read-file-geno",file_geno); debug_msg("entered"); indicator_snp.clear(); snpInfo.clear(); @@ -924,6 +935,7 @@ bool ReadFile_bed(const string &file_bed, const set &setSnps, const double &maf_level, const double &miss_level, const double &hwe_level, const double &r2_level, size_t &ns_test) { + checkpoint("read-file-bed",file_bed); debug_msg("entered"); indicator_snp.clear(); size_t ns_total = snpInfo.size(); @@ -1232,6 +1244,7 @@ void Plink_ReadOneSNP(const int pos, const vector &indicator_idv, void ReadFile_kin(const string &file_kin, vector &indicator_idv, map &mapID2num, const size_t k_mode, bool &error, gsl_matrix *G) { + checkpoint("read-file-kin",file_kin); debug_msg("entered"); igzstream infile(file_kin.c_str(), igzstream::in); if (!infile) { @@ -1792,6 +1805,7 @@ bool PlinkKin(const string &file_bed, vector &indicator_snp, bool ReadFile_geno(const string file_geno, vector &indicator_idv, vector &indicator_snp, gsl_matrix *UtX, gsl_matrix *K, const bool calc_K) { + checkpoint("read-file-geno",file_geno); debug_msg("entered"); igzstream infile(file_geno.c_str(), igzstream::in); if (!infile) { @@ -1900,6 +1914,7 @@ bool ReadFile_geno(const string &file_geno, vector &indicator_idv, vector> &Xt, gsl_matrix *K, const bool calc_K, const size_t ni_test, const size_t ns_test) { + checkpoint("read-file-geno",file_geno); debug_msg("entered"); igzstream infile(file_geno.c_str(), igzstream::in); if (!infile) { @@ -2008,6 +2023,7 @@ bool ReadFile_geno(const string &file_geno, vector &indicator_idv, bool ReadFile_bed(const string &file_bed, vector &indicator_idv, vector &indicator_snp, gsl_matrix *UtX, gsl_matrix *K, const bool calc_K) { + checkpoint("read-file-bed",file_bed); debug_msg("entered"); ifstream infile(file_bed.c_str(), ios::binary); if (!infile) { @@ -2141,6 +2157,7 @@ bool ReadFile_bed(const string &file_bed, vector &indicator_idv, vector &indicator_snp, vector> &Xt, gsl_matrix *K, const bool calc_K, const size_t ni_test, const size_t ns_test) { + checkpoint("read-file-bed",file_bed); debug_msg("entered"); ifstream infile(file_bed.c_str(), ios::binary); if (!infile) { @@ -2277,6 +2294,7 @@ bool ReadFile_bed(const string &file_bed, vector &indicator_idv, bool ReadFile_est(const string &file_est, const vector &est_column, map &mapRS2est) { + checkpoint("read-file-est",file_est); debug_msg("entered"); mapRS2est.clear(); @@ -2361,6 +2379,7 @@ bool CountFileLines(const string &file_input, size_t &n_lines) { // Read gene expression file. bool ReadFile_gene(const string &file_gene, vector &vec_read, vector &snpInfo, size_t &ng_total) { + checkpoint("read-file-gene",file_gene); debug_msg("entered"); vec_read.clear(); ng_total = 0; -- cgit 1.4.1