Installing MPB

I wanted to try MPB also, it’s a photonic bandgap simulator by MIT. So I downloaded the package and tried to install in my office workstation. The config stage couldn’t pass since it didn’t find the FFTW library, though I have one installed. It turns out that mine is fftw3 while MPB is not compatible with fftw3 yet. So I have to installed fftw2 into my local directory. The installation for fftw2 is pretty straightforward. Now I need to specify both fftw2, libctl and HDF5 location into the configure of MPB (you may want to refer to Meep installation also, it’s quite similar). This is what I typed to configure MPB.


./configure --prefix=/scratch/kurniawano/local LDFLAGS="-L/scratch/kurniawano/local/fftw2/lib -L/scratch/kurniawano/Download/hdf5/lib" CPPFLAGS="-I/scratch/kurniawano/local/fftw2/include -I/scratch/kurniawano/Download/hdf5/include" --with-libctl=/scratch/kurniawano/local/share/libctl

However, when I typed make, it gives me an error, from this page, I found out that the problem is that I am using HDF5 version 1.8, so I needed to pass through the option -DH5_USE_16_API=1 in the CPPFLAGS. After adding this, my installation works fine 🙂

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: