Kaskade 7 relies on several third party libraries for grid management, direct and iterative solvers, and parallel linear algebra. Installing these dependencies is no fun. We therefore provide container-based development environments with everything pre-installed. These should cover most development scenarios. If they don’t fit, you can of course install the required libraries directly, see below.
If you have access to the ZIB GitLab server, check out a working copy:
git clone git@git.zib.de:numerical-mathematics/computational-anatomy-and-physiology/kaskade7.git
Without GitLab access, download the current source snapshot:
kaskade7-src.tar.gz. It contains the tracked
Kaskade 7 sources at the current release state, without git history or build
artifacts. Alternatively, extract the source code from the kaskade7-complete
image or obtain it from the public repository.
Unpack the snapshot and change into the resulting directory:
tar -xzf kaskade7-src.tar.gz
cd kaskade7
The following sections assume that you are in this directory.
The container images are built from the scripts in InstallDependencies/ in the
Kaskade 7 repository. They require podman. From the repository root, run
InstallDependencies/build.sh
This builds the following images:
.am files. This image is
deprecated; Amira support will be dropped in Kaskade 7.9. It is only built
if the libamiramesh.tar.gz archive is present.The images are intended to be used in rootless mode with podman, such that any
non-root developer on a multi-user Linux system can use them. All images serve the
Doxygen documentation at http://localhost:8080/ (set DOCS_PORT to use a
different port).
Start the complete container with your project directory mounted at /workspace:
InstallDependencies/startComplete.sh your-project-directory
Kaskade 7 is installed under /kaskade7 and ready to be used. The dependency
installation paths are listed in /kaskade7/Makefile.Local (in the image,
/Makefile.Local is the third-party configuration). The container runs a small web
server handing out the Doxygen documentation for Kaskade 7. Point your browser to
http://localhost:8080 to access it.
The library and the documentation are prebuilt, but tutorial examples and tests are
not. If you want to run them, go to /kaskade7 and execute:
make test
make run-tutorial
A list of supported make targets is produced by make help.
Smaller projects that mainly rely on Kaskade 7 can benefit from using the Kaskade 7
make structure directly. Here is a short template for a project Makefile:
# Include the Kaskade 7 path and library setup
include /kaskade7/Makefile.Local
# Include the make rules for building object and dependency files
include $(KASKADE7)/Makefile.Rules
# Start with a debug build. Append to FLAGS instead of replacing it, because
# Makefile.Local already contains the required language and platform flags.
FLAGS += -g -Wall
default: main
# Some object files, purely as an arbitrary example
OBJ = main.o module.o
# Include the dependency files for the objects. This triggers the building of
# dependency files, and their presence ensures that the implicit compilation
# rule for creating objects (defined in Makefile.Rules) is found by make.
include $(patsubst %.o, %.d, $(OBJ))
# Build the target executable.
main: $(OBJ) $(KASKADE7)/libs/libkaskade.a
$(CXX) $(OBJ) $(KASKADE7)/libs/*.o $(KASKADELIB) $(DUNELIB) $(UGLIB) \
$(BOOSTLIB) $(DIRECTSOLVERLIB) $(BLASLIB) $(FTNLIB) $(NUMALIB) \
$(LINKFLAGS) $(FLAGS) -o $@
clean:
rm -f gccerr.txt main $(OBJ)
Create a suitable Makefile.Local file in your Kaskade 7 working directory. The
Makefile.Local-container template provided with Kaskade 7 should work out of the
box in the container:
cp Makefile.Local-container Makefile.Local
Then start the development container. The Kaskade 7 working copy is mounted at
/kaskade7, your project directory at /workspace:
InstallDependencies/startBuildEnvironment.sh your-project-directory
This opens an interactive shell in the /kaskade7 working directory. You may
directly type
make all
to build the library and the Doxygen documentation and to run the test suite.
make tutorial builds the tutorial examples and make run-tutorial runs them.
Dependency and object files end up in your host working directory, and the container
remains disposable (--rm is passed by the start script).
Of course, you can use the build environment image as well for separate projects
outside of the Kaskade 7 source tree; mount your project directory at /workspace
and use the Kaskade 7 make structure shown above.
If the container development environments do not fit your needs, you can install the required dependencies on your own. It’s no fun, but also no magic.
dune-common, dune-geometry, dune-localfunctions, dune-istl, dune-grid,
and dune-uggrid (for grid data structures, some linear algebra, and infrastructure).am files. This is
deprecated and will be removed in Kaskade 7.9.The exact compiler and library versions matter. In particular, Kaskade 7.8 is
tested with Dune 2.11 and GCC 16. Older Dune versions are not supported by the
current master branch.