OpenMP issue

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

OpenMP issue

David Blaikie via cfe-dev
Hi Everyone,

In case you are still seeking feedback
(https://releases.llvm.org/3.7.0/tools/clang/docs/ReleaseNotes.html#openmp-support)
:

CXX=clang++ CXXFLAGS="-DNDEBUG -g2 -O3 -fopenmp=libomp" make -j 4
...

clang++ -DNDEBUG -g2 -O3 -fopenmp=libomp -DCRYPTOPP_DISABLE_MIXED_ASM
-fPIC -pthread -pipe -c nbtheory.cpp

nbtheory.cpp:16:11: fatal error: 'omp.h' file not found
# include <omp.h>
          ^~~~~~~
1 error generated.
make: *** [GNUmakefile:1587: nbtheory.o] Error 1

$ cat nbtheory.cpp
...
#ifdef _OPENMP
# include <omp.h>
#endif
...

Finally,

$ clang++ --version
clang version 6.0.1 (tags/RELEASE_601/final)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /bin

And:

$ clang++ --version
clang version 6.0.1 (tags/RELEASE_601/final)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /bin

$ lsb_release -a
LSB Version:    :core-4.1-amd64:core-4.1-noarch
Distributor ID: Fedora
Description:    Fedora release 28 (Twenty Eight)
Release:        28
Codename:       TwentyEight

GCC, ICC, MSVC, IBM XLC and SunCC are OK.

Jeff
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: OpenMP issue

David Blaikie via cfe-dev
You need libomp. Also, probably, you need to specify the path to the omp.h file when you invoke the compiler

Best regards,
Alexey Bataev

> 22 янв. 2019 г., в 17:19, Jeffrey Walton via cfe-dev <[hidden email]> написал(а):
>
> Hi Everyone,
>
> In case you are still seeking feedback
> (https://releases.llvm.org/3.7.0/tools/clang/docs/ReleaseNotes.html#openmp-support)
> :
>
> CXX=clang++ CXXFLAGS="-DNDEBUG -g2 -O3 -fopenmp=libomp" make -j 4
> ...
>
> clang++ -DNDEBUG -g2 -O3 -fopenmp=libomp -DCRYPTOPP_DISABLE_MIXED_ASM
> -fPIC -pthread -pipe -c nbtheory.cpp
>
> nbtheory.cpp:16:11: fatal error: 'omp.h' file not found
> # include <omp.h>
>          ^~~~~~~
> 1 error generated.
> make: *** [GNUmakefile:1587: nbtheory.o] Error 1
>
> $ cat nbtheory.cpp
> ...
> #ifdef _OPENMP
> # include <omp.h>
> #endif
> ...
>
> Finally,
>
> $ clang++ --version
> clang version 6.0.1 (tags/RELEASE_601/final)
> Target: x86_64-unknown-linux-gnu
> Thread model: posix
> InstalledDir: /bin
>
> And:
>
> $ clang++ --version
> clang version 6.0.1 (tags/RELEASE_601/final)
> Target: x86_64-unknown-linux-gnu
> Thread model: posix
> InstalledDir: /bin
>
> $ lsb_release -a
> LSB Version:    :core-4.1-amd64:core-4.1-noarch
> Distributor ID: Fedora
> Description:    Fedora release 28 (Twenty Eight)
> Release:        28
> Codename:       TwentyEight
>
> GCC, ICC, MSVC, IBM XLC and SunCC are OK.
>
> Jeff
>
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev