Friday, January 27, 2012

Compiling Meep

Meep is a fantastic electromagnetic field simulator from MIT. [Link:ab-initio.mit.edu]

It runs fine on my Windows XP laptop, but my laptop isn't all that powerful to perform any meaningful simulations reliably. Fortunately I got access to a bigger 64-bit Linux machine that's got 128GB of RAM :) Installing Meep on it was a bit of a pain, though.. as I didn't have administrative access to that system, and finding the right versions of dependencies and compiling them with the right options was tricky.

Here's what finally worked for me:




mkdir --parents /home/kpachar1/meep/local

wget ftp://ftp.gnu.org/gnu/libtool/libtool-1.5.6.tar.gz
gunzip libtool-1.5.6.tar.gz
tar -xf libtool-1.5.6.tar
cd libtool-1.5.6
./configure --prefix=/home/kpachar1/meep/local
make clean
make
make install
cd ..

wget ftp://ftp.gmplib.org/pub/gmp-5.0.3/gmp-5.0.3.tar.bz2
bunzip2 gmp-5.0.3.tar.bz2
tar -xf gmp-5.0.3.tar
cd gmp-5.0.3
export LDFLAGS=-L/home/kpachar1/meep/local/lib
export CPPFLAGS=-I/home/kpachar1/meep/local/include
./configure --prefix=/home/kpachar1/meep/local
make clean
make
make install
cd ..

export LD_LIBRARY_PATH=/home/kpachar1/meep/local/lib

wget ftp://ftp.gnu.org/gnu/guile/guile-1.8.8.tar.gz
gunzip guile-1.8.8.tar.gz
tar -xf guile-1.8.8.tar
cd guile*
export LDFLAGS=-L/home/kpachar1/meep/local/lib
export CPPFLAGS=-I/home/kpachar1/meep/local/include
./configure --prefix=/home/kpachar1/meep/local --with-local-prefix=/home/kpachar1/meep/local
make clean
make
make install
cd ..

export PATH=$PATH:/home/kpachar1/meep/local/bin

wget http://ab-initio.mit.edu/libctl/libctl-3.1.tar.gz
gunzip libctl-3.1.tar.gz
tar -xf libctl-3.1.tar
cd libctl-3.1
export CPPFLAGS=-I/home/kpachar1/meep/local/include
export LDFLAGS=-L/home/kpachar1/meep/local/lib
./configure --prefix=/home/kpachar1/meep/local
make clean
make
make install
cd ..


wget http://www.open-mpi.org/software/ompi/v1.4/downloads/openmpi-1.4.4.tar.bz2
bunzip2 openmpi-1.4.4.tar.bz2
tar -xf openmpi-1.4.4.tar
cd openm*
./configure --prefix=/home/kpachar1/meep/local
make
make install
cd ..


wget http://www.hdfgroup.org/ftp/HDF5/releases/hdf5-1.6/hdf5-1.6.10/src/hdf5-1.6.10.tar.gz
cd hdf5-1.6.10
./configure --prefix=/home/kpachar1/meep/local
make clean
make
make install
cd ..



wget http://ab-initio.mit.edu/h5utils/h5utils-1.12.1.tar.gz
gunzip h5utils-1.12.1.tar.gz
tar -xf h5utils-1.12.1.tar
cd h5utils-1.12.1
export LDFLAGS=-L/home/kpachar1/meep/local/lib
export CPPFLAGS=-I/home/kpachar1/meep/local/include
./configure --prefix=/home/kpachar1/meep/local
make clean
make
make install
cd ..


wget http://ab-initio.mit.edu/meep/meep-1.1.1.tar.gz
gunzip meep-1.1.1.tar.gz
tar -xf meep-1.1.1.tar
cd meep-1.1.1
./configure --prefix=/home/kpachar1/meep/local --with-libctl=/home/kpachar1/meep/local/share/libctl --with-mpi
make clean
make
make install
meep-mpi
cd ..

5 comments:

  1. Thanks a lot, this is of great help!!

    ReplyDelete
  2. Was helpful. I linked to your post http://msdresearch.blogspot.com/2012/04/meep-installation.html

    ReplyDelete
  3. Thanks, although I can intsall it easily on my ubuntu, I am happy to have these instructions. I am copying them to my mail draft. One more thing, do you have similar instructions for the MPB also??

    ReplyDelete
    Replies
    1. I also did same installed on ubuntu but cant run some of instructions like run untill to get image plz help me out

      Delete
  4. how did you set up for windows

    ReplyDelete