|MIT Photonic Bands|
|Data Analysis Tutorial|
|License and Copyright|
Here you can download the source code of MIT Photonic-Bands package. First, though, please consider subscribing to one of the mailing lists.
(It goes without saying that we will not sell or give your email address to anyone else...we hate spam, too.)
MIT Photonic-Bands 1.4.2 is the current version of MPB (see the MPB release notes to find out what's changed). You can download it from:
Be sure to look at the installation section of the manual. MPB should work on most any Unix-like operating system, but you may need to install a number of other packages first (e.g., BLAS, LAPACK, HDF5, Guile), as described in the installation instructions. Also, see below for additional notes for specific systems.
MIT Photonic Bands is free software under the GNU General Public License; see the MPB License and Copyright section of the documentation for additional information. Note especially that it comes as-is with no warranty (see the license for more details)
Precompiled MPB packages
Installation on Windows
It is possible to install MPB under Windows by using Cygwin, a free Unix-compatibility environment for Windows.
One MPB user, Robert Hovden, wrote a brief guide on installing MPB under Cygwin that should be helpful.
Common Installation Problems
Please read the following notes regarding the installation of MPB on various platforms. (Somewhat out of date, unfortunately.)
- HDF5: Version 1.8 of HDF5 changed the API, and programs like MPB that compiled with the earlier versions of HDF5 no longer work. The workaround is to pass
CPPFLAGSwhen running the
configurescript for MPB. i.e.
./configure CPPFLAGS="-DH5_USE_16_API=1", or
./configure CPPFLAGS="-DH5_USE_16_API=1 -I...include-paths..."if you also need to pass
- FFTW: Note that MPB requires you to install FFTW version 2.x; the newer version 3.x does not work with MPB yet. (It is fine to have both FFTW 2.x and FFTW 3.x installed simultaneously.)
- There is a gcc bug causing gcc 3.0. to crash when compiling MPB. The bug was fixed in gcc 3.1.
- The gcc "2.96" version released with Redhat 7.0 seems to cause problems (generate NaNs), although we haven't yet tracked this down in detail; we recommend using the official gcc 2.95.2 or later instead. It has been reported that lowering the optimization level of MPB to
-O2fixes the problem (run
perl -pi -e 's/-O3/-O2/g' configure); this is done by default in MPB 1.2 or later.
- There is a bug in gcc 2.95. (and possibly earlier egcs versions) that causes problems. This was fixed in gcc 2.95.2. (gcc 2.8.1 and earlier seem to be okay, too.)
- Linux/PPC: There is a bug in gcc 2.95. that causes problems. This was fixed in gcc 2.95.3.
- Alpha: There seems to be a bug in the accelerated BLAS routines provided by version 3.5 (and perhaps other versions) of the CXML (née DXML) math library. (It causes the test program
tests/blastestto crash, for one thing.) We've been told that recent versions of CXML fix this bug. To work around it, compile the file zgerc.f from the generic BLAS implementation and modify the
LIBSvariable of the
Makefileto link with
- HDF5: There is a bug in HDF5 1.4.2's build scripts that can cause compilation to fail on systems using some newer versions of gcc (e.g. RedHat 7, or Apple's MacOS X). (We've reported the bug and supplied a patch to the HDF folks, so hopefully this will be fixed in a future release.) If you can't compile HDF5 1.4.2, downgrading to version 1.2.2 seems to work.
- ATLAS: There is a bug in ATLAS 2.0 (a self-optimizing, accelerated BLAS library) that causes it to crash with the Photonic-Bands package. Version 3.0 of ATLAS fixes the bug, and is also tremendously faster for the matrix sizes that MPB typically uses.
Please email me if you have any additional comments or notes.