|
[Sponsors] |
Customized code based on DieselEngineFoamSolver, always getting segmentation fault |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 3, 2009, 05:26 |
Customized code based on DieselEngineFoamSolver, always getting segmentation fault
|
#1 |
Member
Join Date: Jun 2009
Posts: 36
Rep Power: 16 |
Hello,
i am still working/searching for a good solution for MeshMoving. I figured out that the Cut/adding-cell algorithm can be find in the LayerAR.C (with its baseclasses). For testing I took the DieselEngineFoamSolver with "EngineTopoChangerMesh.H" (instead of EngineMesh.H) and "CreateEngineDynmiacMesh.H" (instead of CreateEngineMesh.H). For the first loops (crank angle -180 - (-170.5)) all is done fine. But then the solver gives the following message when the crank angle exactly reaching -170: Code:
deformSwitch 20 INFO 0 PistonDeformation0 Piston layering mode 01 1 MinLayerThickness 0.003 Segmentation fault Code:
deformSwitch 20 INFO 0 PistonDeformation0 Piston layering mode 01 1 MinLayerThickness 0.003 2 3 3 .... Code:
Info << "1" << endl; Info << "MinLayerThickness " << minLayerThickness << endl; autoPtr<mapPolyMesh> topoChangeMap = topoChanger_.changeMesh(); Info << "2" I would be very happy anybody can help me! Any have fun to decrypt my Enlish |
|
July 3, 2009, 08:05 |
|
#2 |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
I'm afraid the 'easiest' way to find out the exact location of the error is compiling a debug-version and running that (see http://openfoamwiki.net/index.php/HowTo_debugging)
Unless this is a well-known error. Then someone might be able to tell you directly what is wrong |
|
July 3, 2009, 08:46 |
|
#3 |
Member
Join Date: Jun 2009
Posts: 36
Rep Power: 16 |
ok, i will repeat it with the debug-mode. let's see...
|
|
July 15, 2009, 10:40 |
|
#4 | |
Member
Join Date: Jun 2009
Posts: 36
Rep Power: 16 |
Hello,
i recompiled the openfoam-15-dev now with the linxgccdebug compiler. Now i can compile everything in debug-mode. I made the the same procedure like last time. Now: Quote:
The void checks if i is < 0 or < size (obv 531 in this case) but i have no idea where he gets: a) index i b) size If anybody knows that, it would be very helpfull. |
||
July 16, 2009, 05:12 |
|
#5 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
http://openfoamwiki.net/index.php/HowTo_debugging Normally the actual error should be one or two points below the intercepted UList-access. The stack-trace reports reports the filenames and the line-numbers in the debug-version. And that is the information of interest Bernhard |
||
July 30, 2009, 09:33 |
|
#6 |
Member
Join Date: Jun 2009
Posts: 36
Rep Power: 16 |
Hello,
it's me again I teste the "bt" command in gdb after the segmentation fault: Code:
#0 0xb804d430 in __kernel_vsyscall () #1 0xb61b36d0 in raise () from /lib/tls/i686/cmov/libc.so.6 #2 0xb61b5098 in abort () from /lib/tls/i686/cmov/libc.so.6 #3 0xb6648458 in Foam::error::abort (this=0xb69cf620) at lnInclude/error.C:243 #4 0x08087d58 in Foam::operator<< <Foam::error> (os=@0x89be5d8, m={fPtr_ = 0xb664815a <Foam::error::abort()>, err_ = @0xb69cf620}) at /home/cfd/OpenFOAM/OpenFOAM-1.5-dev/src/OpenFOAM/lnInclude/errorManip.H:86 #5 0x08096597 in Foam::UList<double>::checkIndex (this=0x8b3528c, i=1) at /home/cfd/OpenFOAM/OpenFOAM-1.5-dev/src/OpenFOAM/lnInclude/UListI.H:111 #6 0x080965c2 in Foam::UList<double>::operator[] (this=0x8b3528c, i=1) at /home/cfd/OpenFOAM/OpenFOAM-1.5-dev/src/OpenFOAM/lnInclude/UListI.H:136 #7 0xb73df753 in Foam::volPointInterpolation::interpolateInternalField<Foam::Vector<double> > (this=0xbfb6955c, vf=@0xbfb687d0, pf=@0x8b0c6e8) at lnInclude/volPointInterpolate.C:67 #8 0xb73e9caa in Foam::volPointInterpolation::interpolate<Foam::Vector<double> > (this=0xbfb6955c, vf=@0xbfb687d0) at lnInclude/volPointInterpolate.C:184 #9 0xb7404129 in interpolationCellPointFace (this=0x8a507a0, pInterp=@0xbfb6955c, psi=@0xbfb687d0) at interpolation/interpolation/interpolationCellPointFace/interpolationCellPointFace.C:53 #10 0xb740425d in Foam::interpolation<Foam::Vector<double> >::adddictionaryConstructorToTable<Foam::interpolationCellPointFace<Foam::Vector<double> > >::New ( pInterp=@0xbfb6955c, psi=@0xbfb687d0) at lnInclude/interpolation.H:80 #11 0xb6c4db56 in Foam::interpolation<Foam::Vector<double> >::New (interpolationType=@0xbfb674d8, pInterp=@0xbfb6955c, psi=@0xbfb687d0) at /home/cfd/OpenFOAM/OpenFOAM-1.5-dev/src/finiteVolume/lnInclude/newInterpolation.C:58 #12 0xb6c4dbcf in Foam::interpolation<Foam::Vector<double> >::New (interpolationSchemes=@0xbfb67f4c, pInterp=@0xbfb6955c, psi=@0xbfb687d0) at /home/cfd/OpenFOAM/OpenFOAM-1.5-dev/src/finiteVolume/lnInclude/newInterpolation.C:71 #13 0xb6c46b5f in Foam::spray::evolve (this=0xbfb67c58) at spray/sprayOps.C:57 #14 0x080811d6 in main (argc=Cannot access memory at address 0x528c The orginally error is now: index 1 out of range 0 ... 0 From function UList<T>::checkIndex(const label) in file /home/cfd/OpenFOAM/OpenFOAM-1.5-dev/src/OpenFOAM/lnInclude/UListI.H at line 111. FOAM aborting |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
how can I get rid of segmentation fault | sabuj | Fluent UDF and Scheme Programming | 4 | July 3, 2016 05:46 |
DPM Segmentation Fault in UDF | jhlee9622 | FLUENT | 0 | July 1, 2016 03:21 |
DPM_Heat_MASS, Segmentation fault error | herr010 | Fluent UDF and Scheme Programming | 0 | July 22, 2015 04:24 |
Segmentation Fault caused by a pointer | floquation | OpenFOAM Programming & Development | 1 | October 17, 2014 11:43 |