From: Jason Swails <>
Date: Fri, 15 May 2015 20:47:42 -0400

On Fri, May 15, 2015 at 4:22 PM, George Tzotzos <> wrote:

> I’ve successfully installed on the Mac Pro following the
> instructions given in:
> I followed the same installation procedure on a PowerBook Pro (OS X
> v.10.10.3). Prior to the installation, I deleted the /opt directory and
> re-installed it.
> I selected the proper compilers (see below)
> Selecting 'mp-gcc48' for 'gcc' succeeded. 'mp-gcc48' is now active.
> Selecting 'mpich-gcc48-fortran' for 'mpi' succeeded. 'mpich-gcc48-fortran'
> is now active.
> Completing the parallel installation of amber through out no error
> messages. However, was NOT installed.
> mpi4py_install.log indicates that file _configtest.o was built for the
> wrong architecture (i386) and not for x86_64.
> Anything that can be done to save the day? Thanks in advance for any
> suggestions
> George
> The complete .log file is below.
> unning build
> running build_py
> creating build
> creating build/lib.macosx-10.10-intel-2.7
> creating build/lib.macosx-10.10-intel-2.7/mpi4py
> copying src/ -> build/lib.macosx-10.10-intel-2.7/mpi4py
> copying src/ -> build/lib.macosx-10.10-intel-2.7/mpi4py
> creating build/lib.macosx-10.10-intel-2.7/mpi4py/include
> creating build/lib.macosx-10.10-intel-2.7/mpi4py/include/mpi4py
> copying src/include/mpi4py/mpi4py.h ->
> build/lib.macosx-10.10-intel-2.7/mpi4py/include/mpi4py
> copying src/include/mpi4py/mpi4py.MPI.h ->
> build/lib.macosx-10.10-intel-2.7/mpi4py/include/mpi4py
> copying src/include/mpi4py/mpi4py.MPI_api.h ->
> build/lib.macosx-10.10-intel-2.7/mpi4py/include/mpi4py
> copying src/include/mpi4py/__init__.pxd ->
> build/lib.macosx-10.10-intel-2.7/mpi4py/include/mpi4py
> copying src/include/mpi4py/MPI.pxd ->
> build/lib.macosx-10.10-intel-2.7/mpi4py/include/mpi4py
> copying src/include/mpi4py/mpi_c.pxd ->
> build/lib.macosx-10.10-intel-2.7/mpi4py/include/mpi4py
> copying src/include/mpi4py/__init__.pyx ->
> build/lib.macosx-10.10-intel-2.7/mpi4py/include/mpi4py
> copying src/include/mpi4py/mpi.pxi ->
> build/lib.macosx-10.10-intel-2.7/mpi4py/include/mpi4py
> copying src/include/mpi4py/mpi4py.i ->
> build/lib.macosx-10.10-intel-2.7/mpi4py/include/mpi4py
> running build_ext
> MPI C compiler: /opt/local/bin/mpicc
> MPI C++ compiler: /opt/local/bin/mpicxx
> MPI linker: /opt/local/bin/mpicc
> checking for MPI compile and link ...
> /opt/local/bin/mpicc -arch x86_64 -arch i386 -pipe -fno-strict-aliasing
> -fno-common -dynamic -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes
> -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7
> -c _configtest.c -o _configtest.o

​Look right here ^^^

You see "-arch x86_64 -arch i386" in the compilation line. Based on your
error message below, I suspect what this means is the "-arch" flag in the
host compiler is either ignored or it overwrites (so that -arch i386
overrides -arch x86_64), rather than specifying two target architectures.

It's not entirely straightforward to change these flags, either. Python's
distutils uses the same CFLAGS and compiler as those used to compile Python
originally, and Apple builds their Python binary for both architectures.​
 mpi4py, though, needs mpicc, which in this case does *not* wrap the host
compiler (/usr/bin/clang) but rather /opt/local/bin/gcc instead (you can
use "mpicc -show" to verify this).

Long story short: you will not have much luck building this mpi4py using
the system Python. I recommend using MacPorts to install Python 2.7, and
since you're using MacPorts to install your MPI also, go ahead and have
MacPorts install mpi4py as well (that way Amber won't try to).

So something like this:

sudo port install python27 py27-tkinter py27-mpi4py py27-matplotlib
py27-scipy py27-pandas

That should give you the basic Python infrastructure with the most common
Python libraries and everything that every program in Amber depends on
(like,,,, and by extension After you do this, make sure to reconfigure so that Amber
knows to switch its default Python interpreter.


Jason M. Swails
Rutgers University
Postdoctoral Researcher
AMBER mailing list
Received on Fri May 15 2015 - 18:00:02 PDT
Custom Search