Skip to content

Commit 8f8a82a

Browse files
authored
Adding solver overview to User's Guide (#14349)
- Adding overview table to integration methods section - Clarifing that DASSL is using dense solvers - Adding path to omc on default CMake build - Updating C++ Readme a bit
1 parent 7c42efd commit 8f8a82a

File tree

7 files changed

+150
-149
lines changed

7 files changed

+150
-149
lines changed

OMCompiler/SimulationRuntime/cpp/README

Lines changed: 0 additions & 112 deletions
This file was deleted.
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Build the C++ runtime
2+
3+
Set `OM_OMC_ENABLE_CPP_RUNTIME=ON` when compiling with CMake.
4+
Check [README.cmake.md](../../../README.cmake.md) for details.
5+
6+
## Configuration arguments
7+
8+
```cmake
9+
BOOST_STATIC_LINKING="true"
10+
BOOST_REALPATHS="true"
11+
RUNTIME_PROFILING="true"
12+
SCOREP="true"
13+
SCOREP_HOME=”...”
14+
FMU_SUNDIALS="true"
15+
PARALLEL_OUTPUT="true"
16+
USE_LOGGER="false"
17+
BUILDTYPE=[Release,Debug]
18+
USE_KLU=["true","false"]
19+
```
20+
21+
The boost static libraries can be used for the build, by passing the
22+
`BOOST_STATIC_LINKING` argument to make. Take care that all boost- libraries are
23+
linked statically.
24+
25+
Sometimes it's necessary to link boost against it's real path libraries. This
26+
means for example, that instead of linking against “-lboost_filesystem”, the
27+
makefiles will link against “-lboost1.55_filesystem”. Use the `BOOST_REALPATHS`
28+
argument for this purpose.
29+
30+
If profiling informations for the runtime are required, they can be turned on
31+
with the `RUNTIME_PROFILING` command.
32+
33+
Profiling can additionally be handled by Score-P. This gives the possibility to
34+
use tracing besides profiling for performance analysis. Maybe it's necessary to
35+
give the `SCOREP_HOME` directory to make as well. This is the directory
36+
containing `include/scorep/SCOREP_User.h`. Turn the Score-P support on, by
37+
passing the `SCOREP` argument.
38+
39+
The FMU export usually creates executables that use the Newton algorithm to
40+
solve equation systems. The KINSOL solver can be used as well, by passing the
41+
`FMU_SUNDIALS` argument to configure.
42+
43+
Simulation results can be written asynchronously with the help of boost
44+
threads and a consumer producer algorithm (experimental). This feature is
45+
available after passing `PARALLEL_OUTPUT` to configure.
46+
47+
For performance reasons it can be necessary to disable the logger-code completely.
48+
This can be done by passing the `USE_LOGGER` argument.
49+
50+
The build-type of cmake can be directly controlled by passing the `BUILDTYPE`
51+
argument. If debug librariers should be created, set this value to `debug`.
52+
If release libraries are required, pass `release` instead.
53+
54+
The Windows build does not support C++11 at the moment. Therfore a lot of C++11
55+
features are replaced with boost equivalents. Sometimes it is necessary to check
56+
this build on Linux-systems as well. Therefore the argument `CPP_03` can be
57+
passed, to prevent the usage of C++11 features.
58+
59+
Author: Marcus Walther 20.11.2015

doc/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22

33
There are different documentations available for OpenModelica.
44

5-
- The User's Guide, see [UsersGuide/README.md](https://github.com/OpenModelica/OpenModelica/blob/master/doc/UsersGuide/README.md)
6-
- Doxygen documentation for parts of the C, C++ and OMSI documentation
5+
- The User's Guide, see [UsersGuide/README.md](./UsersGuide/README.md)
6+
- Doxygen documentation for parts of the C, C++ and OMSI documentation

doc/UsersGuide/Makefile

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,18 @@
33

44
OPENMODELICA_ROOT = $(CURDIR)/../..
55
# OMPython needs this
6-
OPENMODELICAHOME := $(shell \
7-
if [ -d $(OPENMODELICA_ROOT)/build_cmake/install ]; \
8-
then echo '$(OPENMODELICA_ROOT)/build_cmake/install'; \
9-
elif [ -d $(OPENMODELICA_ROOT)/install_cmake ]; \
10-
then echo '$(OPENMODELICA_ROOT)/install_cmake'; \
11-
else \
6+
OPENMODELICAHOME := $(shell \
7+
if [ -d $(OPENMODELICA_ROOT)/build_cmake/install ]; \
8+
then echo '$(OPENMODELICA_ROOT)/build_cmake/install'; \
9+
elif [ -d $(OPENMODELICA_ROOT)/build_cmake/install_cmake ]; \
10+
then echo '$(OPENMODELICA_ROOT)/build_cmake/install_cmake'; \
11+
elif [ -d $(OPENMODELICA_ROOT)/install_cmake ]; \
12+
then echo '$(OPENMODELICA_ROOT)/install_cmake'; \
13+
else \
1214
echo '$(OPENMODELICA_ROOT)/build/'; fi)
1315

16+
OPENMODELICAHOME := $(shell realpath $(OPENMODELICAHOME))
17+
1418
OMSUSERSGUIDE = $(OPENMODELICA_ROOT)/OMSimulator/doc/UsersGuide
1519

1620
# You can set these variables from the command line.

doc/UsersGuide/README.md

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,38 @@ OpenModelica User's Guide using Sphinx (Python Documentation Generator).
55
## Dependencies
66

77
Getting all dependencies right is a nightmare. Just use the dev container
8-
`build-deps:v1.22.0` from [.devcontainer/README.md](./../../.devcontainer/README.md) and
9-
set `GITHUB_AUTH`.
8+
`build-deps:v1.22.0` from
9+
[.devcontainer/README.md](./../../.devcontainer/README.md) and set
10+
`GITHUB_AUTH`.
11+
12+
- omc, omc-diff and omsimulator
13+
- Inkscape > v1.0
14+
- [Sphinx](http://sphinx-doc.org/)
15+
- pandoc
16+
- gnuplot
17+
- Python3 and packages from [source/requirements.txt](./source/requirements.txt)
1018

11-
- omc, omc-diff and omsimulator
12-
- Inkscape > v1.0
13-
- [Sphinx](http://sphinx-doc.org/)
14-
- Python3 and packages from [source/requirements.txt](./source/requirements.txt)
1519
```bash
16-
pip3 install --upgrade -r source/requirements.txt
20+
pip install --upgrade -r source/requirements.txt
21+
```
22+
23+
- Python PyGithub package
24+
25+
```bash
26+
pip install PyGithub
1727
```
18-
- Python PyGithub package
1928

2029
### GITHUB_AUTH
2130

2231
Create a read-only personal access token (API token) on GitHub.com and define an
2332
environment variable `GITHUB_AUTH` with your secret API token.
33+
2434
```bash
2535
export GITHUB_AUTH=XXXXXXXXXXX
2636
```
37+
2738
This is needed to read release information from
28-
https://github.com/OpenModelica/OpenModelica with the PyGithub package.
39+
<https://github.com/OpenModelica/OpenModelica> with the PyGithub package.
2940

3041
## Build instructions
3142

@@ -36,5 +47,5 @@ make html
3647
## Preview build
3748

3849
```bash
39-
python3 -m http.server --directory build/html
50+
python -m http.server --directory build/html
4051
```

doc/UsersGuide/source/conf.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
if not 'OPENMODELICAHOME' in os.environ:
2626
if os.path.isdir('../../../build_cmake/install'):
2727
os.environ['OPENMODELICAHOME'] = os.path.realpath('../../../build_cmake/install')
28+
elif os.path.isdir('../../../build_cmake/install_cmake'):
29+
os.environ['OPENMODELICAHOME'] = os.path.realpath('../../../build_cmake/install_cmake')
2830
elif os.path.isdir('../../../install_cmake'):
2931
os.environ['OPENMODELICAHOME'] = os.path.realpath('../../../install_cmake')
3032
else:

0 commit comments

Comments
 (0)