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.02k stars 245 forks source link

Different results using SERIALIZER_TRACE_ERROR and SERIALIZER_NO_TRACE #12222

Open aronnoordam opened 6 months ago

aronnoordam commented 6 months ago

When im loading a derived class from set_moving_load_process from the StructuralMechanicsApplication with the kratos serializer, I get the message:

"MemoryError: bad array new length"

when im using SERIALIZER_NO_TRACE SerializerTraceType.

However when Im using the SerializerTraceType SERIALIZER_TRACE_ERROR, I do not have any problem and my simulation runs well.

Any idea what can cause this issue?

aronnoordam commented 6 months ago

update for the people interested:

in my case: I was adding each stage to a list something like:

` model = Kratos.Model()

stages = []

for parameter_file_name in parameter_files:

    with open(parameter_file_name,'r') as parameter_file:

        parameters = Kratos.Parameters(parameter_file.read())

    simulation = Analysis(model,parameters)

    simulation.Run()

    stages.append(simulation)`

this was causing the memory error. I do not understand why my simulation was working with: SERIALIZER_TRACE_ERROR though.