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

Error with eigenvalue analysis #2130

Closed veiguf closed 6 years ago

veiguf commented 6 years ago

I am using a relatively large volume model for eigenvalue analysis (number of nodes: 124145, number of elements: 610735) but I'm getting some errors. It appears to be a bad allocation of RAM in Boost(?). Is it possible to set the amount of RAM available for the simulation?

Attached you can find the error message. ErrorMessage.txt System information: Ubuntu 17.10, Intel Xeon CPU 5160 @ 3.00 GHz, 7,8 GiB RAM.

Any help would be appreciated!

philbucher commented 6 years ago

which eigensolver did you use? Does it work with a smaller problem? Could you give some more details on the configuration you used?

Usually Kratos does not limit the amount of RAM, this should be depending on the OS. Does the RAM fill up completely before it crashes?

veiguf commented 6 years ago

Hi @philbucher ,

I used the EigenSolversApplication with the following parameters:

    "eigensolver_settings":{
        "solver_type": "eigen_eigensystem",
        "number_of_eigenvalues": 6,
        "max_iteration": 1000,
        "tolerance": 0.1,
        "echo_level": 2
    },

It is a volume model constrained on a surface of one side. I tested exactly the same simulation where I used the same .py-file and the same .json-files with the only difference of a rougher mesh (number of nodes: 23587, number of elements 109662) and it works. Please let me know which other informations are needed.

Yes, the RAM is filled up during the run until it's maximum and then the simulation crashes.

armingeiser commented 6 years ago

The eigen_eigensystem is using a linear direct solver internally, so it could be the case that the 8GB RAM are not enough for this model. @veiguf can you try to do a linear static analysis with the same model using the eigen_sparse_lu or eigen_pardiso_lu in case you compiled it with MKL support? Just monitor how much memory is consumed during the solution.

veiguf commented 6 years ago

Hi @armingeiser , Is it correct that if you write eigen_sparse_lu and eigen_pardiso_lu, I use Feast and set the named solvers as linear solver? Or is there another possibility to use them?

armingeiser commented 6 years ago

@veiguf No using them as linear solver in FEAST will not work, because FEAST requires a complex linear solver. What i mean is to really do a static analysis (no eigenvalue analysis) to see how much memory is used in this linear static solution. In case it is also filling up the memory and crashing, we know its a problem of the system simply not fitting in the memory. If this is the case, one could think of making iterative subsolvers available in the eigen_eigensystem solver to overcome this memory issue. (But its not yet implemented and will most probably also be slower).

Example for linear analysis: https://github.com/KratosMultiphysics/Kratos/blob/master/applications/StructuralMechanicsApplication/tests/beam_test/linear_3D2NBeamCr_test_parameters.json

msandre commented 6 years ago

If you are using feast, try the pastix solver. It should use less memory than the default.

veiguf commented 6 years ago

Sorry, I completely forgot to answer. There was a problem on my pc with the compilation of Kratos and MKL. Since the correct installation and compilation of Kratos and MKL the simulations with the high number of degrees of freedom run without problems and smaller examples run faster compared to before. The used solver is still eigen_eigensystem because it is much faster than FEAST.