CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > SU2

How you debug SU2?

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   December 13, 2016, 23:31
Default How you debug SU2?
  #1
Member
 
Paul Zhang
Join Date: Feb 2011
Posts: 44
Rep Power: 9
paulzhang is on a distinguished road
The question is how you guys debug your code, like which platform Windows/Linux/Mac, and what kind of tool you use?

I use to set a breakpoint in the code, but it seems not quite efficient. Any suggestions will be appreciated.

Thanks,
Paul
paulzhang is offline   Reply With Quote

Old   February 7, 2017, 08:44
Post How to compile SU2 with a -g (debugger) flag?
  #2
New Member
 
Sangeeth
Join Date: Jul 2015
Posts: 7
Rep Power: 4
SangeethCFD is on a distinguished road
Dear Paul,

I encountered the same problem recently. I was trying to use Valgrind tool to map out the function calls in SU2. But to be able to use this tool, one has to compile SU2 with a -g flag ( a debugger flag). I am not sure how to do this?

Since you mentioned that you used a breakpoint feature to debug the code, I presume you must have already done this? Can you please detail as what and which files you changed to compile the whole SU2 code in a debugger version?

Any help is highly appreciated.


Regards,
SangeethCFD is offline   Reply With Quote

Old   February 7, 2017, 21:23
Default
  #3
Member
 
Paul Zhang
Join Date: Feb 2011
Posts: 44
Rep Power: 9
paulzhang is on a distinguished road
Dear SangeethCFD,

I haven't found a good way yet. The breakpoint feature I mentioned is just that I add a piece of code in a way when SU2 runs to this place, it exits. I also output some information to check if my variable or array is functional.

Best,
Paul


Quote:
Originally Posted by SangeethCFD View Post
Dear Paul,

I encountered the same problem recently. I was trying to use Valgrind tool to map out the function calls in SU2. But to be able to use this tool, one has to compile SU2 with a -g flag ( a debugger flag). I am not sure how to do this?

Since you mentioned that you used a breakpoint feature to debug the code, I presume you must have already done this? Can you please detail as what and which files you changed to compile the whole SU2 code in a debugger version?

Any help is highly appreciated.


Regards,
paulzhang is offline   Reply With Quote

Old   February 8, 2017, 01:10
Default
  #4
Member
 
Tom
Join Date: Oct 2015
Posts: 67
Rep Power: 4
mlooti is on a distinguished road
Hi guys


I think the best way to read or debug the code is with help of Xcode

If you use windows you can install mac on VMWare and then install xcode on that

with Xcode one can track the run process line by line

it is also possible to connect the Xcode to the GitHub and try branching
mlooti is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
SU2 debug mode. neetin SU2 4 June 5, 2014 14:48
Pointwise-SU2 joint webinar (April 29th) and SU2 v3.1.0 new release fpalacios SU2 News & Announcements 1 April 30, 2014 02:40
Official release of SU2 V3.0 and SU2 Educational V1.0 fpalacios SU2 News & Announcements 2 January 22, 2014 06:28
SU2 suite has moved to GitHub! fpalacios SU2 News & Announcements 0 August 12, 2013 02:07
Welcome to the Stanford University Unstructured (SU2) forum! economon SU2 0 January 7, 2013 03:48


All times are GMT -4. The time now is 23:33.