c - Get the Apple llvm clang compiler with MP and MPI support -
i have compile program (gromacs 4.6) on mac mpi , mp support , cuda. cuda 8.0 (required) not allow use of gcc on mac, "apple llvm 8.0.0".
i tried hard set clang compiler support openmp , openmpi not working.
what managed getting llvm 4.0.0 installed openmp , openmpi support, compiling nvcc complaining:
nvcc fatal : version ('40000') of host compiler ('clang') not supported
is there way got apple llvm openmp support?
edit:
$ clang-4.0 -fopenmp hello_openmp.c # works fine
$ gcc -fopenmp hello_openmp.c clang: error: unsupported option '-fopenmp'
$ gcc --version configured with: --prefix=/library/developer/commandlinetools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 apple llvm version 8.0.0 (clang-800.0.42.1) target: x86_64-apple-darwin16.7.0 thread model: posix installeddir: /library/developer/commandlinetools/usr/bin
$ clang-4.0 --version clang version 4.0.1 (tags/release_401/final) target: x86_64-apple-darwin16.7.0 thread model: posix installeddir: /usr/local/opt/llvm/bin
file hello_openmp.c:
#include <omp.h> #include <stdio.h> int main() { #pragma omp parallel printf("hello thread %d, nthreads %d\n", omp_get_thread_num(), omp_get_num_threads()); }
Comments
Post a Comment