[gmx-developers] Problems building for OS X with threads

Shirts, Michael (mrs5pt) mrs5pt at eservices.virginia.edu
Sun Apr 1 15:23:24 CEST 2012


> Michael's issue is a different because it is gcc 4.1.2

And on double checking, I read it wrong -- it's gcc 4.2.1!  So it might be
the same thing.

> and because it is
> not a segfault but the linker errorr.

I do get a segfault when I run on multiple threads when it compiles.
However, when shared libraries is on, it link fails instead.

Setting -DGMX_OPENMP:BOOL=OFF does not appear to fix the problem; it still
crashes on multiple threads.  I'll keep poking to make sure I've run through
all the options.

Best,
~~~~~~~~~~~~
Michael Shirts
Assistant Professor
Department of Chemical Engineering
University of Virginia
michael.shirts at virginia.edu
(434)-243-1821


> From: Roland Schulz <roland at utk.edu>
> Reply-To: Discussion list for GROMACS development <gmx-developers at gromacs.org>
> Date: Sun, 1 Apr 2012 09:05:03 -0400
> To: Discussion list for GROMACS development <gmx-developers at gromacs.org>
> Subject: Re: [gmx-developers] Problems building for OS X with threads
> 
> On Sun, Apr 1, 2012 at 6:20 AM, David van der Spoel
> <spoel at xray.bmc.uu.se>wrote:
> 
>> On 2012-04-01 05:50, Shirts, Michael (mrs5pt) wrote:
>>> Hi, all-
>>> 
>>> I'm very recently (with 4.6 updates in the last couple of weeks) having
>>> issues with building gromacs with threads on OS X.  When I try to compile
>>> with shared libraries, I get:
>>> 
>>> ld: warning: in /usr/local/lib/libgomp.dylib, file was built for i386
>> which
>>> is not the architecture being linked (x86_64)
>>> 
>>> When I build without shared libraries, it compiles, but crashes when run
>>> with -nt more than 1.
>>> 
>>> Currently using OS X 10.6.8, gcc 4.1.2 to compile.
>>> 
>>> Everything works fine with 4.5.5, and with earlier versions of 4.6.
>>> 
>>> Anyone else having similar problems, or know what changes could have
>> caused
>>> this?
>> 
>> There is a redmine for this (900).
>> 
> 
> Michael's issue is a different because it is gcc 4.1.2 and because it is
> not a segfault but the linker errorr.
> I'm surprised that you get a linker error. gcc 4.1 doesn't support OpenMP
> and if run cmake with gcc 4.1 on Linux I get:
> Could NOT find OpenMP (missing: OpenMP_C_FLAGS OpenMP_CXX_FLAGS)
> 
> If you rerun cmake (without a cache), do you still not get any error during
> cmake?
> 
> BTW: We probably should automatic disable OpenMP if the flags can't be
> found (e.g. for clang and gcc <4.2)
> 
> Roland
> 
>> 
>> Your simplest solution is cmake -DGMX_OPENMP:BOOL=OFF
>> 
>>> 
>>> Thanks!
>>> ~~~~~~~~~~~~
>>> Michael Shirts
>>> Assistant Professor
>>> Department of Chemical Engineering
>>> University of Virginia
>>> michael.shirts at virginia.edu
>>> (434)-243-1821
>>> 
>> 
>> 
>> --
>> David van der Spoel, Ph.D., Professor of Biology
>> Dept. of Cell & Molec. Biol., Uppsala University.
>> Box 596, 75124 Uppsala, Sweden. Phone:  +46184714205.
>> spoel at xray.bmc.uu.se    http://folding.bmc.uu.se
>> --
>> gmx-developers mailing list
>> gmx-developers at gromacs.org
>> http://lists.gromacs.org/mailman/listinfo/gmx-developers
>> Please don't post (un)subscribe requests to the list. Use the
>> www interface or send it to gmx-developers-request at gromacs.org.
>> 
>> 
>> 
>> 
>> 
> 
> 
> -- 
> ORNL/UT Center for Molecular Biophysics cmb.ornl.gov
> 865-241-1537, ORNL PO BOX 2008 MS6309
> -- 
> gmx-developers mailing list
> gmx-developers at gromacs.org
> http://lists.gromacs.org/mailman/listinfo/gmx-developers
> Please don't post (un)subscribe requests to the list. Use the
> www interface or send it to gmx-developers-request at gromacs.org.




More information about the gromacs.org_gmx-developers mailing list