Re: [Meep-discuss] Meep, MPB, Harminv on Cygwin

2013-12-30 Thread Pavel Ivanov
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

2012-01-18 Thread Pavel Ivanov

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

2011-12-19 Thread Pavel Ivanov
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

2010-06-07 Thread DEVEL Michel
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