[cig-commits] commit: merge in doc changes

Mercurial hg at geodynamics.org
Thu Dec 29 13:27:23 PST 2011


changeset:   65:6e1914fc4d90
tag:         tip
parent:      64:1c8259246842
parent:      62:437133fc9231
user:        Sylvain Barbot <sbarbot at caltech.edu>
date:        Thu Dec 29 13:27:20 2011 -0800
files:       latex/documentation.pdf latex/documentation.tex
description:
merge in doc changes


diff -r 1c8259246842 -r 6e1914fc4d90 INSTALL
--- a/INSTALL	Thu Dec 29 13:07:00 2011 -0800
+++ b/INSTALL	Thu Dec 29 13:27:20 2011 -0800
@@ -1,29 +1,98 @@ Static linking
-Static linking
+Before building Relax, you must have
 
-Mac OS X
---------
+  GMT
+  Proj
+  Python 2.4 or greater
 
-From Fink, install gmt, fftw, proj, gfortran, and gcc4.6.  Configure
-with
+A fast fft library, such as FFTW or MKL, is also highly recommended.
+An implementation of the Cooley-Tukey FFT algorithm is included, but
+it will be significantly slower.
 
-  CC=/sw/bin/gcc-fsf-4.6 CPPFLAGS="-I/usr/include/netcdf-4" ./waf configure --proj-dir=/sw --gmt-dir=/sw --fftw-dir=/sw --use-fftw
+The first step in building Relax is to configure the build system.  Relax uses Waf
 
-Copy system directories to the current directory.
+  http://code.google.com/p/waf/
 
-  cp /sw/lib/gcc4.6/lib/libquadmath.a /sw/lib/gcc4.6/lib/libgfortran.a /sw/lib/gcc4.6/lib/libgomp.a /sw/lib/libgmt.a /sw/lib/libnetcdf.a /sw/lib/libproj.a /sw/lib/libfftw3f.a /sw/lib/libfftw3f_threads.a .
+for configuration and building.  To configure, run
 
-Compile
+  ./waf configure
+
+To get basic help and a list of configuration options, run
+
+  ./waf --help
+
+Once configuration works, build Relax with the command
 
   ./waf
 
-and then recompile the executable
+As one example, to compile the code on Mac OS X with the Intel fortran
+compiler, the MKL libraries, and the Fink-provided GMT and Proj
+libraries, we configured with the command
 
-  cd build
-  /sw/bin/gfortran relax.f90.1.o types.f90.1.o ctfft.f.1.o fourier.f90.1.o green.f90.1.o elastic3d.f90.1.o friction3d.f90.1.o viscoelastic3d.f90.1.o writevtk.c.1.o writegrd4.2.c.1.o proj.c.1.o export.f90.1.o getdata.f.1.o getopt_m.f90.1.o input.f90.1.o mkl_dfti.f90.1.o -o /Users/sbarbot/Documents/src/relax/relax -L.. -lgmt -lnetcdf -lproj -lfftw3f -lfftw3f_threads -lgomp -lquadmath -lgfortran -Wl,-search_paths_first -static-libgcc
+  ./waf configure --proj-dir=/sw --gmt-dir=/sw --mkl-libdir=/opt/intel/Compiler/11.1/084/Frameworks/mkl/lib/em64t/ --mkl-incdir=/opt/intel/Compiler/11.1/084/Frameworks/mkl/include --check-c-compiler=icc --check-fortran-compiler=ifort
 
-Then the output of "otool -L ../relax" will give
+As another example, to build Relax on Caltech's CITerra, we first built and
+install gmt and proj into /home/walter/src/relax/relax-bin.  We then
+configured Relax with the command
 
-../relax:
-        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.11)
+  CPPFLAGS="-I/usr/include/netcdf-4" LDFLAGS="-L/usr/lib64" ./waf configure  --proj-dir=/home/walter/src/relax/relax-bin --gmt-dir=/home/walter/src/relax/relax-bin/ --mkl-incdir=/opt/intel/composerxe-2011.1.107/mkl/include/ --mkl-libdir=/opt/intel/composerxe-2011.1.107/mkl/lib/intel64/ --check-c-compiler=icc --check-fortran-compiler=ifort
 
-which is a standard system library available on all Macs.
+Depending on how your libraries were built, you may have to set
+LD_LIBRARY_PATH (Linux) or DYLD_LIBRARY_PATH (Mac) so that Relax can
+find them.  For example, on Mac OS X using Fink, you may have to run the command
+
+  export DYLD_LIBRARY_PATH=/sw/lib:/sw/lib/netcdf-gfortran/lib
+
+-------
+Doxygen
+-------
+
+You can generate a doxygen interface with the commands
+
+  mkdir doc
+  doxygen ./doxygen
+
+
+---------------------
+Environment Variables
+---------------------
+
+The valid environment variables for Waf are slightly different from
+autoconf.  Specifically, they are
+
+CFLAGS
+
+    Selects compilation options for when the C compiler is used,
+    e.g. "-Wall".
+
+CXXFLAGS
+
+    Selects compilation options for when the C++ compiler is used,
+    e.g. "-Wall".
+
+CPPFLAGS
+
+    Selects C preprocessor options, e.g. "-DFOO=bar"
+
+LINKFLAGS
+
+    Extra linker options, e.g. "-L/usr/local -lsome-library"
+
+CC
+
+    The C compiler that will be used instead of the platform
+    default. Example CC=/usr/bin/gcc-2.95
+
+CXX
+
+    The C++ compiler that will be used instead of the platform
+    default. Example CXX=/usr/bin/g++-2.95
+
+FC
+
+    The fortran compiler that will be used instead of the platform
+    default. Example CXX=/usr/bin/gfortran
+
+PREFIX
+
+    The default installation prefix to be used, if no --prefix option
+    is given.
diff -r 1c8259246842 -r 6e1914fc4d90 INSTALL.STATIC
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/INSTALL.STATIC	Thu Dec 29 13:27:20 2011 -0800
@@ -0,0 +1,259 @@
+These instructions are only useful if you want to build binaries that
+will run on other people's machines.  If you are only running the
+Relax on your own machine, just read the regular instructions in
+INSTALL.
+
+Static linking
+--------------
+
+After the binaries are built, to actually make the code run on another
+machine, you need to copy
+
+  proj/proj_def.dat
+  gmt/pslib/PS_font_info.d
+  gmt/time/us.d
+  gmt/gmt.conf
+
+into the following structure
+
+  share/time/us.d
+  share/gmt.conf
+  share/pslib/PS_font_info.d
+  share/proj_def.dat
+
+Then before running set the environment variables
+
+  export PROJ_LIB=$PWD/share
+  export GMT_SHAREDIR=$PWD/share
+
+Also, on the Mac, you have to set DYLD_LIBRARY_PATH to point to a
+bundled version of libgcc_s.  There are scripts for this in
+setup_linux.sh, setup_mac.sh, and setup_win.bat.
+
+-------
+Windows
+-------
+
+Install cygwin and the packages gcc4, gcc4-fortran, libhdf5-devel, and
+libfftw3-devel.  libproj-devel is too old.
+
+Download and configure netcdf 4.1.3 with
+
+  ./configure --prefix=/home/walter/src/relax/relax-bin --enable-netcdf4 --disable-shared --disable-fortran --disable-dap
+
+Download and configure GMT 4.5.7 (do not use install-gmt.sh)
+
+  ./configure --prefix=/home/walter/src/relax/relax-bin --enable-netcdf=/home/walter/src/relax/relax-bin LIBS=-lnetcdf -lhdf5_hl -lhdf5 -lz --disable-xgrid --disable-shared --disable-ps
+
+Download and configure Proj 4.7.0
+
+  ./configure --prefix=/home/walter/src/relax/relax-bin --disable-shared
+
+Finally, configure relax
+
+  ./waf configure --use-fftw --gmt-dir=/home/walter/src/relax/relax-bin --proj-dir=/home/walter/src/relax/relax-bin/ --zero-flag=-finit-local-zero
+
+Build relax, cd into build/, and redo the link line
+
+  gcc -Wl,--enable-auto-import -Wl,--enable-auto-import relax.f90.1.o types.f90.1.o ctfft.f.1.o fourier.f90.1.o green.f90.1.o elastic3d.f90.1.o friction3d.f90.1.o viscoelastic3d.f90.1.o writevtk.c.1.o writegrd4.2.c.1.o proj.c.1.o export.f90.1.o getdata.f.1.o getopt_m.f90.1.o input.f90.1.o mkl_dfti.f90.1.o -o /home/walter/src/relax/relax/build/relax.exe -Wl,-rpath,/home/walter/src/relax/relax-bin/lib -Wl,-rpath,/home/walter/src/relax/relax-bin//lib -Wl,-rpath,None -Wl,-Bstatic -Wl,-Bdynamic -L/home/walter/src/relax/relax-bin/lib -L/home/walter/src/relax/relax-bin//lib -LNone -lgmt -lnetcdf -lproj -lfftw3f -lfftw3f_threads /usr/lib/libhdf5_hl.a /usr/lib/libhdf5.a /usr/lib/libz.a `gcc -print-file-name=libgfortran.a` `gcc -print-file-name=libgomp.a`
+
+Running ldd on the binary gives
+
+  $ ldd build/relax.exe 
+	ntdll.dll => /cygdrive/c/Windows/SysWOW64/ntdll.dll (0x77e80000)
+	kernel32.dll => /cygdrive/c/Windows/syswow64/kernel32.dll (0x76130000)
+	KERNELBASE.dll => /cygdrive/c/Windows/syswow64/KERNELBASE.dll (0x75970000)
+	cygwin1.dll => /usr/bin/cygwin1.dll (0x61000000)
+	ADVAPI32.DLL => /cygdrive/c/Windows/syswow64/ADVAPI32.DLL (0x76030000)
+	msvcrt.dll => /cygdrive/c/Windows/syswow64/msvcrt.dll (0x75e20000)
+	sechost.dll => /cygdrive/c/Windows/SysWOW64/sechost.dll (0x75860000)
+	RPCRT4.dll => /cygdrive/c/Windows/syswow64/RPCRT4.dll (0x755f0000)
+	SspiCli.dll => /cygdrive/c/Windows/syswow64/SspiCli.dll (0x75560000)
+	CRYPTBASE.dll => /cygdrive/c/Windows/syswow64/CRYPTBASE.dll (0x75550000)
+	cygfftw3f-3.dll => /usr/bin/cygfftw3f-3.dll (0x64140000)
+	cyggcc_s-1.dll => /usr/bin/cyggcc_s-1.dll (0x6bf40000)
+
+So you will have to include cygwin1.dll, cygfftw3f-3.dll, and
+cyggcc_s-1.dll with the binary.
+
+--------
+Mac OS X
+--------
+
+You will first need a fortran compiler.  Compile gcc 4.6.2 with
+
+  ../gcc-4.6.2/configure --prefix=/Users/walter/src/gcc-4.6.2-bin --enable-languages=c,c++,fortran
+
+Then build and install it.  Set the path to point to the new compiler
+
+  export PATH=/Users/walter/src/gcc-4.6.2-bin/bin:$PATH
+
+Configure HDF5 1.8.8 
+
+  ./configure --prefix=/Users/walter/src/relax/relax-bin --disable-shared --disable-parallel
+
+Configure NetCDF 4.1.3
+
+  ./configure --prefix=/Users/walter/src/relax/relax-bin --enable-netcdf4 --disable-shared CPPFLAGS="-I/Users/walter/src/relax/relax-bin/include" LDFLAGS="-L/Users/walter/src/relax/relax-bin/lib" --disable-fortran --disable-dap
+
+Get the GMT 4.5.7 tarball and configure it directly (do not use install-gmt.sh)
+
+  ./configure --prefix=/Users/walter/src/relax/relax-bin --enable-netcdf=/Users/walter/src/relax/relax-bin LDFLAGS="-L/Users/walter/src/relax/relax-bin/lib" CPPFLAGS="-I/Users/walter/src/relax/relax-bin/include" LIBS="-lnetcdf -lhdf5_hl -lhdf5 -lz" --disable-xgrid --disable-shared --disable-ps
+
+Configure Proj 4.7.0
+
+  ./configure --prefix=/Users/walter/src/relax/relax-bin --disable-shared
+
+Configure FFTW 3.3
+
+  ./configure --enable-threads --disable-openmp --enable-fortran --prefix=/Users/walter/src/relax/relax-bin --enable-single
+
+Finally, configure Relax
+
+  ./waf configure --use-fftw --gmt-dir=/Users/walter/src/relax/relax-bin/ --proj-dir=/Users/walter/src/relax/relax-bin/ --zero-flag="-finit-local-zero" --fftw-dir=/Users/walter/src/relax/relax-bin/
+
+This will fail to link.  cd into build/ and redo the final link with
+
+  gcc relax.f90.1.o types.f90.1.o ctfft.f.1.o fourier.f90.1.o green.f90.1.o elastic3d.f90.1.o friction3d.f90.1.o viscoelastic3d.f90.1.o writevtk.c.1.o writegrd4.2.c.1.o proj.c.1.o export.f90.1.o getdata.f.1.o getopt_m.f90.1.o input.f90.1.o mkl_dfti.f90.1.o -o /Users/walter/src/relax/relax/build/relax -Wl,-rpath,/Users/walter/src/relax/relax-bin//lib -Wl,-rpath,/Users/walter/src/relax/relax-bin//lib -Wl,-rpath,/Users/walter/src/relax/relax-bin//lib   -L/Users/walter/src/relax/relax-bin//lib -L/Users/walter/src/relax/relax-bin//lib -L/Users/walter/src/relax/relax-bin//lib -lgmt -lnetcdf -lproj -lfftw3f -lfftw3f_threads -lhdf5_hl -lhdf5 -lz `gcc -print-file-name=libgomp.a` `gcc -print-file-name=libquadmath.a` `gcc -print-file-name=libgfortran.a` -static-libgcc
+
+
+Running otool -L on it gives
+
+  $ otool -L relax
+  relax:
+        /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.3
+)                                                                               
+        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 
+125.2.11)
+
+which are both provided by the system.
+
+------------------
+Mac OS X with Fink
+------------------
+
+Install gmt, fftw, proj, gfortran, and gcc4.6.  Configure with
+
+  CC=/sw/bin/gcc-fsf-4.6 CPPFLAGS="-I/usr/include/netcdf-4" ./waf configure --proj-dir=/sw --gmt-dir=/sw --fftw-dir=/sw --use-fftw
+
+Copy system directories to the current directory.
+
+  cp /sw/lib/gcc4.6/lib/libquadmath.a /sw/lib/gcc4.6/lib/libgfortran.a /sw/lib/gcc4.6/lib/libgomp.a /sw/lib/libgmt.a /sw/lib/libnetcdf.a /sw/lib/libproj.a /sw/lib/libfftw3f.a /sw/lib/libfftw3f_threads.a .
+
+Compile
+
+  ./waf
+
+and then recompile the executable
+
+  cd build
+  /sw/bin/gfortran relax.f90.1.o types.f90.1.o ctfft.f.1.o fourier.f90.1.o green.f90.1.o elastic3d.f90.1.o friction3d.f90.1.o viscoelastic3d.f90.1.o writevtk.c.1.o writegrd4.2.c.1.o proj.c.1.o export.f90.1.o getdata.f.1.o getopt_m.f90.1.o input.f90.1.o mkl_dfti.f90.1.o -o /Users/sbarbot/Documents/src/relax/relax -L.. -lgmt -lnetcdf -lproj -lfftw3f -lfftw3f_threads -lgomp -lquadmath -lgfortran -Wl,-search_paths_first -static-libgcc
+
+Then the output of "otool -L ../relax" will give
+
+../relax:
+        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.11)
+
+which is a standard system library available on all Macs.
+
+-----
+Linux
+-----
+
+Install fftw using apt.  Set the path to use Pylith's compilers
+
+  export PATH=/home/buildbot/install/pylith_linux_x86_64_binbot/bin:$PATH
+
+for io.geodynamics.org or 
+
+  export PATH=/home/buildbot/install/pylith_linux_i686_binbot/bin:$PATH
+
+for nix.geodynamics.org.  You may have to change the permissions of
+the directories, since the binbot likes to make then non-readable to
+the world.
+
+Manually install hdf5 1.8.8 using the configure line
+
+  ./configure --prefix=/home/walter/src/relax/relax-bin --disable-shared --disable-parallel
+
+Then install netcdf 4.1.3 using the configure line
+
+  ./configure --prefix=/home/walter/src/relax/relax-bin --enable-netcdf4 --disable-shared CPPFLAGS="-I/home/walter/src/relax/relax-bin/include" LDFLAGS="-L/home/walter/src/relax/relax-bin/lib" --disable-fortran
+
+Install gmt 4.5.7 using the configure line (do not use install-gmt.sh)
+
+  ./configure --prefix=/home/walter/src/relax/relax-bin --enable-netcdf=/home/walter/src/relax/relax-bin LDFLAGS="-L/home/walter/src/relax/relax-bin/lib" CPPFLAGS="-I/home/walter/src/relax/relax-bin/include" LIBS="-lnetcdf -lhdf5_hl -lhdf5 -lz" --disable-xgrid --disable-shared --disable-ps
+
+Install Proj 4.7.0 with the configure line
+
+  ./configure --prefix=/home/walter/src/relax/relax-bin --disable-shared
+
+Finally, configure relax with the line
+
+  python2.5 waf configure --use-fftw --gmt-dir=/home/walter/src/relax/relax-bin/ --proj-dir=/home/walter/src/relax/relax-bin/ --zero-flag="-finit-local-zero"
+
+Build relax, cd into build/, and redo the link with a command like
+
+  gcc relax.f90.1.o types.f90.1.o ctfft.f.1.o fourier.f90.1.o green.f90.1.o elastic3d.f90.1.o friction3d.f90.1.o viscoelastic3d.f90.1.o writevtk.c.1.o writegrd4.2.c.1.o proj.c.1.o export.f90.1.o getdata.f.1.o getopt_m.f90.1.o input.f90.1.o mkl_dfti.f90.1.o -o /home/walter/src/relax/relax/build/relax -Wl,-rpath,/home/walter/src/relax/relax-bin//lib -Wl,-rpath,/home/walter/src/relax/relax-bin//lib -Wl,-rpath,None -Wl,-Bstatic -Wl,-Bdynamic -L/home/walter/src/relax/relax-bin//lib -L/home/walter/src/relax/relax-bin//lib -lgmt -lnetcdf -lhdf5_hl -lhdf5 -lproj /usr/lib/libfftw3f.a /usr/lib/libfftw3f_threads.a /usr/lib/libz.a `gcc -print-file-name=libgfortran.a` `gcc -print-file-name=libgomp.a` -lm -lpthread -lrt
+
+The changes to the default link line are
+  1) Change gfortran to gcc and add in
+   `gcc -print-file-name=libgfortran.a`
+   `gcc -print-file-name=libquadmath.a`
+  2) Add in hdf5 links.
+  3) Change fftw to static libs.
+  4) Remove -fopenmp and add in
+   `gcc -print-file-name=libgfortran.a`
+  5) add in -lm, -lpthread, and -lrt
+
+Running ldd on the binary gives
+
+  $ ldd relax
+	linux-vdso.so.1 =>  (0x00007fffcc3f6000)
+	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f9741499000)
+	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f974127d000)
+	librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f9741074000)
+	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f9740cf0000)
+	/lib64/ld-linux-x86-64.so.2 (0x00007f9741738000)
+
+which are all things provided by the system.
+
+--------------
+Linux Centos 5
+--------------
+
+Log in as buildbot and use the pylith compilers
+
+export CC=/home/buildbot/install/pylith_centos_x86_64_binbot/bin/gcc
+export CXX=/home/buildbot/install/pylith_centos_x86_64_binbot/bin/g++
+export F90=/home/buildbot/install/pylith_centos_x86_64_binbot/bin/gfortran
+export F77=/home/buildbot/install/pylith_centos_x86_64_binbot/bin/gfortran
+export FC=/home/buildbot/install/pylith_centos_x86_64_binbot/bin/gfortran
+
+Configure HDF5
+
+  ./configure --prefix=/home/buildbot/src/relax/relax-bin --disable-shared --disable-parallel
+
+Configure NetCDF 4.1.3
+
+  ./configure --prefix=/home/buildbot/src/relax/relax-bin --enable-netcdf4 --disable-shared CPPFLAGS="-I/home/buildbot/src/relax/relax-bin/include" LDFLAGS="-L/home/buildbot/src/relax/relax-bin/lib" --disable-fortran --disable-dap
+
+Get the GMT 4.5.7 tarball and configure it directly (do not use install-gmt.sh)
+
+  ./configure --prefix=/home/buildbot/src/relax/relax-bin --enable-netcdf=/home/buildbot/src/relax/relax-bin LDFLAGS="-L/home/buildbot/src/relax/relax-bin/lib" CPPFLAGS="-I/home/buildbot/src/relax/relax-bin/include" LIBS="-lnetcdf -lhdf5_hl -lhdf5 -lz" --disable-xgrid --disable-shared --disable-ps
+
+Configure Proj 4.7.0
+
+  ./configure --prefix=/home/buildbot/src/relax/relax-bin --disable-shared
+
+Configure FFTW 3.3
+
+  ./configure --enable-threads --disable-openmp --enable-fortran --prefix=/home/buildbot/src/relax/relax-bin --enable-single
+
+Finally, configure Relax
+
+  ./waf configure --use-fftw --gmt-dir=/home/buildbot/src/relax/relax-bin/ --proj-dir=/home/buildbot/src/relax/relax-bin/ --zero-flag="-finit-local-zero" --fftw-dir=/home/buildbot/src/relax/relax-bin/
+
+This will fail to link.  cd into build/ and redo the final link with
+
+  /home/buildbot/install/pylith_centos_x86_64_binbot/bin/gcc relax.f90.1.o types.f90.1.o ctfft.f.1.o fourier.f90.1.o green.f90.1.o elastic3d.f90.1.o friction3d.f90.1.o viscoelastic3d.f90.1.o writevtk.c.1.o writegrd4.2.c.1.o proj.c.1.o export.f90.1.o getdata.f.1.o getopt_m.f90.1.o input.f90.1.o mkl_dfti.f90.1.o -o /home/buildbot/src/relax/relax/build/relax -Wl,-rpath,/home/buildbot/src/relax/relax-bin//lib -Wl,-rpath,/home/buildbot/src/relax/relax-bin//lib -Wl,-rpath,/home/buildbot/src/relax/relax-bin//lib -Wl,-Bstatic -Wl,-Bdynamic -L/home/buildbot/src/relax/relax-bin//lib -L/home/buildbot/src/relax/relax-bin//lib -L/home/buildbot/src/relax/relax-bin//lib -lgmt -lnetcdf -lproj -lfftw3f -lfftw3f_threads -lhdf5_hl -lhdf5 -lz -lm `$CC -print-file-name=libgfortran.a` `$CC -print-file-name=libgomp.a` -lpthread -lrt
diff -r 1c8259246842 -r 6e1914fc4d90 examples/mogi.bat
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/examples/mogi.bat	Thu Dec 29 13:27:20 2011 -0800
@@ -0,0 +1,8 @@
+if not exist mogi mkdir mogi
+
+
+set OMP_NUM_THREADS=4
+
+set GMT_SHAREDIR=%CD%\..\share
+set PROJ_LIB=%CD%\..\share
+..\relax < mogi.input
diff -r 1c8259246842 -r 6e1914fc4d90 examples/mogi.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/examples/mogi.input	Thu Dec 29 13:27:20 2011 -0800
@@ -0,0 +1,48 @@
+# grid size (sx1,sx2,sx3)
+256 256 256
+# sampling size & smoothing (dx1,dx2,dx3,beta) & nyquist
+0.05 0.05 0.05 0.2 1
+# origin position and rotation
+0 0 0 
+# observation depth (displacement and stress)
+0 0.5
+# output directory
+mogi
+# elastic parameters (lambda,mu) and gravity effect
+1 1 0
+# integration time and time step
+10 0.257
+# number of observation planes
+0
+# number of observation points
+0
+# number of prestress interfaces
+0
+# number of linear viscous interfaces
+0
+# number of powerlaw viscous interfaces
+1
+# no depth gammadot0 power cohesion
+   1     2        20     3        0
+# number of power-law ductile zones
+0
+# number of friction faults
+0
+# number of interseismic loading stuff
+0
+0
+# number of coseismic events
+1
+# number of shear dislocations
+0
+# index slip   x1 x2 x3 length width strike dip rake
+#      1    0 -1.0  0  0      1   0.8      0  90    0
+# number of tensile cracks
+0
+# number of dilatation point sources
+1
+# no dilatation xs ys zs
+   1          1  0  0  1
+# number of surface loads
+0
+
diff -r 1c8259246842 -r 6e1914fc4d90 examples/mogi.sh
--- a/examples/mogi.sh	Thu Dec 29 13:07:00 2011 -0800
+++ b/examples/mogi.sh	Thu Dec 29 13:27:20 2011 -0800
@@ -20,52 +20,4 @@ if [ ! -e $WDIR ]; then
 	mkdir $WDIR
 fi
 
-time ../relax --no-stress-output --no-proj-output $* <<EOF
-# grid size (sx1,sx2,sx3)
-256 256 256
-# sampling size & smoothing (dx1,dx2,dx3,beta) & nyquist
-0.05 0.05 0.05 0.2 1
-# origin position and rotation
-0 0 0 
-# observation depth (displacement and stress)
-0 0.5
-# output directory
-$WDIR
-# elastic parameters (lambda,mu) and gravity effect
-1 1 0
-# integration time and time step
-10 0.257
-# number of observation planes
-0
-# number of observation points
-0
-# number of prestress interfaces
-0
-# number of linear viscous interfaces
-0
-# number of powerlaw viscous interfaces
-1
-# no depth gammadot0 power cohesion
-   1     2        20     3        0
-# number of power-law ductile zones
-0
-# number of friction faults
-0
-# number of interseismic loading stuff
-0
-0
-# number of coseismic events
-1
-# number of shear dislocations
-0
-# index slip   x1 x2 x3 length width strike dip rake
-#      1    0 -1.0  0  0      1   0.8      0  90    0
-# number of tensile cracks
-0
-# number of dilatation point sources
-1
-# no dilatation xs ys zs
-   1          1  0  0  1
-# number of surface loads
-0
-EOF
+time ../relax --no-stress-output --no-proj-output $* < mogi.input
diff -r 1c8259246842 -r 6e1914fc4d90 examples/run1.bat
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/examples/run1.bat	Thu Dec 29 13:27:20 2011 -0800
@@ -0,0 +1,8 @@
+if not exist output1 mkdir output1
+
+
+set OMP_NUM_THREADS=4
+
+set GMT_SHAREDIR=%CD%\..\share
+set PROJ_LIB=%CD%\..\share
+..\relax < run1.input
diff -r 1c8259246842 -r 6e1914fc4d90 examples/run1.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/examples/run1.input	Thu Dec 29 13:27:20 2011 -0800
@@ -0,0 +1,69 @@
+# use '#' character to include comments in your input file
+# grid size (sx1,sx2,sx3)
+256 256 256
+# sampling size (in unit of length), smoothing (0-0.5) & nyquist (dx1,dx2,dx3,beta,nq)
+0.05 0.05 0.05 0.2 2
+# origin position & rotation
+0 0 0
+# geographic origin (longitude and latitude), UTM zone and real length unit (usually m or km)
+# displacements and stress are converted to lon/lat geographic coordinates
+# unit corresponds to a scaling from dx1,dx2,dx3 to real unit
+# use unit = 1   if dimensions are described in units of m
+# use unit = 1e3 if dimensions are described in units of km
+120 22 51 1e3
+# observation depth for displacement and for stress (stress in only exported in GRD)
+0 0.5
+# output directory (all output written here)
+output1
+# elastic parameters and gamma = (1-nu) rho g / mu = 8.33e-7 /m = 8.33e-4 /km
+1 1 8.33e-4
+# integration time (in unit of time), step (negative for automatic) and scaling of computed value
+20 -1 1
+# number of observation planes
+1
+# no x1 x2 x3 length width strike dip
+   1  0 -3  0      6     6     90  90
+# number of observation points
+0
+# number of Coulomb patches
+0
+# number of prestress interfaces
+0
+# number of linear viscous interfaces (where viscosity changes)
+2
+# no depth gammadot0 cohesion (gammadot0 is shear modulus divided by viscosity)
+   1   3.0       1.0      0.0
+   2   9.0       1.0      0.0
+# number of linear ductile zones
+0
+# number of powerlaw viscous interfaces
+0
+# number of friction faults
+0
+# number of interseismic loading strike-slip and opening
+0
+0
+# number of coseismic events (when slip distribution is prescribed)
+2
+# number of shear dislocations (strike-slip and dip-slip faulting)
+1
+# no slip x1 x2 x3 length width strike dip rake
+   1    1 -1  0  0      1     1      0  90    0
+# number of tensile cracks
+0
+# number of dilatation sources
+0
+# number of surface traction
+0
+# time of second event
+1
+# number of shear dislocations
+1
+# no slip x1 x2 x3 length width strike dip rake
+   1    1  0  0  0      1     1      0  90    0
+# number of tensile cracks
+0
+# number of dilatation sources
+0
+# number of surface traction
+0
diff -r 1c8259246842 -r 6e1914fc4d90 examples/run1.sh
--- a/examples/run1.sh	Thu Dec 29 13:07:00 2011 -0800
+++ b/examples/run1.sh	Thu Dec 29 13:27:20 2011 -0800
@@ -66,74 +66,4 @@ if [ ! -e $WDIR ]; then
 	mkdir $WDIR
 fi
 
-OMP_NUM_THREADS=4 time ../relax $* <<EOF | tee $WDIR/in.param
-# use '#' character to include comments in your input file
-# grid size (sx1,sx2,sx3)
-256 256 256
-# sampling size (in unit of length), smoothing (0-0.5) & nyquist (dx1,dx2,dx3,beta,nq)
-0.05 0.05 0.05 0.2 2
-# origin position & rotation
-0 0 0
-# geographic origin (longitude and latitude), UTM zone and real length unit (usually m or km)
-# displacements and stress are converted to lon/lat geographic coordinates
-# unit corresponds to a scaling from dx1,dx2,dx3 to real unit
-# use unit = 1   if dimensions are described in units of m
-# use unit = 1e3 if dimensions are described in units of km
-120 22 51 1e3
-# observation depth for displacement and for stress (stress in only exported in GRD)
-0 0.5
-# output directory (all output written here)
-$WDIR
-# elastic parameters and gamma = (1-nu) rho g / mu = 8.33e-7 /m = 8.33e-4 /km
-1 1 8.33e-4
-# integration time (in unit of time), step (negative for automatic) and scaling of computed value
-20 -1 1
-# number of observation planes
-1
-# no x1 x2 x3 length width strike dip
-   1  0 -3  0      6     6     90  90
-# number of observation points
-0
-# number of Coulomb patches
-0
-# number of prestress interfaces
-0
-# number of linear viscous interfaces (where viscosity changes)
-2
-# no depth gammadot0 cohesion (gammadot0 is shear modulus divided by viscosity)
-   1   3.0       1.0      0.0
-   2   9.0       1.0      0.0
-# number of linear ductile zones
-0
-# number of powerlaw viscous interfaces
-0
-# number of friction faults
-0
-# number of interseismic loading strike-slip and opening
-0
-0
-# number of coseismic events (when slip distribution is prescribed)
-2
-# number of shear dislocations (strike-slip and dip-slip faulting)
-1
-# no slip x1 x2 x3 length width strike dip rake
-   1    1 -1  0  0      1     1      0  90    0
-# number of tensile cracks
-0
-# number of dilatation sources
-0
-# number of surface traction
-0
-# time of second event
-1
-# number of shear dislocations
-1
-# no slip x1 x2 x3 length width strike dip rake
-   1    1  0  0  0      1     1      0  90    0
-# number of tensile cracks
-0
-# number of dilatation sources
-0
-# number of surface traction
-0
-EOF
+OMP_NUM_THREADS=4 ../relax $* < run1.input | tee $WDIR/in.param
diff -r 1c8259246842 -r 6e1914fc4d90 examples/run2.bat
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/examples/run2.bat	Thu Dec 29 13:27:20 2011 -0800
@@ -0,0 +1,8 @@
+if not exist output2 mkdir output2
+
+
+set OMP_NUM_THREADS=4
+
+set GMT_SHAREDIR=%CD%\..\share
+set PROJ_LIB=%CD%\..\share
+..\relax < run2.input
diff -r 1c8259246842 -r 6e1914fc4d90 examples/run2.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/examples/run2.input	Thu Dec 29 13:27:20 2011 -0800
@@ -0,0 +1,69 @@
+# grid size (sx1,sx2,sx3)
+256 256 256
+# sampling size defines the grid spacing in units of distance
+# smoothing is a roll-off parameter 0 <= beta <= 0.5 that tapers 
+# the slip distribution on faults beta=0.2 and beta=0.3 are good values
+# nyquist is the minimum size of fault patches, relative to the sampling size
+# sampling size, smoothing & nyquist (dx1,dx2,dx3,beta,nq)
+0.05 0.05 0.05 0.2 2
+# origin position & rotation
+0 0 0
+# observation depth (displacements and stress) (stress is only exported in GRD)
+0 0.5
+# output directory (all output files are stored in the following directory)
+output2
+# the elastic parameters (Lambda and mu) are the Lame parameter and the shear modulus
+# gamma=(1-nu)*rho*g/mu is a wavelength relevant to buoyancy.
+# elastic parameters and gamma = (1-nu) rho g / mu = 8.33e-7 /m = 8.33e-4 /km
+1 1 8.33e-4
+# integration time refers to the length in units of time of the simulation.
+# integration time (t1)
+100 -1 1
+# observation planes are arbitrary planes where the inelastic strain rate
+# is sampled for output.
+# number of observation planes
+0
+# observation points are GPS points, for example, where time series of
+# displacement are output.
+# number of observation points
+0
+# stress observation segments are patches where Coulomb and other
+# stress components are evaluated.
+# number of stress observation segments
+0
+# prestress interfaces corresponds to depths where the prestress
+# tensor changes (default is no prestress).
+# number of prestress interfaces
+0
+# viscous interfaces are depths where the viscous properties change.
+# number of linear viscous interfaces
+0
+# number of powerlaw viscous interfaces
+2
+# no depth gammadot0 power cohesion
+   1   2.0       5e3   3.0      0.0
+   2   8.0       5e3   3.0      0.0
+# ductile zones corresponds to volumes where viscous properties change.
+# number of power-law ductile zones
+0
+# depths where friction properties change.
+# number of friction interfaces
+0
+# number of interseismic loading strike-slip and opening
+0
+0
+# number of coseismic events
+1
+# number of shear dislocations (strike-slip and dip-slip faults)
+1
+# index slip x1 x2 x3 length width strike dip rake
+      1    1 -1  0  0      2     1      0  90    0
+# number of tensile cracks
+0
+# volumetric deformation (Mogi source)
+# number of dilatation sources
+0
+# surface loads can be used to model loading of lakes or dams
+# number of surface loads
+0
+
diff -r 1c8259246842 -r 6e1914fc4d90 examples/run2.sh
--- a/examples/run2.sh	Thu Dec 29 13:07:00 2011 -0800
+++ b/examples/run2.sh	Thu Dec 29 13:27:20 2011 -0800
@@ -23,73 +23,4 @@ if [ ! -e $WDIR ]; then
 	mkdir $WDIR
 fi
 
-OMP_NUM_THREADS=2 time ../relax --no-proj-output $* <<EOF | tee $WDIR/in.param
-# grid size (sx1,sx2,sx3)
-256 256 256
-# sampling size defines the grid spacing in units of distance
-# smoothing is a roll-off parameter 0 <= beta <= 0.5 that tapers 
-# the slip distribution on faults beta=0.2 and beta=0.3 are good values
-# nyquist is the minimum size of fault patches, relative to the sampling size
-# sampling size, smoothing & nyquist (dx1,dx2,dx3,beta,nq)
-0.05 0.05 0.05 0.2 2
-# origin position & rotation
-0 0 0
-# observation depth (displacements and stress) (stress is only exported in GRD)
-0 0.5
-# output directory (all output files are stored in the following directory)
-$WDIR
-# the elastic parameters (Lambda and mu) are the Lame parameter and the shear modulus
-# gamma=(1-nu)*rho*g/mu is a wavelength relevant to buoyancy.
-# elastic parameters and gamma = (1-nu) rho g / mu = 8.33e-7 /m = 8.33e-4 /km
-1 1 8.33e-4
-# integration time refers to the length in units of time of the simulation.
-# integration time (t1)
-100 -1 1
-# observation planes are arbitrary planes where the inelastic strain rate
-# is sampled for output.
-# number of observation planes
-0
-# observation points are GPS points, for example, where time series of
-# displacement are output.
-# number of observation points
-0
-# stress observation segments are patches where Coulomb and other
-# stress components are evaluated.
-# number of stress observation segments
-0
-# prestress interfaces corresponds to depths where the prestress
-# tensor changes (default is no prestress).
-# number of prestress interfaces
-0
-# viscous interfaces are depths where the viscous properties change.
-# number of linear viscous interfaces
-0
-# number of powerlaw viscous interfaces
-2
-# no depth gammadot0 power cohesion
-   1   2.0       5e3   3.0      0.0
-   2   8.0       5e3   3.0      0.0
-# ductile zones corresponds to volumes where viscous properties change.
-# number of power-law ductile zones
-0
-# depths where friction properties change.
-# number of friction interfaces
-0
-# number of interseismic loading strike-slip and opening
-0
-0
-# number of coseismic events
-1
-# number of shear dislocations (strike-slip and dip-slip faults)
-1
-# index slip x1 x2 x3 length width strike dip rake
-      1    1 -1  0  0      2     1      0  90    0
-# number of tensile cracks
-0
-# volumetric deformation (Mogi source)
-# number of dilatation sources
-0
-# surface loads can be used to model loading of lakes or dams
-# number of surface loads
-0
-EOF
+OMP_NUM_THREADS=2 time ../relax --no-proj-output $* < run2.input | tee $WDIR/in.param
diff -r 1c8259246842 -r 6e1914fc4d90 examples/run3.bat
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/examples/run3.bat	Thu Dec 29 13:27:20 2011 -0800
@@ -0,0 +1,8 @@
+if not exist output3 mkdir output3
+
+
+set OMP_NUM_THREADS=4
+
+set GMT_SHAREDIR=%CD%\..\share
+set PROJ_LIB=%CD%\..\share
+..\relax < run3.input
diff -r 1c8259246842 -r 6e1914fc4d90 examples/run3.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/examples/run3.input	Thu Dec 29 13:27:20 2011 -0800
@@ -0,0 +1,64 @@
+# grid size (sx1,sx2,sx3)
+256 256 256 
+# sampling size, smoothing & nyquist (dx1,dx2,dx3,beta,nq)
+0.05 0.05 0.05 0.2 1
+# origin position & rotation
+0 0 0
+# geographic origin (longitude, latitude, UTM zone, unit)
+# displacements and stress are converted to lon/lat geographic coordinates
+# unit corresponds to a scaling from dx1,dx2,dx3 to real unit
+# use unit = 1   if dimensions are described in units of m
+# use unit = 1e3 if dimensions are described in units of km
+#-115 37.5 11 1e3
+# observation depth (displacement and stress) (stress in only exported in GRD)
+0 0
+# output directory
+output3
+# elastic parameters and gamma = (1-nu) rho g / mu = 8.33e-7 /m = 8.33e-4 /km
+1 1 8.33e-4
+# integration time (t1)
+0.5 -1 0.01
+# number of observation planes
+1
+# no  x1 x2  x3 length width strike dip
+   1  -3  0 0.5      6   2.5      0  90
+# number of observation points
+0
+# number of Coulomb patches
+0
+# number of prestress interfaces
+0
+# number of linear viscous interfaces
+0
+# number of powerlaw viscous interfaces
+0
+# number of friction interfaces
+1
+# no    depth   gamma0 (a-b)sig friction cohesion
+   1        1      1e3      1e3      0.0        0
+# number of creeping faults
+1
+# define the fault planes where afterslip occurs. it is possible to
+# constrain the rake slip to be within 180 degrees of given direction by
+# providing a rake between -180 and 180. for values outside this range,
+# the constraint of rake is not applied. this afterslip plane starts
+# immediately below the coseismic rupture.
+# no  x1 x2 x3 length width strike dip rake (slip rake is +-90 degrees from this value)
+   1  -2  0  1      4     2      0  90    0
+# number of interseismic loading strike-slip
+0
+# number of interseismic loading opening cracks
+0
+# number of coseismic events
+1
+# number of shear dislocations
+1
+# no slip    x1 x2 x3 length width strike dip rake
+   1   +1  -0.5  0  0      1     1      0  90    0
+# number of tensile cracks
+0
+# number of dilatation sources
+0
+# number of surface loads
+0
+
diff -r 1c8259246842 -r 6e1914fc4d90 examples/run3.sh
--- a/examples/run3.sh	Thu Dec 29 13:07:00 2011 -0800
+++ b/examples/run3.sh	Thu Dec 29 13:27:20 2011 -0800
@@ -86,68 +86,4 @@ if [ ! -e $WDIR ]; then
 	mkdir $WDIR
 fi
 
-time ../relax --no-proj-output --no-stress-output $* <<EOF | tee $WDIR/in.param
-# grid size (sx1,sx2,sx3)
-256 256 256 
-# sampling size, smoothing & nyquist (dx1,dx2,dx3,beta,nq)
-0.05 0.05 0.05 0.2 1
-# origin position & rotation
-0 0 0
-# geographic origin (longitude, latitude, UTM zone, unit)
-# displacements and stress are converted to lon/lat geographic coordinates
-# unit corresponds to a scaling from dx1,dx2,dx3 to real unit
-# use unit = 1   if dimensions are described in units of m
-# use unit = 1e3 if dimensions are described in units of km
-#-115 37.5 11 1e3
-# observation depth (displacement and stress) (stress in only exported in GRD)
-0 0
-# output directory
-$WDIR
-# elastic parameters and gamma = (1-nu) rho g / mu = 8.33e-7 /m = 8.33e-4 /km
-1 1 8.33e-4
-# integration time (t1)
-0.5 -1 0.01
-# number of observation planes
-1
-# no  x1 x2  x3 length width strike dip
-   1  -3  0 0.5      6   2.5      0  90
-# number of observation points
-0
-# number of Coulomb patches
-0
-# number of prestress interfaces
-0
-# number of linear viscous interfaces
-0
-# number of powerlaw viscous interfaces
-0
-# number of friction interfaces
-1
-# no    depth   gamma0 (a-b)sig friction cohesion
-   1        1      1e3      1e3      0.0        0
-# number of creeping faults
-1
-# define the fault planes where afterslip occurs. it is possible to
-# constrain the rake slip to be within 180 degrees of given direction by
-# providing a rake between -180 and 180. for values outside this range,
-# the constraint of rake is not applied. this afterslip plane starts
-# immediately below the coseismic rupture.
-# no  x1 x2 x3 length width strike dip rake (slip rake is +-90 degrees from this value)
-   1  -2  0  1      4     2      0  90    0
-# number of interseismic loading strike-slip
-0
-# number of interseismic loading opening cracks
-0
-# number of coseismic events
-1
-# number of shear dislocations
-1
-# no slip    x1 x2 x3 length width strike dip rake
-   1   +1  -0.5  0  0      1     1      0  90    0
-# number of tensile cracks
-0
-# number of dilatation sources
-0
-# number of surface loads
-0
-EOF
+time ../relax --no-proj-output --no-stress-output $* < run3.input | tee $WDIR/in.param
diff -r 1c8259246842 -r 6e1914fc4d90 examples/run4.bat
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/examples/run4.bat	Thu Dec 29 13:27:20 2011 -0800
@@ -0,0 +1,8 @@
+if not exist output4 mkdir output4
+
+
+set OMP_NUM_THREADS=4
+
+set GMT_SHAREDIR=%CD%\..\share
+set PROJ_LIB=%CD%\..\share
+..\relax < run4.input
diff -r 1c8259246842 -r 6e1914fc4d90 examples/run4.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/examples/run4.input	Thu Dec 29 13:27:20 2011 -0800
@@ -0,0 +1,62 @@
+# grid size (sx1,sx2,sx3)
+256 256 256 
+# sampling size, smoothing & nyquist (dx1,dx2,dx3,beta,nq)
+0.05 0.05 0.05 0.2 1
+# origin position & rotation
+0 0 0
+# observation depth (displacement and stress) (stress in only exported in GRD)
+0 0
+# output directory
+output4
+# elastic parameters and gamma = (1-nu) rho g / mu = 8.33e-7 /m = 8.33e-4 /km
+1 1 8.33e-4
+# integration time (t1), time step and scaling
+2 -1 1
+# number of observation planes
+0
+# number of observation points
+0
+# number of Coulomb patches
+5
+# no.   x1 x2  x3 length width strike dip friction
+    1 -1.0  1 0.5    0.1   0.1      0  90      0.6
+    2 -0.5  1 0.5    0.1   0.1     90  90      0.6
+    3  0.0  1 0.5    0.1   0.1      0  90      0.6
+    4 +0.5  1 0.5    0.1   0.1     45  90      0.6
+    5 +1.0  1 0.5    0.1   0.1      0  90      0.6
+# number of prestress interfaces
+0
+# number of linear viscous interfaces
+3
+# gammadot0 is assumed to be 0 between depths of 0 and 2.
+# the last value is extended down to infinity.
+# no depth gammadot0 cohesion
+   1     2         1        0
+   2     3         1        0
+   3     3         0        0
+# number of ductile zones (this defines volumes where viscosity changes)
+1
+# a confined area below the ruptured fault is allowed to flow viscously.
+# no gammadot0 x1 x2  x3 length width thickness strike dip
+   1         1 -1  0 1.1      2   0.9         1      0  90
+# number of powerlaw viscous interfaces
+0
+# number of friction faults
+0
+# number of interseismic loading strike-slip
+0
+# number of interseismic loading opening cracks
+0
+# number of coseismic events
+1
+# number of shear dislocations
+1
+# no slip  x1 x2 x3 length width strike dip rake
+   1   -1  -1  0  0      2     1      0  90    0
+# number of tensile cracks
+0
+# number of dilatation sources
+0
+# number of surface traction
+0
+
diff -r 1c8259246842 -r 6e1914fc4d90 examples/run4.sh
--- a/examples/run4.sh	Thu Dec 29 13:07:00 2011 -0800
+++ b/examples/run4.sh	Thu Dec 29 13:27:20 2011 -0800
@@ -43,66 +43,4 @@ if [ ! -e $WDIR ]; then
 	mkdir $WDIR
 fi
 
-time ../relax --no-stress-output --no-proj-output $* <<EOF
-# grid size (sx1,sx2,sx3)
-256 256 256 
-# sampling size, smoothing & nyquist (dx1,dx2,dx3,beta,nq)
-0.05 0.05 0.05 0.2 1
-# origin position & rotation
-0 0 0
-# observation depth (displacement and stress) (stress in only exported in GRD)
-0 0
-# output directory
-$WDIR
-# elastic parameters and gamma = (1-nu) rho g / mu = 8.33e-7 /m = 8.33e-4 /km
-1 1 8.33e-4
-# integration time (t1), time step and scaling
-2 -1 1
-# number of observation planes
-0
-# number of observation points
-0
-# number of Coulomb patches
-5
-# no.   x1 x2  x3 length width strike dip friction
-    1 -1.0  1 0.5    0.1   0.1      0  90      0.6
-    2 -0.5  1 0.5    0.1   0.1     90  90      0.6
-    3  0.0  1 0.5    0.1   0.1      0  90      0.6
-    4 +0.5  1 0.5    0.1   0.1     45  90      0.6
-    5 +1.0  1 0.5    0.1   0.1      0  90      0.6
-# number of prestress interfaces
-0
-# number of linear viscous interfaces
-3
-# gammadot0 is assumed to be 0 between depths of 0 and 2.
-# the last value is extended down to infinity.
-# no depth gammadot0 cohesion
-   1     2         1        0
-   2     3         1        0
-   3     3         0        0
-# number of ductile zones (this defines volumes where viscosity changes)
-1
-# a confined area below the ruptured fault is allowed to flow viscously.
-# no gammadot0 x1 x2  x3 length width thickness strike dip
-   1         1 -1  0 1.1      2   0.9         1      0  90
-# number of powerlaw viscous interfaces
-0
-# number of friction faults
-0
-# number of interseismic loading strike-slip
-0
-# number of interseismic loading opening cracks
-0
-# number of coseismic events
-1
-# number of shear dislocations
-1
-# no slip  x1 x2 x3 length width strike dip rake
-   1   -1  -1  0  0      2     1      0  90    0
-# number of tensile cracks
-0
-# number of dilatation sources
-0
-# number of surface traction
-0
-EOF
+time ../relax --no-stress-output --no-proj-output $* < run4.input
diff -r 1c8259246842 -r 6e1914fc4d90 latex/documentation.pdf
Binary file latex/documentation.pdf has changed
diff -r 1c8259246842 -r 6e1914fc4d90 latex/documentation.tex
--- a/latex/documentation.tex	Thu Dec 29 13:07:00 2011 -0800
+++ b/latex/documentation.tex	Thu Dec 29 13:27:20 2011 -0800
@@ -203,146 +203,43 @@ Both the post-processing and the storage
 
 The output of the simulation can be projected on the fly to geographic coordinates, which is convenient to communicate results to others in a global coordinate system. In RELAX, this is performed with the proj4 library. It is recommended to install these libraries on your system.
 
-\subsection{Installation from the source files}
+\subsection{Running}
 
-The compilation procedure, written by Walter Landry, uses Waf, a Python-based framework for configuring, compiling and installing applications. To obtain more information about this installation script, type
+
+The binary packages provided on the CIG website contain everything
+needed to run simulations.  After unpacking the packages, open a
+terminal (or, in Windows, a Command Prompt) and run the setup script
+
 \begin{alltt}
-{\color{orange}> ./waf --help}
-\end{alltt}
-in a terminal from the source directory. To compile a binary file form the source code, the general procedure is to configure the project first, then compile. For example, to use the FFTW Fourier transform library, use
-\begin{alltt}
-{\color{orange}> ./waf configure --use-fftw
-> ./waf}
-\end{alltt}
-On Pangu, the supercomputer of Caltech's GPS Division, you have to configure \verb'waf' to use the intel compilers and specify the location of the MKL, the GMT, and the PROJ libraries:
-\begin{alltt}
-{\color{orange}> CPPFLAGS="-I/usr/include/netcdf-4" LDFLAGS="-L/usr/lib64" ./waf configure 
---proj-dir=/home/walter/src/relax/relax-bin 
---gmt-dir=/home/walter/src/relax/relax-bin/ 
---mkl-incdir=/opt/intel/composerxe-2011.1.107/mkl/include/ 
---mkl-libdir=/opt/intel/composerxe-2011.1.107/mkl/lib/intel64/ 
---check-c-compiler=icc --check-fortran-compiler=ifort
-> ./waf}
-\end{alltt}
-To compile the code on a Mac OS X platform with the intel Fortran compiler, the MKL Fourier transform library, and the GMT and PROJ libraries installed with Fink, use
-\begin{alltt}
-{\color{orange}> ./waf configure --proj-dir=/sw --gmt-dir=/sw 
---mkl-libdir=/opt/intel/Compiler/11.1/084/Frameworks/mkl/lib/em64t/ 
---mkl-incdir=/opt/intel/Compiler/11.1/084/Frameworks/mkl/include 
---check-c-compiler=icc --check-fortran-compiler=ifort
-> ./waf}
+{\color{orange} source setup.sh # Linux and Mac}
+{\color{orange} setup.bat       # Windows}
 \end{alltt}
 
-To have a closer look at the code, one can generate an \verb'html'-based interface that can be browsed with the \verb'doxygen' program (\verb'http://www.stack.nl/~dimitri/doxygen/index.html') with the command
+You should get the response
+
 \begin{alltt}
-{\color{orange}
-> mkdir doc
-> doxygen ./doxygen}
-\end{alltt}
-in the code source directory.
-
-
-
-\subsection{Running your compiled program}
-
-When using external libraries, it is required to add to the environment variables \verb'LD_LIBRARY_PATH' the location of the dynamic libraries. For example, on a Mac OS X platform, with libraries installed by Fink, the \verb'LD_LIBRARY_PATH' variable should contain
-\begin{alltt}
-{\color{NavyBlue}:/sw/lib:/sw/lib/netcdf-gfortran/lib}
+{\color{orange}Ready to run Relax.}
 \end{alltt}
 
-On shared memory machines, such as most modern laptops, it is possible to run the code in parallel using \verb'openmp'. The number of CPU used is the maximum number of threads allowed by the machine, or the number found in the environment variable \verb'OMP_NUM_THREADS'. To change the value, type
+On shared memory machines, such as most modern laptops and desktops, it is possible to run the code in parallel using \verb'openmp'. The number of CPU's used is the maximum number of threads allowed by the machine, or the number found in the environment variable \verb'OMP_NUM_THREADS'. To change the value, type
 \begin{alltt}
-{\color{orange}> export OMP_NUM_THREADS=4}
+{\color{orange} export OMP_NUM_THREADS=4 # Linux and Mac}
+{\color{orange} set OMP_NUM_THREADS=4    # Windows}
 \end{alltt}
-on the command line. This command affects all other programs running in this session. To set the number for a specific run, prepend the variable definition to your command
+on the command line. This command affects all other programs running
+in this session. On Linux or Mac machines, to set the number for a
+specific run, prepend the variable definition to your command
 \begin{alltt}
-{\color{orange}> OMP_NUM_THREADS=4 relax --option}
+{\color{orange} OMP_NUM_THREADS=4 relax --option # Linux and Mac}
 \end{alltt}
 
-Some examples of simple calculations are provided in the \verb'examples' directory. For instance, to run the first example, just type
+Some examples of simple calculations are provided in the \verb'examples' directory. For instance, to run the first example, change into the \verb'examples' directory and run
 \begin{alltt}
-{\color{orange}> cd examples
-> ./run1.sh}
+{\color{orange} ./run1.sh  # Linux and Mac }
+{\color{orange} ./run1.bat # Windows }
 \end{alltt}
 
-\subsection{Installation from the binary files}
-
-The binary files can be downloaded from the web at \textit{www.geodynamics.org/cig/software/relax}. On a Mac platform, open the \verb`.dmg` bundle (for example, \verb`Relax-Mac-1_0_0.dmg`) and copy the files to a local directory of your choice (\verb`dir`). Then, open a terminal or \verb`X11` window and type the following
-\begin{alltt}
-{\color{orange}> cd dir
-> source setup.sh}
-\end{alltt}
-The Relax software is ready to be used. For example, in the same terminal window, type
-\begin{alltt}
-{\color{orange}> cd examples
-> ./run2.sh}
-\end{alltt}
-
-On Windows Vista and Windows 7, uncompress the .zip file to a local directory of your choice. Then, execute the setup file (\verb`setup.bat`). To run an example, go to the \verb'examples' directory and execute the \verb`run1.bat` script.
-
-On a linux platform, download the compressed tar package to the directory of your choice (dir), then Open a terminal or X11 window and type the following for sh and ksh shells:
-\begin{alltt}
-{\color{orange}> cd dir
-> tar -xzvf package.tgz
-> source setup.sh}
-\end{alltt}
-If you are running the \verb`csh` shell, precede the above lines by a call to 
-\begin{alltt}
-{\color{orange}> bash}
-\end{alltt}
-The Relax software is ready to be used. For example, in the same terminal window, type
-\begin{alltt}
-{\color{orange}> cd examples
-> ./run2.sh}
-\end{alltt}
-If no output messages appear for a long time, you may want to remove the redirection to \verb`in.param` by changing the following line
-\begin{alltt}
-{\color{orange}> OMP_NUM_THREADS=2 time ../relax --no-proj-output \$* <<EOF | 
-    tee \$WDIR/in.param}
-\end{alltt}
-to
-\begin{alltt}
-{\color{orange}> OMP_NUM_THREADS=2 time ../relax --no-proj-output \$* <<EOF }
-\end{alltt}
-The \verb`tee` program may wait until a complete stop of the program before printing on the standard output, preventing you from seeing the results in real time.
-
-\section{Creating stand-alone executable files}
-
-\subsection{Mac OS X}
-From Fink, install gmt, fftw, proj, gfortran, and gcc4.6. Then, copy the static libraries from the system directories to the current location:
-\begin{alltt}
-{\color{orange}> cp /sw/lib/gcc4.6/lib/libquadmath.a /sw/lib/gcc4.6/lib/libgfortran.a 
-/sw/lib/gcc4.6/lib/libgomp.a /sw/lib/libgmt.a /sw/lib/libnetcdf.a 
-/sw/lib/libproj.a /sw/lib/libfftw3f.a /sw/lib/libfftw3f_threads.a .}
-\end{alltt}
-Configure and compile the static code with
-\begin{alltt}
-{\color{orange}> CC=/sw/bin/gcc-fsf-4.6 CPPFLAGS="-I/usr/include/netcdf-4" ./waf configure 
---proj-dir=/sw --gmt-dir=/sw --fftw-dir=/sw --use-fftw
-> ./waf}
-\end{alltt}
-and then recompile the executable
-\begin{alltt}
-{\color{orange}> cd build
-> /sw/bin/gfortran relax.f90.1.o types.f90.1.o ctfft.f.1.o fourier.f90.1.o 
-green.f90.1.o elastic3d.f90.1.o friction3d.f90.1.o viscoelastic3d.f90.1.o 
-writevtk.c.1.o writegrd4.2.c.1.o proj.c.1.o export.f90.1.o getdata.f.1.o 
-getopt_m.f90.1.o input.f90.1.o mkl_dfti.f90.1.o -o ../relax -L.. -lgmt 
--lnetcdf -lproj -lfftw3f -lfftw3f_threads -lgomp -lquadmath -lgfortran 
--Wl,-search_paths_first -static-libgcc}
-\end{alltt}
-To verify that everything goes well, check the output with the command 
-\begin{alltt}
-{\color{orange}> otool -L ../relax}
-\end{alltt}
-which should print
-\begin{alltt}
-{\color{NavyBlue}../relax:
-        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current ver
-sion 125.2.11)}
-\end{alltt}
-The code should depend only on this external standard system library, which is available on all Macs.
-
+Alternately, on Windows, you can double-click on \verb'run1.bat' from the file browser.
 
 \section{Modeling a deformation scenario}
 
diff -r 1c8259246842 -r 6e1914fc4d90 setup.bat
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/setup.bat	Thu Dec 29 13:27:20 2011 -0800
@@ -0,0 +1,33 @@
+if not exist relax.exe (goto :error)
+
+SET GMT_SHAREDIR=%CD%\share
+
+SET PROJ_LIB=%CD%\share
+
+PATH=%CD%;%PATH%
+
+echo "Ready to run Relax"
+
+
+
+goto :theend
+
+:error
+echo
+
+echo *** Error! ***
+
+echo
+
+echo Run this script from the top-level Relax directory:
+
+echo
+
+echo     cd [directory containing 'setup_win.bat']
+
+echo     setup_win.bat
+
+echo
+
+
+:theend
diff -r 1c8259246842 -r 6e1914fc4d90 setup.sh
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/setup.sh	Thu Dec 29 13:27:20 2011 -0800
@@ -0,0 +1,17 @@
+relax=`pwd`
+
+if test ! -f relax; then
+    echo
+    echo "*** Error! ***"
+    echo
+    echo "Source this script from the top-level Relax directory:"
+    echo
+    echo "    cd [directory containing 'setup.sh']"
+    echo "    source setup.sh"
+    echo 
+else
+    export PATH="$relax:$relax/util:$PATH"
+    export GMT_SHAREDIR="$relax/share"
+    export PROJ_LIB="$relax/share"
+    echo "Ready to run Relax."
+fi



More information about the CIG-COMMITS mailing list