clang error during compiling on Mac

738 views
Skip to first unread message

shahed Iasir

unread,
Oct 2, 2016, 11:49:46 PM10/2/16
to moose-users

Hi all,

I have this error during compilation in my mac. Don't know how solve it. 



clang: clangclang: : errorerror: : errorclang: : unsupported option '-fopenmp'clangunsupported option '-fopenmp': error: unsupported option '-fopenmp'error: unsupported option '-fopenmp'unsupported option '-fopenmp'



My OS X is El Capitan. I was able to compile before. Don't know what is causing this. 

Apple LLVM version 7.3.0 (clang-703.0.31)

Target: x86_64-apple-darwin15.6.0





____Shahed

Daniel Schwen

unread,
Oct 2, 2016, 11:53:07 PM10/2/16
to moose-users

Looks like you are not using the MOOSE supplied clang but the Apple stock clang (which in that version does not have OpenMP support). Check if you loaded the MOOSE environment. What does
module list
say?


--
You received this message because you are subscribed to the Google Groups "moose-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to moose-users...@googlegroups.com.
Visit this group at https://groups.google.com/group/moose-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/moose-users/41529c03-23f9-4612-92fa-993293d8f90b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

shahed Iasir

unread,
Oct 3, 2016, 9:02:41 AM10/3/16
to moose-users

Currently Loaded Modulefiles:

  1) moose/.gcc-5.3.0                 3) moose/.mpich-3.2_clang           5) moose/.tbb44_20150728            7) moose-dev-clang                  9) moose-tools

  2) moose/.clang-3.7.0               4) moose/.mpich_petsc-3.6.4-clang   6) moose/.cppunit-1.12.1-clang      8) miniconda



module avail :

--------------------------------------------------------------------------- /opt/moose/Modules/versions ----------------------------------------------------------------------------

3.2.10


----------------------------------------------------------------------- /opt/moose/Modules/3.2.10/modulefiles -----------------------------------------------------------------------

advanced_modules dot              module-git       modules          moose-dev-gcc    null

ccache           miniconda        module-info      moose-dev-clang  moose-tools      use.own

Peterson, JW

unread,
Oct 3, 2016, 10:19:50 AM10/3/16
to moose-users
On Mon, Oct 3, 2016 at 7:02 AM, shahed Iasir <shahed...@gmail.com> wrote:

Currently Loaded Modulefiles:

  1) moose/.gcc-5.3.0                 3) moose/.mpich-3.2_clang           5) moose/.tbb44_20150728            7) moose-dev-clang                  9) moose-tools

  2) moose/.clang-3.7.0               4) moose/.mpich_petsc-3.6.4-clang   6) moose/.cppunit-1.12.1-clang      8) miniconda



module avail :

--------------------------------------------------------------------------- /opt/moose/Modules/versions ----------------------------------------------------------------------------

3.2.10


----------------------------------------------------------------------- /opt/moose/Modules/3.2.10/modulefiles -----------------------------------------------------------------------

advanced_modules dot              module-git       modules          moose-dev-gcc    null

ccache           miniconda        module-info      moose-dev-clang  moose-tools      use.own


This shows the moose-dev-clang module is correctly loaded, but it seems that you have the wrong clang++ in your PATH.  'clang++ --version' should print something like:

clang version 3.7.0 (tags/RELEASE_370/final)
Target: x86_64-apple-darwin15.0.0
Thread model: posix

Notice there's nothing about Apple there...

--
John

shahed Iasir

unread,
Oct 3, 2016, 11:25:18 AM10/3/16
to moose-users
Thanks John. It works now.


__Shahed

Peterson, JW

unread,
Oct 3, 2016, 11:30:21 AM10/3/16
to moose-users
On Mon, Oct 3, 2016 at 9:25 AM, shahed Iasir <shahed...@gmail.com> wrote:
Thanks John. It works now.

Can you elaborate?  

Were you in an old terminal or something?

--
John

shahed Iasir

unread,
Oct 3, 2016, 11:36:59 PM10/3/16
to moose-users
I actually don't know what happened. Some how it stopped using moose's. I just added into the path. 
Reply all
Reply to author
Forward
0 new messages