Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions .github/PULL_REQUEST_TEMPLATE/release.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,10 @@ I updated the adapter version in the following:

Outside this repository:

- [ ] [website](https://github.com/precice/precice.github.io): Update the variables:
- `calculix_adapter_version`
- `calculix_version`
- [ ] [tutorials](https://github.com/precice/tutorials/tree/develop/tools/tests): Update the default CalculiX version in the system tests:
- `components.yaml`
- `reference_versions.yaml` (if the reference results need to be updated)

System tests:

- [ ] I triggered the system tests by adding the `trigger-system-tests` label.
- [ ] I triggered the system tests by adding the `trigger-system-tests` label.
69 changes: 0 additions & 69 deletions docs/build-supermuc.md

This file was deleted.

2 changes: 0 additions & 2 deletions docs/calculix-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ summary: "Supported CalculiX versions and porting the CalculiX adapter to a diff
The CalculiX adapter directly modifies the source files of CalculiX and, as such, is made for a specific version of CalculiX.
This page includes some hints on porting the adapter to different versions.

{% tip %}
Have you upgraded the supported CalculiX version to a newer one? Contribute back to the repository and make it available for everyone!
{% endtip %}

## Porting the adapter to a new CalculiX version

Expand Down
178 changes: 81 additions & 97 deletions docs/configure.md

Large diffs are not rendered by default.

35 changes: 15 additions & 20 deletions docs/get-adapter.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ keywords: adapter, calculix, building
summary: "The CalculiX adapter provides the executable `ccx_preCICE`. You can get the adapter either from a Debian package (on Ubuntu), or build it from source."
---

After [installing preCICE](https://precice.org/installation-overview.html) and [getting the CalculiX source and the required dependencies](adapter-calculix-get-calculix.html), you can now build the adapter, i.e. a modified CCX executable.
After [installing preCICE](https://precice.org/installation-overview.html) and [getting the CalculiX source and the required dependencies](adapter-calculix-get-calculix.html), you can now build the adapter, i.e., a modified CalculiX executable.

There are two ways to get the adapter: (a) get a binary package (Ubuntu-only), or (b) build it from source. The latest adapter version is v{{ site.calculix_adapter_version }} and the versioning format is `<CalculiX major.minor version>.<adapter revision>`.
There are two ways to get the adapter: (a) get a binary package (Ubuntu-only) or (b) build it from source. The adapter follows the versioning format `<CalculiX major.minor version>.<adapter revision>`.

## Get a binary package

Expand All @@ -18,23 +18,19 @@ You can download version-specific Ubuntu (Debian) packages from each [adapter re
Alternatively, download & install it from the command line. For Ubuntu 26.04 (Resolute Raccoon):

```bash
wget https://github.com/precice/calculix-adapter/releases/download/v{{ site.calculix_adapter_version }}/calculix-precice3_{{ site.calculix_adapter_version }}-1_amd64_resolute.deb
sudo apt install ./calculix-precice3_{{ site.calculix_adapter_version }}-1_amd64_resolute.deb
wget https://github.com/precice/calculix-adapter/releases/download/v2.20.1/calculix-precice3_2.20.1-1_amd64_resolute.deb
sudo apt install ./calculix-precice3_2.20.1-1_amd64_resolute.deb
```

This requires that also preCICE itself has been installed from a Debian package.

{% tip %}
{% important %}
Replace `resolute` with `noble` to get the package for Ubuntu 24.04 (Noble Numbat), or with `jammy` for Ubuntu 22.04 (Jammy Jellyfish).
{% endtip %}

{% note %}
We started offering Debian packages for the CalculiX adapter since v2.19.0. Please [give us your feedback](https://precice.org/community-channels.html)!
{% endnote %}
{% endimportant %}

## Building the adapted CalculiX

1. Download and unzip the latest state of the adapter (e.g. in the `CalculiX` folder), currently supporting CalculiX v{{site.calculix_version}}:
1. Download and unzip the latest state of the adapter (e.g. in the `CalculiX` folder), and see the `README.md` for the supported CalculiX version:

```bash
wget https://github.com/precice/calculix-adapter/archive/refs/heads/master.tar.gz
Expand All @@ -44,26 +40,21 @@ We started offering Debian packages for the CalculiX adapter since v2.19.0. Plea

2. Edit the `Makefile` to set the paths to dependencies.
- If you have the CalculiX source in `~/CalculiX/` and the dependencies in your global paths, you don't need to change anything.
- Otherwise, set `CCX` and, if built from source, the include and lib flags for the dependencies.
- Read below if you are [using GCC 10 or later](#compiling-with-gcc-10-or-newer).
- Otherwise, set `CCX` and the include and lib flags for the dependencies.
3. Clean any previous builds with `make clean`.
4. Build with `make` (e.g. `make -j 4` for parallel).
4. Build with `make` (e.g., `make -j 4` for parallel).
5. You should now have a new executable `ccx_preCICE` in the `bin/` folder of the adapter. You may move this file to a path known by your system, or [add this to your `PATH`](https://unix.stackexchange.com/a/26059/36693) (careful when doing this!).

### Building the adapter with PaStiX

Since version 2.17 of CalculiX, it is possible to link the PaStiX solver for increased performance, mostly through GPUs. Building the adapter with PaStiX is quite tedious, as most dependencies of PaStiX and PaStiX itself must be built from source. Check our [detailed instructions on building the adapter with PaStiX](adapter-calculix-pastix-build.html).
CalculiX can link to the PaStiX solver for increased performance using GPUs. Building the adapter with PaStiX is quite tedious, as most dependencies of PaStiX and PaStiX itself must be built from source. Check some [instructions on building the adapter with PaStiX](adapter-calculix-pastix-build.html).

### Makefile options

The adapter is built using GNU Make. The `Makefile` contains a few variables on top, which need to be adapted to your system:

{% version %}
The variables `YAML_INCLUDE` and `YAML_LIBS` are only relevant up to the adapter v2.20.1.
{% endversion %}

1. `CCX`: Location of the original CalculiX solver (CCX) source code ("src" directory)
- Example: `$(HOME)/CalculiX/ccx_{{site.calculix_version}}/src`
- Example: `$(HOME)/CalculiX/ccx_2.20/src`
2. `SPOOLES_INCLUDE`: Include flags for SPOOLES
- Example 1: `SPOOLES_INCLUDE = -I/usr/include/spooles/` (installed)
- Example 2: `SPOOLES_INCLUDE = -I$(HOME)/SPOOLES.2.2/` (source)
Expand All @@ -83,6 +74,10 @@ The variables `YAML_INCLUDE` and `YAML_LIBS` are only relevant up to the adapter
- Example 1: `YAML_LIBS = -lyaml-cpp` (installed)
- Example 2: `YAML_LIBS = -L$(HOME)/yaml-cpp/build -lyaml-cpp` (source)

{% version %}
The variables `YAML_INCLUDE` and `YAML_LIBS` are only relevant up to the adapter v2.20.1.
{% endversion %}

You may also want to adjust the compiler `FC` from `mpifort` to `mpif90` or to any other compiler your system uses.

See also the [troubleshooting](adapter-calculix-troubleshooting.html) page for further known issues.
14 changes: 9 additions & 5 deletions docs/get-calculix.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,26 +144,30 @@ make

After building, make sure that you make yaml-cpp discoverable by setting e.g. your `LD_LIBRARY_PATH`. You don't need this for the CalculiX adapter, but you would need it e.g. for the OpenFOAM adapter.

**Note:**: While v0.6.2 is known to work, try the latest available version first. Newer compilers might only be supported by newer versions.

**Note**: If you use Boost 1.67 or newer, then you also need to install yaml-cpp 0.6 or newer. Similarly, for an older Boost version, you also need an older yaml-cpp. Unfortunately, this is not related to the adapter's code.
</details>

## Building CalculiX with the preCICE adapter

### Get the source

Once the libraries are installed, you can finally install Calculix with preCICE adapter. Note that the adapter version needs to be the same as the CalculiX version (replace `{{site.calculix_version}}` below).
Once the libraries are installed, you can finally install Calculix with preCICE adapter. Note that the adapter version needs to be the same as the CalculiX version (replace `2.20` below).

```bash
cd ~
wget http://www.dhondt.de/ccx_{{site.calculix_version}}.src.tar.bz2
tar xvjf ccx_{{site.calculix_version}}.src.tar.bz2
wget http://www.dhondt.de/ccx_2.20.src.tar.bz2
tar xvjf ccx_2.20.src.tar.bz2
```

The source code is now in the `~/CalculiX/ccx_{{site.calculix_version}}/src` directory. The adapter's [`Makefile`](https://github.com/precice/calculix-adapter/blob/master/Makefile) is looking for CCX in this directory by default, so modify it if needed.
The source code is now in the `~/CalculiX/ccx_2.20/src` directory. The adapter's [`Makefile`](https://github.com/precice/calculix-adapter/blob/master/Makefile) is looking for CCX in this directory by default, so modify it if needed.

### Building the "vanilla" CalculiX (optional)

If you want to build the "vanilla" (i.e. without preCICE) CalculiX, you can now run `make` inside the `src/` directory. Depending on how you installed the dependencies above (using `apt` or from source), you might get compilation errors, such as `spooles.h:26:10: fatal error: misc.h: No such file or directory`. Often these errors can be easily fixed by modifying CalculiX `Makefile`. Please refer to [our adapter's makefile options](adapter-calculix-get-adapter.html#makefile-options) for a list of library and include flag you might have to set depending on your installation procedure.
If you want to build the "vanilla" (i.e., without preCICE) CalculiX, you can now run `make` inside the `src/` directory.

Depending on how you installed the dependencies above (using `apt` or from source), you might get compilation errors, such as `spooles.h:26:10: fatal error: misc.h: No such file or directory`. Often these errors can be easily fixed by modifying CalculiX `Makefile`. Please refer to [the Makefile options of the adapter](adapter-calculix-get-adapter.html#makefile-options) for a list of library and include flags you might have to set depending on your installation procedure.

### Building the modified CalculiX

Expand Down
2 changes: 1 addition & 1 deletion docs/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Are you encountering an unexpected error? Have a look at our [Troubleshooting](a

## Versions

The latest supported CalculiX version is {{site.calculix_version}}. If you already have a copy of the adapter, check the [adapter README](https://github.com/precice/calculix-adapter/blob/master/README.md) for the CalculiX version it was made for.
The latest supported CalculiX version is v2.20. If you already have a copy of the adapter, check the [adapter README](https://github.com/precice/calculix-adapter/blob/master/README.md) for the CalculiX version it was made for.

The adapter has a versioning scheme inherited from CalculiX: It is of the form `CCX_MAJOR.CCX_MINOR.ADAPTER_PATCH`. For instance, the release `v2.20.0` modifies the source code of CalculiX `2.20`. Further adapter releases for the same CalculiX version increase the `ADAPTER_PATCH` (e.g., `2.20.1`), independent of whether it includes bug fixes, new features, or compatibility with a different preCICE version.

Expand Down
14 changes: 7 additions & 7 deletions docs/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ This list is definitely not complete. If after reading this, you still have issu

## Things to check

* Are you using the same version of CalculiX and of the CalculiX adapter? The adapter installation works by replacing files of the original CalculiX, so they should be compatible.
* Can you manually run the `ccx_preCICE` binary?
* It should be in your `$PATH`
* If autocompletion does not work (e.g. `ccx_` + TAB key), then it is probably not in your `$PATH`.
* Our tutorials also require CGX (pre- and post-processor of CalculiX).
* Is CGX installed?
* Is OpenGL (required by CGX) installed?
- Are you using the same version of CalculiX and of the CalculiX adapter? The adapter installation works by replacing files of the original CalculiX, so they should be compatible.
- Can you manually run the `ccx_preCICE` binary?
- It should be in your `$PATH`
- If autocompletion does not work (e.g. `ccx_` + TAB key), then it is probably not in your `$PATH`.
- Our tutorials also require CGX (pre- and post-processor of CalculiX).
- Is CGX installed?
- Is OpenGL (required by CGX) installed?

## Compiling with GCC 10 or newer

Expand Down