KratosMultiphysics / Kratos

Kratos Multiphysics (A.K.A Kratos) is a framework for building parallel multi-disciplinary simulation software. Modularity, extensibility and HPC are the main objectives. Kratos has BSD license and is written in C++ with extensive Python interface.
https://kratosmultiphysics.github.io/Kratos/
Other
1.03k stars 245 forks source link

kratos execution error #60

Closed josep-m-carbonell closed 7 years ago

josep-m-carbonell commented 7 years ago

After compiling kratos in windows 7, when I try to execute a problem I got this error

Tue Feb 21 15:47:18 2017 | / | ' / | _` | _| \ | . \ | ( | | ( |_ \ |__| _,|_|_/ __/ Multi-Physics 5.0.0-8f4ec7005 Importing KratosSolidMechanicsApplication KRATOS __| \ | | \ _ \ ( | | | | , ) |/\/ _|| / MECHANICS Initializing KratosSolidMechanicsApplication... Traceback (most recent call last): File "MainKratos.py", line 50, in import KratosMultiphysics.ExternalSolversApplication as KratosSolvers File "C:\temp\Kratos\KratosMultiphysics\ExternalSolversApplication.py", line 2 , in from KratosExternalSolversApplication import * ImportError: DLL load failed: The specified module could not be found. KRATOS TERMINATED WITH ERROR

This is my configure.bat file:

del CMakeCache.txt :: this is an example file...please DO NOT MODIFY if you don't want to do it for everyone :: to use it, copy it to another file and run it

cls

:: you may want to decomment this the first time you compile 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:\temp\Kratos\external_libraries\boost_1_62_0" ^ -DPYTHON_LIBRARY="C:\Python35\libs\python35.lib" ^ -DPYTHON_INCLUDE_PATH="C:\Python35\include" ^ -DLAPACK_LIBRARIES="C:\temp\Kratos\external_libraries\liblapack.lib" ^ -DBLAS_LIBRARIES="C:\temp\Kratos\external_libraries\libblas.lib" ^ -DMESHING_APPLICATION=OFF ^ -DEXTERNAL_SOLVERS_APPLICATION=ON ^ -DPFEM_BASE_APPLICATION=ON ^ -DPFEM_SOLID_MECHANICS_APPLICATION=ON ^ -DFLUID_DYNAMICS_APPLICATION=ON ^ -DSOLID_MECHANICS_APPLICATION=ON ^ -DCONTACT_MECHANICS_APPLICATION=ON ^ -DCONVECTION_DIFFUSION_APPLICATION=ON ^ -DFLUID_DYNAMICS_APPLICATION=ON ^ -DALE_APPLICATION=OFF ^ -DFSI_APPLICATION=OFF ^ -DDEM_APPLICATION=ON ^ -DSWIMMING_DEM_APPLICATION=ON ^ -DINSTALL_PYTHON_FILES=ON ^ -DINSTALL_EMBEDDED_PYTHON=ON ^ -DEXCLUDE_ITSOL=ON ^ ..

roigcarlo commented 7 years ago

@josep-m-carbonell You have to copy libblas.dll ad liblapack.dll to C:\temp\Kratos\libs

Also you need to copy the dll files form Mingw folder (by default C:\MinGW\bin ) into C:\temp\Kratos\libs. Alternatively you can add C:\MinGW\bin to your windows PATH

This needs to be done if you are using the ExternalSolverApplication since it depends on Blas and Lapack, which have mingw dependencies.

josep-m-carbonell commented 7 years ago

It is possible that this step about MingGW libraries is missing. I will check it. Thank you.

roigcarlo commented 7 years ago

I've checked out and it seems to be correct.

If it is not clear enough we can try to highlight it

pooyan-dadvand commented 7 years ago

@roigcarlo This is a common issue for windows users. Is there anyway to automate it?

roigcarlo commented 7 years ago

I believe it can be done for all dll except for those in Mingw (because they are dependencies of dependecies...), I'll take a look

josep-m-carbonell commented 7 years ago

Well, the problem was not MingGW libraries, they were already copied. Was the blas and lapack dll, that seems not to be the appropriate ones for the correct functioning, we copied them again the error was solved.

pooyan-dadvand commented 7 years ago

IMO least the boost one should be copied automatically

josep-m-carbonell commented 7 years ago

For me the error is solved, some improvements are needed to make the Windows install easier. Maybe an issue to ask for suggestions can be opened. Right now I close this issue. Thank you very much for your help. @pooyan-dadvand @roigcarlo