Installing Meep 1.1.1

I tried to install Meep 1.1.1 in my CentOS workstation. It turns out that it needs some more packages to be installed. First Meep requires guile and libctl, So after downloading them, I tried to install guile. But it failed since guile requires GNU MP (sigh). So I downloaded GNU MP 4.3.1 and did configure, make, make install. I successfully installed in in a local folder. Then in configure guile, I need to specify the location of the GNU MP as well as the libltdl, so I typed:

./configure --prefix=/scratch/kurniawano/local LDFLAGS="-L/scratch/kurniawano/local/lib/" CPPFLAGS="-I/usr/share/libtool/libltdl/ -I/scratch/kurniawano/local/include"

I also need to specify the gmp.h location using CPPFLAGS. Otherwise, I will get an error “At least GNU MP 4.1 is required, see README”. After that I successfully installed guile 1.8.7. Once this is done I configure libctl and specifying the location of guile using LDFLAGS in the configure command. libctl was successfully installed also 🙂

During configure, a warning message shows that I didn’t have hdf5.h in my system. So I downloaded hdf5 and included the header files in the CPPFLAGS when installing meep 1.1.1. Before installing hdf5, I need to install SZIP library first. The installation for SZIP library is pretty simple and no problem encountered. However, it requires me to rebuild libctl again. After I installed hdf5, meep configure gives no error. But when I did make, it gives me error undefined reference to some hdf5 libraries. The problem is that some interface has changed in hdf5 1.8.x version. In one of the forum, it was suggested to install h5utils version 1.11.1.

To overcome this problem, I installed h5utils version 1.12.1 from MIT website, and configure it as follows:

./configure --prefix=/scratch/kurniawano/local LDFLAGS="-L/scratch/kurniawano/Download/hdf5/lib -L/scratch/kurniawano/local/lib" CPPFLAGS="-I/scratch/kurniawano/Download/hdf5/include -I/scratch/kurniawano/local/include" LIBS="-lhdf5"

If you use the shared library, you need to add the hdf5/lib into your LD_LIBRARY_PATH to make the configure successful. Besides that to create png, jpg image from hdf5 output of Meep, you need to install libpng, libjpeg. Another library that is required by h5utils is matheval.

To configure meep 1.1.1, I typed:

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

This configures fine, but when I run make, it gives me this error:


libtool: link: warning: library `/scratch/kurniawano/Download/hdf5/lib/libhdf5.l
a' was moved.
grep: /mnt/hdf/packages/szip/shared/encoder/Linux2.6-x86_64-gcc/lib/libsz.la: No
such file or directory
/bin/sed: can't read /mnt/hdf/packages/szip/shared/encoder/Linux2.6-x86_64-gcc/l
ib/libsz.la: No such file or directory
libtool: link: `/mnt/hdf/packages/szip/shared/encoder/Linux2.6-x86_64-gcc/lib/li
bsz.la' is not a valid libtool archive

though, I have installed szip library, it seems that hdf5 looks at a different location. So I needed to edit the libhdf5.la file under the hdf5/lib folder, and comment the line for dependency_libs then add the line for szip lib location:


# Libraries that this one depends upon.
#dependency_libs=' -L/mnt/hdf/packages/szip/shared/encoder/Linux2.6-x86_64-gcc/l
ib /mnt/hdf/packages/szip/shared/encoder/Linux2.6-x86_64-gcc/lib/libsz.la -lz -l
m'
dependency_libs='/scratch/kurniawano/local/lib/libsz.la -lz -lm'

After this, the make and make install runs fine.

If you want to build Meep with MPI enabled for parallel computation, add –with-mpi during the configure stage.

Advertisements

One Response

  1. […] 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 […]

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: