Skip to content

Commit

Permalink
removed all openmp stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
Aleksey Zimin committed Jan 23, 2018
1 parent 1b77cf5 commit 277dac5
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 13 deletions.
1 change: 1 addition & 0 deletions include/compactsufsort/compactsufsort_imp.hpp
Expand Up @@ -8,6 +8,7 @@
#include "trsort_imp.hpp"
#include <mummer/timer.hpp>

#undef _OPENMP
#ifdef _OPENMP
# include <omp.h>
#endif
Expand Down
10 changes: 5 additions & 5 deletions include/mummer/mgaps.hh
Expand Up @@ -146,7 +146,7 @@ int ClusterMatches::Cluster_each_long(Match_t * A, int N, Output out) const {
openmp_qsort(A + 1, A + N + 1, By_Start2);
N = Filter_Matches (A + 1, N);

#pragma omp parallel for schedule(dynamic)
//#pragma omp parallel for schedule(dynamic)
for (int i = 1; i < N; i ++) {
long int i_end = A [i] . Start2 + A [i] . Len;
long int i_diag = A [i] . Start2 - A [i] . Start1;
Expand All @@ -163,7 +163,7 @@ int ClusterMatches::Cluster_each_long(Match_t * A, int N, Output out) const {
}

// Set the cluster id of each match and reset Good flag
#pragma omp parallel for
//#pragma omp parallel for
for (int i = 1; i <= N; i ++) {
A [i] . cluster_id = UF.find (i);
assert(A[i].cluster_id > 0);
Expand All @@ -173,15 +173,15 @@ int ClusterMatches::Cluster_each_long(Match_t * A, int N, Output out) const {

// Determine and process clusters
int cluster_size, print_ct = 0;
#pragma omp parallel
//#pragma omp parallel
{
#pragma omp single
//#pragma omp single
for (int i = 1; i <= N; i += cluster_size) {
int j;
for (j = i + 1; j <= N && A [i] . cluster_id == A [j] . cluster_id; j ++)
;
cluster_size = j - i;
#pragma omp task firstprivate(i, cluster_size) shared(out)
//#pragma omp task firstprivate(i, cluster_size) shared(out)
print_ct += Process_Cluster (A + i, cluster_size, out);
}
}
Expand Down
8 changes: 4 additions & 4 deletions include/mummer/openmp_qsort.hpp
Expand Up @@ -18,9 +18,9 @@ void openmp_qsort(Iterator begin, Iterator end, Compare Comp) {
if(sz < 1024)
return std::sort(begin, end, Comp);

#pragma omp parallel
//#pragma omp parallel
{
#pragma omp single
//#pragma omp single
{
openmp_qsort_imp::openmp_qsort_(begin, end, sz, Comp);
}
Expand Down Expand Up @@ -52,15 +52,15 @@ void openmp_qsort_(Iterator begin, Iterator end, const size_t sz, Compare Comp)
assert((size_t)sz1 <= sz);
assert((size_t)sz1 + (size_t)sz2 + 1 == sz);
if(sz1 > 1024) {
#pragma omp task firstprivate(p, sz1)
//#pragma omp task firstprivate(p, sz1)
openmp_qsort_(begin, p, sz1, Comp);
if(sz2 > 1024)
openmp_qsort_(p + 1, end, sz2, Comp);
else
std::sort(p + 1, end, Comp);
} else {
if(sz2 > 1024)
#pragma omp task firstprivate(p, sz2)
//#pragma omp task firstprivate(p, sz2)
openmp_qsort_(p + 1, end, sz2, Comp);
else
std::sort(p + 1, end, Comp);
Expand Down
2 changes: 1 addition & 1 deletion include/mummer/postnuc.hh
Expand Up @@ -355,7 +355,7 @@ void merge_syntenys::processSyntenys_long_each(Container& Syntenys, const FR2& B
std::atomic<size_t> pos(0);
const auto end = Syntenys.end();

#pragma omp parallel
//#pragma omp parallel
{
auto CurrSp = Syntenys.begin();
size_t prev = 0;
Expand Down
1 change: 1 addition & 0 deletions include/mummer/sparseSA_imp.hpp
@@ -1,6 +1,7 @@
#ifndef __SPARSESA_IMP_H__
#define __SPARSESA_IMP_H__

#undef _OPENMP
#ifdef _OPENMP
#include <omp.h>
#endif
Expand Down
4 changes: 2 additions & 2 deletions src/essaMEM/sparseSA.cpp
Expand Up @@ -490,11 +490,11 @@ void sparseSA::construct(bool off48){
ISA.resize(N, off48);
if(SA.is_small) {
compactsufsort::create((const unsigned char*)(S + 0), (int*)SA.small.data(), N);
#pragma omp parallel for
//#pragma omp parallel for
for(long i = 0; i < N; ++i) { ISA.small[SA.small[i]] = i; }
} else {
compactsufsort::create((const unsigned char*)(S + 0), SA.large.begin(), N);
#pragma omp parallel for
//#pragma omp parallel for
for(long i = 0; i < N; ++i) { ISA.large[SA.large[i]] = i; }
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/tigr/mgaps.cc
Expand Up @@ -63,7 +63,7 @@ int ClusterMatches::Filter_Matches(Match_t * A, const int N) {
// diagonal. Pack all remaining matches into the front of A and
// reduce the value of N if any matches are removed.
// Matches in A *MUST* be sorted by Start2 value.
#pragma omp parallel for schedule(dynamic)
//#pragma omp parallel for schedule(dynamic)
for (int i = 0; i < N - 1; i ++) {
if (! A[i].Good) continue;

Expand Down
1 change: 1 addition & 0 deletions src/umd/nucmer_main.cc
Expand Up @@ -8,6 +8,7 @@
#include <src/umd/nucmer_cmdline.hpp>
#include <thread_pipe.hpp>

#undef _OPENMP
#ifdef _OPENMP
#include <omp.h>
#endif
Expand Down

0 comments on commit 277dac5

Please sign in to comment.