SOLVCON is a collection of Python-based conservation-law solvers that use the space-time Conservation Element and Solution Element (CESE) method. SOLVCON targets at solving problems that can be formulated as a system of first-order, linear or non-linear partial differential equations (PDEs) [Lax73]:
where is the unknown vector, , , and the Jacobian matrices, and the source term.
Please use the development version in the Mercurial repository:
hg clone https://bitbucket.org/solvcon/solvcon
Released source tarballs can be downloaded from https://bitbucket.org/solvcon/solvcon/downloads, but the development version is recommended.
SOLVCON itself depends on the following packages:
Building document of SOLVCON requires the following packages:
You will also need Mercurial (hg) to clone the development codebase.
The following command will install the dependencies on Debian jessie:
sudo apt-get install build-essential gcc gfortran scons \
liblapack-pic liblapack-dev libnetcdf-dev libnetcdfc7 netcdf-bin \
libscotch-dev libscotchmetis-dev libscotch-5.1 \
python2.7 python2.7-dev cython python-numpy python-nose gmsh python-vtk \
python-pygraphviz python-sphinx python-sphinxcontrib.issuetracker \
mercurial
On Ubuntu 12.04LTS please use:
sudo apt-get install build-essential gcc gfortran scons \
liblapack-pic liblapack-dev libnetcdf-dev libnetcdf6 netcdf-bin \
libscotch-dev libscotchmetis-dev libscotch-5.1 \
python2.7 python2.7-dev cython python-numpy python-nose gmsh python-vtk \
python-pygraphviz python-sphinx python-sphinxcontrib.issuetracker \
mercurial
Note: For Debian 6.x (squeeze), you need also apt-get install python-profiler for the Python built-in profiler.
The binary part of SOLVCON should be built with SCons:
cd $SCSRC
scons
where $SCSRC indicates the root directory of unpacked source tree.
The source tarball supports distutils and can built alternatively:
python setup.py build_ext --inplace
SOLVCON is designed to work without explicit installation. You can simply set the environment variable $PYTHONPATH to point to the source code, i.e., $SCSRC. Note that the binary code is needed to be compiled.
Note
The Python runtime will search the paths in the environment variable $PYTHONPATH for Python modules. See http://docs.python.org/tutorial/modules.html#the-module-search-path for detail.
Tests should be run with Nose:
nosetests
in the project root directory $SCSRC. Another set of tests are collected in $SCSRC/ftests/ directory, and can be run with:
nosetests ftests/*
Some tests in $SCSRC/ftests/ involve remote procedure call (RPC) that uses ssh, so you need to set up the public key authentication of ssh.
On a cluster or a supercomputer, it is impossible for a user to use package managers (e.g., apt or yum) to install the prerequisites. It is also time-consuming to ask support people to install those packages. Building the required software manually is the most feasible approach to get the prerequisites. SOLVCON provides a suite of scripts and makefiles to facilitate the tedious process.
The $SCSRC/ground directory contains scripts to build most of the software that SOLVCON depends on. The $SCSRC/ground/get script downloads the source packages to be built. By default, the $SCSRC/ground/Makefile file does not make large packages related to visualization, e.g., VTK. Visualization packages must be manually built by specifying the target vislib. The built files will be automatically installed into the path specified by the $SCROOT environment variable, which is set to $HOME/opt/scruntime by default. The $SCROOT/bin/scvars.sh script will be created to export necessary environment variables for the installed software, and the $SCROOT environment variable itself.
The $SCSRC/soil directory contains scripts to build gcc. The $SCROOT/bin/scgccvars.sh script will be created to export necessary environment variables for the self-compiled gcc. The enabled languages include only C, C++, and Fortran. The default value of $SCROOT remains to be $HOME/opt/scruntime, while the software will be installed into $SCROOT/soil. Note: (i) Do not use different $SCROOT when building $SCSRC/soil and $SCSRC/ground. (ii) On hyper-threading CPUs the NP environment variable should be set to the actual number of cores, or compilation of gcc could exhaust system memory.
$SCROOT/bin/scvars.sh and $SCROOT/bin/scgccvars.sh can be separately sourced. The two sets of packages reside in different directories and do not mix with each other nor system software. Users can disable these environments by not sourcing the two scripts.
Some packages have not been incorporated into the dependency building system described above. Debian or Ubuntu users should install the additional dependencies by using:
sudo apt-get install build-essential gcc gfortran gcc-multilib m4
libreadline6 libreadline6-dev libncursesw5 libncurses5-dev libbz2-1.0
libbz2-dev libdb4.8 libdb-dev libgdbm3 libgdbm-dev libsqlite3-0
libsqlite3-dev libcurl4-gnutls-dev libhdf5-serial-dev libgl1-mesa-dev
libxt-dev
These building scripts have only been tested with 64-bit Linux.
[Lax73] | Peter D. Lax, Hyperbolic Systems of Conservation Laws and the Mathematical Theory of Shock Waves, Society for Industrial Mathematics, 1973. ISBN 0898711770. |
Copyright (c) 2008, Yung-Yu Chen <yyc@solvcon.net>
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.