Thanks, Arthur.

I finally managed to get this working yesterday. I couldn't find a prebuilt
binary for our installation that contained H5 support, so I had to build
Meep from the source.

Tracking down all of the nested library requirements - - meep needs h5utils
which needs hdf5 which needs blah blah blah - was a bit of a chore as there
doesn't seem to be a comprehensive list anywhere. Fortunately, the INSTALL
and README files with each library were helpful in iteratively building a
list.

My (Hopefully) Comprehensive Meep Install Process:
-----------------------------------
#1. Required libraries:

jpeg-8b (libjpg)
libpng-1.4.4
gmp-5.0.1
guile-1.8.7
h5utils-1.12.1
hdf5-1.8.5-patch1
libctl-3.1
libmatheval-1.1.7
libtool-2.4

mvapich2-1.4.1.
meep-1.1.1

# The configure/make/install order was, I think:

libtool
libjpg
libpng
gmp
libmatheval
libctl
guile
hdf5
h5utils

and, finally, Meep.

# I created a ~/install/meep_requirements folder, into which I downloaded
each required tar file:

cd ~/install/meep_requirements
wget http://<web and folder path>/tar.gz

# I may have the order slightly off, but the ./configure script in each
install will generate warnings when a library cannot be found, in which case
that dependency (obviously) must be built first.

# Also, as Arthur said, it's important to set the environment flags (Linux
syntax):

#1. As Arthur said, set the required environment variables for compilation
and linking. These are used by gcc, mpicc and make:

export CPPFLAGS="-I/usr/include -I~/include" #separate multiple folders with
spaces and prefix each with -I (capital i)
export LD_FLAGS="-L/usr/lib -L~/lib" # separate multiple folders with spaces
and prefix each with -L
export LD_LIBRARY="/usr/lib:~/lib" # separate multiple entries with a colon,
just as when setting the PATH environment variable.

#2 build each library in turn

cd ~/install/meep_requirements/jpeg-8b
./configure --prefix=/home/myUserName

# When compiling each library in turn, if you are not installing into the
default /usr/* folders, be sure to add the option "--prefix=<someFolder>"
when running each ./configure script.

./configure --prefix=/home/myUserName
make
make install

# The configure script will prefix each reference to lib or include with
give entry. It's not necessary to pass "--prefix" to "make," "make check" or
"make install".

# If you're using Meep in parallel, when building hdf5, be sure to use mpicc
from your MPI library installation. Before building hdf5, set the
environment variable:

export CC="/usr/mpi/gcc/mvapich2-1.4.1/bin/mpicc"
./configure --with-parallel
make
make install

# Be sure to clear this setting after building hdf5.

export CC=

# Call meep. I created an ~/mpi folder containing configuration data common
to all MPI processes (for mvapich2 - this may vary for different MPI
libaries):

cat ~/mpi/machines
inode1
inode2
inode3
inode4
inode5
inode6
inode7
inode8
inode9
inode10
inode11
inode12
inode13
inode14
inode15
inode16

# I created a shell script called "go" to run simulations with all required
parameters

cat ~/meep/go

time /usr/mpi/gcc/mvapich2-1.4.1/bin/mpirun_rsh -ssh -np 128 -hostfile
/users/myUserName/mpi/machines /path/to/meep-mpi/binary  $1 | tee $1.out

# This is called via:
~/meep/go myFile.ctl

#Bada-bing, bada-boom, the sim should be running.

#We had some issues getting Infiniband running (required by mvapich). Our
administrator took care of those issues so I'm not sure exactly what was
involved. We also had to generate RSA keys for each user for each node in
the cluster so that MPI could ssh into each node when starting processes and
not be prompted for a password.

#Also, for MPD (MPI daemon, which must be running on all nodes), you may
require "secret word" file in the user's home directory. Filename and
contents depend on the MPI library used. For mvapich, I created:

cat ~/.mpd.conf
MPD_SECRETWORD=PutAnythingHere

# If your home directory is shared amongst nodes, as it should be for all of
this to work, that file only needs to be created once.

I realize this is a very verbose post, and the list may not be the
appropriate place to post this, but it contains much information which, as
far as I can tell, is not available in the wiki. Hopefully it will help
someone else in the future.

Cheers,

David

























On Wed, Nov 24, 2010 at 7:47 AM, Arthur Thijssen
<thijssen.art...@gmail.com>wrote:

> Hi David,
>
> During configure you will get a warning stating that the required libraries
> were not detected at the given location and MEEP will compile without hdf5
> support. You need to check the configure output carefully.
>
> I always set the LDFLAGS and CPPFLAGS, for me this would be:
>
> export LDFLAGS="-L/usr/local/gnu_builds/blas -L/usr/local/gnu_builds/lapack
> -L/usr/local/gnu_builds/hdf5/mpi/lib -L/usr/local/gnu_builds/harminv/lib
> -L/usr/local/gnu_builds/libctl/lib"
> export CPPFLAGS="-I/usr/local/gnu_builds/gsl/include
> -I/usr/local/gnu_builds/gsl-1.13/include
> -I/usr/local/gnu_builds/hdf5/mpi/include
> -I/usr/local/gnu_builds/libctl/include
> -I/usr/local/gnu_builds/harminv/include"
>
> note that blas, lapack, harminv and libctl are not required but can be
> useful. From what I can see in the commands you posted, you are not
> configuring with libctl, although it's not required, it means you can't run
> MEEP with the Scheme interface.
>
> then I run configure:
> ./configure --prefix=$HOME/source/meep-1.1.1/src --with-mpi
> --with-libctl=/usr/local/gnu_builds/libctl/share/libctl/
>
> Hope it helps,
>
> Arthur
> On 23 November 2010 17:07, David Lively <davidliv...@gmail.com> wrote:
>
>> We compiled/installed Meep with:
>>
>> ./configure --prefix=/grid/software/meep-1.1.1
>> MPICXX=/usr/mpi/gcc/mvapich2-1.4.1/bin/mpicxx
>> MPILIBS=/usr/mpi/gcc/mvapich2-1.4.1/lib --with-mpi
>> --with-hdf5=/grid/software/hdf5-1.8.3
>>
>> And everything appears to work correctly, until it gets to the part where
>> it needs to save an H5 file. Then, I get the wonderful error:
>>
>> creating output file "./smu-eps-000000.00.h5"...
>> meep: meep: not compiled with HDF5, required for HDF5 outputmeep: meep:
>> meep: meep: meep: not compiled with HDF5, required for HDF5 outputnot
>> compiled with HDF5, required for HDF5 outputmeep: not compiled with HDF5,
>> required for HDF5 output
>>
>> I'm perplexed as the -with-hdf5 flag was included when we compiled.
>> Suggestions? I'm having to go back and forth with our administrator with
>> this so it's difficult to perform any real diagnostics.
>>
>> D
>>
>>
>>
>> _______________________________________________
>> meep-discuss mailing list
>> meep-discuss@ab-initio.mit.edu
>> http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss
>>
>
>
_______________________________________________
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

Reply via email to