zjshi / gt-pro

MIT License
23 stars 7 forks source link

Assertion `db_data != MAP_FAILED' failed #34

Closed nick-youngblut closed 4 years ago

nick-youngblut commented 4 years ago

I'm getting the following error when trying to create an optimized version of the database:

1594460918244:  [Info] Starting to load DB: /ebio/abt3_projects/databases_no-backup/gt-pro
1594460918245:  [ERROR] Failed to MMAP /ebio/abt3_projects/databases_no-backup/gt-pro_optimized_db_snps.bin.  This is fine, but init will be slower as we recreate this file.
1594460918245:  [ERROR] Failed to MMAP /ebio/abt3_projects/databases_no-backup/gt-pro_optimized_db_kmer_index.bin.  This is fine, but init will be slower as we recreate this file.
1594460918263:  [Info] Using -l 32 -m 36 as optimal for system RAM
1594460918264:  [ERROR] Failed to MMAP /ebio/abt3_projects/databases_no-backup/gt-pro_optimized_db_mmer_bloom_36.bin.  This is fine, but init will be slower as we recreate this file.
1594460923257:  [ERROR] Failed to MMAP /ebio/abt3_projects/databases_no-backup/gt-pro_optimized_db_lmer_index_32.bin.  This is fine, but init will be slower as we recreate this file.
gt_pro: ./src/gt_pro.cpp:1711: int main(int, char**): Assertion `db_data != MAP_FAILED' failed.
Aborted

reprex:

cd /ebio/abt3_projects/databases_no-backup/
wget http://jason.shi-bucket.s3.amazonaws.com/public/20190723_881species_optimized_db_kmer_index.bin
wget http://jason.shi-bucket.s3.amazonaws.com/public/20190723_881species_optimized_db_snps.bin
wget http://jason.shi-bucket.s3.amazonaws.com/public/variants_main.covered.hq.snp_dict.tsv
cd ~
git clone https://github.com/zjshi/gt-pro.git
cd gt-pro
make
./gt_pro -d /ebio/abt3_projects/databases_no-backup/ </dev/null

system info:

Ubuntu 18.04.4 LTS
nick-youngblut commented 4 years ago

OK, I didn't see that the user needs to provide a prefix of the database files & not just the directory path. Using ./gt_pro -d /ebio/abt3_projects/databases_no-backup/20190723_881species </dev/null. It might be good to include a more informative error if the user provides the directory instead of the directory + file_prefix.