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

How to see total elapsed time of simulation?

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By zweihuehner
  • 1 Post By courant_numero_uno

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 8, 2021, 15:27
Default How to see total elapsed time of simulation?
  #1
Senior Member
 
Josh McCraney
Join Date: Jun 2018
Posts: 220
Rep Power: 8
joshmccraney is on a distinguished road
Hello all

Is there a way for me to see how long it's taken to run sims? After executing the command

mpirun -np 16 interFoam -parallel

the time pops up in the terminal. But if I close the terminal I'll lose the total runtime. Is there a way to see this, like in a printed file?
joshmccraney is offline   Reply With Quote

Old   December 8, 2021, 19:27
Default
  #2
New Member
 
Faro Schäfer
Join Date: Nov 2021
Posts: 10
Rep Power: 5
zweihuehner is on a distinguished road
You could redirect the output to a file like so:


Linux:
Code:
mpirun -np 16 interFoam -parallel > log.txt &

Windows:
Code:
START /B mpirun -np 16 interFoam -parallel > log.txt

Explanation:
  • > log.txt redirects to a text file
  • [...] & (Linux) and START /B [...] (Windows) run the program in the background
Hope this helps
joshmccraney likes this.
zweihuehner is offline   Reply With Quote

Old   December 30, 2021, 21:12
Default
  #3
Senior Member
 
Josh McCraney
Join Date: Jun 2018
Posts: 220
Rep Power: 8
joshmccraney is on a distinguished road
Thanks so much for the reply! Quick question: if a run this command, then exit the simulation and then resume, will the time be total elapsed or just the time since I re-executed the simulation
joshmccraney is offline   Reply With Quote

Old   January 5, 2022, 12:26
Default
  #4
New Member
 
Join Date: Sep 2019
Posts: 17
Rep Power: 6
courant_numero_uno is on a distinguished road
Quote:
Originally Posted by joshmccraney View Post
Thanks so much for the reply! Quick question: if a run this command, then exit the simulation and then resume, will the time be total elapsed or just the time since I re-executed the simulation

The time in the logs will always be for each separate call of the solver. The symbol > will overwrite the log file after each call. If you want to append to the log file instead, use >>. Alternatively, you can just change the name of the log each run (e.g., command > log1, command > log2).
joshmccraney likes this.
courant_numero_uno 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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Epyc 7551 vs 6850K; Ansys Mechanical Bench Duke711 Hardware 24 March 26, 2020 10:16
Unstabil Simulation with chtMultiRegionFoam mbay101 OpenFOAM Running, Solving & CFD 13 December 28, 2013 13:12
Error in run Batch file saba1366 CFX 4 February 10, 2013 01:15
IcoFoam parallel woes msrinath80 OpenFOAM Running, Solving & CFD 9 July 22, 2007 02:58
Could anybody help me see this error and give help liugx212 OpenFOAM Running, Solving & CFD 3 January 4, 2006 18:07


All times are GMT -4. The time now is 18:58.