Python Wrapper Build (2024)

This page only applies to SU2 version 6.2.0 and lower.
The new documentation section can be found here.

It is recommended to read the information at Build from Source first prior reading this section.

In order to use the Python Wrapper of SU2, an additional compilation step is required. The wrapper is based on the CDriver structure of SU2 and the compilation is performed with Swig that is required to be installed on your system. For a parallel build, Python bindings for MPI are also required. We recommend to use mpi4py. You will find a few notes that will help you install the required packages at the end of this tutorial.

Configuration with the Python wrapper

The Py wrapper build configuration is still based on the configure script but has to be enabled by adding the option --enable-PY_WRAPPER.

Example for Linux

To configure a parallel build in a specified location with the Python wrapper, the command should be:

$ ./configure --prefix=/path/to/install/SU2 CXXFLAGS="-O3" --enable-mpi --with-cc=/path/to/mpicc --with-cxx=/path/to/mpicxx --enable-PY_WRAPPER

followed by the classical make -j N and make install commands.

This will first compile the SU2 code, and all the required libraries from ./externals, to generate the executables (SU2_CFD, SU2_SOL, SU2_DEF, …). Then it will wrap the CDriver structure in order to create the Python module pysu2.py that is linked to the library _pysu2.so (also coming from the wrapper compilation). The pysu2 module can be imported in a Python script so that any SU2 driver (general, fluid, …) can be instantiated and used as a classical Py object.

Make sure to note the SU2_RUN and SU2_HOME environment variables displayed at the conclusion of configure. It is recommended that you add the SU2_RUN and SU2_HOME variables to your ~/.bashrc file and update your PATH and PYTHONPATH variables to include the install location ($SU2_RUN, specified by –prefix).

Note : How to install Swig and mpi4py

On Linux, Swig can be easily installed with the APT:

$ sudo apt-get install swig

If you have a working distribution of MPI on your system, mpi4py can be installed with Python pip:

$ sudo apt-get install python-pip$ sudo pip install mpi4py

On Mac OS X, you can use the Homebrew package manager. Once it is installed on your system, you can install Swig by running:

$ sudo brew install swig

Note that you can also use Homebrew to easily install Open MPI on your Mac:

$ sudo brew install open-mpi

Install mpi4py with Python pip using easy install:

$ sudo easy_install pip$ sudo pip install mpi4py
Python Wrapper Build (2024)
Top Articles
Vermilion Energy (VET) Stock Forecast, Price Targets and Analysts Predictions - TipRanks.com
One-Page Business Proposal Writing Guide (+ Templates)
Metallica - Blackened Lyrics Meaning
Ret Paladin Phase 2 Bis Wotlk
The Daily News Leader from Staunton, Virginia
50 Meowbahh Fun Facts: Net Worth, Age, Birthday, Face Reveal, YouTube Earnings, Girlfriend, Doxxed, Discord, Fanart, TikTok, Instagram, Etc
Optimal Perks Rs3
Nwi Police Blotter
How do you mix essential oils with carrier oils?
What Does Dwb Mean In Instagram
zopiclon | Apotheek.nl
1Win - инновационное онлайн-казино и букмекерская контора
Koop hier ‘verloren pakketten’, een nieuwe Italiaanse zaak en dit wil je ook even weten - indebuurt Utrecht
Zürich Stadion Letzigrund detailed interactive seating plan with seat & row numbers | Sitzplan Saalplan with Sitzplatz & Reihen Nummerierung
People Portal Loma Linda
7 Fly Traps For Effective Pest Control
Dtab Customs
Our History
Dwc Qme Database
Babbychula
Home
Jobs Hiring Near Me Part Time For 15 Year Olds
Toothio Login
Shoe Station Store Locator
Tracking every 2024 Trade Deadline deal
Allegheny Clinic Primary Care North
Lawrence Ks Police Scanner
Rubmaps H
Home Auctions - Real Estate Auctions
De beste uitvaartdiensten die goede rituele diensten aanbieden voor de laatste rituelen
PA lawmakers push to restore Medicaid dental benefits for adults
Hindilinks4U Bollywood Action Movies
Japanese Big Natural Boobs
Registrar Lls
What Is A K 56 Pink Pill?
Ds Cuts Saugus
13 Fun & Best Things to Do in Hurricane, Utah
Www Craigslist Com Atlanta Ga
Big Reactors Best Coolant
Best Suv In 2010
Large Pawn Shops Near Me
Willkommen an der Uni Würzburg | WueStart
The Blackening Showtimes Near Ncg Cinema - Grand Blanc Trillium
Verizon Forum Gac Family
60 Days From August 16
Iron Drop Cafe
Diccionario De Los Sueños Misabueso
Powah: Automating the Energizing Orb - EnigmaticaModpacks/Enigmatica6 GitHub Wiki
How to Get a Check Stub From Money Network
91 East Freeway Accident Today 2022
Equinox Great Neck Class Schedule
Latest Posts
Article information

Author: Edwin Metz

Last Updated:

Views: 5988

Rating: 4.8 / 5 (78 voted)

Reviews: 93% of readers found this page helpful

Author information

Name: Edwin Metz

Birthday: 1997-04-16

Address: 51593 Leanne Light, Kuphalmouth, DE 50012-5183

Phone: +639107620957

Job: Corporate Banking Technician

Hobby: Reading, scrapbook, role-playing games, Fishing, Fishing, Scuba diving, Beekeeping

Introduction: My name is Edwin Metz, I am a fair, energetic, helpful, brave, outstanding, nice, helpful person who loves writing and wants to share my knowledge and understanding with you.