Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xg indexing doesn't work on whole-genome graph #2447

Closed
glennhickey opened this issue Sep 11, 2019 · 8 comments
Closed

xg indexing doesn't work on whole-genome graph #2447

glennhickey opened this issue Sep 11, 2019 · 8 comments

Comments

@glennhickey
Copy link
Contributor

Since the new xg got merged in, I can no longer index whole-genome graphs. Here is one on courtyard that used to work fine: /public/home/hickey/dev/hgsvc/HGSVC-jan5/HGSVC.vg

Now vg index HGSVC.vg -x HGSVC.xg segfaults after 12 minutes

#8    Object "", at 0xffffffffffffffff, in 
#7    Object "/data1/vg/bin/vg", at 0x55aabb6d3429, in _start
#6    Object "/lib/x86_64-linux-gnu/libc-2.27.so", at 0x7f7ec5501b96, in __libc_start_main
      Source "../csu/libc-start.c", line 310, in __libc_start_main [0x7f7ec5501b96]
#5    Object "/data1/vg/bin/vg", at 0x55aabb60a8c2, in main
      Source "src/main.cpp", line 73, in main [0x55aabb60a8c2]
#4    Object "/data1/vg/bin/vg", at 0x55aabbb6e2e7, in vg::subcommand::Subcommand::operator()(int, char**) const
    | Source "src/subcommand/subcommand.cpp", line 72, in operator()
      Source "/usr/include/c++/7/bits/std_function.h", line 706, in operator() [0x55aabbb6e2e7]
        703:     {
        704:       if (_M_empty())
        705: 	__throw_bad_function_call();
      > 706:       return _M_invoker(_M_functor, std::forward<_ArgTypes>(__args)...);
        707:     }
        708: 
        709: #if __cpp_rtti
#3    Object "/data1/vg/bin/vg", at 0x55aabbad79d6, in main_index(int, char**)
      Source "src/subcommand/index_main.cpp", line 544, in main_index [0x55aabbad79d6]
#2    Object "/data1/vg/bin/vg", at 0x55aabbf26806, in vg::VGset::to_xg(xg::XG&, std::function<bool (std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)> const&, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, vg::Path, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, vg::Path> > >*)
      Source "src/vg_set.cpp", line 182, in __stack_chk_fail [0x55aabbf26806]
#1    Object "/data1/vg/bin/vg", at 0x55aabc7b650f, in xg::XG::from_enumerators(std::function<void (std::function<void (std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, long const&)> const&)> const&, std::function<void (std::function<void (long const&, bool const&, long const&, bool const&)> const&)> const&, std::function<void (std::function<void (std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, long const&, bool const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool const&, bool const&)> const&)> const&, bool, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)
      Source "deps/xg/src/xg.cpp", line 812, in from_enumerators [0x55aabc7b650f]
#0    Object "/data1/vg/bin/vg", at 0x55aabc7eb50e, in mmmulti::map<unsigned long, unsigned long>::index(unsigned long)
      Source "/data1/vg/include/mmmultimap.hpp", line 406, in index [0x55aabc7eb50e]
        403:                 last = curr;
        404:             }
        405:             // the last key in the sort is our max key
      > 406:             max_key = nth_key(n_records-1);
        407:             key_bv[n_records] = 1; // sentinel
        408:             // build the compressed bitvector
        409:             sdsl::util::assign(key_cbv, sdsl::sd_vector<>(key_bv));

@ekg
Copy link
Member

ekg commented Sep 12, 2019 via email

@ekg
Copy link
Member

ekg commented Sep 12, 2019

@glennhickey I'm unable to reproduce this problem. Do you think it might be a transient issue? If so, I can try to run in a loop until it happens.

-> % time vg index -x HGSVC.xg HGSVC.vg
vg index -x HGSVC.xg HGSVC.vg  1253.65s user 855.02s system 204% cpu 17:13.33 total

The index seems fine.

@glennhickey
Copy link
Contributor Author

glennhickey commented Sep 12, 2019 via email

@ekg
Copy link
Member

ekg commented Sep 12, 2019

Sure, it'll show up in /public/home/ergarris/graphs/human/HGSVC when the copy's done (maybe 45 minutes from now).

I think you can set TMPDIR or something to where you want to work.

I can't compile vg on courtyard, so I'm not working there. I guess docker is a solution, but it's also a new set of problems. Should have this sorted soon.

@ekg
Copy link
Member

ekg commented Sep 12, 2019

That's TMPDIR in your shell environment.

@ekg
Copy link
Member

ekg commented Sep 12, 2019

Did you build this vg on exactly the same system? It seems our static builds are less platform-independent than they used to be. I'm seeing lots of weird errors when using even v1.16.0 in the CPANG19 course environment.

@glennhickey
Copy link
Contributor Author

glennhickey commented Sep 12, 2019 via email

@glennhickey
Copy link
Contributor Author

My bad. It was indeed the TMPDIR. With it set, it ran through fine for me too. What's extra nice is that including the 145000 alt paths vg index -L only cost an extra 10s of runtime and 3G of RAM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants