Skip to content

onera/cwipi

Repository files navigation

Logo

CWIPI

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.

Documentation

The user documentation is available here.

ONERA users can also access the documentation deployed on ONERA's internal Gitlab pages server.

Installation

Dependencies

General dependencies for building CWIPI are:

  • a C++ compiler (tested with gcc 10, gcc 12, intel 2022 and intel-llvm 22)
  • CMake (version 3.16 or higher)
  • an MPI distribution (tested with openmpi and intel oneapi)
  • gnu-time on macOS (to run tests with cwp_run)

Basic Installation

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:

  1. cd cwipi
  2. git submodule update --init (needed for dependencies such as ParaDiGM)
  3. mkdir build
  4. cd build
  5. cmake ..
  6. make
  7. make install
  8. ./cwp_run (if you want to run the test cases, at least 10 CPU cores are required)
Configuration with CMake

CMake general options

cmake -D<option1_name>=<option1_value> ... -D<option2_name>=<option2_value>

Installation prefix

CMAKE_INSTALL_PREFIX=<prefix>

Enable Fortran interface

CWP_ENABLE_Fortran=<ON | OFF> (default : OFF)
CWP_ENABLE_Fortran_MPI_MODULE=<ON | OFF> (default : OFF)

Enable Python interface

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.

Build shared library

CWP_ENABLE_SHARED=<ON | OFF> (default : ON)

Build static library

CWP_ENABLE_STATIC=<ON | OFF> (default : OFF)

Enable MPI wrapper check

CWP_ENABLE_MPI_CHECK=<ON | OFF> (default : ON)

Hide symbols of internal ParaDiGM library

CWP_ENABLE_HIDE_PDM_SYMBOLS=<ON | OFF> (default : ON)

If CWP_ENABLE_STATIC=ON then CWP_ENABLE_HIDE_PDM_SYMBOLS=OFF is forced

Enable the use of external ParaDiGM library

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

Quick start

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

Issues can be reported directly in the Issues section.

License

CWIPI is available under the LGPL3 license.

Copyright

Copyright 2023, ONERA The French Aerospace Lab

About

Library for coupling parallel scientific codes via MPI communications to perform multi-physics simulations

Resources

Contributing

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages