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

Erik Marklund erikm at xray.bmc.uu.se
Sun Apr 1 22:06:56 CEST 2012


1 apr 2012 kl. 15.16 skrev Roland Schulz:

> 
> 
> On Sun, Apr 1, 2012 at 9:09 AM, David van der Spoel <spoel at xray.bmc.uu.se> wrote:
> 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.
> 
> True. I overlooked that part. Yes that part is the same. I'm still puzzled why cmake doesn't detect that gcc 4.1 doesn't have OpenMP. 

From Red Hat a flavor of gcc 4.1.2 once emerged that supported OpenMP. Some other distros picked it up, so although the standard gcc didn't get OpenMP support until later, 4.1.2 is not necessarily non-OpenMP. Apples gcc could furthermore very well be modified in similar ways.

Erik

> @Michael: Or was your compiler version a typo and you are also using gcc 4.2?
> 
> Roland
> 
> 
> 
> >
> > 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
> --
> 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.

-----------------------------------------------
Erik Marklund, PhD
Dept. of Cell and Molecular Biology, Uppsala University.
Husargatan 3, Box 596,    75124 Uppsala, Sweden
phone:    +46 18 471 6688        fax: +46 18 511 755
erikm at xray.bmc.uu.se
http://www2.icm.uu.se/molbio/elflab/index.html

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://maillist.sys.kth.se/pipermail/gromacs.org_gmx-developers/attachments/20120401/e26a6749/attachment.html>


More information about the gromacs.org_gmx-developers mailing list