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

Boost errors when compiling vari branch #7

Open
Colelyman opened this issue Apr 21, 2017 · 6 comments
Open

Boost errors when compiling vari branch #7

Colelyman opened this issue Apr 21, 2017 · 6 comments
Assignees

Comments

@Colelyman
Copy link

I get the following errors when trying to compile vari.

errors.txt

I definitely could have done something wrong when I installed the other dependencies, but I don't think so.

Any ideas on how to fix these errors?

@cfblaeb
Copy link

cfblaeb commented May 16, 2017

Also getting this.
errors.txt

@cfblaeb
Copy link

cfblaeb commented May 16, 2017

It appears that the boost path is hardcoded to "/s/chopin/h/proj/soma/boost_1_54
" in the makefile....
I am no Makefile expert...but thats wrong right?

@cfblaeb
Copy link

cfblaeb commented May 16, 2017

Can confirm that it compiles when I download and compile boost_1_54 and change the Makefile to point to that.
1_54 is 4 years old though so I also tested with boost 1_64 but then compile fails again.

@Colelyman
Copy link
Author

I'm glad to know I'm not the only one @cfblaeb! I definitely think that the hardcoded boost path is a bug.

I think I have narrowed down the errors to two code chunks. Both errors occur in cosmo-build.cpp. One error occurs at line 200, here is the code chunk surrounding the error:

   {
        auto dbg = builder.build([&](size_t num_rows) {
          //lcs_v = sdsl::int_vector<8>((params.variable_order)*num_rows);
          lcs_file.set_size((params.variable_order)*num_rows);
          // a bit hacky. Should seperate finding dummies from merging them in builder,
          // so I can get the number of rows as a function call
          lcs_v = new stxxl::vector<uint8_t>(&lcs_file);
          lcs_writer = new stxxl::vector<uint8_t>::bufwriter_type(*lcs_v);
          //lcs_v.resize((params.variable_order)*num_rows);
        }, [&](auto x){
          size_t l;
          if (params.variable_order) {
            l = x.lcs;
            //lcs_v[idx++] = l;
            idx++;
            *lcs_writer << (uint8_t)l;
          }
          // Comment left in for potential verbose mode
          /*
          auto kmer = x.edge;
          string flag = flags[x.is_first_suffix];
          cerr << (int) x.is_first_prefix << " ";
          if (x.tag == in_dummy) {
            cerr << kmer_to_string(kmer, k, x.k) << flag << " ";
          } else if (x.tag == out_dummy) {
            assert(x.is_first_prefix);
            cerr << kmer_to_string(kmer<<2, k-1) << "$ ";
          } else {
            cerr << kmer_to_string(kmer, k) << flag << " ";
          }
          cerr << l << endl;
          */
        });
        //COSMO_LOG(info) << "size of DBG: " << size_in_mega_bytes(dbg) << " MB";
        sdsl::store_to_file(dbg, params.output_prefix + params.output_base + ".dbg");
      }

The other error occurs at line 301, here is the surrounding block:

  auto dbg = builder.build([&](auto x) { // Pre merge
            // color_bv = bit_vector(x * num_colors);
    },[&](auto x) { // Merge visitor
      //auto kmer = x.edge;
      //cerr << kmer_to_string(kmer,k) << endl;
      auto color = get<0>(x.payload);
      serialize_color_bv(cfs, color);
      for (size_t color_idx = 0; color_idx < num_colors; color_idx++) {
        // TODO: try complemented bits in color-major form in a *sd_vector* for large data set.
        //color_bv[color_idx * num_colors + edge_idx] = !color[color_idx];
//        color_bv[edge_idx * num_colors + color_idx] = color[color_idx];
        num_set += color[color_idx];
      }
      edge_idx++;
    });

Are there any Boost experts that could help diagnose the errors? To get the specfic errors, refer to the uploaded file above.

@mmuggli mmuggli self-assigned this May 17, 2017
@cfblaeb
Copy link

cfblaeb commented May 18, 2017

As I said, it compiles when I point the makefile to a local install of boost 1.54 so I don't think there are any errors in the code. But the Makefile shouldnt have a hardcoded path to boost unless boost is included in the repo.
It would of course be nice it this was compatible with newer versions of boost.

@mmuggli
Copy link
Contributor

mmuggli commented May 18, 2017

Sorry for the trouble. Boost should have been included as another 3rd party source and should have had a relative path in the Makefile. Thanks for reporting this. I've updated the README and Makefile.

I believe an older version of Boost was probably what was packaged with the linux distribution @alexbowe was using at the time when he started cosmo 3 years ago. We might be using Boost in unintended ways that happened to work in older versions. Or, perhaps the library has changed in non backward compatible ways. I'd like to see it work with the latest version too, so I'm keeping this issue open for that.

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

3 participants