su2code/SU2

Building error in SU2 enabling -Denable-pywrapper and -Dwith-mpi

Closed this issue · 1 comments

Describe the bug
Building SU2 with building options -Denable-pywrapper and -Dwith-mpi, The meson error occured.
Please let me know if anyone knows what to do.

The part of meson-log.txt is below:

Message: Boost sources found.
Program swig found: YES (/usr/bin/swig)
Running command: /---/---/---/work/SU2/venv/bin/python3 -c import mpi4py; print(mpi4py.get_include())
--- stdout ---
/---/---/---/work/SU2/venv/lib/python3.7/site-packages/mpi4py/include

--- stderr ---

Message: Using mpi4py from /---/---/---/work/SU2/venv/lib/python3.7/site-packages/mpi4py/include
Pkg-config binary for 1 is cached.
Determining dependency 'python-3.7m' with pkg-config executable '/usr/bin/pkg-config'
env[PKG_CONFIG_LIBDIR]: /---/---/---/soft/Python-3.7.9/build/lib/pkgconfig
env[PKG_CONFIG_PATH]: /opt/intel/compilers_and_libraries_2019.1.144/linux/mkl/bin/pkgconfig
Called /usr/bin/pkg-config --modversion python-3.7m -> 0
3.7
env[PKG_CONFIG_LIBDIR]: /---/---/---/soft/Python-3.7.9/build/lib/pkgconfig
env[PKG_CONFIG_PATH]: /opt/intel/compilers_and_libraries_2019.1.144/linux/mkl/bin/pkgconfig
Called /usr/bin/pkg-config --cflags python-3.7m -> 0
-I/data/home/yamazaki/soft/Python-3.7.9/build/include/python3.7m
env[PKG_CONFIG_LIBDIR]: /---/---/---/soft/Python-3.7.9/build/lib/pkgconfig
env[PKG_CONFIG_ALLOW_SYSTEM_LIBS]: 1
env[PKG_CONFIG_PATH]: /opt/intel/compilers_and_libraries_2019.1.144/linux/mkl/bin/pkgconfig
Called /usr/bin/pkg-config --libs python-3.7m -> 0
-L/---/---/---/soft/Python-3.7.9/build/lib -lpython3.7m
env[PKG_CONFIG_LIBDIR]: /---/---/---/soft/Python-3.7.9/build/lib/pkgconfig
env[PKG_CONFIG_PATH]: /opt/intel/compilers_and_libraries_2019.1.144/linux/mkl/bin/pkgconfig
Called /usr/bin/pkg-config --libs python-3.7m -> 0
-L/---/---/---/soft/Python-3.7.9/build/lib -lpython3.7m
WARNING: extract_all_objects called without setting recursive
keyword argument. Meson currently defaults to
non-recursive to maintain backward compatibility but
the default will be changed in the future.

SU2_PY/pySU2/meson.build:27:2: ERROR: Tried to form an absolute path to a source dir.
You should not do that but use relative paths instead.

To get include path to any directory relative to the current dir do

incdir = include_directories(dirname)

After this incdir will contain both the current source dir as well as the
corresponding build dir. It can then be used in any subdirectory and
Meson will take care of all the busywork to make paths work.

Dirname can even be '.' to mark the current directory. Though you should
remember that the current source and build directories are always
put in the include directories by default so you only need to do
include_directories('.') if you intend to use the result in a
different subdirectory.

To Reproduce

$ cd $HOME/local
$ git clone https://github.com/su2code/SU2.git
$ cd SU2
$ mkdir build
$ $HOME/local/Python-3.7.9/python -m venv venv
$ source venv/bin/activate
(venv)$ export MPICC=/path/to/mpicc
(venv)$ export MPICXX=/path/to/mpicxx
(venv)$ export CC=$MPICC
(venv)$ export CXX=$MPICXX
(venv)$ pip install --upgrade pip
(venv)$ pip install mpi4py
(venv)$ ./meson.py build -Dcustom-mpi=true -Denable-pywrapper=True --prefix=$HOME/local/SU2/build/

Desktop (please complete the following information):

  • OS: Linux (CentOS 7)
  • MPI implementation and version: mpich-3.2-intel64-19.0.1.144
  • Python Version: Python-3.7.9
  • swig Version: 3.0.12
  • SU2 Version: [e.g., v6.2.0]

@patelha57 and @aa-g have been doing a lot of work with the python wrapper. Any advice you guys can share here?