Compiling
Compiling your own version of OpenSees.
Compiling OpenSees requires the following software to be installed on your local machine:
Software | Hugo | Remarks |
---|---|---|
Git | recommended | Recommended for version control |
C/C++ Compilers | Embedded as npm binary | |
Node.js | The installation package includes npm |
The primary system dependencies required for compiling are LAPACK/BLAS and Tcl. Packages providing these libraries are listed below for various package management ecosystems.
Note
When building in an Anaconda environment, you should install all dependencies with
conda
ormamba
, and preferably from theconda-forge
channel. Expand the notes on Anaconda below.
When using conda, you need to ensure that CMake only finds compilers that are compatible with the libraries in the environment. System compilers (like those installed by the operating system’s package manager) often cannot be used and can lead to segfaults. The following command should install everything you need:
conda install -c conda-forge fortran-compiler cxx-compiler c-compiler openblas openmpi
Dependency | Package |
---|---|
LAPACK | liblapack-dev |
BLAS | libblas-dev |
Tcl* | tcl-dev |
Dependency | Package |
---|---|
LAPACK | lapack |
BLAS | blas |
Tcl* | tcl |
Dependency | Package |
---|---|
LAPACK | lapack-devel |
Tcl* | tcl-devel |
Clone the package repository: {{< command >}} git clone https://github.com/claudioperez/OpenSeesRT {{< /command >}}
install run-time dependencies. These are the libraries that will be needed in order to use OpenSees. To install these, run: {{< command >}} python -m pip install opensees {{< /command >}}
Install compile-time dependencies; see Dependencies below. These dependencies are only needed for the compilinf process.
The next steps describe how to set up your compilers and build the OpenSees library.
Check that everything was built properly by running the following command:
python -m opensees
This should start an OpenSees interpreter which can be closed by running
the exit
command.