strange behaviour of SaveMaterials in Restart runs

Extension of Elmer in computational glaciology

strange behaviour of SaveMaterials in Restart runs

Postby Martina » 22 May 2013, 12:22

Hi,

I have some problems with the SaveMaterials in Restart runs.
I have two parameters in the Material section which change over time (they are read in from a file at each timestep). They exist only for output purpose, but are doubles of other things (for example the line "Constant Temperature" in the viscosity section or a scaled version of the surface mass balance (which is a real variable)).
If I do my full run, everything is fine - they correspond to what I read in. If I do a restart after 50years, they remain for the remaining simulation time unchanged at their last value before the restart. However, the corresponding "real" variables do change as they should: I verified my real mass balance variable and I also verified the result after 100years of simulation. It is the same with and without restart in the middle which leads me to the conclusion that my actual reading is working fine and my temperature and massbalance are actually right; but something goes wrong with the SaveMaterials. In my case it's luckily without consequence, since it was meant only for "checking" that the reading goes well.
I added in the restart run 2 more parameters with a different name (which do not exist before restarting), copypasting from the two first ones, and they do change over time as they should in contrast to the first set.
I also tried adding "exported variable" for these parameters and running a dummy solver creating them as variable in addition - without effect, they remain constant after restarting.

I didn't took the time to look further in that or in making a smaller testcase since for me the problem is not essential (it's only output and currently I just introduce new parameter-names when restarting), but I was wondering if others had experienced similar problems and I had heart from several persons having troubles with restarts (but don't know more about the nature of these problems).

Martina
Martina
 
Posts: 39
Joined: 17 Apr 2013, 14:06

Re: strange behaviour of SaveMaterials in Restart runs

Postby joeatodd » 22 May 2013, 13:02

Hi Martina,

This sounds like a problem I had with a solver I wrote, which involved the VariableAdd function.

Basically, the solver called:

Code: Select all
VariableAdd( variables, mesh, SolverPointer, Name, 1, Values, Perm )


On the assumption that this call was successful, the values were simply updated with:

Code: Select all
Values(Perm(i)) = whatevernumber_dp


This is fine if the VariableAdd call is successful, but in the case where the variable already exists, this failed and the values weren't updated.

A quick scan of SaveMaterials doesn't throw up anything obvious like this, but your symptoms are identical to mine, so it's probably worth looking into.
joeatodd
 
Posts: 34
Joined: 02 Feb 2012, 18:49


Return to Elmer/Ice

Who is online

Users browsing this forum: No registered users and 1 guest