|
[Sponsors] |
September 30, 2014, 12:37 |
Debug mode in V2.3.0
|
#1 |
New Member
Join Date: Jun 2014
Posts: 22
Rep Power: 11 |
Dear All,
I am trying to use debug mode so that I can have more information. I tried to follow the instruction in the following website, but I don't think I got it right. http://openfoamwiki.net/index.php/HowTo_debugging My understanding was: 1. turn on the terminal and typing "WM_COMPILE_OPTION=Debug". 2. run wmake under /opt/openfoam230/applications and /opt/openfoam230/src 3. the debug mode is on; now can run the case in usual way. However, it doesn't show anything special in the log file. What should I do to turn on the debug mode? or I will be appreciate if anyone can tell me a better way to go through the log file? by the way, the following are my error message. (using interPhaseChangeDyMFoam on openFoam 2.3.0) Code:
Courant Number mean: 0.00212372546584 max: 0.991900179872 deltaT = 1.8928919974e-06 Time = 0.0197943 PIMPLE: iteration 1 solidBodyMotionFunctions::myRotatingMotion::transformation(): Time = 0.019794321324 transformation: ((0.894465723199 -0.000502692955871 1.5649935677) (-0.0669220610587 (-0.00052803881651 -0.997758066151 -1.86923002333e-05))) AMI: Creating addressing and weights between 60855 source faces and 61246 target faces AMI: Patch source sum(weights) min/max/average = 0.546824575872, 1.51385917053, 1.0007421976 AMI: Patch target sum(weights) min/max/average = 0, 1.24007098357, 0.998532347332 Execution time for mesh.update() = 51.82 s GAMGPCG: Solving for pcorr, Initial residual = 1, Final residual = 2.27993255806e-06, No Iterations 6 time step continuity errors : sum local = 5.82512806303e-05, global = 5.70027272373e-05, cumulative = 0.013985308617 smoothSolver: Solving for alpha.water, Initial residual = 5.11556184272e-06, Final residual = 1.7923962635e-11, No Iterations 1 Phase-1 volume fraction = 0.447086765725 Min(alpha1) = 0 Max(alpha1) = 1.00000502961 MULES: Correcting alpha.water Liquid phase volume fraction = 0.447086772721 Min(alpha1) = 0 Max(alpha1) = 1.0000050296 [3] #0 Foam::error::printStack(Foam::Ostream&) at /opt/openfoam230/src/OSspecific/POSIX/printStack.C:221 [3] #1 Foam::sigFpe::sigHandler(int) at /opt/openfoam230/src/OSspecific/POSIX/signals/sigFpe.C:108 [3] #2 in "/lib/x86_64-linux-gnu/libc.so.6" [3] #3 Foam::divide(Foam::Field<double>&, double const&, Foam::UList<double> const&) at /opt/openfoam230/src/OpenFOAM/fields/Fields/scalarField/scalarField.C:116 (discriminator 2) [3] #4 Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::operator/<Foam::fvPatchField, Foam::volMesh>(Foam::dimensioned<double> const&, Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > const&) at ??:? [3] #5 [3] at ??:? [3] #6 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6" [3] #7 [3] at ??:? [laptop-Ubuntu:06447] *** Process received signal *** [laptop-Ubuntu:06447] Signal: Floating point exception (8) [laptop-Ubuntu:06447] Signal code: (-6) [laptop-Ubuntu:06447] Failing at address: 0x3e80000192f [laptop-Ubuntu:06447] [ 0] /lib/x86_64-linux-gnu/libc.so.6(+0x36ff0) [0x7f69ff50cff0] [laptop-Ubuntu:06447] [ 1] /lib/x86_64-linux-gnu/libc.so.6(gsignal+0x37) [0x7f69ff50cf77] [laptop-Ubuntu:06447] [ 2] /opt/openfoam230/platforms/linux64GccDPOpt/lib/libOpenFOAM.so(_ZN4Foam6sigFpe10sigHandlerEi+0xbc) [0x7f6a009fedba] [laptop-Ubuntu:06447] [ 3] /lib/x86_64-linux-gnu/libc.so.6(+0x36ff0) [0x7f69ff50cff0] [laptop-Ubuntu:06447] [ 4] /opt/openfoam230/platforms/linux64GccDPOpt/lib/libOpenFOAM.so(_ZN4Foam6divideERNS_5FieldIdEERKdRKNS_5UListIdEE+0x87) [0x7f6a0094d90f] [laptop-Ubuntu:06447] [ 5] interPhaseChangeDyMFoam(_ZN4FoamdvINS_12fvPatchFieldENS_7volMeshEEENS_3tmpINS_14GeometricFieldIdT_T0_EEEERKNS_11dimensionedIdEERKS8_+0x1af) [0x48361f] [laptop-Ubuntu:06447] [ 6] interPhaseChangeDyMFoam() [0x42ffa0] [laptop-Ubuntu:06447] [ 7] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5) [0x7f69ff4f7de5] [laptop-Ubuntu:06447] [ 8] interPhaseChangeDyMFoam() [0x434f46] [laptop-Ubuntu:06447] *** End of error message *** -------------------------------------------------------------------------- mpirun noticed that process rank 3 with PID 6447 on node laptop-Ubuntu exited on signal 8 (Floating point exception). |
|
September 30, 2014, 15:00 |
|
#2 |
Senior Member
|
Hi,
do you have write permission in /opt/openfoam230 (just to be sure version with debug symbols was built)? Do you have WM_COMPILE_OPTION=Debug in the terminal session where you are trying to debug OpenFOAM (just to be sure you're really running version with debug information)? |
|
September 30, 2014, 15:22 |
|
#3 |
New Member
Join Date: Jun 2014
Posts: 22
Rep Power: 11 |
yes, I do have the permission in /opt/openfoam230, and I do have WM_COMPILE_OPTION=Debug in the terminal session.
I also run the Allwmake under /opt/openfoam230/applications and /opt/openfoam230/src. |
|
September 30, 2014, 15:40 |
|
#4 |
Senior Member
|
Well, can you please post the output of
Code:
$ echo $FOAM_APPBIN |
|
September 30, 2014, 15:47 |
|
#5 |
New Member
Join Date: Jun 2014
Posts: 22
Rep Power: 11 |
the result of "echo $FOAM_APPBIN" is
/opt/openfoam230/platforms/linux64GccDPOpt/bin |
|
September 30, 2014, 15:49 |
|
#6 |
Senior Member
|
Well, as you can see you build is linux64GccDPOpt, i.e. it's Opt and not Debug. Do you have folder /opt/openfoam230/platforms/linux64GccDPDebug/bin at all?
|
|
September 30, 2014, 15:56 |
|
#7 |
New Member
Join Date: Jun 2014
Posts: 22
Rep Power: 11 |
I think you got the point. I don't even have the folder /opt/openfoam230/platforms/linux64GccDPDebug.
So......would you mind to tell me which steps that I missed? |
|
September 30, 2014, 16:15 |
|
#8 |
Senior Member
|
Well,
1. As you've said you've got write permission in /opt/openfoam230, show the output of wmake command. 2 (one way). Edit /opt/opefoam230/etc/bashrc, change "WM_COMPILE_OPTION=Opt" to "WM_COMPILE_OPTION=Debug", reopen terminal session, run wmake in /opt/openfoam230/src and /opt/openfoam/applications. When you get tired of debug version, you edit bashrc again and revert to "WM_COMPILE_OPTION=Opt" 2 (another way). Build debug version of OpenFOAM from sources rather than use system-wide installation. So you'll have Debug version in $HOME/OpenFOAM and Opt version system-wide. Then you create corresponding aliases for environment setup. |
|
September 30, 2014, 16:36 |
|
#9 |
New Member
Join Date: Jun 2014
Posts: 22
Rep Power: 11 |
The first way that you suggested was exactly what I did before.
I just find a useful file online. http://www.tfd.chalmers.se/~hani/kur.../debugging.pdf. Now, I guess that the reason causing to fail, might because of not install a third party debug software(eg, GDB). Thank you for reply, I think I will try to just switch the DebugSwitch option and see. I will try to install GDB if the DebugSwitch option won't give me enough information. Thank you very much. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Debug mode with UDF ?? | Thierry | FLUENT | 1 | October 9, 2018 21:57 |
SU2 debug mode. | neetin | SU2 | 4 | June 5, 2014 14:48 |
index out of range when accessing boundaryField in debug mode | sr_tenedor | OpenFOAM Bugs | 5 | April 14, 2013 11:17 |
Switching to debug mode? | NJG | OpenFOAM Installation | 4 | March 4, 2013 18:08 |
How to compile OF-1.5 in the debug mode? | sandy | OpenFOAM Running, Solving & CFD | 4 | July 8, 2009 08:43 |