CUBoulder-HPCPerfAnalysis / memory

Experiments with memory performance
MIT License
2 stars 7 forks source link

Issues Compiling with openMP #13

Open engvall opened 9 years ago

engvall commented 9 years ago

I'm having issues trying to run stream on multiple threads on my Macbook Pro. I first tried compiling it with gcc-4.2.1 with:

make CC=gcc CFLAGS='-fopenmp -march=native' stream

and got the error:

ld: library not found for -lgomp

so I tried updating to version 4.9 with:

brew install gcc49 --enable-all-languages

Then tried compiling again, and got the same error. Any idea what could be going wrong?

jedbrown commented 9 years ago

What do you get from gcc --version? Are you actually using the new version of gcc (run which gcc)? Which version of Mac OS?

engvall commented 9 years ago

I'm running OSX 10.10.1

For some reason it doesn't look like homebrew installed version 4.9 correctly

gcc --version gives:

Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/c++/4.2.1 Apple LLVM version 6.0 (clang-600.0.54) (based on LLVM 3.5svn) Target: x86_64-apple-darwin14.0.0 Thread model: posix

I guess I'll try installing again some other way?

jedbrown commented 9 years ago

I think Apple is totally out of line to claim the "gcc" namespace for clang (a compiler not even related to gcc and that doesn't support OpenMP), but there is nothing I can do.

Homebrew likely installed to a directory that is not first in your PATH. Maybe /usr/local/bin/gcc?

engvall commented 9 years ago

went home to my linux box, and it's working. Thanks for the help.