Restart file not working (v.7)

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
fracenvi
Posts: 41
Joined: Wed Jun 19, 2024 9:58 am

Restart file not working (v.7)

Post by fracenvi »

Hello,

I'm facing a weird issue as i'm trying to run a restarted calculation, setting up the restart folder in the cs_user_scripts.py file. Every time i try to run the simulation, it immediately ends with the error:

Code: Select all

Premature end of file "restart/main.csc"
When checking the reference simulation from where the "wrong" checkpoint has been taken i see at the end of the listing file:

Code: Select all

Write final restart files
   checkpoint at iteration       7401, Physical time    0.37005E-01


   ** Writing the main restart file
      -----------------------------

 Start writing
  Wrote field names and types to checkpoint at iteration 7401: checkpoint/main.csc
   End writing the options
  Wrote main variables to checkpoint: checkpoint/main.csc
 End writing

   ** Writing the auxiliary restart file
      ----------------------------------

 Start writing
   End writing the dimensions and options
   End writing the physical properties
   End writing the time step
  Wrote boundary condition coefficients to checkpoint: checkpoint/auxiliary.csc
   End writing the source terms
   End writing combustion information (COD3P)
 End writing
   ** Information on the radiative module
      -----------------------------------
    Writing a restart file
      Write start
      End of output for dimensions
      End of output for data
    End of output to restart file
So i don't really get where the error could be, considering that until that moment i was restarting some other simulations correctly (i'm running on a cluster, so to avoid allocation time problems, every once in a while the simulation is stopped and then restarted using the previously saved checkpoint).

Any idea on how to fix it?
Thanks in advance,
Francesco
Yvan Fournier
Posts: 4263
Joined: Mon Feb 20, 2012 3:25 pm

Re: Restart file not working (v.7)

Post by Yvan Fournier »

Hello,

You can run "code_saturne bdump checkpoint/main.csc" to get more info on file and see if it complete (it should end in an "EOF" section).

It has probably been corrupted, but how ? If this occurs at each run, this is an issue. If it occurs once, it is probably not worth bothering to analyze it, but simply re-run that computation. Note also that code_saturne 7.0 is not supported anymore (though there is no significant change that I can think in handling of checkpoints between v7.0 and later versions).

Best regards,

Yvan
Post Reply