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

Nightly Build failing in FluidDynamics #8452

Closed philbucher closed 3 years ago

philbucher commented 3 years ago

Description From last night, first time this happened

======================================================================
ERROR: testDarcyNonLinear (darcy_channel_test.DarcyChannelTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/__w/Kratos/Kratos/bin/Release/applications/FluidDynamicsApplication/tests/darcy_channel_test.py", line 86, in testDarcyNonLinear
    self.runDarcyChannelTest()
  File "/__w/Kratos/Kratos/bin/Release/applications/FluidDynamicsApplication/tests/darcy_channel_test.py", line 68, in runDarcyChannelTest
    self.runTest()
  File "/__w/Kratos/Kratos/bin/Release/applications/FluidDynamicsApplication/tests/darcy_channel_test.py", line 265, in runTest
    self.fluid_solver.FinalizeSolutionStep()
  File "/__w/Kratos/Kratos/bin/Release/KratosMultiphysics/FluidDynamicsApplication/navier_stokes_two_fluids_solver.py", line 265, in FinalizeSolutionStep
    self._GetDistanceReinitializationProcess().Execute()
RuntimeError: Error: Zero sum in skyline_lu factorization

in kratos/solving_strategies/builder_and_solvers/residualbased_block_builder_and_solver.h:495:void ResidualBasedBlockBuilderAndSolver<UblasSpace<double, boost::numeric::ublas::compressed_matrix<...>, boost::numeric::Vector >,...>::InternalSystemSolveWithPhysics(ResidualBasedBlockBuilderAndSolver::TSystemMatrixType &,...]
   kratos/solving_strategies/builder_and_solvers/residualbased_block_builder_and_solver.h:544:virtual void ResidualBasedBlockBuilderAndSolver<UblasSpace<double, boost::numeric::ublas::compressed_matrix<...>, boost::numeric::Vector >,...>::BuildAndSolve(typename TSchemeType::Pointer, ModelPart &, ResidualBasedBlockBuilderAndSolver::TSystemMatrixType &,...]
   kratos/processes/variational_distance_calculation_process.h:353:virtual void VariationalDistanceCalculationProcess<3, UblasSpace<double, boost::numeric::ublas::compressed_matrix<...>, boost::numeric::Vector >, UblasSpace<double, boost::numeric::ublas::matrix<double,...>, boost::numeric::Vector >, LinearSolver<UblasSpace<double, boost::numeric::ublas::compressed_matrix<...>, boost::numeric::Vector >, UblasSpace<double, boost::numeric::ublas::matrix<double,...>, boost::numeric::Vector >, Reorderer<UblasSpace<double, boost::numeric::ublas::compressed_matrix<...>, boost::numeric::Vector >, UblasSpace<double, boost::numeric::ublas::matrix<double,...>, boost::numeric::Vector > > > >::Execute() [TDim = 3, TSparseSpace = UblasSpace<double, boost::numeric::ublas::compressed_matrix<...>, boost::numeric::Vector >, TDenseSpace = UblasSpace<double, boost::numeric::ublas::matrix<double,...>, boost::numeric::Vector >, TLinearSolver = LinearSolver<UblasSpace<double, boost::numeric::ublas::compressed_matrix<...>, boost::numeric::Vector >, UblasSpace<double, boost::numeric::ublas::matrix<double,...>, boost::numeric::Vector >, Reorderer<UblasSpace<double, boost::numeric::ublas::compressed_matrix<...>, boost::numeric::Vector >, UblasSpace<double, boost::numeric::ublas::matrix<double,...>, boost::numeric::Vector > > >]

Happens only with CLANG for some reason

ddiezrod commented 3 years ago

I have found this problem in other cases using amgcl. The solution in my case was to use scaling = true, as it seemed that the problem was somehow related to machine precision. You could maybe give it a try...

philbucher commented 3 years ago

now it fails also in GCC:

 ERROR: testDarcyDensity (darcy_channel_test.DarcyChannelTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/__w/Kratos/Kratos/bin/Release/applications/FluidDynamicsApplication/tests/darcy_channel_test.py", line 93, in testDarcyDensity
    self.runDarcyChannelTest()
  File "/__w/Kratos/Kratos/bin/Release/applications/FluidDynamicsApplication/tests/darcy_channel_test.py", line 68, in runDarcyChannelTest
    self.runTest()
  File "/__w/Kratos/Kratos/bin/Release/applications/FluidDynamicsApplication/tests/darcy_channel_test.py", line 265, in runTest
    self.fluid_solver.FinalizeSolutionStep()
  File "/__w/Kratos/Kratos/bin/Release/KratosMultiphysics/FluidDynamicsApplication/navier_stokes_two_fluids_solver.py", line 265, in FinalizeSolutionStep
    self._GetDistanceReinitializationProcess().Execute()
RuntimeError: Error: Zero sum in skyline_lu factorization

in kratos/solving_strategies/builder_and_solvers/residualbased_block_builder_and_solver.h:495:void ResidualBasedBlockBuilderAndSolver<TSparseSpace,...>::InternalSystemSolveWithPhysics(ResidualBasedBlockBuilderAndSolver<TSparseSpace,...>::TSystemMatrixType&, ResidualBasedBlockBuilderAndSolver<TSparseSpace,...>::TSystemVectorType&, ResidualBasedBlockBuilderAndSolver<TSparseSpace,...>::TSystemVectorType&, ModelPart&) [with TSparseSpace = UblasSpace<double, boost::numeric::ublas::compressed_matrix<...>, boost::numeric::ublas::vector<double> >; TDenseSpace = UblasSpace<double, boost::numeric::ublas::matrix<double>, boost::numeric::ublas::vector<double> >; TLinearSolver = LinearSolver<UblasSpace<double, boost::numeric::ublas::compressed_matrix<...>, boost::numeric::ublas::vector<double> >, UblasSpace<double, boost::numeric::ublas::matrix<double>, boost::numeric::ublas::vector<double> > >; ResidualBasedBlockBuilderAndSolver<TSparseSpace,...>::TSystemMatrixType = boost::numeric::ublas::compressed_matrix<...>; ResidualBasedBlockBuilderAndSolver<TSparseSpace,...>::TSystemVectorType = boost::numeric::ublas::vector<double>]
   kratos/solving_strategies/builder_and_solvers/residualbased_block_builder_and_solver.h:544:void ResidualBasedBlockBuilderAndSolver<TSparseSpace,...>::BuildAndSolve(typename ResidualBasedBlockBuilderAndSolver<TSparseSpace,...>::BaseType::TSchemeType::Pointer, ModelPart&, ResidualBasedBlockBuilderAndSolver<TSparseSpace,...>::TSystemMatrixType&, ResidualBasedBlockBuilderAndSolver<TSparseSpace,...>::TSystemVectorType&, ResidualBasedBlockBuilderAndSolver<TSparseSpace,...>::TSystemVectorType&) [with TSparseSpace = UblasSpace<double, boost::numeric::ublas::compressed_matrix<...>, boost::numeric::ublas::vector<double> >; TDenseSpace = UblasSpace<double, boost::numeric::ublas::matrix<double>, boost::numeric::ublas::vector<double> >; TLinearSolver = LinearSolver<UblasSpace<double, boost::numeric::ublas::compressed_matrix<...>, boost::numeric::ublas::vector<double> >, UblasSpace<double, boost::numeric::ublas::matrix<double>, boost::numeric::ublas::vector<double> > >; typename ResidualBasedBlockBuilderAndSolver<TSparseSpace,...>::BaseType::TSchemeType::Pointer = shared_ptr<Scheme<UblasSpace<double, boost::numeric::ublas::compressed_matrix<...>, boost::numeric::ublas::vector<double> >, UblasSpace<double, boost::numeric::ublas::matrix<double>, boost::numeric::ublas::vector<double> > > >; ResidualBasedBlockBuilderAndSolver<TSparseSpace,...>::TSystemMatrixType = boost::numeric::ublas::compressed_matrix<...>; ResidualBasedBlockBuilderAndSolver<TSparseSpace,...>::TSystemVectorType = boost::numeric::ublas::vector<double>]
   kratos/processes/variational_distance_calculation_process.h:353:void VariationalDistanceCalculationProcess<TDim, TSparseSpace, TDenseSpace, TLinearSolver>::Execute() [with unsigned int TDim = 3; TSparseSpace = UblasSpace<double, boost::numeric::ublas::compressed_matrix<...>, boost::numeric::ublas::vector<double> >; TDenseSpace = UblasSpace<double, boost::numeric::ublas::matrix<double>, boost::numeric::ublas::vector<double> >; TLinearSolver = LinearSolver<UblasSpace<double, boost::numeric::ublas::compressed_matrix<...>, boost::numeric::ublas::vector<double> >, UblasSpace<double, boost::numeric::ublas::matrix<double>, boost::numeric::ublas::vector<double> > >]

@mrhashemi we are trying hard to have the nightly build working at all times as this is very important for the representation of Kratos. Could you please take a look soon? If you don't have time atm then I would deactivate the test for the moment until you have time to fix it

mrhashemi commented 3 years ago

@philbucher and @rubenzorrilla Actually, I did not create/modify this test but as I further checked: The problem seems to be with the "TwoFluidNoRedistanceSolver". It needs a specific definition for the FinalizeSolutionStep.

mrhashemi commented 3 years ago

@philbucher and @rubenzorrilla Actually, I did not create/modified this test but I further checked: The problem is with the "TwoFluidNoRedistanceSolver". It needs a specific definition for the FinalizeSolutionStep.

Or more simply, using "distance_reinitialization": "none"