CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > SU2 > SU2 Installation

Error during compilation (python-wrapper)

Register Blogs Members List Search Today's Posts Mark Forums Read

LinkBack Thread Tools Search this Thread Display Modes
Old   January 21, 2022, 13:26
Default Error during compilation (python-wrapper)
New Member
Wim Cardoen
Join Date: Jan 2022
Posts: 1
Rep Power: 0
wimcardoen is on a distinguished road

I tried to compile the SU2 code on a machine (OS:Centos7) using the following modules:
module purge
module load gcc/10.2.0 # gcc/10.2.0
module load python/3.9.7 # python/3.9.7 (compiled with gcc/10.2.0)
module load openblas/0.3.19-st # openblas 0.3.19 (Single threaded)
module load impi/2019.5.281 # IMPI MPI library
module load cmake
export CC=mpicc
export CXX=mpicxx
export CFLAGS=" -O2 -fPIC "

I used the following flags:
./ mybuild -Dcustom-mpi=true -Dwith-mpi=enabled -Denable-mpp=true -Denable-openblas=true -Denable-pywrapper=true \
-Denable-autodiff=true -Denable-mixedprec=true --prefix=/uufs/

Program swig found: YES (/bin/swig)
Message: Using mpi4py from /uufs/
Dependency python found: YES (pkgconfig)
Program found: YES (/bin/sh /uufs/
Message: -------------------------------------------------------------------------
| ___ _ _ ___ |
| / __| | | |_ ) Release 7.2.1 "Blackbird" |
| \__ \ |_| |/ / |
| |___/\___//___| Meson Configuration Summary |
| |

Option Value
TecIO: true
CGNS: true
AD (reverse): true
AD (forward): false
Python Wrapper: true
Intel-MKL: false
OpenBlas: true
PaStiX: false
Mixed Float: true
libROM: false

Please be sure to add the $SU2_HOME and $SU2_RUN environment variables,
and update your $PATH (and $PYTHONPATH if applicable) with $SU2_RUN

Based on the input to this configuration, add these lines to your .bashrc file:

export SU2_RUN=/uufs/
export SU2_HOME=/uufs/
export PATH=$PATH:$SU2_RUN

Use './ninja -C mybuild install' to compile and install SU2

Message: To run SU2 with Mutation++ library, add these lines to your .bashrc file:

export MPP_DATA_DIRECTORY=$SU2_HOME/subprojects/Mutationpp/data
export LD_LIBRARY_PATH=$SU2_HOME/<build_dir>/subprojects/Mutationpp

At the end of the compilation I obtained the following error:
Build targets in project: 21

SU2 7.2.1 "Blackbird"

Mutationpp: YES

Found ninja-1.10.0.git at /uufs/

./ninja -C build install

[608/810] Compiling C++ object SU2_CFD/src/libSU2core.a.p/drivers_CDriver.cpp.o
In file included from ../subprojects/Mutationpp/src/utilities/Utilities.h:45,
from ../subprojects/Mutationpp/src/kinetics/RateLaws.h:35,
from ../subprojects/Mutationpp/src/kinetics/RateLawGroup.h:41,
from ../subprojects/Mutationpp/src/kinetics/RateManager.h:31,
from ../subprojects/Mutationpp/src/kinetics/Kinetics.h:33,
from ../subprojects/Mutationpp/src/general/Mixture.h:34,
from ../subprojects/Mutationpp/src/general/mutation++.h:31,
from ../SU2_CFD/src/drivers/../../include/numerics/NEMO/convection/../../../fluid/CMutationTCLib.hpp:33,
from ../SU2_CFD/src/drivers/../../include/numerics/NEMO/convection/../CNEMONumerics.hpp:32,
from ../SU2_CFD/src/drivers/../../include/numerics/NEMO/convection/roe.hpp:30,
from ../SU2_CFD/src/drivers/CDriver.cpp:67:
../subprojects/Mutationpp/src/utilities/XMLite.h: In member function ‘bool Mutation::Utilities::IO::XmlElement::getChildEleme ntObject(const string&, T&) const’:
../subprojects/Mutationpp/src/utilities/XMLite.h:288:5: warning: no return statement in function returning non-void [-Wreturn-type]
288 | }
| ^
[789/810] Generating 'SU2_PY/pySU2/'.
../SU2_PY/pySU2/../../Common/include/code_config.hpp:60: Error: Syntax error in input(1).
[798/810] Compiling C++ object SU2_CFD/src/libSU2core_AD.a.p/.._include_numerics_simd_CNumericsSIMD.cpp.o
ninja: build stopped: subcommand failed.

When I removed the option "-Denable-pywrapper=true" from the meson CMD line I was able to compile the code.

Before compiling the SU2 code I installed MPI4PY with the same version of gcc and impi.
module purge
module load gcc/10.2.0
module load python/3.9.7
module load impi/2019.5.281

export CC=mpicc
export CXX=mpicxx
export CFLAGS=" -m64 -O2 -fPIC "
export CXXFLAGS=" ${CFLAGS} "

cd /uufs/
python3 build
python3 install --prefix=/uufs/

Any idea what I should do to resolve the compilation issue?

Thank you,

wimcardoen is offline   Reply With Quote

Old   March 14, 2022, 00:29
New Member
Join Date: Feb 2022
Posts: 6
Rep Power: 2
HIT19B902072 is on a distinguished road
I have the same problem, do you have a solution now?
HIT19B902072 is offline   Reply With Quote


python wrapper

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Python wrapper set up clacon21 SU2 0 January 19, 2022 04:39
[PyFoam] Using To Plot Residuals m_ridzon OpenFOAM Community Contributions 22 January 26, 2021 19:48
Running Fluent from Python: UDF Compilation problems Ames Fluent UDF and Scheme Programming 5 November 16, 2020 07:12
Extracting parameters to the python wrapper Arad SU2 0 August 9, 2016 07:41
Compilation of Paraview3.3-cvs with python support crazysumi OpenFOAM 10 October 12, 2009 14:01

All times are GMT -4. The time now is 23:20.