su2code / SU2

SU2: An Open-Source Suite for Multiphysics Simulation and Design
https://su2code.github.io
Other
1.32k stars 837 forks source link

Compile SU2 on Windows 10 Error #888

Closed KleineKampfzwergin closed 4 years ago

KleineKampfzwergin commented 4 years ago

Hi,

i tried to compile SU2 v7.0.1 on Windows 10. For this i followed your despription in Docs/Build from Source/Build SU2 on Windows.

I installed MS MPI and MS MPISDK 10.1.2, MinGW 8.1.0, pkg-config 0.26 - 1 and swigwin 4.0.1.

The command for meson is: python meson.py build -Denable-autodiff=true -Denable-directdiff=true -Denable-pywrapper=true -Dwith-mpi=enabled --prefix="D:\Programs\SU2 CFD\SU2-7.0.1\bin"

The result is the following: git command not found. Using fall-back method to init submodules The Meson build system Version: 0.52.999 Source dir: D:\Programs\SU2 CFD\SU2-7.0.1 Build dir: D:\Programs\SU2 CFD\SU2-7.0.1\build Build type: native build Project name: SU2 Project version: 7.0.1 C compiler for the host machine: gcc (gcc 8.1.0 "gcc (x86_64-posix-seh-rev0, Built by MinGW-W64 project) 8.1.0") C linker for the host machine: GNU ld.bfd 2.30 C++ compiler for the host machine: c++ (gcc 8.1.0 "c++ (x86_64-posix-seh-rev0, Built by MinGW-W64 project) 8.1.0") C++ linker for the host machine: GNU ld.bfd 2.30 Host machine cpu family: x86_64 Host machine cpu: x86_64 Program python3 found: YES (C:\Users\Name\AppData\Local\Programs\Python\Python38\python.exe) Run-time dependency MPI for c found: YES Run-time dependency MPI for cpp found: NO

meson.build:37:2: ERROR: Dependency "mpi" not found

Can you help me what is wrong here? Which settings do you use to compile SU2 on Windows 10? Did you change any meson.build files?

Thank you very much.

Kind Regards KleineKampfzwergin

talbring commented 4 years ago

Hi,

just remove the mpi option from the meson command. Otherwise, meson tries to also find the cpp bindings of MPI which are not available in MSMPI. The c bindings however should be found automatically. Let me know if it works.

Tim

KleineKampfzwergin commented 4 years ago

Hi Tim,

thanks for you help. without -Dwith-mpi=enabled meson works.

But now i have a new problem. If i run ninja.exe -C build install i got some warnings. At the end i got an error! Following i show the last two comments of the installing!

In file included from ..\externals/medi/include/medi/ampi/ampi.hpp:41, from ..\externals/medi/include/medi/medi.hpp:33, from D:/Programs/SU2 CFD/SU2-7.0.1/Common/include/mpi_structure.hpp:50, from ../SU2_DOT/src/../include/SU2_DOT.hpp:32, from ../SU2_DOT/src/SU2_DOT.cpp:29: ..\externals/medi/include/medi/ampi/../../../generated/medi/ampiFunctions.hpp:12188:47: warning: 'int MPI_Errhandler_set(MPI_Comm, MPI_Errhandler)' is deprecated: Deprecated in MPI 2.0, use 'MPI_Comm_set_errhandler'. To disable deprecation, define MSMPI_NO_DEPRECATE_20. [-Wdeprecated-declarations] return MPI_Errhandler_set(comm, errhandler); ^ In file included from D:/Programs/SU2 CFD/SU2-7.0.1/Common/include/mpi_structure.hpp:32, from ../SU2_DOT/src/../include/SU2_DOT.hpp:32, from ../SU2_DOT/src/SU2_DOT.cpp:29: D:\Programs\Microsoft\Microsoft SDKs\MPI\Include/mpi.h:6741:1: note: declared here MPI_Errhandler_set( ^~~~~~ ninja: build stopped: subcommand failed.

Thanks a lot!

KleineKampfzwergin

talbring commented 4 years ago

Hmm I don't really see the error in that output. Can you make sure to post the part where the error occurs?

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If this is still a relevant issue please comment on it to restart the discussion. Thank you for your contributions.

KleineKampfzwergin commented 3 years ago

Hi,

for my late answer. i can't solve the problem yet.

here is the meson-log.txt output: Build started at 2021-04-17T15:34:44.243386 Main binary: C:\Users\KleineKampfzwergin\AppData\Local\Programs\Python\Python39\python.exe Build Options: -Denable-autodiff=true -Denable-directdiff=true -Denable-pywrapper=true -Denable-cgns=true '-Dprefix=D:\Programme\SU2-7.1.1\bin' Python system: Windows The Meson build system Version: 0.54.999 Source dir: D:\Programme\SU2-7.1.1 Build dir: D:\Programme\SU2-7.1.1\build Build type: native build None of 'PKG_CONFIG_PATH' are defined in the environment, not changing global flags. None of 'PKG_CONFIG_PATH' are defined in the environment, not changing global flags. Project name: SU2 Project version: 7.1.1 "Blackbird" None of 'CC' are defined in the environment, not changing global flags. None of 'CFLAGS' are defined in the environment, not changing global flags. None of 'LDFLAGS' are defined in the environment, not changing global flags. None of 'CPPFLAGS' are defined in the environment, not changing global flags. None of 'CC_LD' are defined in the environment, not changing global flags. Sanity testing C compiler: gcc Is cross compiler: False. None of 'CC_LD' are defined in the environment, not changing global flags. Sanity check compiler command line: gcc D:\Programme\SU2-7.1.1\build\meson-private\sanitycheckc.c -o D:\Programme\SU2-7.1.1\build\meson-private\sanitycheckc.exe -pipe Sanity check compile stdout:

-----
Sanity check compile stderr:

-----
Running test binary command: D:\Programme\SU2-7.1.1\build\meson-private\sanitycheckc.exe
C compiler for the build machine: gcc (gcc 8.1.0 "gcc (x86_64-posix-seh-rev0, Built by MinGW-W64 project) 8.1.0")
C linker for the build machine: gcc ld.bfd 2.30
None of 'AR' are defined in the environment, not changing global flags.
None of 'CXX' are defined in the environment, not changing global flags.
None of 'CXXFLAGS' are defined in the environment, not changing global flags.
None of 'LDFLAGS' are defined in the environment, not changing global flags.
None of 'CPPFLAGS' are defined in the environment, not changing global flags.
None of 'CXX_LD' are defined in the environment, not changing global flags.
Sanity testing C++ compiler: c++
Is cross compiler: False.
None of 'CXX_LD' are defined in the environment, not changing global flags.
Sanity check compiler command line: c++ D:\Programme\SU2-7.1.1\build\meson-private\sanitycheckcpp.cc -o D:\Programme\SU2-7.1.1\build\meson-private\sanitycheckcpp.exe -pipe
Sanity check compile stdout:

-----
Sanity check compile stderr:

-----
Running test binary command: D:\Programme\SU2-7.1.1\build\meson-private\sanitycheckcpp.exe
C++ compiler for the build machine: c++ (gcc 8.1.0 "c++ (x86_64-posix-seh-rev0, Built by MinGW-W64 project) 8.1.0")
C++ linker for the build machine: c++ ld.bfd 2.30
None of 'CC' are defined in the environment, not changing global flags.
None of 'CFLAGS' are defined in the environment, not changing global flags.
None of 'LDFLAGS' are defined in the environment, not changing global flags.
None of 'CPPFLAGS' are defined in the environment, not changing global flags.
None of 'CC_LD' are defined in the environment, not changing global flags.
Sanity testing C compiler: gcc
Is cross compiler: False.
None of 'CC_LD' are defined in the environment, not changing global flags.
Sanity check compiler command line: gcc D:\Programme\SU2-7.1.1\build\meson-private\sanitycheckc.c -o D:\Programme\SU2-7.1.1\build\meson-private\sanitycheckc.exe -pipe
Sanity check compile stdout:

-----
Sanity check compile stderr:

-----
Running test binary command: D:\Programme\SU2-7.1.1\build\meson-private\sanitycheckc.exe
C compiler for the host machine: gcc (gcc 8.1.0 "gcc (x86_64-posix-seh-rev0, Built by MinGW-W64 project) 8.1.0")
C linker for the host machine: gcc ld.bfd 2.30
None of 'AR' are defined in the environment, not changing global flags.
None of 'CXX' are defined in the environment, not changing global flags.
None of 'CXXFLAGS' are defined in the environment, not changing global flags.
None of 'LDFLAGS' are defined in the environment, not changing global flags.
None of 'CPPFLAGS' are defined in the environment, not changing global flags.
None of 'CXX_LD' are defined in the environment, not changing global flags.
Sanity testing C++ compiler: c++
Is cross compiler: False.
None of 'CXX_LD' are defined in the environment, not changing global flags.
Sanity check compiler command line: c++ D:\Programme\SU2-7.1.1\build\meson-private\sanitycheckcpp.cc -o D:\Programme\SU2-7.1.1\build\meson-private\sanitycheckcpp.exe -pipe
Sanity check compile stdout:

-----
Sanity check compile stderr:

-----
Running test binary command: D:\Programme\SU2-7.1.1\build\meson-private\sanitycheckcpp.exe
C++ compiler for the host machine: c++ (gcc 8.1.0 "c++ (x86_64-posix-seh-rev0, Built by MinGW-W64 project) 8.1.0")
C++ linker for the host machine: c++ ld.bfd 2.30
Build machine cpu family: x86_64
Build machine cpu: x86_64
Host machine cpu family: x86_64
Host machine cpu: x86_64
Target machine cpu family: x86_64
Target machine cpu: x86_64
Program python3 found: YES (C:\Users\KleineKampfzwergin\AppData\Local\Programs\Python\Python39\python.exe)
Pkg-config binary for MachineChoice.HOST is not cached.
None of 'PKG_CONFIG' are defined in the environment, not changing global flags.
Pkg-config binary missing from cross or native file, or env var undefined.
Trying a default Pkg-config fallback at pkg-config
Trying pkg-config binary pkg-config for machine MachineChoice.HOST at ['D:\\Programme\\pkg-config-lite-0.28-1_bin-win32\\pkg-config-lite-0.28-1\\bin\\pkg-config.EXE']
Found pkg-config: D:\Programme\pkg-config-lite-0.28-1_bin-win32\pkg-config-lite-0.28-1\bin\pkg-config.EXE (0.28)
Determining dependency 'ompi-c' with pkg-config executable 'D:\\Programme\\pkg-config-lite-0.28-1_bin-win32\\pkg-config-lite-0.28-1\\bin\\pkg-config.EXE'
PKG_CONFIG_PATH: 
Called `D:\Programme\pkg-config-lite-0.28-1_bin-win32\pkg-config-lite-0.28-1\bin\pkg-config.EXE --modversion ompi-c` -> 1

mpicc binary missing from cross or native file, or env var undefined.
Trying a default mpicc fallback at mpicc
mpicc found: NO
Run-time dependency MPI for c found: YES
Pkg-config binary for MachineChoice.HOST is cached.
Determining dependency 'ompi-cxx' with pkg-config executable 'D:\\Programme\\pkg-config-lite-0.28-1_bin-win32\\pkg-config-lite-0.28-1\\bin\\pkg-config.EXE'
PKG_CONFIG_PATH: 
Called `D:\Programme\pkg-config-lite-0.28-1_bin-win32\pkg-config-lite-0.28-1\bin\pkg-config.EXE --modversion ompi-cxx` -> 1

mpic++ binary missing from cross or native file, or env var undefined.
Trying a default mpic++ fallback at mpic++
Trying a default mpic++ fallback at mpicxx
Trying a default mpic++ fallback at mpiCC
mpic++ found: NO
Run-time dependency MPI for cpp found: NO (tried pkgconfig and config-tool)
Running command: C:\Users\KleineKampfzwergin\AppData\Local\Programs\Python\Python39\python.exe D:/Programme/SU2-7.1.1/meson_scripts/check_dir.py boost
--- stdout ---

--- stderr ---

Message: Boost sources found.
Program swig found: YES (D:\Programme\swigwin-4.0.2\swig.EXE)
Running command: C:\Users\KleineKampfzwergin\AppData\Local\Programs\Python\Python39\python.exe -c import mpi4py; print(mpi4py.get_include())
--- stdout ---
C:\Users\KleineKampfzwergin\AppData\Local\Programs\Python\Python39\lib\site-packages\mpi4py\include

--- stderr ---

Message: Using mpi4py from C:\Users\KleineKampfzwergin\AppData\Local\Programs\Python\Python39\lib\site-packages\mpi4py\include
"python-3.9-embed" could not be found in LIBPC (None), this is likely due to a relocated python installation
Pkg-config binary for MachineChoice.HOST is cached.
Determining dependency 'python-3.9-embed' with pkg-config executable 'D:\\Programme\\pkg-config-lite-0.28-1_bin-win32\\pkg-config-lite-0.28-1\\bin\\pkg-config.EXE'
PKG_CONFIG_PATH: 
Called `D:\Programme\pkg-config-lite-0.28-1_bin-win32\pkg-config-lite-0.28-1\bin\pkg-config.EXE --modversion python-3.9-embed` -> 1

Found "python-3.9-embed" via fallback pkgconfig lookup in PKG_CONFIG_LIBDIR/PKG_CONFIG_PATH
Found "python-3.9" via SYSCONFIG module
Dependency python found: YES (sysconfig)
Program install.sh found: YES (sh D:\Programme\SU2-7.1.1\SU2_PY/pySU2\install.sh)
Message: -------------------------------------------------------------------------
         |    ___ _   _ ___                                                      |
         |   / __| | | |_  )   Release 7.1.1 "Blackbird"                         |
         |   \__ \ |_| |/ /                                                      |
         |   |___/\___//___|   Meson Configuration Summary                       |
         |                                                                       |
         -------------------------------------------------------------------------

         Option          Value
         ---------------------
         TecIO:          true
         CGNS:           true
         AD (reverse):   true
         AD (forward):   true
         Python Wrapper: true
         Intel-MKL:      false
         OpenBlas:       false
         PaStiX:         false
         Mixed Float:    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=D:\Programme\SU2-7.1.1\bin/bin
         export SU2_HOME=D:\Programme\SU2-7.1.1
         export PATH=$PATH:$SU2_RUN
         export PYTHONPATH=$PYTHONPATH:$SU2_RUN

         Use './ninja -C D:\Programme\SU2-7.1.1\build install' to compile and install SU2

Build targets in project: 20

Found ninja.exe-1.9.0 at D:\Programme\SU2-7.1.1\ninja.exe
Running compile:
Working directory:  C:\Users\MANUEL~1\AppData\Local\Temp\tmpctmi2f32
Command line:  c++ C:\Users\MANUEL~1\AppData\Local\Temp\tmpctmi2f32\testfile.cpp -o C:\Users\MANUEL~1\AppData\Local\Temp\tmpctmi2f32\output.obj -pipe -c -std=c++11 

Code:
 int i = static_cast<int>(0);
Compiler stdout:

Compiler stderr:

Compiler accepts -std=c++11: YES
Running compile:
Working directory:  D:\Programme\SU2-7.1.1\build\meson-private\tmp380_12oo
Command line:  c++ D:\Programme\SU2-7.1.1\build\meson-private\tmp380_12oo\testfile.cpp -o D:\Programme\SU2-7.1.1\build\meson-private\tmp380_12oo\output.obj -pipe -c -O0 -fpermissive --print-search-dirs 

Code:

Compiler stdout:
 install: C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/
programs: =C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/../libexec/gcc/x86_64-w64-mingw32/8.1.0/;C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/../libexec/gcc/;C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/x86_64-w64-mingw32/8.1.0/;C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/
libraries: =C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/;C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/../lib/gcc/;C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/lib/x86_64-w64-mingw32/8.1.0/;C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/lib/../lib/;C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../x86_64-w64-mingw32/8.1.0/;C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../lib/;C:/mingw810/x86_64-810-posix-seh-rt_v6-rev0/mingw64/mingw/lib/x86_64-w64-mingw32/8.1.0/;C:/mingw810/x86_64-810-posix-seh-rt_v6-rev0/mingw64/mingw/lib/../lib/;C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/lib/;C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../;C:/mingw810/x86_64-810-posix-seh-rt_v6-rev0/mingw64/mingw/lib/

Compiler stderr:
In Command Window i got this message: Message: ------------------------------------------------------------------------- / __ _ ) Release 7.1.1 "Blackbird" __ \ _ / / /\//___ Meson Configuration Summary
     -------------------------------------------------------------------------

     Option          Value
     ---------------------
     TecIO:          true
     CGNS:           true
     AD (reverse):   true
     AD (forward):   true
     Python Wrapper: true
     Intel-MKL:      false
     OpenBlas:       false
     PaStiX:         false
     Mixed Float:    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=D:\Programme\SU2-7.1.1\bin/bin
     export SU2_HOME=D:\Programme\SU2-7.1.1
     export PATH=$PATH:$SU2_RUN
     export PYTHONPATH=$PYTHONPATH:$SU2_RUN

     Use './ninja -C D:\Programme\SU2-7.1.1\build install' to compile and install SU2

Build targets in project: 20

Found ninja.exe-1.9.0 at D:\Programme\SU2-7.1.1\ninja.exe Traceback (most recent call last): File "D:\Programme\SU2-7.1.1\externals\meson\mesonbuild\mesonmain.py", line 131, in run return options.run_func(options) File "D:\Programme\SU2-7.1.1\externals\meson\mesonbuild\msetup.py", line 245, in run app.generate() File "D:\Programme\SU2-7.1.1\externals\meson\mesonbuild\msetup.py", line 159, in generate self._generate(env) File "D:\Programme\SU2-7.1.1\externals\meson\mesonbuild\msetup.py", line 215, in _generate intr.backend.generate() File "D:\Programme\SU2-7.1.1\externals\meson\mesonbuild\backend\ninjabackend.py", line 321, in generate self.generate_target(t) File "D:\Programme\SU2-7.1.1\externals\meson\mesonbuild\backend\ninjabackend.py", line 641, in generate_target elem = self.generate_link(target, outname, obj_list, linker, pch_objects, stdlib_args=stdlib_args) File "D:\Programme\SU2-7.1.1\externals\meson\mesonbuild\backend\ninjabackend.py", line 2571, in generate_link dep_targets.extend(self.guess_external_link_dependencies(linker, target, commands, internal)) File "D:\Programme\SU2-7.1.1\externals\meson\mesonbuild\backend\ninjabackend.py", line 2453, in guess_external_link_dependencies staticlibs = self.guess_library_absolute_path(linker, libname, File "D:\Programme\SU2-7.1.1\externals\meson\mesonbuild\backend\ninjabackend.py", line 2395, in guess_library_absolute_path trial = CCompiler._get_file_from_list(self.environment, trial) File "D:\Programme\SU2-7.1.1\externals\meson\mesonbuild\compilers\mixins\clike.py", line 922, in _get_file_from_list if f.is_file(): File "C:\Users\KleineKampfzwergin\AppData\Local\Programs\Python\Python39\lib\pathlib.py", line 1439, in is_file return S_ISREG(self.stat().st_mode) File "C:\Users\KleineKampfzwergin\AppData\Local\Programs\Python\Python39\lib\pathlib.py", line 1221, in stat return self._accessor.stat(self) OSError: [WinError 123] Die Syntax für den Dateinamen, Verzeichnisnamen oder die Datenträgerbezeichnung ist falsch: 'C:\Program Files\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin\..\lib\gcc\x86_64-w64-mingw32\8.1.0\libC:\Program Files (x86)\Microsoft SDKs\MPI\Lib\x64\msmpi.a'

I saw this problem in error #1047 and #1048 but ther is no solution.

Maybe you can help me, how i can solve this problem.

Thank you very much.