-
Notifications
You must be signed in to change notification settings - Fork 247
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error in test_KratosCore if FluidDynamicsApplication is not compiled #2848
Comments
The error happens if the FluidDynamicsApplication.py is available, but the pybind module KratosFluidDynamicsApplication is not. then a ModuleNotFoundError is thrown, and the extraction of the application name from the exception does not work: missing_application = re.search(r'''.*'KratosMultiphysics\.(.*)'.*''',
'{0}'.format(e)).group(1) |
Just in case someone else encounters this issue: This error is due to old files remaining in the KratosMultiphysics folder from a past compilation of the FluidDynamicsApplication (FluidDynamicsApplication.py in this case). The easiest fix is to modify your @KratosMultiphysics/technical-committee should we update the example configures (and tutorials) to reflect this? |
+1 to indicate that this may happen, but I think the behavior is correct. In fact it is the same problem than when we try to load outdated .so. Maybe we can extend that RE so it captures this sort of problems. I was not aware of this mechanism, but as it seems that there are several files using it maybe we can even put it as part of the test utils. |
Extending the RE would fix it for this test, but similar statements appear in other parts of the code. In fact, this RE is part of the recommended best practice for skipping tests in the wiki. If we want to go in this direction, maybe we should provide a method to manage import errors somewhere in the core (or probably in the test suite). |
The hint of @jcotela solved the issue for me. I'll leave it to you to close it as you maybe consider this in the future. |
@jcotela where is the code that deletes the |
It is not there officially, but most of us have added to our configure.sh at some point... |
Could you please share how you do it? |
Well, in my configure I have
(adjust for your local paths etc.) This removes installed files from a previous compilation, which cmake places in the |
thanks @jcotela |
It would be better to use CMake to cleanup these folders |
Closing, for now we recommend deleting the installed files (KratosMultiphysics and libs folders) before calling cmake in the configure script if necessary. |
I just noticed that there happens an error in the block of skipping the "test_materials_input.py" if the FluidDynamicsApplication is not compiled.
The text was updated successfully, but these errors were encountered: