Latest GPU-supported search.py fails at expandaln
I'm trying to get colabfold_search to run on our GPU cluster with the latest updates, including to search.py 88e5efa16e43397041e2c1480e35ab1716d858b7 and setup_databases.sh 24e79a5ef16d3b8cb3d0421c9bbd2a49641b7cb9. I can't quite make sense of the error below. Any help would be appreciated. Thanks!
Expected Behavior
colabfold_search uses MMseqs2 with GPU support to produce an a3m file.
Current Behavior
expandaln terminates with an error:
terminate called after throwing an instance of 'std::logic_error' what(): basic_string::_M_construct null not valid
See full output below.
Steps to Reproduce (for bugs)
colabfold_search --mmseqs /public/MMseqs2/mmseqs/bin/mmseqs --gpu 1 --threads 8 --use-templates 0 test.fasta /public/MMseqs2/DBs test
ColabFold Output (for bugs)
createdb test/query.fas test/qdb --shuffle 0
Converting sequences [ Time for merging to qdb_h: 0h 0m 0s 0ms Time for merging to qdb: 0h 0m 0s 0ms Database type: Aminoacid Time for processing: 0h 0m 0s 3ms Create directory test/tmp search test/qdb /public/MMseqs2/DBs/uniref30_2302_db test/res test/tmp --threads 8 --num-iterations 3 --db-load-mode 0 -a -e 0.1 --max-seqs 10000 --gpu 1 --prefilter-mode 1
ungappedprefilter test/qdb /public/MMseqs2/DBs/uniref30_2302_db.idx test/tmp/12866274709769833335/pref_0 --sub-mat 'aa:blosum62.out,nucl:nucleotide.out' -c 0 -e 0.1 --cov-mode 0 --comp-bias-corr 1 --comp-bias-corr-scale 1 --min-ungapped-score 15 --max-seqs 10000 --db-load-mode 0 --gpu 1 --gpu-server 0 --prefilter-mode 1 --threads 8 --compressed 0 -v 3
Index version: 16 Generated by: 93d74798d7fc584e28ca35ef9522dee7d9747c82 ScoreMatrix: VTML80.out [=================================================================] 1 3s 260ms Time for merging to pref_0: 0h 0m 0s 0ms Time for processing: 0h 1m 18s 709ms align test/qdb /public/MMseqs2/DBs/uniref30_2302_db.idx test/tmp/12866274709769833335/pref_0 test/tmp/12866274709769833335/aln_0 --sub-mat 'aa:blosum62.out,nucl:nucleotide.out' -a 1 --alignment-mode 2 --alignment-output-mode 0 --wrapped-scoring 0 -e 0.1 --min-seq-id 0 --min-aln-len 0 --seq-id-mode 0 --alt-ali 0 -c 0 --cov-mode 0 --max-seq-len 65535 --comp-bias-corr 1 --comp-bias-corr-scale 1 --max-rejected 2147483647 --max-accept 2147483647 --add-self-matches 0 --db-load-mode 0 --pca substitution:1.100,context:1.400 --pcb substitution:4.100,context:5.800 --score-bias 0 --realign 1 --realign-score-bias -0.2 --realign-max-seqs 2147483647 --corr-score-weight 0 --gap-open aa:11,nucl:5 --gap-extend aa:1,nucl:2 --zdrop 40 --threads 8 --compressed 0 -v 3
Index version: 16 Generated by: 93d74798d7fc584e28ca35ef9522dee7d9747c82 ScoreMatrix: VTML80.out Compute score only Query database size: 1 type: Aminoacid Target database size: 36293491 type: Aminoacid Calculation of alignments [=================================================================] 1 0s 0ms Time for merging to aln_0: 0h 0m 0s 0ms 10000 alignments calculated 60 sequence pairs passed the thresholds (0.006000 of overall calculated) 60.000000 hits per query sequence Time for processing: 0h 0m 36s 903ms result2profile test/qdb /public/MMseqs2/DBs/uniref30_2302_db.idx test/tmp/12866274709769833335/aln_0 test/tmp/12866274709769833335/profile_0 --sub-mat 'aa:blosum62.out,nucl:nucleotide.out' -e 0.1 --mask-profile 1 --e-profile 0.1 --comp-bias-corr 1 --comp-bias-corr-scale 1 --wg 0 --allow-deletion 0 --filter-msa 1 --filter-min-enable 0 --max-seq-id 0.9 --qid '0.0' --qsc -20 --cov 0 --diff 1000 --pseudo-cnt-mode 0 --pca substitution:1.100,context:1.400 --pcb substitution:4.100,context:5.800 --db-load-mode 0 --gap-open aa:11,nucl:5 --gap-extend aa:1,nucl:2 --threads 8 --compressed 0 -v 3
Index version: 16 Generated by: 93d74798d7fc584e28ca35ef9522dee7d9747c82 ScoreMatrix: VTML80.out Query database size: 1 type: Aminoacid Target database size: 36293491 type: Aminoacid [=================================================================] 1 0s 1ms Time for merging to profile_0: 0h 0m 0s 0ms Time for processing: 0h 0m 0s 888ms ungappedprefilter test/tmp/12866274709769833335/profile_0 /public/MMseqs2/DBs/uniref30_2302_db.idx test/tmp/12866274709769833335/pref_tmp_1 --sub-mat 'aa:blosum62.out,nucl:nucleotide.out' -c 0 -e 0.1 --cov-mode 0 --comp-bias-corr 1 --comp-bias-corr-scale 1 --min-ungapped-score 15 --max-seqs 10000 --db-load-mode 0 --gpu 1 --gpu-server 0 --prefilter-mode 1 --threads 8 --compressed 0 -v 3
Index version: 16 Generated by: 93d74798d7fc584e28ca35ef9522dee7d9747c82 ScoreMatrix: VTML80.out [=================================================================] 1 1s 515ms Time for merging to pref_tmp_1: 0h 0m 0s 0ms Time for processing: 0h 0m 2s 429ms subtractdbs test/tmp/12866274709769833335/pref_tmp_1 test/tmp/12866274709769833335/aln_0 test/tmp/12866274709769833335/pref_1 --threads 8 --e-profile 0.1 -e 0.1 --compressed 0 -v 3
subtractdbs test/tmp/12866274709769833335/pref_tmp_1 test/tmp/12866274709769833335/aln_0 test/tmp/12866274709769833335/pref_1 --threads 8 --e-profile 0.1 -e 0.1 --compressed 0 -v 3
Remove test/tmp/12866274709769833335/aln_0 ids from test/tmp/12866274709769833335/pref_tmp_1 [=================================================================] 1 0s 0ms Time for merging to pref_1: 0h 0m 0s 1ms Time for processing: 0h 0m 0s 5ms rmdb test/tmp/12866274709769833335/pref_tmp_1
Time for processing: 0h 0m 0s 0ms align test/tmp/12866274709769833335/profile_0 /public/MMseqs2/DBs/uniref30_2302_db.idx test/tmp/12866274709769833335/pref_1 test/tmp/12866274709769833335/aln_tmp_1 --sub-mat 'aa:blosum62.out,nucl:nucleotide.out' -a 1 --alignment-mode 2 --alignment-output-mode 0 --wrapped-scoring 0 -e 0.1 --min-seq-id 0 --min-aln-len 0 --seq-id-mode 0 --alt-ali 0 -c 0 --cov-mode 0 --max-seq-len 65535 --comp-bias-corr 1 --comp-bias-corr-scale 1 --max-rejected 2147483647 --max-accept 2147483647 --add-self-matches 0 --db-load-mode 0 --pca substitution:1.100,context:1.400 --pcb substitution:4.100,context:5.800 --score-bias 0 --realign 0 --realign-score-bias -0.2 --realign-max-seqs 2147483647 --corr-score-weight 0 --gap-open aa:11,nucl:5 --gap-extend aa:1,nucl:2 --zdrop 40 --threads 8 --compressed 0 -v 3
Index version: 16 Generated by: 93d74798d7fc584e28ca35ef9522dee7d9747c82 ScoreMatrix: VTML80.out Compute score, coverage and sequence identity Query database size: 1 type: Profile Target database size: 36293491 type: Aminoacid Calculation of alignments [=================================================================] 1 0s 1ms Time for merging to aln_tmp_1: 0h 0m 0s 0ms 9940 alignments calculated 28 sequence pairs passed the thresholds (0.002817 of overall calculated) 28.000000 hits per query sequence Time for processing: 0h 0m 1s 55ms mergedbs test/tmp/12866274709769833335/profile_0 test/tmp/12866274709769833335/aln_1 test/tmp/12866274709769833335/aln_0 test/tmp/12866274709769833335/aln_tmp_1
Merging the results to test/tmp/12866274709769833335/aln_1 [=================================================================] 1 0s 0ms Time for merging to aln_1: 0h 0m 0s 0ms Time for processing: 0h 0m 0s 1ms rmdb test/tmp/12866274709769833335/aln_0
Time for processing: 0h 0m 0s 0ms rmdb test/tmp/12866274709769833335/aln_tmp_1
Time for processing: 0h 0m 0s 0ms result2profile test/tmp/12866274709769833335/profile_0 /public/MMseqs2/DBs/uniref30_2302_db.idx test/tmp/12866274709769833335/aln_1 test/tmp/12866274709769833335/profile_1 --sub-mat 'aa:blosum62.out,nucl:nucleotide.out' -e 0.1 --mask-profile 1 --e-profile 0.1 --comp-bias-corr 1 --comp-bias-corr-scale 1 --wg 0 --allow-deletion 0 --filter-msa 1 --filter-min-enable 0 --max-seq-id 0.9 --qid '0.0' --qsc -20 --cov 0 --diff 1000 --pseudo-cnt-mode 0 --pca substitution:1.100,context:1.400 --pcb substitution:4.100,context:5.800 --db-load-mode 0 --gap-open aa:11,nucl:5 --gap-extend aa:1,nucl:2 --threads 8 --compressed 0 -v 3
Index version: 16 Generated by: 93d74798d7fc584e28ca35ef9522dee7d9747c82 ScoreMatrix: VTML80.out Query database size: 1 type: Profile Target database size: 36293491 type: Aminoacid [=================================================================] 1 0s 2ms Time for merging to profile_1: 0h 0m 0s 0ms Time for processing: 0h 0m 0s 880ms ungappedprefilter test/tmp/12866274709769833335/profile_1 /public/MMseqs2/DBs/uniref30_2302_db.idx test/tmp/12866274709769833335/pref_tmp_2 --sub-mat 'aa:blosum62.out,nucl:nucleotide.out' -c 0 -e 0.1 --cov-mode 0 --comp-bias-corr 1 --comp-bias-corr-scale 1 --min-ungapped-score 15 --max-seqs 10000 --db-load-mode 0 --gpu 1 --gpu-server 0 --prefilter-mode 1 --threads 8 --compressed 0 -v 3
Index version: 16 Generated by: 93d74798d7fc584e28ca35ef9522dee7d9747c82 ScoreMatrix: VTML80.out [=================================================================] 1 1s 64ms Time for merging to pref_tmp_2: 0h 0m 0s 0ms Time for processing: 0h 0m 1s 967ms subtractdbs test/tmp/12866274709769833335/pref_tmp_2 test/tmp/12866274709769833335/aln_1 test/tmp/12866274709769833335/pref_2 --threads 8 --e-profile 0.1 -e 0.1 --compressed 0 -v 3
subtractdbs test/tmp/12866274709769833335/pref_tmp_2 test/tmp/12866274709769833335/aln_1 test/tmp/12866274709769833335/pref_2 --threads 8 --e-profile 0.1 -e 0.1 --compressed 0 -v 3
Remove test/tmp/12866274709769833335/aln_1 ids from test/tmp/12866274709769833335/pref_tmp_2 [=================================================================] 1 0s 0ms Time for merging to pref_2: 0h 0m 0s 1ms Time for processing: 0h 0m 0s 5ms rmdb test/tmp/12866274709769833335/pref_tmp_2
Time for processing: 0h 0m 0s 0ms align test/tmp/12866274709769833335/profile_1 /public/MMseqs2/DBs/uniref30_2302_db.idx test/tmp/12866274709769833335/pref_2 test/tmp/12866274709769833335/aln_tmp_2 --sub-mat 'aa:blosum62.out,nucl:nucleotide.out' -a 1 --alignment-mode 2 --alignment-output-mode 0 --wrapped-scoring 0 -e 0.1 --min-seq-id 0 --min-aln-len 0 --seq-id-mode 0 --alt-ali 0 -c 0 --cov-mode 0 --max-seq-len 65535 --comp-bias-corr 1 --comp-bias-corr-scale 1 --max-rejected 2147483647 --max-accept 2147483647 --add-self-matches 0 --db-load-mode 0 --pca substitution:1.100,context:1.400 --pcb substitution:4.100,context:5.800 --score-bias 0 --realign 0 --realign-score-bias -0.2 --realign-max-seqs 2147483647 --corr-score-weight 0 --gap-open aa:11,nucl:5 --gap-extend aa:1,nucl:2 --zdrop 40 --threads 8 --compressed 0 -v 3
Index version: 16 Generated by: 93d74798d7fc584e28ca35ef9522dee7d9747c82 ScoreMatrix: VTML80.out Compute score, coverage and sequence identity Query database size: 1 type: Profile Target database size: 36293491 type: Aminoacid Calculation of alignments [=================================================================] 1 0s 1ms Time for merging to aln_tmp_2: 0h 0m 0s 0ms 9912 alignments calculated 5 sequence pairs passed the thresholds (0.000504 of overall calculated) 5.000000 hits per query sequence Time for processing: 0h 0m 1s 58ms mergedbs test/tmp/12866274709769833335/profile_1 test/res test/tmp/12866274709769833335/aln_1 test/tmp/12866274709769833335/aln_tmp_2
Merging the results to test/res [=================================================================] 1 0s 0ms Time for merging to res: 0h 0m 0s 2ms Time for processing: 0h 0m 0s 3ms rmdb test/tmp/12866274709769833335/aln_1
Time for processing: 0h 0m 0s 0ms rmdb test/tmp/12866274709769833335/aln_tmp_2
Time for processing: 0h 0m 0s 0ms mvdb test/tmp/latest/profile_1 test/prof_res
Time for processing: 0h 0m 0s 5ms lndb test/qdb_h test/prof_res_h
Time for processing: 0h 0m 0s 1ms expandaln test/qdb /public/MMseqs2/DBs/uniref30_2302_db.idx test/res /public/MMseqs2/DBs/uniref30_2302_db.idx test/res_exp --db-load-mode 0 --threads 8 --expansion-mode 0 -e inf --expand-filter-clusters 1 --max-seq-id 0.95
Index version: 16
Generated by: 93d74798d7fc584e28ca35ef9522dee7d9747c82
ScoreMatrix: VTML80.out
Index version: 16
Generated by: 93d74798d7fc584e28ca35ef9522dee7d9747c82
ScoreMatrix: VTML80.out
[=================================================================] 1 0s 204ms
terminate called after throwing an instance of 'std::logic_error'
what(): basic_string::_M_construct null not valid
Traceback (most recent call last):
File "/public/colabfold/colabfoldconda/envs/colabfold/bin/colabfold_search", line 8, in
Context
Running colabfold_search with GPU support in a SLURM script. Before the command above, the conda environment is activated and the cuda module is loaded.
Your Environment
MMseqs2 version db8ad2d14d0a285ce0ad62bbefd0dce927663315 (downloaded binary with GPU support)
colabfold/mmseqs/search.py commit 88e5efa (after GPU support)
Databases set up using the latest setup_databases.sh from 24e79a5ef16d3b8cb3d0421c9bbd2a49641b7cb9
@sami-chaaban I encountered the same issue and was able to fix it. In my case, the problem stemmed from corrupted indexing during the setup_database process. To successfully set up the GPU database, you'll need at least 128GB of RAM (I used 196GB), 1.6TB of disk space for data, and an additional 200GB for temporary files.
Thanks for the suggestion @LucRyan. I tried rerunning setup_database for uniref30 with 1 TB of memory accessible and it seemed to have run to completion (see output below). However, I'm still getting the error.
uniref30_2302.md5sum uniref30_2302.tsv uniref30_2302_h.tsv uniref30_2302_aln.tsv uniref30_2302_seq.tsv uniref30_2302_db_mapping uniref30_2302_db_taxonomy uniref30_2302_db exists and will be overwritten tsv2exprofiledb uniref30_2302 uniref30_2302_db
MMseqs Version: db8ad2d14d0a285ce0ad62bbefd0dce927663315 Use GPU 0 Threads 224 Compressed 1 Verbosity 3
createindex uniref30_2302_db tmp1 --remove-tmp-files 1
MMseqs Version: db8ad2d14d0a285ce0ad62bbefd0dce927663315 Seed substitution matrix aa:VTML80.out,nucl:nucleotide.out k-mer length 0 Alphabet size aa:21,nucl:5 Compositional bias 1 Compositional bias 1 Max sequence length 65535 Max results per query 300 Mask residues 1 Mask residues probability 0.9 Mask lower case residues 0 Mask lower letter repeating N times 0 Spaced k-mers 1 Spaced k-mer pattern Sensitivity 7.5 k-score seq:0,prof:0 Check compatible 0 Search type 0 Split database 0 Split memory limit 0 Index subset 0 Verbosity 3 Threads 224 Min codons in orf 30 Max codons in length 32734 Max orf gaps 2147483647 Contig start mode 2 Contig end mode 2 Orf start mode 1 Forward frames 1,2,3 Reverse frames 1,2,3 Translation table 1 Translate orf 0 Use all table starts false Offset of numeric ids 0 Create lookup 0 Compressed 0 Overlap between sequences 0 Sequence split mode 1 Header split mode 0 Translation mode 0 Strand selection 1 Remove temporary files true
createindex uniref30_2302_db tmp1 --remove-tmp-files 1
MMseqs Version: db8ad2d14d0a285ce0ad62bbefd0dce927663315 Seed substitution matrix aa:VTML80.out,nucl:nucleotide.out k-mer length 0 Alphabet size aa:21,nucl:5 Compositional bias 1 Compositional bias 1 Max sequence length 65535 Max results per query 300 Mask residues 1 Mask residues probability 0.9 Mask lower case residues 0 Mask lower letter repeating N times 0 Spaced k-mers 1 Spaced k-mer pattern Sensitivity 7.5 k-score seq:0,prof:0 Check compatible 0 Search type 0 Split database 0 Split memory limit 0 Index subset 0 Verbosity 3 Threads 224 Min codons in orf 30 Max codons in length 32734 Max orf gaps 2147483647 Contig start mode 2 Contig end mode 2 Orf start mode 1 Forward frames 1,2,3 Reverse frames 1,2,3 Translation table 1 Translate orf 0 Use all table starts false Offset of numeric ids 0 Create lookup 0 Compressed 0 Overlap between sequences 0 Sequence split mode 1 Header split mode 0 Translation mode 0 Strand selection 1 Remove temporary files true
indexdb uniref30_2302_db uniref30_2302_db --seed-sub-mat 'aa:VTML80.out,nucl:nucleotide.out' -k 0 --alph-size aa:21,nucl:5 --comp-bias-corr 1 --comp-bias-corr-scale 1 --max-seq-len 65535 --max-seqs 300 --mask 1 --mask-prob 0.9 --mask-lower-case 0 --mask-n-repeat 0 --spaced-kmer-mode 1 -s 7.5 --k-score seq:0,prof:0 --check-compatible 0 --search-type 0 --split 0 --split-memory-limit 0 --index-subset 0 -v 3 --threads 224
Estimated memory consumption: 450G
Write VERSION (0)
Write META (1)
Write SCOREMATRIXNAME (2)
Write SPACEDPATTERN (23)
Write GENERATOR (22)
Write DBR1INDEX (5)
Write DBR1DATA (6)
Write DBR2INDEX (7)
Write DBR2DATA (8)
Write HDR1INDEX (18)
Write HDR1DATA (19)
Write ALNINDEX (24)
Write ALNDATA (25)
Write SCOREMATRIX3MER (4)
Write SCOREMATRIX2MER (3)
Index table: counting k-mers
[=================================================================] 100.00% 36.29M 13s 285ms
Index table: Masked residues: 342898260
Index table: fill
[=================================================================] 100.00% 36.29M 17s 993ms
Index statistics
Entries: 7781341201
DB size: 54290 MB
Avg k-mer size: 6.079173
Top 10 k-mers
LAMHETP 17746
FLNSHRT 14675
GRDQVRG 10712
AYITSTG 10062
LLGPGKT 9661
LAGAHNN 8532
FGGSSYL 6941
HERPLIL 6299
ADSTRGG 6064
GDNDGDL 5933
Write ENTRIES (9)
Write ENTRIESOFFSETS (10)
Write SEQINDEXDATASIZE (15)
Write SEQINDEXSEQOFFSET (16)
Write SEQINDEXDATA (14)
Write ENTRIESNUM (12)
Write SEQCOUNT (13)
Time for merging to uniref30_2302_db.idx: 0h 0m 0s 1ms
Time for processing: 0h 22m 43s 851ms
@sami-chaaban The logs appear to be correct. The only difference I noticed is the MMseqs version: db8ad2d14d0a285ce0ad62bbefd0dce927663315. I downloaded the precompiled GPU version from release 16, but I'm not sure if that's causing the issue. mmseqs-linux-gpu.tar.gz
Btw, MMseqs 17 was released just 4 days ago; it might be worth trying to see if it helps. https://github.com/soedinglab/MMseqs2/releases/tag/17-b804f
Thanks for the suggestions. I just tried the latest version (b804fbe384e6f6c9fe96322ec0e92d48bccd0a42) and unfortunately it did not resolve the issue
Please check issue #691. I posted a fix within. We'll tag a new mmseqs release soon if this works correctly.