Installation and Build

New documentation under development. Please refer to the CMakeList.txt files in the top-level directories of the SMR Packages.

Introduction and Prerequisites

The following assumptions are made throughout this chapter:

  • All shell commands are bash shell commands.

  • All SMR packages are built with the cmake build system.

A number of system packages are required to build B2000++. Depending on the Linux distribution the package names vary. cmake will report any missing packages.

SMR Packages

All SMR packages are available through your administrator. The following SMR packages are required for building B2000++:

B2000++ Packages

CMakeModules

cmake files required by most packages for building with`` cmake``.

memcom

The B2000++ data manager.

pymemcom

The Python module memcom for accessing the database with Python.

mcbrowser

The MemCom dataset browser. Installs the mcbrowser application.

b2000pp

The B2000++ libraries and solvers. Installs the libb2000++ library, the B2000++ header files, and the b2ip++, b2000++, b2mass, and b2add_6dof applications.

b2000pp_data

Installs all B20000++ examples and test cases. Test cases are installed in <prefix>/shared/b2000pp_data.

b2test

Installs the b2testrunner application.

b2toools

Installs the B2000++ tools applications.

b2browser

Installs the b2browser* model browser prototype (GTK based).

b2converters

Installs the BDF and other file converter applications.

simples

Installs the Simples Python modules and applications.

Please install all packages under one source directory. In what follows, all packages are accessed under the directory $SMR_SRC

Although not strictly necessary, it is advised to define the following environment variables:

  • SMR_SRC: Path to the directory containing all packages. Example (bash shell):

    export SMR_SRC=$HOME/src/git
    
  • SMR_PREFIX: Path to the installation directory. Example (bash shell):

    export SMR_PREFIX=$HOME/smr/versionxxx
    
  • SMR_CMAKEMODULES: Path to the CMakeModules directory. Example (bash shell):

    export SMR_CMAKEMODULES=$SMR_SRC/CMakeModules
    

The cmake scripts will recognize SMR_PREFIX and SMR_CMODULES.

Build and Install

All packages must be build in a dedicated build directory hereunder referred to as _build.

To configure a package and compile and install it:

  1. Create a build directory and go to that build directory. Example: Compile MemCom (package memcom):

    mkdir -p $HOME/_build/memcom
    cd $HOME/_build/memcom
    
  2. Configure with evironment variables SMR_SRC, SMR_PREFIX, and SMR_CMAKEMODULES defined (see above):

     cmake $SMR_SRC/memcom
    make -j NJOBS install
    

First Steps after the Installation

Add the $SMR_PREFIX path to your $PATH (depends on shell).

Define the PYTHONPATH variable (required in this version due to a bug). It points to $SMR_PREFIX/lib/pythonX.Y/site-packages.

To check if B2000++ is installed properly the following command can be entered in the shell:

b2000++ -version

If the installation has been successful the following message will appear:

B2000++ version x.y
...

If the B2000++ command does not work then most probably the PATH environment variable is not set properly.

Run one or all of the test cases of b2000pp_data/examples and b2000pp_data/verification. You can run the scordelis-lo-roof example.:

cd $SMR_SRC/b2000pp_data/examples/static/scordelis_lo_roof
b2000++ scordelis_lo_roof.mdl
python3 print_vmises.py

If the python command does not work then most probably the PYTHONPATH environment variable is not set properly.

Testing

Run the b2testrunner in b2000pp_data/examples and b2000pp_data/verification:

b2testrunner -j n .

where n is the number of threads to be launched.