Skip to content

Ilyabasharov/cpp-pybind-mpi4py

Repository files navigation

Effective Numerical Calculus in Python

Introduction

Demonstrates how to call a C++ class from Python using pybind11 together with MPI. The task is to solve differential equations using Shooting and Seidel methods.

Installation

Requirements

apt install openmpi
apt install cmake

Project Installation

git clone --recursive https://github.com/Ilyabasharov/cpp-pybind-mpi4py.git
pip install -r requirements.txt
cd cpp-pybind-mpi4py
mkdir -p build && cd build
export CC=gcc
export CXX=g++
cmake ..
make

Basic run

mpirun -n 8 python3 helloWorld.py

Contents

Main files:

  • mpi_lib.cpp: C++/MPI library code
  • pybind_calc.py: python code that call the C++/MPI library (using pybind11 and mpi4py)

About

Effective Numerical Calculus in Python

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published