echoi / snac_bmi

SNAC (StGermaiN Analysis of Continua) is an updated Lagrangian explicit finite difference code for modeling a finitely deforming elasto-visco-plastic solid in 3D.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

1. Build SNAC with Pyre on a recent Linux system

1.1 Building Pyre and Exchanger

1.1.0 libxml2 and MPICH
These two libraries are assumed to be available already.
Note that OpenMPI is currently NOT supported.

1.1.1 merlin-1.8
- Download .egg file from https://pypi.python.org/pypi/merlin
- sudo easy_install merlin-1.8.egg

1.1.2 pythia-0.8
- https://geodynamics.org/cig/software/pythia/
- snac_bmi now includes verstion 0.8 with the following changes:
  - Fix Makefile.am
    ACLOCAL_AMFLAGS = -I ./m4 ==> ACLOCAL_AMFLAGS = -I m4
  - Reconfigure
    autoreconf -i .
  - pympi.h added to packages/mpi/mpimodule
  
- Set up environment variables
export CXX=g++-mp-4.8
export CC=gcc-mp-4.8
export MPI_DIR=/Users/eunseo/opt/openmpi-1.8
export MPI_BINDIR=${MPI_DIR}/bin
export MPI_LIBDIR=${MPI_DIR}/lib
export MPI_INCDIR=${MPI_DIR}/include
export MPI_RUN=${MPI_BINDIR}/mpirun
export PATH=${MPI_BINDIR}:${PATH}
export LD_LIBRARY_PATH=${MPI_LIBDIR}:${LD_LIBRARY_PATH}
- Run ./configure
MPIINCLUDES=-I${MPI_INCDIR} ./configure --prefix=/Users/eunseo/projects/snac_bmi/pythia
- In case OpenMPI is used, check if libmpi_cxx is going to be linked:
./packages/mpi/Makefile:_mpimodule_la_LDFLAGS = -module $(MPI_LIBS)
- Make sure that the local sysconfig.pyc doesn't interefere the intallation step
make; make install

1.1.3 Exchanger-1.0.1
- https://geodynamics.org/cig/software/exchanger/
- Contains classes to be inherited by StGermain and Snac's Exchanger module.
- It tries to install pythia-0.8.
/anaconda/bin/python setup.py install_deps -f /Users/eunseo/projects/Coupling_SNAC_CHILD/snac_bmi/Exchanger-1.0.1/deps -zmxd /Users/eunseo/projects/Coupling_SNAC_CHILD/snac_bmi/Exchanger-1.0.1/deps; 
/anaconda/bin/python setup.py develop -H None -f /Users/eunseo/projects/Coupling_SNAC_CHILD/snac_bmi/Exchanger-1.0.1/deps -x -d /Users/eunseo/projects/Coupling_SNAC_CHILD/snac_bmi/Exchanger-1.0.1/python; 
/anaconda/bin/python setup.py egg_flags (<-- Not working!!)
- configure
CC=/Users/eunseo/opt/openmpi-1.6.1/bin/mpicc CXX=/Users/eunseo/opt/openmpi-1.6.1/bin/mpicxx PYTHON=/anaconda/bin/python CXXFLAGS="-fPIC -I${PYTHIA_INCDIR} -I${MPI_INCDIR}" LDFLAGS="-L${MPI_LIBDIR}" ./configure --prefix=/Users/eunseo/projects/Coupling_SNAC_CHILD/snac_bmi/Exchanger
- make; make install (Note: the local sysconfig.pyc can confuse the install process).

1.2 SNAC

- For installation, see the user manual or INSTALL for quick start.
Basically, './configure; make'.

- Some customization of environment variables might be required 
prior to configuring and building SNAC with Pyre support.
The recommended set of environment variables is given below.
Note that some values need to be changed according to a user's setting.

In bash:
======================================================
export MPI_DIR=/opt/local
export MPI_BINDIR=${MPI_DIR}/bin
export MPI_INCDIR=${MPI_DIR}/include/mpich2
export MPI_LIBDIR=${MPI_DIR}/lib
export MPI_RUN=${MPI_BINDIR}/mpirun
export PATH=${MPI_BINDIR}:{$PATH}
export LD_LIBRARY_PATH=${MPI_LIBDIR}:{LD_LIBRARY_PATH}
export CC=mpicc
export CXX=mpicxx

export PYTHON_DIR=/anaconda
export PYTHON_VERSION=2.7
export PYTHIA_DIR=${HOME}/projects/Coupling_SNAC_CHILD/snac_bmi/pythia
export PYTHIA_INCDIR=${PYTHIA_DIR}/include/pythia-0.8
export PYTHIA_LIBDIR=${PYTHIA_DIR}/lib
export PYTHIA_BINDIR=${PYTHIA_DIR}/bin
export PATH=${PYTHIA_BINDIR}:${PATH}
export PYTHONPATH=${PYTHIA_LIBDIR}/python2.7/site-packages:${PYTHONPATH}

export EXCHANGER_DIR=${HOME}/projects/Coupling_SNAC_CHILD/snac_bmi/Exchanger
export EXCHANGER_INCDIR=${EXCHANGER_DIR}/include
export EXCHANGER_LIBDIR=${EXCHANGER_DIR}/lib
export EXCHANGER_BINDIR=${EXCHANGER_DIR}/bin
export PATH=${PYTHIA_BINDIR}:${PATH}
export LD_LIBRARY_PATH=${PYTHIA_LIBDIR}:${LD_LIBRARY_PATH}
export PYTHONPATH=${PYTHIA_LIBDIR}/python2.7/site-packages:${PYTHONPATH}

export SNAC_DIR=${HOME}/Src/SNAC
export SNAC_BLDDIR=${SNAC_DIR}/build
export SNAC_BINDIR=${SNAC_BLDDIR}/bin
export SNAC_INCDIR=${SNAC_BLDDIR}/include
export SNAC_LIBDIR=${SNAC_BLDDIR}/lib
export PATH=${SNAC_BINDIR}:{$PATH}
export LD_LIBRARY_PATH=${SNAC_LIBDIR}:{LD_LIBRARY_PATH}
======================================================

2. Build SNAC with Pyre on OS X

Building SNAC with Pyre support on OS X is still experimental but 
in principle, the steps described above can be followed.

About

SNAC (StGermaiN Analysis of Continua) is an updated Lagrangian explicit finite difference code for modeling a finitely deforming elasto-visco-plastic solid in 3D.

License:GNU General Public License v2.0


Languages

Language:C 71.9%Language:Shell 9.2%Language:Python 7.9%Language:C++ 5.1%Language:Makefile 3.2%Language:Objective-C++ 1.2%Language:Perl 0.7%Language:CSS 0.3%Language:Objective-C 0.2%Language:HTML 0.1%Language:TeX 0.1%Language:Fortran 0.0%