CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   SU2 Installation (https://www.cfd-online.com/Forums/su2-installation/)
-   -   Problems with ninja command (https://www.cfd-online.com/Forums/su2-installation/248968-problems-ninja-command.html)

Gianmarco$ April 12, 2023 09:02

Problems with ninja command
 
After downloading the source code of SU2 7.5.1 from github and switching to the 'develop' branch from the 'master' one, I tried to build the 'build' (enabling CoolProp and disabling CGNS support) via the command

./meson.py build -Denable-coolprop=true -Denable-cgns=false

This seemed to work. When I run the command to install

./ninja -C build install

I get the following error:

[497/509] Linking target SU2_GEO/src/SU2_GEO
FAILED: SU2_GEO/src/SU2_GEO
c++ -o SU2_GEO/src/SU2_GEO SU2_GEO/src/SU2_GEO.p/SU2_GEO.cpp.o -Wl,--as-needed -Wl,--no-undefined -Wl,-O1 -Wl,-rpath,/usr/lib/x86_64-linux-gnu/openmpi/lib -Wl,-rpath-link,/usr/lib/x86_64-linux-gnu/openmpi/lib -Wl,--start-group externals/metis/libmetis.a externals/parmetis/libparmetis.a externals/tecio/teciompisrc/libteciompi.a subprojects/CoolProp/libCoolProp.a Common/src/libSU2Common.a -L/usr/lib/x86_64-linux-gnu/openmpi/lib -L/usr//lib -lmpi /usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi_cxx.so -L/usr/lib/x86_64-linux-gnu/openmpi/lib -L/usr//lib -lmpi -L/usr/lib/x86_64-linux-gnu/openmpi/lib -L/usr//lib -lmpi -L/usr/lib/x86_64-linux-gnu/openmpi/lib -L/usr//lib -lmpi -L/usr/lib/x86_64-linux-gnu/openmpi/lib -L/usr//lib -lmpi -L/usr/lib/x86_64-linux-gnu/openmpi/lib -L/usr//lib -lmpi -L/usr/lib/x86_64-linux-gnu/openmpi/lib -L/usr//lib -lmpi -L/usr/lib/x86_64-linux-gnu/openmpi/lib -L/usr//lib -lmpi -Wl,--end-group
/usr/bin/ld: impossibile trovare -lmpi
/usr/bin/ld: impossibile trovare -lmpi
/usr/bin/ld: impossibile trovare -lmpi
/usr/bin/ld: impossibile trovare -lmpi
/usr/bin/ld: impossibile trovare -lmpi
/usr/bin/ld: impossibile trovare -lmpi
/usr/bin/ld: impossibile trovare -lmpi
/usr/bin/ld: impossibile trovare -lmpi
collect2: error: ld returned 1 exit status
[502/509] Compiling C++ object SU2_DEF/src/SU2_DEF.p/drivers_CDiscAdjDeformationDriver.cpp.o
ninja: build stopped: subcommand failed.


What I tried then was to disable the MPI support and try again with the ninja command. This time I got a different error:

[405/411] Linking target SU2_CFD/src/SU2_CFD
FAILED: SU2_CFD/src/SU2_CFD
c++ -o SU2_CFD/src/SU2_CFD SU2_CFD/src/SU2_CFD.p/SU2_CFD.cpp.o -Wl,--as-needed -Wl,--no-undefined -Wl,-O1 -Wl,--start-group SU2_CFD/src/libSU2core.a externals/tecio/teciosrc/libtecio.a subprojects/CoolProp/libCoolProp.a Common/src/libSU2Common.a -Wl,--end-group -pthread
subprojects/CoolProp/libCoolProp.a.p/src_Backends_REFPROP_REFPROPMixtureBackend.cpp.o: nella funzione "getFunctionPointer(char const*, DLLNameManglingStyle)":
REFPROPMixtureBackend.cpp:(.text+0xcc4): riferimento non definito a "dlsym"
subprojects/CoolProp/libCoolProp.a.p/src_Backends_REFPROP_REFPROPMixtureBackend.cpp.o: nella funzione "load_REFPROP(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)":
REFPROPMixtureBackend.cpp:(.text+0x2108): riferimento non definito a "dlopen"
REFPROPMixtureBackend.cpp:(.text+0x2561): riferimento non definito a "dlerror"
subprojects/CoolProp/libCoolProp.a.p/src_Backends_REFPROP_REFPROPMixtureBackend.cpp.o: nella funzione "unload_REFPROP(std::__cxx11::basic_string<cha r, std::char_traits<char>, std::allocator<char> >&)":
REFPROPMixtureBackend.cpp:(.text+0x278c): riferimento non definito a "dlclose"
REFPROPMixtureBackend.cpp:(.text+0x27d1): riferimento non definito a "dlerror"
collect2: error: ld returned 1 exit status
[407/411] Compiling C++ object SU2_DEF/src/SU2_DEF.p/drivers_CDiscAdjDeformationDriver.cpp.o
ninja: build stopped: subcommand failed


Has anyone faced this problem before or can someone help me to solve it?

PENGGEGE777 April 12, 2023 11:27

Hi, thanks for your interest in SU2 and CoolProp.


I succeeded the compilation and what I did is the following:


1. download SU2 develop branch
$ git clone https://github.com/su2code/SU2.git --branch=develop

2. compile
$ ./meson.py build -Denable-coolprop=true -Denable-cgns=false -Dwith-mpi=enabled --prefix=/home/yan/Downloads
3. build
$ ./ninja -C build install -j 4


If you encounter some issue with mpi, you can try:
$ sudo apt install libopenmpi-dev


Good luck.

Vinzmann June 26, 2023 06:45

Hello Penggege,

I cannot figure out how to install SU2 with coolprop enabled.

When using ninja, I get errors like:

Code:

Compiling C++ object subprojects/CoolProp/libCoolProp.a.p/src_CPfilepaths.cpp.o
FAILED: subprojects/CoolProp/libCoolProp.a.p/src_CPfilepaths.cpp.o
c++ -Isubprojects/CoolProp/libCoolProp.a.p -Isubprojects/CoolProp -I../subprojects/CoolProp -I../subprojects/CoolProp/externals/Eigen -I../subprojects/CoolProp/externals/fmtlib -I../subprojects/CoolProp/include -I../subprojects/CoolProp/src -Isubprojects/CoolProp/__CMake_build -I../subprojects/CoolProp/__CMake_build -D_FILE_OFFSET_BITS=64 -std=gnu++11 -O3 -fPIC -m64 -DSHARED_PTR_TR1_MEMORY_HEADER -DSHARED_PTR_TR1_NAMESPACE -MD -MQ subprojects/CoolProp/libCoolProp.a.p/src_CPfilepaths.cpp.o -MF subprojects/CoolProp/libCoolProp.a.p/src_CPfilepaths.cpp.o.d -o subprojects/CoolProp/libCoolProp.a.p/src_CPfilepaths.cpp.o -c ../subprojects/CoolProp/src/CPfilepaths.cpp
In file included from ../subprojects/CoolProp/src/CPfilepaths.cpp:4:0:
../subprojects/CoolProp/include/CPstrings.h:14:103: fatal error: fmt/format.h: No such file or directory
 #    include "fmt/format.h"  // For addition of the string formatting functions and macros from fmtlib
                                                                                                      ^
compilation terminated.
[534/850] Compiling C++ object Common/src/libSU2Common.a.p/CConfig.cpp.o
ninja: build stopped: subcommand failed.

Would you have any idea on how I can install SU2 with coolprop?

I am building with Cmake from Source. SU2 Version is blackbird.

Thanks a bunch,
Vinz

bigfootedrockmidget June 26, 2023 17:12

it looks like you are missing the fmt package. I think it's called libfmt-dev so you could try installing that with apt-get.


All times are GMT -4. The time now is 19:54.