A supercomputing framework for solving PDEs by hybrid parallelism.
Project description
SOLVCON: a multi-physics, supercomputing software framework for high-fidelity solutions of partial differential equations (PDEs) by hybrid parallelism.
SOLVCON facilitates rapid devlopment of PDE solvers for massively parallel computing. C or CUDA is used for fast number-crunching. SOLVCON is designed for extension to various physical processes. Numerical algorithms and physical models are pluggable. Sub-package solvcon.kerpak contains default implementations. The default numerical algorithm in SOLVCON is the space-time Conservation Element and Solution Element (CESE) method, which was originally developed by Sin-Chung Chang at NASA Glenn Research Center. The CESE method solves generic, first-order, hyperbolic PDEs.
SOLVCON is released under GNU GPLv2, and developed by Yung-Yu Chen and Sheng-Tao John Yu.
Key Features
Multi-physics: Pluggable physical models by the built-in CESE solvers
Complex geometry: 2/3D unstructured mesh consisting of mixed shapes
Massively parallel: Automatic domain decomposition with MPI or socket
GPGPU computing: Hybrid parallelism with CUDA
Large data set: In situ visualization by VTK and parallel I/O
I/O formats: VTK, GAMBIT Neutral, CUBIT Genesis/ExodosII, etc.
Productive work flow: Integration to batch systems, e.g., Torque
Install
The C code in SOLVCON are intentionally made to be standard shared libraries rather than Python extension modules. SOLVCON uses ctypes to load and call these binary codes. In this way, the binary codes can be flexibly built and optimized for performance. Hence, installing SOLVCON requires building these libraries. SOLVCON uses SCons as the binary builder.
For SOLVCON to be built and run, it requires the following packages: (i) Python 2.6 or 2.7, (ii) SCons, (iii) a C compiler, gcc or icc is OK, (iv) Numpy, (v) LAPACK, (vi) NetCDF higher than version 4, and (vii) METIS version 4.0.3 for graph partitioning (SOLVCON will download it for you on building). Optional dependencies include: (i) SCOTCH (version 5.1 or higher) as an alternative of METIS, (ii) Nose for running unit tests, (iii) Epydoc for generating API documentation, and (iv) VTK for in situ visualization. 64-bits Linux is recommended. For Debian or Ubuntu users, they can use the following command to install the dependencies:
$ sudo apt-get install scons build-essential gcc liblapack-pic libnetcdf-dev libnetcdf6 netcdf-bin python2.6 python2.6-dev python-profiler python-numpy libscotch-5.1 python-nose python-epydoc python-vtk
CUDA needs to be separately installed and configured. For using meshes with more then 35 million cells, SCOTCH-5.1 is recommended. METIS-4 has issues on memory allocation for large graphs.
The end of this section describes how to manually compile these dependencies with helper scripts shipped with SOLVCON.
The three steps to install:
Obtain the latest release from https://bitbucket.org/yungyuc/solvcon/downloads . Unpack the source tarball.
Get into the source tree and run SCons to build the binary codes:
$ cd $SCSRC $ scons --download --extract
$SCSRC indicates the root directory of unpacked source tree.
Install everything:
$ python setup.py install
Optionally, you can install SOLVCON to your home directory. It is useful when you don’t have the root permission on the system. To do this, add the --user when invoking the setup.py script:
$ python setup.py install --user
The option --download used above asks the building script to download necessary external source packages, e.g., METIS, from Internet. Option --extract extracts the downloaded packages.
Build and Install Dependencies (Optional)
If one wants to build the dependencies from ground up, he/she should take a look of directory $SCSRC/ground. The directory contains scripts to compile most of the depended packages. The Makefile in the directory has three default targets: binary, python, and vtk. An additional target all will run all of them in order. The Makefile automatically installs built files, and takes environment variable $SCPREFIX as installation target path. If not specified, by default it is set to $HOME/opt/scruntime. A script $SCROOT/bin/scvars.sh will be created to export necessary environment variables for the installed dependencies. Variable $SCROOT points to the installation target path; it is the runtime version of variable $SCPREFIX used in building phase. $SCROOT will be set by scvars.sh script too.
For those who like to get their hands dirty, the following packages still need to be installed as prerequisite:
$ sudo apt-get install build-essential gcc cmake libcurl4-gnutls-dev libhdf5-serial-dev
Sometimes it is inevitable to compile these dependencies from source. For example, to deploy SOLVCON on a supercomputer/cluster which runs stable but out-dated OSes. The ground/ directory is meant to ease the tedious task.
Install from Repository
To use the latest source from the code repository, you need to use Mercurial to clone the repository to your local disk:
$ sudo apt-get install mercurial $ hg clone https://bitbucket.org/yungyuc/solvcon
and then follow steps 2 and 3.
Rebuild/Reinstall
If you want to rebuild and reinstall, you can run:
$ cd $SCSRC $ scons $ python setup.py install
without using the options --download and --extract. If you want a clean rebuild, run scons -c before scons.
Unit Test
If you have Nose installed, you can run:
$ nosetests
inside the source tree for unit tests. To test installed version, use the following command instead:
$ python -c 'import solvcon; solvcon.test()'
When testing installed version, make sure your current directory does not have a sub-directory named as solvcon.
Because SOLVCON uses ssh as its default approach for remote procedure call (RPC), you need to set up the public key authentication for ssh, or some of the unit tests for RPC could fail. Some tests using optional libraries could be skipped (indicated by S), if you do not have the libraries installed. Everything else should pass.
Resources
Portal (with API document): http://solvcon.net/
Mailing list: http://groups.google.com/group/solvcon