Kratos: Registering is done twice when importing Kratos Core?

Created on 21 Dec 2018  路  6Comments  路  Source: KratosMultiphysics/Kratos

While I was debugging the kratos cpp tests (they do not run fine in my pc currently) I realized that the variables in the Core are registered twice. It is not introducing bugs (afak), but it is useless.
In particular, the line
https://github.com/KratosMultiphysics/Kratos/blob/93a0288b434de86b7b50504f575dafe1ffe6ac3a/kratos/sources/kernel.cpp#L28
is calling the registering function, but the next line is importing the Core, which again registers the variables.
Does anyone know if this is done on purpose?
I removed the line referenced above and everything runs ok...

Help Wanted Kratos Core Question

All 6 comments

Just referencing @RiccardoRossi , @roigcarlo

I found the same when doing #3666, I leave it as it is to not break anything :P

Is the function being called twice or is there another call in the code?

It is still there?!? My fault then...

Let me explain the historical reason: Now they are calling twice but they used to be different. One was to registering the variables in core of Kratos.so and another one for registering the core of application. After we changed the library structure of Kratos and put the core as a single shared library. So now only one of them is needed.

Understood. So I added this to the PR #3786 . I close this one and if there's issues we can talk about them there.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

josep-m-carbonell picture josep-m-carbonell  路  4Comments

najianaslreza picture najianaslreza  路  7Comments

armingeiser picture armingeiser  路  6Comments

KlausBSautter picture KlausBSautter  路  6Comments

philbucher picture philbucher  路  4Comments