The increasing complexity of in silico experiments as they have become feasible over the past few years prompted for the development of a framework that simplifies the definition and execution of such experiments which become quickly intractable otherwise even for expert users. The major design goals were
carputils
is a Python package containing a lot of CARPentry-related
functionality and a framework for running CARPentry simulations and testing their
outputs en masse. Provided functionality includes:
The CARP examples framework encompasses a number of repositories, the purpose of which can be initially confusing. This section aims to explain the structure.
A typical installation might look like:
software
├── carputils
├── carp-examples
│ ├── benchmarks
│ └── devtests
├── carp-meshes
└── carp-reference
├── benchmarks
└── devtests
carputils
bin
subdirectory should be
added to your PATH
environment variable, and the top level directory
should be added to your PYTHONPATH
. On first run of an experiment, or
when using the automatic clone script, the settings.yaml
file will be
generated, which must be tailored to your setup.carp-examples
run.py
script in these packages runs
an experiment. In fact, as long as carputils
is set up correctly, you
can move these run scripts anywhere on your system (along with any input
files they depend on) and they will work, but in order to run regression
tests they must be inside these packages and carp-examples
must be
added to the PYTHONPATH
.carp-meshes
--get-mesh
flag with run scripts to get
only their needed meshes. Note that most run scripts generate meshes
programmatically, in which case this is not needed. The location of this
repository is set in carputils/settings.yaml
with MESH_DIR
.carp-reference
carp-reference
must have the same name as those
under carp-examples
. These repositories are only needed for running
regression tests. The location of carp-reference
is set by the
REGRESSION_REF
settings in carputils/settings.yaml
Note
The actual structure above need not be conformed to. It only matters that
carputils
and carp-examples
are in the PYTHONPATH
,
carputils/bin
is in the PATH
, and carp-meshes
and
carp-reference
are at the locations specified in settings.yaml
.
Other than that you can put them where you want.
The following concepts are used in the carputils
framework:
This documentation is based on Sphinx and can be generated using the Makefile in the carputils/doc folder.
cd carputils/doc
make clean
make html
The html webpages are found then in the folder carputils/doc/build/html. To view, point your favorite browser to
firefox ${CARPUTILS_DIR}/doc/build/html/index.html