soedinglab / MMseqs2

MMseqs2: ultra fast and sensitive search and clustering suite
https://mmseqs.com
MIT License
1.48k stars 200 forks source link

nrtotaxmapping throwing std::bad_alloc #666

Closed kthurimella closed 1 year ago

kthurimella commented 1 year ago

Expected Behavior

nrtotaxmapping to create a _mapping file

Current Behavior

When I am running the databases workflow to download the NR database the workflow fails on the nrtotaxmapping step at the end.

Steps to Reproduce (for bugs)

Please make sure to execute the reproduction steps with newly recreated and empty tmp folders.

$ mmseqs nrtotaxmapping tmp/12298358726300512471/pdb.accession2taxid tmp/12298358726300512471/prot.accession2taxid nr_mmseqs/nr_db nr_mmseqs/nr_db_mapping --threads 16 -v 3

MMseqs Output (for bugs)

Please make sure to also post the complete output of MMseqs. You can use gist.github.com for large output.

Reading symbols from mmseqs... (gdb) r Starting program: /home/kthurime/mmseqs/bin/mmseqs nrtotaxmapping tmp/12298358726300512471/pdb.accession2taxid tmp/12298358726300512471/prot.accession2taxid nr_mmseqs/nr_db nr_mmseqs/nr_db_mapping --threads 16 -v 3 [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". nr_mmseqs/nr_db_mapping exists and will be overwritten nrtotaxmapping tmp/12298358726300512471/pdb.accession2taxid tmp/12298358726300512471/prot.accession2taxid nr_mmseqs/nr_db nr_mmseqs/nr_db_mapping --threads 16 -v 3

MMseqs Version: f5b588be54de35876eff90f3694b67e1d00856ef Threads 16 Verbosity 3

terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc

Program received signal SIGABRT, Aborted. 0x00000000008cab0b in raise () (gdb) bt

0 0x00000000008cab0b in raise ()

1 0x000000000040d7bc in abort ()

2 0x000000000040ad81 in __gnu_cxx::__verbose_terminate_handler() [clone .cold] ()

3 0x000000000079460c in cxxabiv1::terminate(void (*)()) ()

4 0x0000000000794677 in std::terminate() ()

5 0x00000000007947d9 in __cxa_throw ()

6 0x000000000040ad02 in operator new(unsigned long) [clone .cold] ()

7 0x000000000060ed45 in gnu_cxx::new_allocator<std::pair<std::cxx11::basic_string<char, std::char_traits, std::allocator >, int> >::allocate (this=, __n=)

at /usr/include/c++/9/ext/new_allocator.h:102

8 std::allocator_traits<std::allocator<std::pair<std::cxx11::basic_string<char, std::char_traits, std::allocator >, int> > >::allocate (a=..., __n=)

at /usr/include/c++/9/bits/alloc_traits.h:443

9 std::_Vector_base<std::pair<std::cxx11::basic_string<char, std::char_traits, std::allocator >, int>, std::allocator<std::pair<std::cxx11::basic_string<char, std::char_traits, std::allocator >, int> > >::_M_allocate (this=, __n=)

at /usr/include/c++/9/bits/stl_vector.h:343

10 std::vector<std::pair<std::cxx11::basic_string<char, std::char_traits, std::allocator >, int>, std::allocator<std::pair<std::cxx11::basic_string<char, std::char_traits, std::allocator >, int> > >::_M_realloc_insert<std::cxx11::basic_string<char, std::char_traits, std::allocator >&, unsigned int&> (this=this@entry=0x7fffffffd290, position=__position@entry=...)

at /usr/include/c++/9/bits/vector.tcc:440

11 0x000000000060c68b in std::vector<std::pair<std::cxx11::basic_string<char, std::char_traits, std::allocator >, int>, std::allocator<std::pair<std::cxx11::basic_string<char, std::char_traits, std::allocator >, int> > >::emplace_back<std::__cxx11::basic_string<char, std::char_traits, std::allocator >&, unsigned int&> (this=0x7fffffffd290)

at /usr/include/c++/9/bits/stl_iterator.h:803

12 nrtotaxmapping (argc=, argv=, command=...)

at /home/vsts/work/1/s/src/util/nrtotaxmapping.cpp:96

13 0x0000000000426a27 in runCommand (p=0x1288200, argc=argc@entry=8, argv=argv@entry=0x7fffffffe3b8)

at /home/vsts/work/1/s/src/commons/Application.cpp:40

14 0x000000000040e501 in main (argc=10, argv=0x7fffffffe3a8)

at /home/vsts/work/1/s/src/commons/Application.cpp:203

Your Environment

Include as many relevant details about the environment you experienced the bug in.

kthurimella commented 1 year ago

Upgraded system to have more memory and this works. It would be nice if there was a way to chunk the mapping since it's such a large file.