CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

System("PAUSE") like command for Debugging

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 6, 2014, 05:13
Default System("PAUSE") like command for Debugging
  #1
Senior Member
 
Ashwani
Join Date: Sep 2013
Location: Hyderabad
Posts: 154
Rep Power: 12
AshwaniAssam is on a distinguished road
Hi all,

Can anyone please suggest how while debugging the code in OpenFOAM, we can halt the simulation. I want to print some output, then have the simulation halt and then continue by pressing any key. I am working on my first code in OpenFOAM and also in C++.

Thanks.
AshwaniAssam is offline   Reply With Quote

Old   February 6, 2014, 05:49
Default
  #2
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 29
akidess will become famous soon enough
Learn how to use GDB. See also http://www.tfd.chalmers.se/~hani/kur...ing.pdf‎
__________________
*On twitter @akidTwit
*Spend as much time formulating your questions as you expect people to spend on their answer.
akidess is offline   Reply With Quote

Old   February 6, 2014, 10:57
Default
  #3
Senior Member
 
Ashwani
Join Date: Sep 2013
Location: Hyderabad
Posts: 154
Rep Power: 12
AshwaniAssam is on a distinguished road
Quote:
Originally Posted by akidess View Post
Thank you for your reply. Actually I was asking for someway to pause the output window, after a desired variable in the code is printed.
As the window refreshes I can't see the output. But definitely, I can use a log file which I thought now.
AshwaniAssam is offline   Reply With Quote

Old   February 6, 2014, 12:07
Default
  #4
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 29
akidess will become famous soon enough
Use the log file, or interactively with Ctrl+Z (general bash command to send a process to sleep). You can wake it again with the command "fg".
__________________
*On twitter @akidTwit
*Spend as much time formulating your questions as you expect people to spend on their answer.
akidess is offline   Reply With Quote

Reply


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 Off
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 14:16.