View Issue Details

IDProjectCategoryView StatusLast Update
0003563OpenFOAMBugpublic2020-10-16 15:18
ReporterAlexisEspinosa Assigned Tohenry  
PrioritynoneSeverityminorReproducibilityalways
Status closedResolutionsuspended 
PlatformGNU/LinuxOSOtherOS Version(please specify)
Summary0003563: Failing to restart a collated case when result-time-directory precision is higher than timePrecision set in controlDict
DescriptionWhen using:
writeControl runTime;
adjustTimeStep yes;
timePrecision 6;

result-time-directories may be written with a time-name that cannot be represented by the precision. To illustrate, use the tutorial:
OpenFOAM-8/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVessel2D
then modify to use writeControl runTime;
After some iteratons, this will write result-times like:
1.29958617

This is not a problem for the "fileHandler uncollated" default option, because when restarting from there, the following change is reported and restart is successfull:
--> FOAM Warning :
    From function void Foam::Time::setControls()
    in file db/Time/Time.C at line 205
    Increasing the timePrecision from 6 to 16 to support the formatting of the current time directory 1.29958617

But when decomposing the case from the very beginning (time 0) and using the collated option. When reaching the time 1.29958617 and restarting from there, the case CANNOT be restarted. The following error message appears:

[0] --> FOAM FATAL ERROR:
[0] cannot find file "/scratch/pawsey0001/espinosa/borra/containers-openfoam-workshop-scripts/02_executingFullWorkflow/example_OpenFOAM-8/run/mixerVessel2D/processor0/1.29959/p"
[0]

Clearly, when collated option is used, the adjustment to higher timePrecision is not performed and the reader is looking for the time-directory 1.29959 instead of 1.29958617.

Steps To ReproduceExplained in the description
TagsNo tags attached.

Activities

henry

2020-10-01 10:42

manager   ~0011564

Try increasing the time precision or use time step adjustment to ensure that the time directory names are more regular.

AlexisEspinosa

2020-10-02 05:13

reporter   ~0011565

Yes, currently we are avoiding this issue with the use of:
writeControl adjustableRunTime;
This forces the generation of regular names for the time-result directories.

But I raised the ticket because the criteria of the restart of the solver is different between the `uncollated` and `collated` fileHandler. When long time-result directory names are used in a restart:
1. When using the default `fileHandler uncollated`: the solver overrides the controlDict setting and increases timePrecision to support the restarting time.
2. When using the `fileHandler collated`: the solver is unable to restart.

So, I'm guessing you would like to apply a uniform criteria for the solver when it reaches this situation. Either to never override the timePrecision , so that users take care of the generation of time-results always with adjustableRunTime, even for the default `uncollated` option. Or, to always override the timePrecision for both types of fileHandler. But it sounds a bit weird to me to use different criteria for the same situation depending on the fileHandler choice. And more if you already have thought about a solution for this problematic and already programmed it for fileHandler uncollated. It then sounds very reasonable to me to "copy/paste" (if it is that simple) the same criteria-logic to be used for the `collated` option too.

Many thanks,
Alexis

henry

2020-10-02 07:40

manager   ~0011566

Can you provide funding to work on this or a patch which resolves the issue you have in your cases?

AlexisEspinosa

2020-10-02 07:48

reporter   ~0011567

Sure, I will work on the patch. I will try my simple idea of copy/paste what you already have implemented for the `uncollated` option. I will let you know when its ready.
Cheers, Alexis.

henry

2020-10-16 15:18

manager   ~0011619

Pending patch and/or funding.

Issue History

Date Modified Username Field Change
2020-10-01 10:28 AlexisEspinosa New Issue
2020-10-01 10:42 henry Note Added: 0011564
2020-10-01 10:59 henry Priority normal => none
2020-10-01 10:59 henry Severity crash => minor
2020-10-02 05:13 AlexisEspinosa Note Added: 0011565
2020-10-02 07:40 henry Note Added: 0011566
2020-10-02 07:48 AlexisEspinosa Note Added: 0011567
2020-10-16 15:18 henry Assigned To => henry
2020-10-16 15:18 henry Status new => closed
2020-10-16 15:18 henry Resolution open => suspended
2020-10-16 15:18 henry Note Added: 0011619