Skip to content
This repository has been archived by the owner on May 9, 2022. It is now read-only.

FOAM-FSI does not work in Debug mode (index out of range) #382

Open
MakisH opened this issue Jan 25, 2018 · 8 comments
Open

FOAM-FSI does not work in Debug mode (index out of range) #382

MakisH opened this issue Jan 25, 2018 · 8 comments

Comments

@MakisH
Copy link

MakisH commented Jan 25, 2018

Hello everyone,

When I try to run any tutorial case, fsiFoam crashes in the beginning with an error I do not understand. See the log files here. The error is always in the solid and it has the following form:

FOAM-FSI build: 3.2-5f43c0922374

Patch inner-wall	Traction boundary field: U
	nonLinear set to total Lagrangian
Patch outer-wall	Traction boundary field: U
	nonLinear set to total Lagrangian
Patch inner-wall	Traction boundary field: U
	nonLinear set to total Lagrangian
Patch outer-wall	Traction boundary field: U
	nonLinear set to total Lagrangian
[1] 
[1] 
[1] --> FOAM FATAL ERROR: 
[1] index 84 out of range 0 ... 83
[1] 
[1]     From function UList<T>::checkIndex(const label)
[1]     in file /home/tester/foam/foam-extend-3.2/src/foam/lnInclude/UListI.H at line 124.

This particular error is for the 3dTube tutorial, with preCICE. I simply run ./Allrun or ./Allrun_precice (after I run ./Allclean).

I built foam-extend and FOAM-FSI successfully, the testsuite-fsi returns no errors. The foam-extend (parallel) tutorials run successfully.

Any ideas?

@SvensenSeven
Copy link

I think that FOAM-FSI should be in /home/tester/foam/foam-extend-3.2/
If I understood David's instructions right, FOAM-FSI cannot be located outside of foam-extend.

@MakisH
Copy link
Author

MakisH commented Jan 25, 2018

I think this is not the case here, as fsiFoam was built and starts successfully. I cannot find such an instruction in the Readme. I do set FOAM_INST_DIR correctly, however.

@SvensenSeven
Copy link

which OS do you use ? Ubuntu 16.04 ?

@MakisH
Copy link
Author

MakisH commented Jan 26, 2018 via email

@SvensenSeven
Copy link

SvensenSeven commented Jan 26, 2018

There are some problems during compilation on Ubuntu 16.04.
I have the successful build on a workstation, but only on 14.04.

As I noticed, you use VirtualBox. So, if it is possible, please try to use Ubuntu 14.04.
By the way, on my home computer I also use 16.04, so I will try to compile FOAM-FSI during the next days. Maybe I will be faced with the same issue.

@MakisH
Copy link
Author

MakisH commented Jan 29, 2018

An interesting observation: This number seems to be the number of faces shared with each other processor (as I see it in log.decomposePar) and is dependent on the number of processes used.

Any idea why the index goes out of range? I assume that it is running for everybody else, so it must be platform-specific.

Things that I also tried already, without seeing any difference:

  • Reverting the effects of 2f6a745 (default fvSchemes)
  • commenting-out renumberMesh in the Allrun

Some information about my system:

  • I use OpenMPI 1.10.2.
  • Ubuntu 16.04 64bit on a VirtualMachine (host: also Ubuntu 16.04) with 2 virtual cores.
  • My CPU is an Intel Kaby Lake laptop processor with 2*2 virtual cores.
  • I use foam-extend 3.2-a4e7bf3b15c0, which compiled without any errors (I have the complete log file if needed, it is 6MB). FOAM-FSI also built without errors at the end. As I describe in Use relative paths to src/include for the consistent solvers #41 (comment), I had to resume building after setting $FOAM_USER_SRC appropriately. I will try to rebuild it from scratch, but I don't expect this to be relevant.

@MakisH
Copy link
Author

MakisH commented Feb 10, 2018

An update on things I have tried in the meanwhile:
I built it on a different computer (not a VM), again with Ubuntu 16.04. Another user told me that for him it runs normally on Ubuntu 16.04.

I get the same error.

The FOAM-FSI testsuites are running without errors. I also ran a parallel tutorial bundled with foam-extend without any errors (incompressible/simpleFoam/pitzDaily with decompoesPar and mpirun -n 4 simpleFoam -parallel). I also let the foam-extend tutorials/Alltest script run for a while, without any errors.

@davidsblom do you maybe have any idea? Have you seen this kind of error before?

@MakisH
Copy link
Author

MakisH commented Feb 13, 2018

It looks like FOAM-FSI fails to run in Debug mode.

In the building instructions, it is stated:

With the environment variable WM_COMPILE_OPTION you can switch between debug and release builds. So for a debug build: export WM_COMPILE_OPTION=Debug and for a release build: export WM_COMPILE_OPTION=Opt

For optimal performance of the production run, it is advised to add the NDEBUG compiler flag in order to disable all assertions as follows: sed -i s/"c++OPT = -O3"/"c++OPT = -O3 -DNDEBUG"/g foam-extend-3.2/wmake/rules/linux64Gcc/c++Opt

It looks like at the moment this is not only related to performance and is a "must" instead of a "suggestion". Has anybody managed to make it running in Debug? Maybe a bigger bug is hidden below this.

This was a bit counter-intuitive to find because when one tries to find out why a software doesn't work, they should test in "Debug" mode. If there are no guesses on the cause, I will issue a Pull Request to update the building instructions.

@MakisH MakisH changed the title fsiFoam crashes in the beginning (index our of range) fsiFoam crashes in the beginning (index our of range) - FOAM-FSI does not work in Debug mode Feb 13, 2018
@MakisH MakisH changed the title fsiFoam crashes in the beginning (index our of range) - FOAM-FSI does not work in Debug mode FOAM-FSI does not work in Debug mode (index out of range) Feb 13, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants