The below may be of help to some. Including those looking to get meep-mpi running as well as those simply looking for a sample .ctl file when their system is inaccessible (web locations embedded in below script).

#!/bin/bash

# \begin(README)

# ubuntumeepmpiquickstart version 0.1k (should be moved to a repository)

# (prior to that please ++0.1 the version number prior to saving any changes
#  and append your initial to the version number, then save&email it to me)

# This script attempts to help quickstart meep-mpi using the ubuntu environment
# and successfully opens a graphical simulation result on the below system.

# Would like to hear from someone who has a similar quickstart file for
# -CentOS.
# -a cluster of networked machines.

# Computer used:
# Acer Aspire E700 Intel Core 2 Q6600 Quad 64 Architecture 2.4GHz
# Desktop Computer (ASE700-EQ662A) PSU 300W Lite-On
# DDR2, PC2-5300 (333 MHz), 2048 MB memory
# ATI X1650SE 256MB video card and a 500GB HDD

# Thus downloaded:
# http://www.ubuntu.com/getubuntu/downloading?release=desktop-newest&mirror=http%3A%2F%2Fmirror.csclub.uwaterloo.ca%2Fubuntu-releases%2F&arch=amd64

# Burnt iso, default install to harddrive using boot from cd
# then went to System > Administration > Synaptic Package Manager
# added meep-mpi, meep-mpi-dev, libhdf5-mpich-dev, and h5utils
# then allowed automatic web updates to run

# After obtaining this file use Applications > Accessories > Terminal
# chmod +rx ubuntumeepmpiquickstart

# Run this file by typing
# ./ubuntumeepmpiquickstart

# If unattended use is desired comment out the user feedback e.g.
# read -n 1 yorn

# \end(README)

# N.B. Synaptic adds:
# gcc-4.2-base (version 4.2.4-5ubuntu1) will be installed
# h5utils (version 1.10-7ubuntu2) will be installed
# hdf5-tools (version 1.6.6-4ubuntu1) will be installed
# libblas3gf (version 1.2-2) will be installed
# libctl3 (version 3.0.3-1ubuntu1) will be installed
# libfftw3-3 (version 3.1.2-3.1ubuntu1) will be installed
# libgfortran2 (version 4.2.4-5ubuntu1) will be installed
# libgfortran3 (version 4.3.3-5ubuntu4) will be installed
# libharminv2 (version 1.3.1-1.1) will be installed
# libhdf4g (version 4.1r4-22) will be installed
# libhdf5-mpich-1.6.6-0 (version 1.6.6-4ubuntu1) will be installed
# libhdf5-mpich-dev (version 1.6.6-4ubuntu1) will be installed
# libjpeg62-dev (version 6b-14) will be installed
# liblapack3gf (version 3.1.1-6) will be installed
# libmatheval1 (version 1.1.7-1) will be installed
# libmeep-mpi-dev (version 0.20.3-1ubuntu1) will be installed
# libmeep-mpi2 (version 0.20.3-1ubuntu1) will be installed
# libmpich1.0-dev (version 1.2.7-9ubuntu1) will be installed
# libmpich1.0gf (version 1.2.7-9ubuntu1) will be installed
# meep-mpi (version 0.20.3-1ubuntu1) will be installed
# mpich-bin (version 1.2.7-9ubuntu1) will be installed
# zlib1g-dev (version 1:1.2.3.3.dfsg-12ubuntu2) will be installed

echo -n "1/5 Install Imagemagick? (y/n) "
yorn="y"
read -n 1 yorn
if [ $yorn == y ]; then
  sudo apt-get install imagemagick
fi

echo -n -e "\n2/5 Download tests? (y/n) "
yorn="y"
read -n 1 yorn
if [ $yorn == y ]; then
  echo -n -e "\n"
  cd /usr/share/meep-mpi
  sudo mkdir tests
  sudo chmod o+w tests
  sudo chmod g+w tests
  cd tests
  wget http://ab-initio.mit.edu/~meep/meep/tests/2D_convergence.cpp
  wget http://ab-initio.mit.edu/~meep/meep/tests/Makefile
  wget http://ab-initio.mit.edu/~meep/meep/tests/Makefile.am
  wget http://ab-initio.mit.edu/~meep/meep/tests/Makefile.in
  wget http://ab-initio.mit.edu/~meep/meep/tests/bench.cpp
  wget http://ab-initio.mit.edu/~meep/meep/tests/bragg_transmission.cpp
  wget http://ab-initio.mit.edu/~meep/meep/tests/convergence_cyl_waveguide.cpp
  wget http://ab-initio.mit.edu/~meep/meep/tests/cylindrical.cpp
  wget http://ab-initio.mit.edu/~meep/meep/tests/flux.cpp
  wget http://ab-initio.mit.edu/~meep/meep/tests/h5test.cpp
  wget http://ab-initio.mit.edu/~meep/meep/tests/harmonics.cpp
  wget http://ab-initio.mit.edu/~meep/meep/tests/integrate.cpp
  wget http://ab-initio.mit.edu/~meep/meep/tests/known_results.cpp
  wget http://ab-initio.mit.edu/~meep/meep/tests/one_dimensional.cpp
  wget http://ab-initio.mit.edu/~meep/meep/tests/physical.cpp
  wget http://ab-initio.mit.edu/~meep/meep/tests/pml.cpp
  wget http://ab-initio.mit.edu/~meep/meep/tests/symmetry.cpp
  wget http://ab-initio.mit.edu/~meep/meep/tests/three_d.cpp
  wget http://ab-initio.mit.edu/~meep/meep/tests/two_dimensional.cpp
  cd "$HOME"
fi

echo -n -e "\n3/5 Download examples? (y/n) "
yorn="y"
read -n 1 yorn
if [ $yorn == y ]; then
  echo -n -e "\n"
  cd /usr/share/meep-mpi
  cd ..
  sudo chmod go+w meep-mpi/
  cd meep-mpi
  sudo mkdir examples
  sudo chmod o+w examples
  sudo chmod g+w examples
  cd examples
  wget http://ab-initio.mit.edu/~meep/meep/examples/3rd-harm-1d.ctl
  wget http://ab-initio.mit.edu/~meep/meep/examples/Makefile.am
  wget http://ab-initio.mit.edu/~meep/meep/examples/bend-flux.ctl
  wget http://ab-initio.mit.edu/~meep/meep/examples/holey-wvg-bands.ctl
  wget http://ab-initio.mit.edu/~meep/meep/examples/holey-wvg-cavity.ctl
  wget http://ab-initio.mit.edu/~meep/meep/examples/material-dispersion.ctl
  wget http://ab-initio.mit.edu/~meep/meep/examples/pw-source.ctl
  wget http://ab-initio.mit.edu/~meep/meep/examples/ring-cyl.ctl
  wget http://ab-initio.mit.edu/~meep/meep/examples/ring.ctl
  cd "$HOME"
fi

echo -n -e "\n4/5 Run draft of attempt to run test bench.cpp? (y/n) "
yorn="y"
read -n 1 yorn
if [ $yorn == y ]; then
  echo -n -e "\n"
  if [ ! -e /usr/share/meep-mpi/tests/bench.dac ] ; then
    cd /usr/share/meep-mpi
    cd tests
    make bench.dac
    ./bench.dac
    cd "$HOME"
  fi
fi

echo -n -e "\n5/5 Run example ring.ctl? (y/n) "
yorn="y"
read -n 1 yorn
if [ $yorn == y ]; then
  echo -n -e "\n"
  if [ ! -e /usr/share/meep-mpi/ring-ez-0.118.gif ] ; then
    cd /usr/share/meep-mpi
    #mpirun -np 4 meep-mpi foo.ctl >& foo.out
    #meep-mpi examples/bend-flux.ctl >& examples/bend-flux.out
    meep-mpi fcen=0.118 df=0.01 examples/ring.ctl
h5topng -RZc /usr/share/h5utils/colormaps/dkbluered -C ring-eps-000000.00.h5 ring-ez-*.h5
    convert ring-ez-*.png ring-ez-0.118.gif
    cd "$HOME"
  fi
  firefox file:///usr/share/meep-mpi/ring-ez-0.118.gif
fi

exit


----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.



_______________________________________________
meep-discuss mailing list
[email protected]
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

Reply via email to