### [SOLVED] AIFlow - Segmentation Fault with Calculate Loads

Posted:

**08 Mar 2021, 11:17**Hello everyone,

I'm trying to run a simulation with the AIFlow Solver and the Caculate Loads option, but Elmer crashes with a segmentation fault.

The bug only appears when I activate the Calculate Loads option.

After looking in the code I have found that the problem comes from the fact that the

I have tired to modify the source code of the AIFlow Solver by adding

directly after the end of the bulk assembly step. It removes the segfault error, but the computed external forces do not look convincing. I've also tried to add these two lines of code after the Neumann boundary conditions assembly, between the

Would anyone have an idea on how to properly fix this segfault error ? I have attached a small test case to the post.

Thanks a lot,

Kévin

I'm trying to run a simulation with the AIFlow Solver and the Caculate Loads option, but Elmer crashes with a segmentation fault.

The bug only appears when I activate the Calculate Loads option.

After looking in the code I have found that the problem comes from the fact that the

*BulkValues*and*BulkRHS*variables of the solver matrix are not associated. Thus, Line 12754 of the subroutine CalculateLoads in the SolverUtils.F90 source file, the*Aaid % Values*and*RHS*variables are replaced with non associated values, which leads to the segfault during the matrix and vector multiplication (in the CRS_MatrixVectorMultiply subroutine).I have tired to modify the source code of the AIFlow Solver by adding

Code: Select all

```
Solver % Matrix % BulkValues => Solver % Matrix % Values
Solver % Matrix % BulkRHS => Solver % Matrix % RHS
```

*CALL DefaultFinishAssembly()*and*CALL DefaultDirichletBCs()*, but the results are not better.Would anyone have an idea on how to properly fix this segfault error ? I have attached a small test case to the post.

Thanks a lot,

Kévin