Mac OS 10.8 + Trilinos + Deal.II + clang

181 views
Skip to first unread message

Luca Heltai

unread,
Apr 24, 2013, 2:58:46 PM4/24/13
to Deal.II Users
Dear All,

I've been trying to figure this out for a while, but I could not make this combination of things work on my system.

/usr/bin/clang++
Trilinos 11.0.3
deal.II

Anytime I try to compile any example using this combination I get the following:

./step-1
Segmentation fault: 11
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0xffffffffffffffe8
0x000000010ec71150 in global constructors keyed to a ()


This has been happening for a while now, and it happens also if I run Trilinos examples alone, so I guess it is related with a little mess made by Trilinos 11.0.3. Online this has been reported as a compiler bug triggered in some rare cases, but I could not really follow the explanations.

If I disable Trilinos and recompile deal.II, everything works fine with deal.II. I'm now trying another native compiler which is installed by XCode command line tools:

/Applications/Xcode.app/Contents/Developer/usr/bin/llvm-gcc

I'm not sure if this is present in all installations of XCode, but if this work, we should advise people not to use clang when compiling Trilinos+Deal.II under Mac.

L.

--
Luca Heltai <luca....@gmail.com>
http://people.sissa.it/~heltai/
Scuola Internazionale Superiore di Studi Avanzati
Phone: +39 040 3787 449, Office: 622
--
There are no answers, only cross references

Wolfgang Bangerth

unread,
May 6, 2013, 5:17:25 PM5/6/13
to dea...@googlegroups.com

> This has been happening for a while now, and it happens also if I run
> Trilinos examples alone, so I guess it is related with a little mess made
> by Trilinos 11.0.3. Online this has been reported as a compiler bug
> triggered in some rare cases, but I could not really follow the
> explanations.
>
> If I disable Trilinos and recompile deal.II, everything works fine with
> deal.II. I'm now trying another native compiler which is installed by XCode
> command line tools:
>
> /Applications/Xcode.app/Contents/Developer/usr/bin/llvm-gcc
>
> I'm not sure if this is present in all installations of XCode, but if this
> work, we should advise people not to use clang when compiling
> Trilinos+Deal.II under Mac.

I think the Mac OS X section of the Wiki might be a good place for this. Want
to put a sentence in there?

Best
W.


--
------------------------------------------------------------------------
Wolfgang Bangerth email: bang...@math.tamu.edu
www: http://www.math.tamu.edu/~bangerth/

Matthias Maier

unread,
May 6, 2013, 6:45:02 PM5/6/13
to dea...@googlegroups.com

Am 06. Mai 2013, 23:17 schrieb Wolfgang Bangerth <bang...@math.tamu.edu>:

>> I'm not sure if this is present in all installations of XCode, but if this
>> work, we should advise people not to use clang when compiling
>> Trilinos+Deal.II under Mac.
>
> I think the Mac OS X section of the Wiki might be a good place for
> this. Want to put a sentence in there?

Please keep in mind that llvm-gcc is actually highly deprecated.
It was abandoned upstream in favor of dragonegg [1].

It is more of an intermediate solution for Apple's Xcode to replace the
highly dated gcc-4.2 with llvm-gcc-4.2 (to get at least a "half" modern
compile chain...). I think that it is not unlikely that Apple
will drop the last remains of *gcc* with the next (major?) version of
Xcode/their operating system.

So, actually, clang is the way to go. And, in my humble opinion, is
actually a fairly decent compiler, not just for Mac (with a much better
frontend than gcc).

Best,
Matthias

[1] http://dragonegg.llvm.org/

Luca Heltai

unread,
May 7, 2013, 6:09:53 AM5/7/13
to dea...@googlegroups.com
Unfortunately I have not been able to compile Trilinos correctly using the native clang compilers. Whenever I try to combine deal.II and Trilinos using Clang, none of the examples work (I always get a segfault with an invalid kernel address that online is reported as a bug of the compiler...).

Deal.II alone, however, works fine.

It might be something related to my system, where there are far too many compilers and far too many different installations. I already updated the OS X wiki with the procedure I used to compile using different compilers. I was hoping to get some feedback from other OS X users, to get their experience on Clang+Trilinos+Deal.II.

I opted for macports gcc47, since this also allowed me to install netcdf, arpack, tbb, umfpack and boost as external packages, and it is by far the most complete deal.II installation on a Mac that I was able to accomplish so far.

Any other Mac user with experience on clang+trilinos+deal.II?

Luca.

--
Luca Heltai <luca....@gmail.com>
http://people.sissa.it/~heltai/
Scuola Internazionale Superiore di Studi Avanzati
Phone: +39 040 3787 449, Office: 622
--
There are no answers, only cross references

> --
> The deal.II project is located at http://www.dealii.org/
> For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en
> ---
> You received this message because you are subscribed to the Google Groups "deal.II User Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to dealii+un...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

Reply all
Reply to author
Forward
0 new messages