-
Notifications
You must be signed in to change notification settings - Fork 248
Windows Install
You can find updated instructions to compile kratos in the Install.md
- Objectives:
- Test that Kratos Works
- Get familiar with the execution process
Once Kratos is compiled and correctly install all its left is to execute some cases. In this section we will descrive how you can make a simple example to test that kratos works, and the general way to run problems: directly from the command line or using GiD.
To to test the compilation, you can prepare a simple script (for example test_kratos.py
) that contains this line:
from KratosMultiphysics import *
Then you can execute this script as explained in the next section.
The most easy way to execute a KratosMultiphysics script from the command line is to prepare a .bat
file. A .bat
file is just a series of commands that are executed together and will make the process simpler. This file should contain only two lines. First the path for the kratos executable and libs folders, and the second, the actual command. For instace:
- Your Downloaded Kratos in
C:\Kratos
- Your script is called
test_kratos.py
set PATH=C:\\Kratos;C:\\Kratos\\libs;%PATH%
"C:\\Kratos\\runkratos" test_kratos.py
We strongly recommend you to run kratos scripts with the runkratos
binary inside your Kratos installation folder, because it gives the correct values to the environment variables.
runkratos test.py
Or more exactly, you can go to the folder where your case is (input files and main python script) and type:
path_to_kratos/runkratos test.py
You can also run them directly using the python you have installed in your system (provided that the system knows where python is and the environment variables have the correct values assigned, PYTHONPATH
, LD_LIBRARY_PATH
and PATH
).
python test.py
python3 test.py
python36 test.py
If everything is correct you will see this message:
| / |
' / __| _` | __| _ \ __|
. \ | ( | | ( |\__ \
_|\_\_| \__,_|\__|\___/ ____/
Multi-Physics 6.1.XXXXX
This problem can only be solved in 64bit machine
This error happens because the compiler is not able to index more than 4GB of RAM. This is due to the fact that, by default visual studio uses a 32 bit toolset regardless of the target platform. Visual Studio 2015 and 2017 both have a 64 bit toolset that does not have this problem. In order to activate it:
Add this to the *.vsproj
file of the project is giving you problems under the configuration you are using ( Release
, Debug
, etc...)
<PreferredToolArchitecture>x64</PreferredToolArchitecture>
or by setting:
set PreferredToolArchitecture=x64
before calling Msbuild.exe
if you are compiling directly from the cmd.
You have a conflicting declaration of round. This could happen for example if you have multiple versions of Visual Studio in your computer. Please add -DHAVE_ROUND
to the configure cxxflags
entry:
-DCMAKE_CXX_FLAGS=" -D_SCL_SECURE_NO_WARNINGS -DHAVE_ROUND"
- Getting Kratos (Last compiled Release)
- Compiling Kratos
- Running an example from GiD
- Kratos input files and I/O
- Data management
- Solving strategies
- Manipulating solution values
- Multiphysics
- Video tutorials
- Style Guide
- Authorship of Kratos files
- Configure .gitignore
- How to configure clang-format
- How to use smart pointer in Kratos
- How to define adjoint elements and response functions
- Visibility and Exposure
- Namespaces and Static Classes
Kratos structure
Conventions
Solvers
Debugging, profiling and testing
- Compiling Kratos in debug mode
- Debugging Kratos using GDB
- Cross-debugging Kratos under Windows
- Debugging Kratos C++ under Windows
- Checking memory usage with Valgind
- Profiling Kratos with MAQAO
- Creating unitary tests
- Using ThreadSanitizer to detect OMP data race bugs
- Debugging Memory with ASAN
HOW TOs
- How to create applications
- Python Tutorials
- Kratos For Dummies (I)
- List of classes and variables accessible via python
- How to use Logger
- How to Create a New Application using cmake
- How to write a JSON configuration file
- How to Access DataBase
- How to use quaternions in Kratos
- How to do Mapping between nonmatching meshes
- How to use Clang-Tidy to automatically correct code
- How to use the Constitutive Law class
- How to use Serialization
- How to use GlobalPointerCommunicator
- How to use PointerMapCommunicator
- How to use the Geometry
- How to use processes for BCs
- How to use Parallel Utilities in futureproofing the code
- Porting to Pybind11 (LEGACY CODE)
- Porting to AMatrix
- How to use Cotire
- Applications: Python-modules
- How to run multiple cases using PyCOMPSs
- How to apply a function to a list of variables
- How to use Kratos Native sparse linear algebra
Utilities
Kratos API
Kratos Structural Mechanics API