Closed jginternational closed 4 years ago
Hi @jginternational, I added one missing call to Kratos API in #5683 in the potential flow (in compute_embedded_lift_process). As for the other processes, I am not sure what is the cause
@jginternational I cannot reproduce the errors from Fluid in the current master, not even if I compile the CompressiblePotentialFlow too. Are you compiling some other application dependent on Fluid?
@jcotela My configure.bat looks like:
del CMakeCache.txt
cmake -G "Visual Studio 16 2019" -A x64 ^
-DCMAKE_BUILD_TYPE=Release ^
-DCMAKE_CXX_FLAGS=" -D_SCL_SECURE_NO_WARNINGS " ^
-DBOOST_ROOT="E:\PROYECTOS\Boost\boost_1_66_0" ^
-DLAPACK_LIBRARIES="E:\PROYECTOS\LibsPack64\liblapack.lib" ^
-DPYTHON_EXECUTABLE="E:\Python\python.exe" ^
-DBLAS_LIBRARIES="E:\PROYECTOS\LibsPack64\libblas.lib" ^
-DMESHING_APPLICATION=ON ^
-DEXTERNAL_SOLVERS_APPLICATION=ON ^
-DSOLID_MECHANICS_APPLICATION=ON ^
-DCONSTITUTIVE_MODELS_APPLICATION=ON ^
-DSTRUCTURAL_MECHANICS_APPLICATION=ON ^
-DCONTACT_MECHANICS_APPLICATION=ON ^
-DCONTACT_STRUCTURAL_MECHANICS_APPLICATION=ON ^
-DEIGEN_SOLVERS_APPLICATION=ON ^
-DEIGEN_ROOT="E:\PROYECTOS\Eigen" ^
-DPARTICLE_MECHANICS_APPLICATION=ON ^
-DMAPPING_APPLICATION=ON ^
-DEMPIRE_APPLICATION=ON ^
-DCOMPRESSIBLE_POTENTIAL_FLOW_APPLICATION=ON ^
-DCONVECTION_DIFFUSION_APPLICATION=ON ^
-DFLUID_DYNAMICS_APPLICATION=ON ^
-DMESH_MOVING_APPLICATION=ON ^
-DDELAUNAY_MESHING_APPLICATION=ON ^
-DPFEM_APPLICATION=ON ^
-DPFEM_SOLID_MECHANICS_APPLICATION=ON ^
-DPFEM_FLUID_DYNAMICS_APPLICATION=ON ^
-DFSI_APPLICATION=ON ^
-DDEM_APPLICATION=ON ^
-DSWIMMING_DEM_APPLICATION=ON ^
-DINSTALL_PYTHON_FILES=ON ^
-DINSTALL_EMBEDDED_PYTHON=ON ^
-DKRATOS_BUILD_TESTING=OFF ^
-DKRATOS_INSTALL_PREFIX="E:\KratosDeploy" ^
..
Only happens in windows. I'm trying it now in a clean machine
Could you please try compiling only the FluidDynamicsApplication? (without the CompressiblePotentialFlowApplication)
It compiled for FluidDynamics on it's own (disabling the Compressible Potential Flow)
Now (since todays PR) this happens also for Structural Mechanics @KratosMultiphysics/structural-mechanics
1>------ Build started: Project: KratosStructuralMechanicsCore, Configuration: Release x64 ------
1>Building Custom Rule E:/PROYECTOS/Kratos/applications/StructuralMechanicsApplication/CMakeLists.txt
1>CMake does not need to re-run because E:/PROYECTOS/Kratos/cmake_build/applications/StructuralMechanicsApplication/CMakeFiles/generate.stamp is up-to-date.
1> Creating library E:/PROYECTOS/Kratos/cmake_build/applications/StructuralMechanicsApplication/Release/KratosStructuralMechanicsCore.lib and object E:/PROYECTOS/Kratos/cmake_build/applications/StructuralMechanicsApplication/Release/KratosStructuralMechanicsCore.exp
1>structural_mechanics_application.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl Kratos::AdjointFiniteDifferencingSmallDisplacementElement<class Kratos::SmallDisplacement>::CalculateStressDisplacementDerivative(class Kratos::Variable<class boost::numeric::ublas::vector<double,class boost::numeric::ublas::unbounded_array<double,class std::allocator<double> > > > const &,class boost::numeric::ublas::matrix<double,struct boost::numeric::ublas::basic_row_major<unsigned __int64,__int64>,class boost::numeric::ublas::unbounded_array<double,class std::allocator<double> > > &,class Kratos::ProcessInfo const &)" (?CalculateStressDisplacementDerivative@?$AdjointFiniteDifferencingSmallDisplacementElement@VSmallDisplacement@Kratos@@@Kratos@@UEAAXAEBV?$Variable@V?$vector@NV?$unbounded_array@NV?$allocator@N@std@@@ublas@numeric@boost@@@ublas@numeric@boost@@@2@AEAV?$matrix@NU?$basic_row_major@_K_J@ublas@numeric@boost@@V?$unbounded_array@NV?$allocator@N@std@@@234@@ublas@numeric@boost@@AEBVProcessInfo@2@@Z)
1>structural_mechanics_application.obj : error LNK2001: unresolved external symbol "public: virtual int __cdecl Kratos::AdjointFiniteDifferencingSmallDisplacementElement<class Kratos::SmallDisplacement>::Check(class Kratos::ProcessInfo const &)" (?Check@?$AdjointFiniteDifferencingSmallDisplacementElement@VSmallDisplacement@Kratos@@@Kratos@@UEAAHAEBVProcessInfo@2@@Z)
1>structural_mechanics_application.obj : error LNK2019: unresolved external symbol "private: virtual void __cdecl Kratos::AdjointFiniteDifferencingSmallDisplacementElement<class Kratos::SmallDisplacement>::save(class Kratos::Serializer &)const " (?save@?$AdjointFiniteDifferencingSmallDisplacementElement@VSmallDisplacement@Kratos@@@Kratos@@EEBAXAEAVSerializer@2@@Z) referenced in function "[thunk]:private: virtual void __cdecl Kratos::AdjointFiniteDifferencingSmallDisplacementElement<class Kratos::SmallDisplacement>::save`adjustor{16}' (class Kratos::Serializer &)const " (?save@?$AdjointFiniteDifferencingSmallDisplacementElement@VSmallDisplacement@Kratos@@@Kratos@@GBA@EBAXAEAVSerializer@2@@Z)
1>structural_mechanics_application.obj : error LNK2019: unresolved external symbol "private: virtual void __cdecl Kratos::AdjointFiniteDifferencingSmallDisplacementElement<class Kratos::SmallDisplacement>::load(class Kratos::Serializer &)" (?load@?$AdjointFiniteDifferencingSmallDisplacementElement@VSmallDisplacement@Kratos@@@Kratos@@EEAAXAEAVSerializer@2@@Z) referenced in function "[thunk]:private: virtual void __cdecl Kratos::AdjointFiniteDifferencingSmallDisplacementElement<class Kratos::SmallDisplacement>::load`adjustor{16}' (class Kratos::Serializer &)" (?load@?$AdjointFiniteDifferencingSmallDisplacementElement@VSmallDisplacement@Kratos@@@Kratos@@GBA@EAAXAEAVSerializer@2@@Z)
1>E:\PROYECTOS\Kratos\cmake_build\applications\StructuralMechanicsApplication\Release\KratosStructuralMechanicsCore.dll : fatal error LNK1120: 4 unresolved externals
1>Done building project "KratosStructuralMechanicsCore.vcxproj" -- FAILED.
2>------ Build started: Project: KratosStructuralMechanicsApplication, Configuration: Release x64 ------
2>Building Custom Rule E:/PROYECTOS/Kratos/applications/StructuralMechanicsApplication/CMakeLists.txt
2>CMake does not need to re-run because E:/PROYECTOS/Kratos/cmake_build/applications/StructuralMechanicsApplication/CMakeFiles/generate.stamp is up-to-date.
2> Creating library E:/PROYECTOS/Kratos/cmake_build/applications/StructuralMechanicsApplication/Release/KratosStructuralMechanicsApplication.lib and object E:/PROYECTOS/Kratos/cmake_build/applications/StructuralMechanicsApplication/Release/KratosStructuralMechanicsApplication.exp
2>add_custom_response_functions_to_python.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __cdecl Kratos::AdjointMaxStressResponseFunction::AdjointMaxStressResponseFunction(class Kratos::ModelPart &,class Kratos::Parameters)" (__imp_??0AdjointMaxStressResponseFunction@Kratos@@QEAA@AEAVModelPart@1@VParameters@1@@Z) referenced in function "public: class pybind11::handle __cdecl <lambda_667106dddf4f721698341743ae4d674a>::operator()(struct pybind11::detail::function_call &)const " (??R<lambda_667106dddf4f721698341743ae4d674a>@@QEBA?AVhandle@pybind11@@AEAUfunction_call@detail@2@@Z)
2>add_custom_response_functions_to_python.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __cdecl Kratos::AdjointMaxStressResponseFunction::~AdjointMaxStressResponseFunction(void)" (__imp_??1AdjointMaxStressResponseFunction@Kratos@@UEAA@XZ) referenced in function "public: virtual void * __cdecl Kratos::AdjointMaxStressResponseFunction::`scalar deleting destructor'(unsigned int)" (??_GAdjointMaxStressResponseFunction@Kratos@@UEAAPEAXI@Z)
2>add_custom_response_functions_to_python.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl Kratos::AdjointMaxStressResponseFunction::CalculateGradient(class Kratos::Element const &,class boost::numeric::ublas::matrix<double,struct boost::numeric::ublas::basic_row_major<unsigned __int64,__int64>,class boost::numeric::ublas::unbounded_array<double,class std::allocator<double> > > const &,class boost::numeric::ublas::vector<double,class boost::numeric::ublas::unbounded_array<double,class std::allocator<double> > > &,class Kratos::ProcessInfo const &)" (?CalculateGradient@AdjointMaxStressResponseFunction@Kratos@@UEAAXAEBVElement@2@AEBV?$matrix@NU?$basic_row_major@_K_J@ublas@numeric@boost@@V?$unbounded_array@NV?$allocator@N@std@@@234@@ublas@numeric@boost@@AEAV?$vector@NV?$unbounded_array@NV?$allocator@N@std@@@ublas@numeric@boost@@@567@AEBVProcessInfo@2@@Z)
2>add_custom_response_functions_to_python.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl Kratos::AdjointMaxStressResponseFunction::CalculatePartialSensitivity(class Kratos::Condition &,class Kratos::Variable<double> const &,class boost::numeric::ublas::matrix<double,struct boost::numeric::ublas::basic_row_major<unsigned __int64,__int64>,class boost::numeric::ublas::unbounded_array<double,class std::allocator<double> > > const &,class boost::numeric::ublas::vector<double,class boost::numeric::ublas::unbounded_array<double,class std::allocator<double> > > &,class Kratos::ProcessInfo const &)" (?CalculatePartialSensitivity@AdjointMaxStressResponseFunction@Kratos@@UEAAXAEAVCondition@2@AEBV?$Variable@N@2@AEBV?$matrix@NU?$basic_row_major@_K_J@ublas@numeric@boost@@V?$unbounded_array@NV?$allocator@N@std@@@234@@ublas@numeric@boost@@AEAV?$vector@NV?$unbounded_array@NV?$allocator@N@std@@@ublas@numeric@boost@@@678@AEBVProcessInfo@2@@Z)
2>add_custom_response_functions_to_python.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl Kratos::AdjointMaxStressResponseFunction::CalculatePartialSensitivity(class Kratos::Condition &,class Kratos::Variable<class Kratos::array_1d<double,3> > const &,class boost::numeric::ublas::matrix<double,struct boost::numeric::ublas::basic_row_major<unsigned __int64,__int64>,class boost::numeric::ublas::unbounded_array<double,class std::allocator<double> > > const &,class boost::numeric::ublas::vector<double,class boost::numeric::ublas::unbounded_array<double,class std::allocator<double> > > &,class Kratos::ProcessInfo const &)" (?CalculatePartialSensitivity@AdjointMaxStressResponseFunction@Kratos@@UEAAXAEAVCondition@2@AEBV?$Variable@V?$array_1d@N$02@Kratos@@@2@AEBV?$matrix@NU?$basic_row_major@_K_J@ublas@numeric@boost@@V?$unbounded_array@NV?$allocator@N@std@@@234@@ublas@numeric@boost@@AEAV?$vector@NV?$unbounded_array@NV?$allocator@N@std@@@ublas@numeric@boost@@@678@AEBVProcessInfo@2@@Z)
2>add_custom_response_functions_to_python.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl Kratos::AdjointMaxStressResponseFunction::CalculatePartialSensitivity(class Kratos::Element &,class Kratos::Variable<double> const &,class boost::numeric::ublas::matrix<double,struct boost::numeric::ublas::basic_row_major<unsigned __int64,__int64>,class boost::numeric::ublas::unbounded_array<double,class std::allocator<double> > > const &,class boost::numeric::ublas::vector<double,class boost::numeric::ublas::unbounded_array<double,class std::allocator<double> > > &,class Kratos::ProcessInfo const &)" (?CalculatePartialSensitivity@AdjointMaxStressResponseFunction@Kratos@@UEAAXAEAVElement@2@AEBV?$Variable@N@2@AEBV?$matrix@NU?$basic_row_major@_K_J@ublas@numeric@boost@@V?$unbounded_array@NV?$allocator@N@std@@@234@@ublas@numeric@boost@@AEAV?$vector@NV?$unbounded_array@NV?$allocator@N@std@@@ublas@numeric@boost@@@678@AEBVProcessInfo@2@@Z)
2>add_custom_response_functions_to_python.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl Kratos::AdjointMaxStressResponseFunction::CalculatePartialSensitivity(class Kratos::Element &,class Kratos::Variable<class Kratos::array_1d<double,3> > const &,class boost::numeric::ublas::matrix<double,struct boost::numeric::ublas::basic_row_major<unsigned __int64,__int64>,class boost::numeric::ublas::unbounded_array<double,class std::allocator<double> > > const &,class boost::numeric::ublas::vector<double,class boost::numeric::ublas::unbounded_array<double,class std::allocator<double> > > &,class Kratos::ProcessInfo const &)" (?CalculatePartialSensitivity@AdjointMaxStressResponseFunction@Kratos@@UEAAXAEAVElement@2@AEBV?$Variable@V?$array_1d@N$02@Kratos@@@2@AEBV?$matrix@NU?$basic_row_major@_K_J@ublas@numeric@boost@@V?$unbounded_array@NV?$allocator@N@std@@@234@@ublas@numeric@boost@@AEAV?$vector@NV?$unbounded_array@NV?$allocator@N@std@@@ublas@numeric@boost@@@678@AEBVProcessInfo@2@@Z)
2>add_custom_response_functions_to_python.obj : error LNK2001: unresolved external symbol "public: virtual double __cdecl Kratos::AdjointMaxStressResponseFunction::CalculateValue(class Kratos::ModelPart &)" (?CalculateValue@AdjointMaxStressResponseFunction@Kratos@@UEAANAEAVModelPart@2@@Z)
2>E:\PROYECTOS\Kratos\cmake_build\applications\StructuralMechanicsApplication\Release\KratosStructuralMechanicsApplication.pyd : fatal error LNK1120: 8 unresolved externals
2>Done building project "KratosStructuralMechanicsApplication.vcxproj" -- FAILED.
========== Build: 0 succeeded, 2 failed, 5 up-to-date, 0 skipped ==========
It happens something similar in Win with the Meshing App...
@dbaumgaertner
That is strange, as I tried it yesterday on Windows and did not have any issues. I will look into it and comment here on any updates.
@jginternational @philbucher Regarding the linking problem arising from the StructuralMechanicsApp. I tried a compilation of the latest master on Windows and it runs through without any issues. So, unfortunately, I can not reproduce the error. Obviously, also the continuous integration did not complain.
Does somebody else also observe this problem? Just to see if it is a systematic error.
@jginternational Which VisualStudio are you using and which build type?
@dbaumgaertner The structural issue is no longer happening so I think that's been fixed.
The only one that it's still having problems is the Compressible Potential Flow
This is the current message:
1>------ Build started: Project: KratosCompressiblePotentialFlowCore, Configuration: Release x64 ------
1>Building Custom Rule E:/PROYECTOS/Kratos/applications/CompressiblePotentialFlowApplication/CMakeLists.txt
1>CMake does not need to re-run because E:/PROYECTOS/Kratos/cmake_build/applications/CompressiblePotentialFlowApplication/CMakeFiles/generate.stamp is up-to-date.
1> Creating library E:/PROYECTOS/Kratos/cmake_build/applications/CompressiblePotentialFlowApplication/Release/KratosCompressiblePotentialFlowCore.lib and object E:/PROYECTOS/Kratos/cmake_build/applications/CompressiblePotentialFlowApplication/Release/KratosCompressiblePotentialFlowCore.exp
1>compute_nodal_potential_flow_velocity_process.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) const Kratos::ComputeNodalPotentialFlowVelocityProcess::`vftable'" (__imp_??_7ComputeNodalPotentialFlowVelocityProcess@Kratos@@6B@) referenced in function "public: __cdecl Kratos::ComputeNodalPotentialFlowVelocityProcess::ComputeNodalPotentialFlowVelocityProcess(class Kratos::ModelPart &)" (??0ComputeNodalPotentialFlowVelocityProcess@Kratos@@QEAA@AEAVModelPart@1@@Z)
1>E:\PROYECTOS\Kratos\cmake_build\applications\CompressiblePotentialFlowApplication\Release\KratosCompressiblePotentialFlowCore.dll : fatal error LNK1120: 1 unresolved externals
1>Done building project "KratosCompressiblePotentialFlowCore.vcxproj" -- FAILED.
2>------ Build started: Project: KratosCompressiblePotentialFlowApplication, Configuration: Release x64 ------
2>Building Custom Rule E:/PROYECTOS/Kratos/applications/CompressiblePotentialFlowApplication/CMakeLists.txt
2>CMake does not need to re-run because E:/PROYECTOS/Kratos/cmake_build/applications/CompressiblePotentialFlowApplication/CMakeFiles/generate.stamp is up-to-date.
2> Creating library E:/PROYECTOS/Kratos/cmake_build/applications/CompressiblePotentialFlowApplication/Release/KratosCompressiblePotentialFlowApplication.lib and object E:/PROYECTOS/Kratos/cmake_build/applications/CompressiblePotentialFlowApplication/Release/KratosCompressiblePotentialFlowApplication.exp
2>add_custom_processes_to_python.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __cdecl Kratos::ComputeNodalPotentialFlowVelocityProcess::~ComputeNodalPotentialFlowVelocityProcess(void)" (__imp_??1ComputeNodalPotentialFlowVelocityProcess@Kratos@@UEAA@XZ) referenced in function "public: virtual void * __cdecl Kratos::ComputeNodalPotentialFlowVelocityProcess::`scalar deleting destructor'(unsigned int)" (??_GComputeNodalPotentialFlowVelocityProcess@Kratos@@UEAAPEAXI@Z)
2>add_custom_processes_to_python.obj : error LNK2001: unresolved external symbol "public: virtual class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl Kratos::ComputeNodalPotentialFlowVelocityProcess::Info(void)const " (?Info@ComputeNodalPotentialFlowVelocityProcess@Kratos@@UEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ)
2>add_custom_processes_to_python.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl Kratos::ComputeNodalPotentialFlowVelocityProcess::PrintData(class std::basic_ostream<char,struct std::char_traits<char> > &)const " (?PrintData@ComputeNodalPotentialFlowVelocityProcess@Kratos@@UEBAXAEAV?$basic_ostream@DU?$char_traits@D@std@@@std@@@Z)
2>add_custom_processes_to_python.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl Kratos::ComputeNodalPotentialFlowVelocityProcess::PrintInfo(class std::basic_ostream<char,struct std::char_traits<char> > &)const " (?PrintInfo@ComputeNodalPotentialFlowVelocityProcess@Kratos@@UEBAXAEAV?$basic_ostream@DU?$char_traits@D@std@@@std@@@Z)
2>E:\PROYECTOS\Kratos\cmake_build\applications\CompressiblePotentialFlowApplication\Release\KratosCompressiblePotentialFlowApplication.pyd : fatal error LNK1120: 4 unresolved externals
2>Done building project "KratosCompressiblePotentialFlowApplication.vcxproj" -- FAILED.
========== Build: 0 succeeded, 2 failed, 6 up-to-date, 0 skipped ==========
Maybe @roigcarlo can bring some light
@jginternational #5757 should fix the compilation error
Probably related with the kratos api thing #5525