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

David van der Spoel spoel at xray.bmc.uu.se
Sun Apr 1 15:09:18 CEST 2012


On 2012-04-01 15:05, Roland Schulz wrote:
>
>
> On Sun, Apr 1, 2012 at 6:20 AM, David van der Spoel
> <spoel at xray.bmc.uu.se <mailto: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)

He does mention a crash with -nt > 1, and it is only recently, he also 
links to libgomp, so it must be the same error.

>
> 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)

At least on Macs for now.

>
> 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 <mailto:michael.shirts at virginia.edu>
>      > (434)-243-1821 <tel:%28434%29-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
>     <tel:%2B46184714205>.
>     spoel at xray.bmc.uu.se <mailto:spoel at xray.bmc.uu.se>
>     http://folding.bmc.uu.se
>     --
>     gmx-developers mailing list
>     gmx-developers at gromacs.org <mailto: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
>     <mailto:gmx-developers-request at gromacs.org>.
>
>
>
>
>
>
>
> --
> ORNL/UT Center for Molecular Biophysics cmb.ornl.gov <http://cmb.ornl.gov>
> 865-241-1537, ORNL PO BOX 2008 MS6309
>
>


-- 
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



More information about the gromacs.org_gmx-developers mailing list