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

Graceful stop for running on clusters with time limit?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 5, 2018, 20:53
Default Graceful stop for running on clusters with time limit?
  #1
Senior Member
 
TWB
Join Date: Mar 2009
Posts: 403
Rep Power: 19
quarkz is on a distinguished road
Hi,

I am running OF on clusters with a time limit of 24hr. I'm using a modified OF which writes certain info at the end of the simulation. I found that for certain problems, if it stops at the 24hr limit, it will not finish writing the info and hence I'm not able to restart from where it ended.

Hence, I am wondering if I can set something such that OF will end gracefully after 23hr 55 min?

Thanks!
quarkz is offline   Reply With Quote

Old   June 6, 2018, 02:54
Default
  #2
Senior Member
 
Join Date: Sep 2013
Posts: 353
Rep Power: 21
Bloerb will become famous soon enough
Code:
writeControl cpuTime; // Writes data every writeInterval seconds of CPU time.
writeControl clockTime; // Writes data out every writeInterval seconds of real time.
if needed coupled with the timeActivatedFileUpdate functionObject. Or simply the abort function object .
Bloerb is offline   Reply With Quote

Old   June 6, 2018, 03:39
Default
  #3
Senior Member
 
Gerhard Holzinger
Join Date: Feb 2012
Location: Austria
Posts: 341
Rep Power: 28
GerhardHolzinger will become famous soon enoughGerhardHolzinger will become famous soon enough
Use the abort functionObject to make OpenFOAM gracefully stop, when it detects the presence of a certain file.

Code:
Class
    Foam::functionObjects::abort

Description
    Watches for presence of the named file in the $FOAM_CASE directory
    and aborts the calculation if it is present.

    Currently the following action types are supported:
    - noWriteNow
    - writeNow
    - nextWrite
Define a timed creation of the file, abort is watching for, e.g. by a one-time cron job.
See e.g. https://stackoverflow.com/questions/...time-in-future

This way, you retain the ability to write out at fixed intervals, as graceful stopping is independent of writing out the data. However, this is merely a question of personal preference.
GerhardHolzinger is offline   Reply With Quote

Old   June 6, 2018, 04:13
Default
  #4
Member
 
Hosein
Join Date: Nov 2011
Location: Germany
Posts: 94
Rep Power: 14
einstein_zee is on a distinguished road
Quote:
Originally Posted by quarkz View Post
Hi,

I am running OF on clusters with a time limit of 24hr. I'm using a modified OF which writes certain info at the end of the simulation. I found that for certain problems, if it stops at the 24hr limit, it will not finish writing the info and hence I'm not able to restart from where it ended.

Hence, I am wondering if I can set something such that OF will end gracefully after 23hr 55 min?

Thanks!
Hi,

I'm just curious to know what happens if your simulation stops due to time limit by the time that 24 hours is reached, and then the next day you try to send the job but this time change the controlDict entry to start from "latestTime"? is there anything wrong with this approach?
einstein_zee 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
bash script for pseudo-parallel usage of reconstructPar kwardle OpenFOAM Post-Processing 42 May 7, 2024 23:17
[General] Extracting ParaView Data into Python Arrays Jeffzda ParaView 30 November 6, 2023 21:00
Extrusion with OpenFoam problem No. Iterations 0 Lord Kelvin OpenFOAM Running, Solving & CFD 8 March 28, 2016 11:08
Cluster ID's not contiguous in compute-nodes domain. ??? Shogan FLUENT 1 May 28, 2014 15:03
dynamic Mesh is faster than MRF???? sharonyue OpenFOAM Running, Solving & CFD 14 August 26, 2013 07:47


All times are GMT -4. The time now is 21:05.