CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   mpiRun Stop AND Re-Start (https://www.cfd-online.com/Forums/openfoam-solving/115587-mpirun-stop-re-start.html)

JR22 April 2, 2013 21:11

mpiRun Stop AND Re-Start
 
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.

vbchris April 2, 2013 22:11

You might be looking for

startFrom latestTime;

This will restart the simulation at the last recorded time step.

JR22 April 2, 2013 22:33

Stopping and Restarting an openFoam run
 
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 (Post 417954)
You might be looking for startFrom latestTime;
This will restart the simulation at the last recorded time step.



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