bcgsc / physlr

:chains: Construct a Physical Map from Linked Reads
GNU General Public License v3.0
18 stars 8 forks source link

Omp and binning c++ #156

Closed aafshinfard closed 4 years ago

aafshinfard commented 4 years ago

adding random binning of the subgraphs. adding Open MP multi-threading.

aafshinfard commented 4 years ago

to check the randomness of the unordered_set and to see wheher its reproducible, I ran the following code multiple times:

int main () {
  std::unordered_set<int> myvector;

  // set some values:
  for (int i=1; i<10; ++i) unord_set.insert(i); // 1 2 3 4 5 6 7 8 9

  // print out content:
  std::cout << "unord_set contains:";
  for (std::unordered_set<int>::iterator it=unord_set.begin(); it!=unord_set.end(); ++it)
    std::cout << ' ' << *it;

It was reproducible!

aafshinfard commented 4 years ago

reduces the running time from 19 mins to 8 mins using 5 threads (dataset:hg004...m92.5.tsv). no much gain when using more threads with strategy=bc. But I believe when we add other strategies we will gain speed using more threads.