SU2
SU2 copied to clipboard
filter_adjoint.py cannot be run: it imports modules removed in v2.0.3
Describe the bug
SU2_PY/SU2/util/filter_adjoint.py is installed by SU2_PY/meson.build, but it fails on import because libSU2 and libSU2_mesh were removed from the repository in v2.0.3. It also calls an undefined smooth() function and relies on Python 2 behaviour (indexing into map/range objects, float slice indices). Nothing else in the repository references it.
To Reproduce
From the root of the repository:
python SU2_PY/SU2/util/filter_adjoint.py -h
File "SU2_PY/SU2/util/filter_adjoint.py", line 35, in <module>
import libSU2
ModuleNotFoundError: No module named 'libSU2'
Expected behavior
Scripts installed with SU2 can be run, or unusable scripts are not installed.
A fix is proposed in #2902.
Bug report checklist
- [x] Consulting the build instructions (https://su2code.github.io/docs_v7/Build-SU2-Linux-MacOS/).
- [x] Looking for similar problems on GitHub or CFD-Online (https://www.cfd-online.com/Forums/su2/).
- [x] Updating to the newest version of SU2 (either develop, master, or the pre-built executables https://su2code.github.io/download.html).
Desktop (please complete the following information):
- OS: Windows 11
- C++ compiler and version: MSVC 19.44 (Visual Studio 2022 Build Tools)
- MPI implementation and version: Microsoft MPI 10.1
- SU2 Version: develop