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

mpiRun Stop AND Re-Start

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

Reply
 
LinkBack Thread Tools Display Modes
Old   April 2, 2013, 21:11
Question mpiRun Stop AND Re-Start
  #1
Senior Member
 
JR22's Avatar
 
Jose Rey
Join Date: Oct 2012
Posts: 122
Rep Power: 8
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 : Initial Residual for p too high! ) :
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 21:48. Reason: relevant information to changing parameters for convergence
JR22 is offline   Reply With Quote

Old   April 2, 2013, 22:11
Default
  #2
Member
 
Chris L
Join Date: Sep 2012
Posts: 36
Rep Power: 4
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, 22:33
Default Stopping and Restarting an openFoam run
  #3
Senior Member
 
JR22's Avatar
 
Jose Rey
Join Date: Oct 2012
Posts: 122
Rep Power: 8
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.

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

Reply

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

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



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