CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   SU2 Installation (https://www.cfd-online.com/Forums/su2-installation/)
-   -   Error during compilation (python-wrapper) (https://www.cfd-online.com/Forums/su2-installation/240738-error-during-compilation-python-wrapper.html)

wimcardoen January 21, 2022 12:26

Error during compilation (python-wrapper)
 
Hello,

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 "
export CXXFLAGS=" ${CXXFLAGS} "
export PYTHONPATH=/uufs/chpc.utah.edu/sys/installdir/su2/pylib/3.9.7/lib/python3.9/site-packages:$PYTHONPATH

I used the following flags:
./meson.py mybuild -Dcustom-mpi=true -Dwith-mpi=enabled -Denable-mpp=true -Denable-openblas=true -Denable-pywrapper=true \
-Denable-autodiff=true -Denable-mixedprec=true --prefix=/uufs/chpc.utah.edu/sys/installdir/su2/7.2.1

Program swig found: YES (/bin/swig)
Message: Using mpi4py from /uufs/chpc.utah.edu/sys/installdir/su2/pylib/3.9.7/lib/python3.9/site-packages/mpi4py/include
Dependency python found: YES (pkgconfig)
Program install.sh found: YES (/bin/sh /uufs/chpc.utah.edu/sys/srcdir/su2/7.2.1/SU2_PY/pySU2/install.sh)
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/chpc.utah.edu/sys/installdir/su2/7.2.1/bin
export SU2_HOME=/uufs/chpc.utah.edu/sys/srcdir/su2/7.2.1
export PATH=$PATH:$SU2_RUN
export PYTHONPATH=$PYTHONPATH:$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"

Subprojects
Mutationpp: YES

Found ninja-1.10.0.git at /uufs/chpc.utah.edu/sys/srcdir/su2/7.2.1/ninja

./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/_pysu2.so.p/pySU2.cxx'.
FAILED: SU2_PY/pySU2/_pysu2.so.p/pySU2.cxx
/bin/swig -DHAVE_CGNS -DNDEBUG -DUSE_MIXED_PRECISION -DHAVE_MPI -DHAVE_METIS -DHAVE_PARMETIS -DHAVE_TECIO -DTECIOMPI -DHAVE_BLAS -DHAVE_LAPACK -DHAVE_MPP -c++ -python -I/uufs/chpc.utah.edu/sys/installdir/su2/pylib/3.9.7/lib/python3.9/site-packages/mpi4py/include -outdir /uufs/chpc.utah.edu/sys/srcdir/su2/7.2.1/mybuild/SU2_PY/pySU2 -o ./SU2_PY/pySU2/_pysu2.so.p/pySU2.cxx ../SU2_PY/pySU2/pySU2.i
../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/chpc.utah.edu/sys/srcdir/su2/pylib/mpi4py/3.1.3
python3 setup.py build
python3 setup.py install --prefix=/uufs/chpc.utah.edu/sys/installdir/su2/pylib/3.9.7
export PYTHONPATH=/uufs/chpc.utah.edu/sys/installdir/su2/pylib/3.9.7/lib/python3.9/site-packages:$PYTHONPATH

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

Thank you,

Wim

HIT19B902072 March 13, 2022 23:29

I have the same problem, do you have a solution now?


All times are GMT -4. The time now is 00:17.