Skip to content

Latest commit

 

History

History
52 lines (35 loc) · 1.33 KB

README.md

File metadata and controls

52 lines (35 loc) · 1.33 KB

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)