Kratos Multiphysics Forums

Kratos installation/compilation issues => Compilation => Topic started by: Juliano on March 21, 2016, 06:36:31 PM

Title: Compilation Issues on Windows 7
Post by: Juliano on March 21, 2016, 06:36:31 PM
Hi guys,

I'm having trouble compiling Kratos for Windows 7. I'm using Visual Studio 2015; CMake 3.5.0; Python 34; boost 1.59.0.
I think it is an error on Visual Studio. All the other procedures seem to have finalized without errors (e.g. configure.bat showing "Found boost python libraries" and "Configuring done!"). On VStudio, however, it shows "21 succeeded, 5 failed, 0 up-to-date, 0 skipped".

The problem is that not all the files are inside the installation directory. Should all of them be there? Or should some of them be inside "cmake_build" (for manual copying)? Because Kratos's .exe can be found on "C:\KratosInstall\cmake_build\embedded_python\Release" after building.

Regards,
Juliano.
Title: Re: Compilation Issues on Windows 7
Post by: Miguel Angel Celigueta on March 21, 2016, 06:43:27 PM
Hi Juliano,
can you copy and paste some of the errors you are getting when Kratos is being compiled?
Apart from the compilation errors, the result of the compilation is a set of dynamic libraries (.dll and .pyd), no exe is generated, because Kratos is called directly from Python, as a library.
Regards,
Miguel Angel
Title: Re: Compilation Issues on Windows 7
Post by: Juliano on March 21, 2016, 07:01:16 PM
The errors are something like this:

4>LINK : fatal error LNK1181: cannot open input file 'KratosPfemBaseApplication.lib'
2>     Creating library C:/KratosInstall/cmake_build/applications/ExternalSolversApplication/Release/KratosExternalSolversApplication.lib and object C:/KratosInstall/cmake_build/applications/ExternalSolversApplication/Release/KratosExternalSolversApplication.exp
2>superlu.lib(dlacon.obj) : error LNK2001: unresolved external symbol dcopy_
2>add_linear_solvers_to_python.obj : error LNK2001: unresolved external symbol dcopy_
2>superlu.lib(dfgmr.obj) : error LNK2001: unresolved external symbol dcopy_
2>superlu.lib(ilu_dcopy_to_ucol.obj) : error LNK2001: unresolved external symbol dcopy_
2>superlu.lib(ilu_ddrop_row.obj) : error LNK2001: unresolved external symbol dcopy_
2>add_linear_solvers_to_python.obj : error LNK2019: unresolved external symbol dnrm2_ referenced in function "public: virtual bool __cdecl Kratos::SuperLUIterativeSolver<class Kratos::UblasSpace<double,class boost::numeric::ublas::compressed_matrix<double,struct boost::numeric::ublas::basic_row_major<unsigned __int64,__int64>,0,class boost::numeric::ublas::unbounded_array<unsigned __int64,class std::allocator<unsigned __int64> >,class boost::numeric::ublas::unbounded_array<double,class std::allocator<double> > >,class boost::numeric::ublas::vector<double,class boost::numeric::ublas::unbounded_array<double,class std::allocator<double> > > >,class Kratos::UblasSpace<double,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 boost::numeric::ublas::vector<double,class boost::numeric::ublas::unbounded_array<double,class std::allocator<double> > > >,class Kratos::Reorderer<class Kratos::UblasSpace<double,class boost::numeric::ublas::compressed_matrix<double,struct boost::numeric::ublas::basic_row_major<unsigned __int64,__int64>,0,class boost::numeric::ublas::unbounded_array<unsigned __int64,class std::allocator<unsigned __int64> >,class boost::numeric::ublas::unbounded_array<double,class std::allocator<double> > >,class boost::numeric::ublas::vector<double,class boost::numeric::ublas::unbounded_array<double,class std::allocator<double> > > >,class Kratos::UblasSpace<double,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 boost::numeric::ublas::vector<double,class boost::numeric::ublas::unbounded_array<double,class std::allocator<double> > > > > >::Solve(class boost::numeric::ublas::compressed_matrix<double,struct boost::numeric::ublas::basic_row_major<unsigned __int64,__int64>,0,class boost::numeric::ublas::unbounded_array<unsigned __int64,class std::allocator<unsigned __int64> >,class boost::numeric::ublas::unbounded_array<double,class std::allocator<double> > > &,class boost::numeric::ublas::vector<double,class boost::numeric::ublas::unbounded_array<double,class std::allocator<double> > > &,class boost::numeric::ublas::vector<double,class boost::numeric::ublas::unbounded_array<double,class std::allocator<double> > > &)" (?Solve@?$SuperLUIterativeSolver@V?$UblasSpace@NV?$compressed_matrix@NU?$basic_row_major@_K_J@ublas@numeric@boost@@$0A@V?$unbounded_array@_KV?$allocator@_K@std@@@234@V?$unbounded_array@NV?$allocator@N@std@@@234@@ublas@numeric@boost@@V?$vector@NV?$unbounded_array@NV?$allocator@N@std@@@ublas@numeric@boost@@@234@@Kratos@@V?$UblasSpace@NV?$matrix@NU?$basic_row_major@_K_J@ublas@numeric@boost@@V?$unbounded_array@NV?$allocator@N@std@@@234@@ublas@numeric@boost@@V?$vector@NV?$unbounded_array@NV?$allocator@N@std@@@ublas@numeric@boost@@@234@@2@V?$Reorderer@V?$UblasSpace@NV?$compressed_matrix@NU?$basic_row_major@_K_J@ublas@numeric@boost@@$0A@V?$unbounded_array@_KV?$allocator@_K@std@@@234@V?$unbounded_array@NV?$allocator@N@std@@@234@@ublas@numeric@boost@@V?$vector@NV?$unbounded_array@NV?$allocator@N@std@@@ublas@numeric@boost@@@234@@Kratos@@V?$UblasSpace@NV?$matrix@NU?$basic_row_major@_K_J@ublas@numeric@boost@@V?$unbounded_array@NV?$allocator@N@std@@@234@@ublas@numeric@boost@@V?$vector@NV?$unbounded_array@NV?$allocator@N@std@@@ublas@numeric@boost@@@234@@2@@2@@Kratos@@UEAA_NAEAV?$compressed_matrix@NU?$basic_row_major@_K_J@ublas@numeric@boost@@$0A@V?$unbounded_array@_KV?$allocator@_K@std@@@234@V?$unbounded_array@NV?$allocator@N@std@@@234@@ublas@numeric@boost@@AEAV?$vector@NV?$unbounded_array@NV?$allocator@N@std@@@ublas@numeric@boost@@@456@1@Z)
2>superlu.lib(dfgmr.obj) : error LNK2001: unresolved external symbol dnrm2_
2>superlu.lib(ilu_ddrop_row.obj) : error LNK2001: unresolved external symbol dnrm2_
2>superlu.lib(sp_ienv.obj) : error LNK2019: unresolved external symbol xerbla_ referenced in function sp_ienv
2>superlu.lib(dgsequ.obj) : error LNK2001: unresolved external symbol xerbla_
2>superlu.lib(dgscon.obj) : error LNK2001: unresolved external symbol xerbla_
2>superlu.lib(dgssv.obj) : error LNK2001: unresolved external symbol xerbla_
2>superlu.lib(dgsisx.obj) : error LNK2001: unresolved external symbol xerbla_
2>superlu.lib(dgstrs.obj) : error LNK2001: unresolved external symbol xerbla_
2>superlu.lib(dsp_blas2.obj) : error LNK2001: unresolved external symbol xerbla_
2>superlu.lib(dgstrs.obj) : error LNK2019: unresolved external symbol dtrsm_ referenced in function dgstrs
2>superlu.lib(dgstrs.obj) : error LNK2019: unresolved external symbol dgemm_ referenced in function dgstrs
2>superlu.lib(dsp_blas2.obj) : error LNK2019: unresolved external symbol dtrsv_ referenced in function sp_dtrsv
2>superlu.lib(dsnode_bmod.obj) : error LNK2001: unresolved external symbol dtrsv_
2>superlu.lib(dpanel_bmod.obj) : error LNK2001: unresolved external symbol dtrsv_
2>superlu.lib(dcolumn_bmod.obj) : error LNK2001: unresolved external symbol dtrsv_
2>superlu.lib(dsp_blas2.obj) : error LNK2019: unresolved external symbol dgemv_ referenced in function sp_dtrsv
2>superlu.lib(dsnode_bmod.obj) : error LNK2001: unresolved external symbol dgemv_
2>superlu.lib(dpanel_bmod.obj) : error LNK2001: unresolved external symbol dgemv_
2>superlu.lib(dcolumn_bmod.obj) : error LNK2001: unresolved external symbol dgemv_
2>superlu.lib(dfgmr.obj) : error LNK2019: unresolved external symbol ddot_ referenced in function dfgmr
2>superlu.lib(dfgmr.obj) : error LNK2019: unresolved external symbol daxpy_ referenced in function dfgmr
2>superlu.lib(ilu_ddrop_row.obj) : error LNK2001: unresolved external symbol daxpy_
2>superlu.lib(ilu_ddrop_row.obj) : error LNK2019: unresolved external symbol dswap_ referenced in function ilu_ddrop_row
2>superlu.lib(ilu_ddrop_row.obj) : error LNK2019: unresolved external symbol dasum_ referenced in function ilu_ddrop_row
2>superlu.lib(dlacon.obj) : error LNK2001: unresolved external symbol dasum_
2>superlu.lib(ilu_ddrop_row.obj) : error LNK2019: unresolved external symbol idamax_ referenced in function ilu_ddrop_row
2>superlu.lib(dlacon.obj) : error LNK2001: unresolved external symbol idamax_
2>C:\Program Files\KratosLibs\Blas_Lapack\libblas.lib : warning LNK4272: library machine type 'X86' conflicts with target machine type 'x64'
2>C:\KratosInstall\cmake_build\applications\ExternalSolversApplication\Release\KratosExternalSolversApplication.pyd : fatal error LNK1120: 12 unresolved externals

5>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(133,5): error MSB3073: The command "setlocal
5>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(133,5): error MSB3073: "C:\Program Files (x86)\CMake\bin\cmake.exe" -DBUILD_TYPE=Release -P cmake_install.cmake
5>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(133,5): error MSB3073: if %errorlevel% neq 0 goto :cmEnd
5>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(133,5): error MSB3073: :cmEnd
5>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(133,5): error MSB3073: endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
5>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(133,5): error MSB3073: :cmErrorLevel
5>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(133,5): error MSB3073: exit /b %1
5>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(133,5): error MSB3073: :cmDone
5>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(133,5): error MSB3073: if %errorlevel% neq 0 goto :VCEnd
5>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(133,5): error MSB3073: :VCEnd" exited with code 1.



I was also getting some "inconsistent .dll links". But I fixed that somehow.



If the "runkratos.exe" is not generated, how do I use with GiD? Do I create a .bat to link GiD files with the python scripts?

Regards,
Juliano.
Title: Re: Compilation Issues on Windows 7
Post by: Carlos Roig on March 21, 2016, 07:34:01 PM
Hi Juliano

The most probable cause, based on the errors you post, specifically this one:
2>C:\Program Files\KratosLibs\Blas_Lapack\libblas.lib : warning LNK4272: library machine type 'X86' conflicts with target machine type 'x64'
Is that you are using the wrong architecture version of the blas (and presumably lapack) libraries. You need the x64 version, which you can found here:

https://icl.cs.utk.edu/lapack-for-windows/libraries/VisualStudio/3.6.0/Dynamic-MINGW/Win64/libblas.dll (https://icl.cs.utk.edu/lapack-for-windows/libraries/VisualStudio/3.6.0/Dynamic-MINGW/Win64/libblas.dll)
https://icl.cs.utk.edu/lapack-for-windows/libraries/VisualStudio/3.6.0/Dynamic-MINGW/Win64/libblas.lib (https://icl.cs.utk.edu/lapack-for-windows/libraries/VisualStudio/3.6.0/Dynamic-MINGW/Win64/libblas.lib)
https://icl.cs.utk.edu/lapack-for-windows/libraries/VisualStudio/3.6.0/Dynamic-MINGW/Win64/liblapack.dll (https://icl.cs.utk.edu/lapack-for-windows/libraries/VisualStudio/3.6.0/Dynamic-MINGW/Win64/liblapack.dll)
https://icl.cs.utk.edu/lapack-for-windows/libraries/VisualStudio/3.6.0/Dynamic-MINGW/Win64/liblapack.lib (https://icl.cs.utk.edu/lapack-for-windows/libraries/VisualStudio/3.6.0/Dynamic-MINGW/Win64/liblapack.lib)

Compiling with these libraries at least should solve the problems for the ExternalSolverApplication and hopefully the other ones as well. Let me know if this works.





Title: Re: Compilation Issues on Windows 7
Post by: Juliano on March 21, 2016, 08:58:01 PM
Hi Carlos,

It didn't solve that error.
3>C:\Program Files\KratosLibs\Blas_Lapack\libblas.lib : warning LNK4272: library machine type 'X86' conflicts with target machine type 'x64'

And I found something odd here:
5>LINK : fatal error LNK1181: cannot open input file 'KratosPfemBaseApplication.lib'
4>KratosIncompressibleFluidApplication.dir\Release\add_custom_strategies_to_python.obj : fatal error LNK1136: invalid or corrupt file

"Invalid or corrupt file"? Odd that I got the source with SVN. The files should not be corrupt.
Title: Re: Compilation Issues on Windows 7
Post by: Carlos Roig on March 21, 2016, 09:09:49 PM
Mmm I see,

The corrupted file could be basically the same error. Obj files are generated in compile time from the source, so it does not have any relation with the source, don't eorry about that.
As for the other... I'm quite sure that the problem is with the architecture of either the project, the libraries or the machine, or a combination of them.

Can you please copy here your configure.sh and tell me if in the Visutal studio solution you see this:

(http://i.imgur.com/e7NdjEV.png)

or this:

(http://i.imgur.com/twTinVy.png)

Thx.
Title: Re: Compilation Issues on Windows 7
Post by: Juliano on March 21, 2016, 09:17:10 PM
Configure.bat, you mean?

It is like this:

del CMakeCache.txt

 cmake -G "Visual Studio 14 2015 Win64"                                     ^
 -DCMAKE_BUILD_TYPE=Release                                                 ^
 -DCMAKE_CXX_FLAGS=" -D_SCL_SECURE_NO_WARNINGS "                            ^
 -DBOOST_ROOT="C:\Program Files\KratosLibs\boost_1_59_0"                    ^
 -DPYTHON_LIBRARY="C:\Python34\libs\python34.lib"                           ^
 -DPYTHON_INCLUDE_PATH="C:\Python34\include"                                ^
 -DLAPACK_LIBRARIES="C:\Program Files\KratosLibs\Blas_Lapack\liblapack.lib" ^
 -DBLAS_LIBRARIES="C:\Program Files\KratosLibs\Blas_Lapack\libblas.lib"     ^
 -DINCOMPRESSIBLE_FLUID_APPLICATION=ON                                      ^
 -DMESHING_APPLICATION=ON                                                   ^
 -DEXTERNAL_SOLVERS_APPLICATION=ON                                          ^
 -DPFEM_APPLICATION=ON                                                      ^
 -DSTRUCTURAL_APPLICATION=ON                                                ^
 -DSOLID_MECHANICS_APPLICATION=ON                                           ^
 -DPFEM_SOLID_MECHANICS_APPLICATION=ON                                      ^
 -DCONVECTION_DIFFUSION_APPLICATION=ON                                      ^
 -DFLUID_DYNAMICS_APPLICATION=ON                                            ^
 -DALE_APPLICATION=OFF                                                      ^
 -DFSI_APPLICATION=ON                                                       ^
 -DDEM_APPLICATION=ON                                                       ^
 -DKRATOS_INSTALL_PREFIX="c:/KratosMultiphysics"                            ^
 -DINSTALL_PYTHON_FILES=ON                                                  ^
 -DINSTALL_EMBEDDED_PYTHON=ON                                               ^
 -DEXCLUDE_ITSOL=ON                                                         ^
 ..

And in visual Studio I see the first option: Release and x64
Title: Re: Compilation Issues on Windows 7
Post by: Carlos Roig on March 22, 2016, 12:04:49 AM
Hi again,

I was trying to reproduce the error but it seems to work just fine in all my machines. I just compiled some blas and lapack libraries myself.
I attach them here. Please, put these libs in C:\Program Files\KratosLibs\Blas_Lapack and delete the old ones.

Make a clean build and tell me what happens

Thx
Title: Re: Compilation Issues on Windows 7
Post by: Juliano on March 22, 2016, 03:15:51 AM
Hello, these are some of the errors:

24>LINK : fatal error LNK1181: cannot open input file 'KratosPfemBaseApplication.lib'

26>  CMake Error at applications/incompressible_fluid_application/cmake_install.cmake:46 (file):
26>    file INSTALL cannot find
26>    "C:/KratosInstall/cmake_build/applications/incompressible_fluid_application/Release/KratosIncompressibleFluidApplication.pyd".
26>  Call Stack (most recent call first):
26>    applications/cmake_install.cmake:36 (include)
26>    cmake_install.cmake:79 (include)
26>
26>
26>
26>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(133,5): error MSB3073: The command "setlocal
26>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(133,5): error MSB3073: "C:\Program Files (x86)\CMake\bin\cmake.exe" -DBUILD_TYPE=Release -P cmake_install.cmake
26>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(133,5): error MSB3073: if %errorlevel% neq 0 goto :cmEnd
26>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(133,5): error MSB3073: :cmEnd
26>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(133,5): error MSB3073: endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
26>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(133,5): error MSB3073: :cmErrorLevel
26>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(133,5): error MSB3073: exit /b %1
26>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(133,5): error MSB3073: :cmDone
26>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(133,5): error MSB3073: if %errorlevel% neq 0 goto :VCEnd
26>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(133,5): error MSB3073: :VCEnd" exited with code 1.

The followring errors still appear (there are more of the "unresolved external" type, just some examples):

17>C:\Program Files\KratosLibs\Blas_Lapack\libblas.lib : warning LNK4272: library machine type 'X86' conflicts with target machine type 'x64'
17>superlu.lib(dfgmr.obj) : error LNK2019: unresolved external symbol ddot_ referenced in function dfgmr
17>superlu.lib(dfgmr.obj) : error LNK2019: unresolved external symbol daxpy_ referenced in function dfgmr
17>superlu.lib(ilu_ddrop_row.obj) : error LNK2001: unresolved external symbol daxpy_
17>superlu.lib(ilu_ddrop_row.obj) : error LNK2019: unresolved external symbol dswap_

Overall, VS shows 46 errors. And at the end of the output, it shows: Build: 22 succeeded, 4 failed, 0 up-to-date, 0 skipped
Title: Re: Compilation Issues on Windows 7
Post by: Carlos Roig on March 22, 2016, 11:16:10 AM
Hi Juliano,

This is very odd. Let's focus on the externalSolver for now.
I have spoken with some of my colleges and we have some new ideas.. could you send me the output that you obtain while running the "configure.bat" file?

Thx
Title: Re: Compilation Issues on Windows 7
Post by: Juliano on March 22, 2016, 02:05:00 PM
Here you go. Print screens of the "configure.bat" output.
Title: Re: Compilation Issues on Windows 7
Post by: Carlos Roig on March 23, 2016, 09:48:45 AM
Hi Juliano,

Everything seems normal with the configure output. Reached this point probably the best thing you can do is just disable the externalSolversApplication if you don't need it, I spoke with Miguel Angel and he told me that you are mainly interested in DEM, so it shouldn't be a problem if you turn that app off. Just change:

 -DEXTERNAL_SOLVERS_APPLICATION=ON                                          ^

for

 -DEXTERNAL_SOLVERS_APPLICATION=OFF                                          ^
Title: Re: Compilation Issues on Windows 7
Post by: Juliano on March 23, 2016, 03:29:29 PM
Did it. The quantity of errors decreased drastically. Now it is: 21 succeeded, 3 failed, 0 up-to-date, 0 skipped. With 12 errors.

It is this one (repeats a bunch of times):
24>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(133,5): error MSB3073: The command "setlocal
24>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(133,5): error MSB3073: "C:\Program Files (x86)\CMake\bin\cmake.exe" -DBUILD_TYPE=Release -P cmake_install.cmake
24>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(133,5): error MSB3073: if %errorlevel% neq 0 goto :cmEnd
24>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(133,5): error MSB3073: :cmEnd
24>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(133,5): error MSB3073: endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
24>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(133,5): error MSB3073: :cmErrorLevel
24>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(133,5): error MSB3073: exit /b %1
24>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(133,5): error MSB3073: :cmDone
24>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(133,5): error MSB3073: if %errorlevel% neq 0 goto :VCEnd
24>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(133,5): error MSB3073: :VCEnd" exited with code 1.

And these two:
"An iternal error has occured in the compiler".
"cannot open input file 'KratosPfemBaseApplication.lib'"

By the way, how do I use Kratos with GiD? Do I ask on another tab of the forum?
Title: Re: Compilation Issues on Windows 7
Post by: Josep Maria on March 25, 2016, 11:33:46 PM
If you want to compile the PfemSolidMechanicsApplication you need to compile also the PfemBaseApplication.
Title: Re: Compilation Issues on Windows 7
Post by: Juliano on March 28, 2016, 07:02:35 PM
Indeed. Turned both off and no errors whatsoever. Only "2 failed" thing on VStudio. However, I was successful testing a "test.py" script. So, link with GiD? Any headstart? Just linking the folders would do the trick?
Title: Re: Compilation Issues on Windows 7
Post by: Carlos Roig on March 29, 2016, 09:59:23 AM
Hi Juliano,

The easiest way to use it with GiD would be to download the GiD version of kratos ( you can do it inside GiD)
and then replace the folder
GidFolder/problemtypes/Kratos.gid/kratos/kratos.gid/kratos
with your kratos compilation folder ( a shortcut to that folder would do the trick, but it has to be named "kratos")
Title: Re: Compilation Issues on Windows 7
Post by: Juliano on March 29, 2016, 06:58:02 PM
Hi Carlos,

I tried to hardlink the folder, as it worked previously. I got it to work with a "test script", directly via .bat or via command prompt. However, when I try to run a simple simulation with GiD, it shows the error I attached. Looking inside "applications" folder, I can only see a file named "applications_interface.py", I don't know if it is related but... Well, I can see plenty other folders and files inside the "kratos" folder downloaded using GiD.

Also, shouldn't I change other files? Like the one in: "\GiD 12.0.8\problemtypes\kratos.gid\python"?
Title: Re: Compilation Issues on Windows 7
Post by: Carlos Roig on March 29, 2016, 07:02:59 PM
Hi,

Good news is you did it correctly, bad news, it seems like if DEM were not compiled, so you will have to compile again with DEM
Check that in the configure.bat

-DDEM_APPLICATION=ON

is set to on
Title: Re: Compilation Issues on Windows 7
Post by: Juliano on March 29, 2016, 07:13:49 PM
It was set to "on" on configure.bat. Regardless, I tried to compile again. No success.

(I'm beginning to think to work as a bug finder).
Title: Re: Compilation Issues on Windows 7
Post by: Carlos Roig on March 29, 2016, 07:26:20 PM
Ok, try a couple of things:

- If there is a "KratosDEMApplication.pyd" in kratos/libs, try changing its name to "KratosDEMApplication.dll"
- If it does not exists, probably the file is not installed, this happens if you compile the "ALL_BUILD" but not the "INSTALL" project inside the vs.
Title: Re: Compilation Issues on Windows 7
Post by: Juliano on March 29, 2016, 07:58:13 PM
That file is not inside "libs". I tried to compile again with no success (right clicking "Install" and going to "Build"). I can execute the "test_script.py" with no problems, though.
I don't know if it has something to do with it, but the option "ALL_BUILD" is stronger in color, as if it was selected.

VStudio shows some errors, couldn't be something like that? Exiting before generating the other files?
Title: Re: Compilation Issues on Windows 7
Post by: Carlos Roig on March 29, 2016, 08:13:56 PM
Hi,

Yes, if it shows errors the file is not installed indeed, we should try to solve that.
As for the ALL_BUILD being bold, it is normal as it is the "default" project, it is not a problem.
The test script runs well because at some point it actually compiled, but in that point DEM was not activated.

Can you tell me ALL the errors that is giving vs?
Title: Re: Compilation Issues on Windows 7
Post by: Juliano on March 29, 2016, 08:20:39 PM
Hi, here you go. Attached them.
Title: Re: Compilation Issues on Windows 7
Post by: Carlos Roig on April 04, 2016, 09:32:18 AM
HI Juliano, sorry for the delay.

It seems that there is something wrong with the incompressible fluid application right now. This problems (invalid or corrupt file) are usually solved just recompiling from scratch.

I did some findings and, if this keeps happening, as it is not the first time you get the invalid or corrupt file error from other applications in a relative short spawn of time ( you had a similar problem with KratosPfemBaseApplication the first time you posted ), please tell me so we can star considering problems with the disk
Title: Re: Compilation Issues on Windows 7
Post by: Miguel Angel Celigueta on April 05, 2016, 11:55:57 AM
Hello Juliano,
Let's finish this thread and move to the DEM application.
The DEM Application Team will take care of the new problems from now on.
Regards,
Miguel Angel