[gmx-users] gromacs on MacOSX. It works great!

Erik Lindahl erik at theophys.kth.se
Fri Oct 26 22:57:29 CEST 2001


nicolis at guideo.fr wrote:

> Well I am not sure that somebody else wants to use gromacs on
> macintosh under system OSX, but just in case you are interested it works
> just fine.

Hi Yannis and thanks for the report! You might be interested in that
I'm playing around with Altivec assembly right now. NO PROMISES -
I haven't benchmarked things yet - but if we're lucky gromacs might
be considerably faster on powerpc soon....


>
>
> Of course it doesn't work under the aqua environment but under
> X-windows. You have to install XDarwin first. I assume also that you have
> installed fftw and optionnally lesstiff before.
> There are only three points to modify from the standard installation
> procedure:
>
> *       First, configure looks for malloc.h in the /usr/include directory, but under
> MacOSX it is in /usr/include/objc/
> The simplest way I found is to establish a soft link:
> sudo ln -s /usr/include/objc/malloc.h /usr/include/malloc.h
> After that, you can proceed typing ./configure

OK - Actually I'm not 100% sure we need to include malloc.h directly -
I'll try to remove it completely from the code.

>
>
> *       The second problem arises at the end of the configuration. configure is
> unable to create the makefiles complaining about a series of sed errors
> like these ones:
> sed: 48: /tmp/cs6564-15022/subs-1.sed: unescaped newline inside
> substitute pattern
> sed: 3: /tmp/cs6564-15022/subs-2.sed: command i expects \ followed by
> text
> These errors come from some commands in the config files wrapped on
> two lines. For a reason I don't understand (could be a unix/mac end of line
> issue?), sed wants some commands on the same line but the configure
> script splits them on two lines. To correct the problem open (with emacs
> or any other editor) the config.status file and look near the end of the file
> for the 7 lines beginning:
> s, at ACLOCAL@,${SHELL}
> s, at AUTOCONF@,${SHELL}
> s, at AUTOMAKE@,${SHELL}
> s, at AUTOHEADER@,${SHELL}
> s, at MAKEINFO@,${SHELL}
> s, at AMTAR@,${SHELL}
> s, at install_sh@,
> They are followed by a path on the same line and a second path on the
> next line. Just delete the end of line to join the two lines for each of the
> seven commands (taking care to leave a space between the two paths).
> After saving the file, type
> ./config.status
> and the makefiles will be generated.
> You can now type
> make
> in order to build the package and
> sudo make install
> to install it.

This is a known issue with OS X and the current versions of autoconf. The
problem appears because /bin/sh on OS X is actually zsh rather than bash
or the bourne shell. I've reported the bug to them, but in the meantime you
can simply work around it by installing bash and typing

/bin/bash ./configure

Instead of the normal ./configure!

>
>
> *       The third issue comes upon grompp execution.
> grompp uses the c-preprocessor to resolve includes etc. If you want to
> use this functionality you have to know that grompp looks for /lib/cpp but
> on MacOSX it is under /usr/libexec/gcc/darwin/ppc/2.95.2/cpp. Again, the
> simplest way I found is a soft link:
> sudo ln -s /usr/libexec/gcc/darwin/ppc/2.95.2/cpp /lib/cpp
> (of course you can also indicate in the grompp inmput file where cpp is)

That's of course handy to be able to use the same mdp files everywhere, but
you can also give the location of cpp in a variable in the mdp file. In the future
we'll try to get rid of (an external) cpp completely.

>
>
> That's all. I hope it works for you as it worked for me. Any comments (and
> error corrections) are welcomed.
>

Again, thanks for the help! I'm actually tempted to get a powerbook with OS X
on myself... guess I'll have to work harder on those altivec loops.

Cheers,

Erik





More information about the gromacs.org_gmx-users mailing list