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

mpiRun Stop AND Re-Start

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

Like Tree1Likes
  • 1 Post By JR22

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 2, 2013, 22:11
Question mpiRun Stop AND Re-Start
  #1
Senior Member
 
JR22's Avatar
 
Jose Rey
Join Date: Oct 2012
Posts: 134
Rep Power: 18
JR22 will become famous soon enough
How do I stop and then re-start mpirun for a case?.


I use mpirun from within my case directory in the following way:
Code:
mpirun -np 4 simpleFoam -parallel | tee log/simpleFoam.log
This is the content of my controlDict (set to save @ iter 1000); I want to change a few parameters (related to convergence) and then restart (as described in this post : http://www.cfd-online.com/Forums/ope...tml#post412941 ) :
Code:
FoamFile
{
    version 2.0;
    format ascii;
    class dictionary;
    location system;
    object controlDict;
}

    startFrom startTime;
    startTime 0;
    stopAt endTime;
    endTime 2000.0;
    deltaT 1.0;
    writeControl timeStep;
    writeInterval 1000.0;
    purgeWrite 0;
    writeFormat ascii;
    writePrecision 10;
    writeCompression uncompressed;
    timeFormat general;
    timePrecision 6;
    graphFormat raw;
    runTimeModifiable true;
I've made the effort to look around and truly have not found an answer that can help me. The original file was created using helyx-OS. Thank you very much in advance.

Last edited by JR22; April 2, 2013 at 22:48. Reason: relevant information to changing parameters for convergence
JR22 is offline   Reply With Quote

Old   April 2, 2013, 23:11
Default
  #2
Member
 
Chris L
Join Date: Sep 2012
Posts: 53
Rep Power: 14
vbchris is on a distinguished road
You might be looking for

startFrom latestTime;

This will restart the simulation at the last recorded time step.
vbchris is offline   Reply With Quote

Old   April 2, 2013, 23:33
Default Stopping and Restarting an openFoam run
  #3
Senior Member
 
JR22's Avatar
 
Jose Rey
Join Date: Oct 2012
Posts: 134
Rep Power: 18
JR22 will become famous soon enough
Hi Chris,

I think I got it. I was looking for some of flag to put on the mpirun command; obviously I was lost. This is what I should do:
  1. After 1000 iterations (I have it set to save then), break the process CTRL-C in the Terminal should do it.
  2. Make my changes to speedup convergence (e.g. change schemes to 2nd order)
  3. Change "startFrom startTime;" to "startFrom latestTime;" in the controlDict file.
  4. Go back to the terminal and run that sucker again (i.e. mpirun -np 4 simpleFoam -parallel | tee log/simpleFoam.log).

Thank you very much, it worked perfectly.

Quote:
Originally Posted by vbchris View Post
You might be looking for startFrom latestTime;
This will restart the simulation at the last recorded time step.
Alpha001 likes this.

Last edited by JR22; April 3, 2013 at 01:56.
JR22 is offline   Reply With Quote

Reply

Tags
helyx-os, mpirun, openfoam 2.1.x, parallel execution, restart

Thread Tools Search this Thread
Search this Thread:

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



All times are GMT -4. The time now is 01:32.