jts / sga

de novo sequence assembler using string graphs
http://genome.cshlp.org/content/22/3/549
237 stars 82 forks source link

error: use of undeclared identifier 'omp_set_num_threads' #120

Closed sjackman closed 8 years ago

sjackman commented 8 years ago

sga 0.10.14 fails to build on Mac OS with clang. See the build log here: https://travis-ci.org/Homebrew/homebrew-science/jobs/145974556#L453

clang++ -DHAVE_CONFIG_H -I. -I..  -I../Util -I../Bigraph -I../SuffixTools -I../StringGraph -I../Concurrency -I../Algorithm -I../SQG -I../Scaffold -I../GraphDiff -I../Thirdparty -I/usr/local/Cellar/google-sparsehash/2.0.3/include -I/usr/local/Cellar/bamtools/2.4.0_1/include -I/usr/local/Cellar/bamtools/2.4.0_1/include/bamtools -Wall -Wextra  -Wno-unknown-pragmas -O3 -c -o sga-overlap-long.o `test -f 'overlap-long.cpp' || echo './'`overlap-long.cpp
overlap-long.cpp:202:5: error: use of undeclared identifier 'omp_set_num_threads'
    omp_set_num_threads(opt::numThreads);

This call to omp_set_num_threads should be wrapped in #if _OPENMP

mateidavid commented 8 years ago

"With the release of Clang 3.8.0, OpenMP 3.1 support is enabled in Clang by default" - http://openmp.llvm.org/

sjackman commented 8 years ago

Woot! That's fantastic to hear. I don't believe that OpenMP has made its way into Apple clang yet though, as of Apple LLVM version 7.3.0 (clang-703.0.29).

jts commented 8 years ago

Should be fixed, Shaun can you test?

sjackman commented 8 years ago

Yep, that fixes it. Thanks, Jared. Care to tag a new stable release?