Dear Meep users,
Recently, we have interacted with Michel Devel (CC:) and Steffen (CC:)
on compiling of Harminv, Meep and MPB on Cygwin (Windows XP, Vista and
Windows 7). It seems that we found the recipe that works for many of us.
Finally Cygwin allows these packages to be installed and worked well.
Here is the list of steps for installing Meep, Harminv and MPB on Cygwin
for these of you who wants to install them on Cygwin.
Download and install Cygwin from http://www.cygwin.com/
What to install:
Accessibility - Default
Admin - Default
Archive - all install
Audio - default
Base - default
Database - default
Devel - Install all
Docs - default
Editors - default (but I install mc because I like it)
Games - default
Gnome - default
Graphics - install all
Interpreters - default
KDE - default
Libs - install all
Mail - default
Math - add liblapack and can remove fftw3 and libfftw3 from the list
Mingw - default
net - default
perl - default
publishing - default
python - default
security - default
shells - default
System - install all
Text - default
Utils - default
Web - default
X11 - install all
I know that many non-required packages will be installed this way, but I
do not spend much time on optimizing the Cygwin installation.
The Cygwin already contains compiled BLAS and Lapack libraries, so there
is no need to build them.
After installing Cygwin, test cygwin and xwindows:
1. start cygwin bash shell
2. start xwindows - run startxwin.exe in the Cygwin shell
3. if cygwin and xterminal are able to be started then they are
installed well. Stop Xwindows and exit cygwin.
1. Environment variables
Using you favourite text editor, add the following lines at the end of
your ./bash_profile file
LDFLAGS=-L/usr/local/lib export LDFLAGS
CPPFLAGS=-I/usr/local/include export CPPFLAGS
PATH=/usr/local/bin:$PATH export PATH
LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH export LD_LIBRARY_PATH
2. Build and install h5utils (optional, you need them if you want to
convert .h5 files created with Meep and MPB)
2.1 Download http://ab-initio.mit.edu/h5utils/h5utils-1.12.1.tar.gz
2.2 gzip -d h5utils-1.12.1.tar.gz
2.3 tar -xvf h5utils-1.12.1.tar
2.4 cd h5utils-1.12.1
2.5 ./configure --prefix=/usr/local
2.6 make
2.7 make install
3. Build and install FFTW
3.1 download http://www.fftw.org/fftw-2.1.5.tar.gz
3.2 gzip -d fftw-2.1.5.tar.gz
3.3 tar -xvf fftw-2.1.5.tar
3.4 cd fftw-2.1.5
3.5 ./configure --prefix=/usr/local
3.6 make
3.7 make install
4. libctl
4.1 Download it from http://ab-initio.mit.edu/libctl/libctl-3.1.tar.gz
4.2 gzip -d libctl-3.1.tar.gz
4.3 tar -xvf libctl-3.1.tar
4.4 cd libctl-3.1
4.5 ./configure --prefix=/usr/local
4.6 make
4.7 make install
o. Build and install HDF5 (optional)
o.1 Download hdf5-1.6.10.tar.gz from
http://www.hdfgroup.org/ftp/HDF5/prev-releases/hdf5-1.6.9/src/hdf5-1.6.9.tar.gz
o.2 gzip -d hdf5-1.6.9.tar.gz
o.3 tar -xvf hdf5-1.6.9.tar
o.4 cd hdf5-1.6.9
o.5 ./configure --prefix=/usr/local
o.6 make
o.7 make install
5. MPB
5.1 download it from http://ab-initio.mit.edu/mpb/mpb-1.4.2.tar.gz
5.2 gzip -d mpb-1.4.2.tar.gz
5.3 tar -xvf mpb-1.4.2.tar
5.4 cd mpb-1.4.2
5.5 ./configure --prefix=/usr/local
5.6 make
5.7 make install
6. Harminv
6.1 download it from http://ab-initio.mit.edu/harminv/harminv-1.3.1.tar.gz
6.2 gzip -d harminv-1.3.1.tar.gz
6.3 tar -xvf harminv-1.3.1.tar
6.4 cd harminv-1.3.1
6.5 ./configure --prefix=/usr/local F77="gfortran"
6.6 make
6.7 make install
7. MEEP
7.1 download it from http://ab-initio.mit.edu/meep/meep-1.1.1.tar.gz
7.2 gzip -d meep-1.1.1.tar.gz
7.3 tar -xvf meep-1.1.1.tar
7.4 cd meep-1.1.1
7.5 ./configure --prefix=/usr/local F77="gfortran"
7.6 make
7.7 make install
All examples of MPB work well after the installation. Meep examples work
well, except of bend-flux.ctl.
If HDF5 is not installed, MEEP cannot run bend-flux.ctl and interrupts
with the following error message:
#001: /pub/cygports/hdf5/hdf5-1.6.9-2/src/hdf5-1.6.9/src/H5F.c line
1749 in H5
F_open(): unable to open file
major(04): File interface
minor(17): Unable to open file
#002: /pub/cygports/hdf5/hdf5-1.6.9-2/src/hdf5-1.6.9/src/H5FD.c line
1033 in H
5FD_open(): open failed
major(22): Virtual File Layer
minor(29): Unable to initialize object
#003: /pub/cygports/hdf5/hdf5-1.6.9-2/src/hdf5-1.6.9/src/H5FDsec2.c
line 367 i
n H5FD_sec2_open(): unable to open file
major(04): File interface
minor(17): Unable to open file
#004: /pub/cygports/hdf5/hdf5-1.6.9-2/src/hdf5-1.6.9/src/H5FDsec2.c
line 367 i
n H5FD_sec2_open(): No such file or directory
major(03): Internal HDF5 error
minor(87): System error message
meep: error on line 252 of h5file.cpp: error opening HDF5 input file
If HDF5 is installed and both meep and harminv are compiled after
installing the HDF5 libraries, then MEEP cannot run bend-flux.ctl and
interrupts with the different error message:
#000: H5F.c line 2072 in H5Fopen(): unable to open file
major(04): File interface
minor(17): Unable to open file
#001: H5F.c line 1749 in H5F_open(): unable to open file
major(04): File interface
minor(17): Unable to open file
#002: H5FD.c line 1033 in H5FD_open(): open failed
major(22): Virtual File Layer
minor(29): Unable to initialize object
#003: H5FDsec2.c line 367 in H5FD_sec2_open(): unable to open file
major(04): File interface
minor(17): Unable to open file
#004: H5FDsec2.c line 367 in H5FD_sec2_open(): No such file or directory
major(03): Internal HDF5 error
minor(87): System error message
meep: error on line 252 of h5file.cpp: error opening HDF5 input file
The following warning message appears after computations, but we can
live with it.
"Some deprecated features have been used. Set the environment
variable GUILE_WARN_DEPRECATED to "detailed" and rerun the
program to get more information. Set it to "no" to suppress
this message."
This work would not be possible without the help provided by Michel and
Steffen.
Many thanks to Michel Devel for suggesting to build harminv with
F77="gfortran" variable. Otherwise, it would not build.
Many thanks to Steffen for testing and careful checking all steps of the
software installation on Cygwin.
best wishes, have a nice weekend
pavel
_______________________________________________
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss