Maybe I came accross it. These variables must be set before compiling meep:

export CFLAGS=" -fPIC"
export CXXFLAGS=" -fPIC"
export FFLAGS=" -fPIC"

I now can succesfully build and install the python-meep module;
however, running "import meep_mpi" in python fails on:

   ImportError: /usr/local/lib/python2.7/dist-packages/_meep_mpi.so:
undefined symbol: _ZN3MPI3Win4FreeEv

This is somehow related to the OpenMPI1.6 package I am using. I will
try recompiling with another MPI package available in Ubuntu, such as
OpenMPI or MPICH2.

2013/2/5, Filip Dominec <[email protected]>:
> Dear MEEP users, I am trying to compile the latest version of
> python-meep with MPI support from scratch.
> First I compiled meep-mpi (against MPICH2). It works fine and meep-mpi
> supports multiprocessing; but when it comes to compilation of
> python-meep with the command "sudo ./make-mpi -I/usr/local/include", I
> get the error:
>
> (...)
> g++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions
> -Wl,-Bsymbolic-functions -Wl,-z,relro
> build/temp.linux-x86_64-2.7/meep_mpi_wrap.o -lmeep_mpi -o
> build/lib.linux-x86_64-2.7/_meep_mpi.so
> /usr/bin/ld: /usr/local/lib/libmeep_mpi.a(anisotropic_averaging.o):
> relocation R_X86_64_32S against `.rodata' can not be used when making
> a shared object; recompile with -fPIC
> /usr/local/lib/libmeep_mpi.a: could not read symbols: Bad value
> (...)
>
> How to force the compiler to use -fPIC option? I am sorry for probably
> a repeated question and I hope it has a very short answer.
> Thank you in advance!
> Filip
>

_______________________________________________
meep-discuss mailing list
[email protected]
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

Reply via email to