Re: [Meep-discuss] Meep, MPB, Harminv on Cygwin
In my previous message I mentioned MPB, but this conclusion is valid for Meep as well. sorry about the confusion. ___ meep-discuss mailing list meep-discuss@ab-initio.mit.edu http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss
Re: [Meep-discuss] Meep, MPB, Harminv on Cygwin
Dear All I would like to mention that editing the .bash_profile file with Windows Notepad is not a good idea. The editing with Notepad introduces some unwanted symbols into the file. Thus, I am attaching the .bash_profile from my cygwin installation (thanks to Neal Pfeiffenberger for suggesting me to do so) to make building MPB and Meep on Cygwin simpler. best regards pavel # base-files version 4.0-6 # ~/.bash_profile: executed by bash(1) for login shells. # The latest version as installed by the Cygwin Setup program can # always be found at /etc/defaults/etc/skel/.bash_profile # Modifying /etc/skel/.bash_profile directly will prevent # setup from updating it. # The copy in your home directory (~/.bash_profile) is yours, please # feel free to customise it to create a shell # environment to your liking. If you feel a change # would be benifitial to all, please feel free to send # a patch to the cygwin mailing list. # User dependent .bash_profile file # source the users bashrc if it exists if [ -f ${HOME}/.bashrc ] ; then source ${HOME}/.bashrc fi # Set PATH so it includes user's private bin if it exists # if [ -d ${HOME}/bin ] ; then # PATH=${HOME}/bin:${PATH} # fi # Set MANPATH so it includes users' private man if it exists # if [ -d ${HOME}/man ]; then # MANPATH=${HOME}/man:${MANPATH} # fi # Set INFOPATH so it includes users' private info if it exists # if [ -d ${HOME}/info ]; then # INFOPATH=${HOME}/info:${INFOPATH} # fi 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 export LD_LIBRARY_PATH CC=gcc-3 export CC F77=g77 export F77 CXX=c++-3 export CXX___ meep-discuss mailing list meep-discuss@ab-initio.mit.edu http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss
Re: [Meep-discuss] Meep, MPB, Harminv on Cygwin
Recently, Wesley Wand has drawn my attention to issues with compiling MPB and Meep on cygwin of latest version. He noticed that the above recipe does not longer work. The latest Setup.exe version is 2.761 and the latest Cygwin version is 1.7.9-1. To make things simpler, you can install the following cygwin packages as shown below: Accessibility: Default Admin: Default Archive: Install hdf5: HDF5 Hierarchal Data Format /version 1.8.8-1/, libhfd5-devel: HDF5 Hierarchal Data Format (development) /version 1.8.8-1/, libhfd5_7: HDF5 Hierarchal Data Format (runtime) /version 1.8.8-1/ Audio: Default Base: Default Database: Default Devel: Install all Doc: Default Editors: Default Games: Default Gnome: Default Graphics: Default Interpreters: Install guile: the GNU extension language and Scheme interpreter -- executables /version 1.8.7-2/ KDE: Default Libs: Install all Mail: Default Math: Install: lapack: Comprehensive FORTRAN library for linear algebra operations /version 3.2.2-2/, liblapack-devel: Development libs for LAPACK /version 3.2.2-2/, liblapack0: Comprehensive FORTRAN library for linear algebra operations /version 3.2.2-2/ Net: Default Perl: Default Publishing: Default Python: Default Security: Default Shells: Default System: Default Text: Default Utils: Default Web: Default X11: Default I. If you want to compile Meep, MPB and Harminv. The actual Cygwin version includes GNU compiler versions 3.4.4 and 4.5.3. To compile MEEP, MPB and Harminv, we need to use the GCC version 3.4.4. Add the following lines at the end of you .bash_profile file to choose GCC version 3.4.4 and fortan compiler version 3.4.4. 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 export LD_LIBRARY_PATH CC=gcc-3 export CC F77=g77 export F77 CXX=c++-3 export CXX 1. Build and install FFTW 1.1 download http://www.fftw.org/fftw-2.1.5.tar.gz 1.2 gzip -d fftw-2.1.5.tar.gz 1.3 tar -xvf fftw-2.1.5.tar 1.4 cd fftw-2.1.5 1.5 ./configure --prefix=/usr/local 1.6 make 1.7 make install 2. libctl 2.1 Download it from http://ab-initio.mit.edu/libctl/libctl-3.1.tar.gz 2.2 gzip -d libctl-3.1.tar.gz 2.3 tar -xvf libctl-3.1.tar 2.4 cd libctl-3.1 2.5 ./configure --prefix=/usr/local 2.6 make 2.7 make install 3. MPB 3.1 download it from http://ab-initio.mit.edu/mpb/mpb-1.4.2.tar.gz 3.2 gzip -d mpb-1.4.2.tar.gz 3.3 tar -xvf mpb-1.4.2.tar 3.4 cd mpb-1.4.2 3.5 ./configure --prefix=/usr/local CPPFLAGS=-DH5_USE_16_API=1 3.6 make 3.7 make install 4. Harminv 4.1 download it from http://ab-initio.mit.edu/harminv/harminv-1.3.1.tar.gz 4.2 gzip -d harminv-1.3.1.tar.gz 4.3 tar -xvf harminv-1.3.1.tar 4.4 cd harminv-1.3.1 4.5 ./configure --prefix=/usr/local 4.6 make 4.7 make install Run following commands in the cygwin terminal ln -s /usr/lib/gcc/i686-pc-cygwin/3.4.4/libg2c.la /usr/lib/gcc/i686-pc-cygwin/libg2c.la ln -s /usr/lib/gcc/i686-pc-cygwin/3.4.4/libg2c.a /usr/lib/gcc/i686-pc-cygwin/libg2c.a 5. MEEP 5.1 download it from http://ab-initio.mit.edu/meep/meep-1.1.1.tar.gz 5.2 gzip -d meep-1.1.1.tar.gz 5.3 tar -xvf meep-1.1.1.tar 5.4 cd meep-1.1.1 5.5 ./configure --prefix=/usr/local F77=gfortran 5.6 make 5.7 make install 6. Build and install h5utils (optional, you need them if you want to convert .h5 files created with Meep and MPB) 6.1 Download http://ab-initio.mit.edu/h5utils/h5utils-1.12.1.tar.gz 6.2 gzip -d h5utils-1.12.1.tar.gz 6.3 tar -xvf h5utils-1.12.1.tar 6.4 cd h5utils-1.12.1 6.5 ./configure --prefix=/usr/local 6.6 make 6.7 make install II. If you want to install MPB only You can add the following lines at the end of your .bash_profile file to choose GCC version 4.5.3 and fortran compiler version 4.5.3. 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 export LD_LIBRARY_PATH CC=gcc-4 export CC F77=gfortran export F77 CXX=c++-4 export CXX Then build and install all packages as described above. P.S. Moreover, if you need MPB only, then you can add the following lines into 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 export LD_LIBRARY_PATH Configure Harminv as ./configure --prefix=/usr/local F77=gfortran Configure MPB as ./configure --prefix=/usr/local CPPFLAGS=-DH5_USE_16_API=1 F77=gfortran Best regards ___ meep-discuss mailing list meep-discuss@ab-initio.mit.edu http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss
Re: [Meep-discuss] Meep, MPB, Harminv on Cygwin
Dear meep users and developers, Thanks indeed to Pavel for taking the time to write down a complete procedure to install the MIT codes on cygwin! Great job! I just want to add a few comments to warn people about possible additional problems: I want to stress once more that everything should be compiled with compilers (gcc, g++, gfortran) from the same 32 bits GCC 4.x. For example, if you are using a 64 bits version of Vista or 7, you should pay attention to the fact that the 32 bits compilers and libraries should be before the 64 bits one in your PATH, when following Pavel's procedure (you can reverse the order afterward). Similarly, you should take care that you do not have other directories in your PATH before GCC that would provide other versions of some libraries (e.g. blas, atlas or lapack from a code such as matlab...) The worse case is if you have some of the libraries already compiled by g77! = recompile them with gfortran! In case of a problem during the configure step, remember to look inside the file config.log (not at the end because it finishes by recalling some of the values found but near the last line beginning by configure:). -- Sincerely yours, Michel DEVEL ___ meep-discuss mailing list meep-discuss@ab-initio.mit.edu http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss
[Meep-discuss] Meep, MPB, Harminv on Cygwin
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: