segfault when using restart + post

General discussion about Elmer
Post Reply
DHal
Posts: 3
Joined: 31 May 2011, 17:49
Antispam: Yes

segfault when using restart + post

Post by DHal »

Hello All,

I found that when i use a restart file, and also ask for a post file, ElmerSolver segfaults in the WritePostFile function of ModelDescription.f90., somwhere in the loop in the default statement of the "Count degrees of freedom to be saved" step.


Code: Select all

3326               CALL Info('debugging','dofs')
3327               DO k=1,Var % DOFs
3328                 Var => Var % Next
3329               END DO
For some reason, in there, the Var must be undefined before Var%DOFs is reached. I don't know why that would be.

The full debugging output for the crash looks like this, the debugging statements are in the attached patch (it applies to the .f90 file... sorry)

Code: Select all

WriteToPost: Saving results in ElmerPost format to file ./case.ep
debugging: doing while associated
debugging: case statement :coordinate 1
debugging: next
debugging: case statement :coordinate 2
debugging: next
debugging: case statement :coordinate 3
debugging: next
debugging: case statement :potential grad 1
debugging: next
debugging: case statement :potential grad 2
debugging: next
debugging: case statement :grad
debugging: 1:trim
debugging: true
debugging: dofs
Segmentation fault
The final post file is 0 bytes when complete.

Whilst I am good to continue on, now that I know that taking out the restart file avoids the problem, i felt I should still report it, seeing as I spent the time tracking it down :)

Thanks.

If you need the .msh file too, I can upload it.
Attachments
case-forwards.sif
Good case... unless you dont comment out the restart file (do two passes, one commented to make restart file, then again uncommented to load it)
(1.66 KiB) Downloaded 287 times
debugging-prints.patch
debugging print statements
(3.5 KiB) Downloaded 294 times
Post Reply