CWIPI (Coupling With Interpolation Parallel Interface) is a library for coupling parallel scientific codes via MPI communications to perform multi-physics simulations in massively parallel, distributed-memory environments, with interfaces in C, Python and Fortran.
The user documentation is available here.
ONERA users can also access the documentation deployed on ONERA's internal Gitlab pages server.
General dependencies for building CWIPI are:
- a C++ compiler (tested with
gcc 10,gcc 12,intel 2022andintel-llvm 22) - CMake (version 3.16 or higher)
- an MPI distribution (tested with
openmpiandintel oneapi) - gnu-time on macOS (to run tests with
cwp_run)
Follow these steps to build CWIPI from the sources:
First, clone the repository
- either from GitHub:
git clone git@github.com:onera/cwipi.git - or from GitLab (for ONERA users only):
git clone git@gitlab.onera.net:numerics/coupling/cwipi.git
Then, use the following commands:
cd cwipigit submodule update --init(needed for dependencies such as ParaDiGM)mkdir buildcd buildcmake ..makemake install./cwp_run(if you want to run the test cases, at least 10 CPU cores are required)
Configuration with CMake
cmake -D<option1_name>=<option1_value> ... -D<option2_name>=<option2_value>
CMAKE_INSTALL_PREFIX=<prefix>
CWP_ENABLE_Fortran=<ON | OFF> (default : OFF)
CWP_ENABLE_Fortran_MPI_MODULE=<ON | OFF> (default : OFF)
CWP_ENABLE_PYTHON_BINDINGS=<ON | OFF> (default : OFF)
If a simple autodetection fails, you can use these options to find Python :
PYTHON_LIBRARY=<path>
PYTHON_INCLUDE_DIR=<path>
Refer to FindPython in the CMake documentation for more information.
CWP_ENABLE_SHARED=<ON | OFF> (default : ON)
CWP_ENABLE_STATIC=<ON | OFF> (default : OFF)
CWP_ENABLE_MPI_CHECK=<ON | OFF> (default : ON)
CWP_ENABLE_HIDE_PDM_SYMBOLS=<ON | OFF> (default : ON)
If CWP_ENABLE_STATIC=ON then CWP_ENABLE_HIDE_PDM_SYMBOLS=OFF is forced
CWP_ENABLE_EXTERNAL_PDM=<ON | OFF> (default : OFF)
If CWP_ENABLE_EXTERNAL_PDM=ON, you must define this variable to find ParaDiGM:
PDM_SOURCE_DIR=<path> Where to find the base directory of ParaDiGM
If CWP_ENABLE_HIDE_PDM_SYMBOLS=ON then CWP_ENABLE_EXTERNAL_PDM=OFF is forced
You can find a basic example of two-way coupling using CWIPI in the quick start section of the documentation.
Additional examples for more advanced scenarios can be found in the tests directory.
Issues can be reported directly in the Issues section.
CWIPI is available under the LGPL3 license.
Copyright 2023, ONERA The French Aerospace Lab