Restarting the simulation

Submitted by clarence91 on Fri, 02/06/2015 - 01:20

Hi all,

I am trying to restart the simulation by changing the data file by using "read_restart tmp.restart.120000" command (120000 is the last iteration where I stopped my simulation)

But I was getting this error:

ERROR: Cannot read_restart after simulation box is defined (../read_restart.cpp:75)

Can anyone please help me in fixing this?

Thank you.

AttachmentSize
Binary Data box.stl_.tar_.gz10.85 KB

NTT1508 | Fri, 02/06/2015 - 04:44

Hi,

I think it is due to the position of command region... (domain define). Actually you can ignore this command after your first script which has already defined for that.

clarence91 | Fri, 02/06/2015 - 05:10

Thanks for your reply.

If you don't mind, can you please elaborate your explanation wherein I can proceed with my simulation? (I am a new bee to LIGGGHTS)

Thank you

richti83's picture

richti83 | Fri, 02/06/2015 - 08:18

In your main script there is a line

create_box 2 reg

You need to comment this line out because read_restarts creates the box from the information in the readstartfile.

#create_box 2 reg
read_restart tmp.restart.120000

I'm not an associate of DCS GmbH and not a core developer of LIGGGHTS®
ResearchGate | Contact

richti83's picture

richti83 | Fri, 02/06/2015 - 18:22

without input deck we can not help you.
maybe you have accidentally two read_restart commands or a jump command from main script to restart script or a read_data command without add suffix or a read_dump command or a second create box command or ....
As thread-opener you can easily edit your first post and attach the script which causes the problem as *.txt file.
Have a look at these two scripts how I generate restartfiles and load them:
https://github.com/richti83/LIGGGHTS-WITH-BONDS/blob/master/examples/bon... last line writes restart
and
https://github.com/richti83/LIGGGHTS-WITH-BONDS/blob/master/examples/bon... line 29 and 35

I'm not an associate of DCS GmbH and not a core developer of LIGGGHTS®
ResearchGate | Contact

clarence91 | Thu, 02/12/2015 - 08:32

Hi Richi,

Thanks for your reply. I attached my files to this post. Please have a look.
Now I tried to run it by commenting out "read_data" and I get this new error :

ERROR: Need to define compute pair/gran/local or wall/gran/local before first run (../compute_pair_gran_local.cpp:92)

If possible please help me.
Thanks again.

richti83's picture

richti83 | Thu, 02/12/2015 - 10:42

Hi, as the errormessage says you need to have

compute fc all wall/gran/local id contactArea history
compute fpc all pair/gran/local id contactArea history

before the run 0 command in line 62 of your inputdeck ..

I'm not an associate of DCS GmbH and not a core developer of LIGGGHTS®
ResearchGate | Contact

ravirasoon1991 | Sun, 02/15/2015 - 20:30

Hi all,

Is there a way to convert the restart file to text format, so that I can view what all is being written in it?

Thank you.

richti83's picture

richti83 | Sun, 02/15/2015 - 21:24

have a look in tools/ there is a program called reastart2data, just cd in LIGGGHTS-PUBLIC/tools/ and type make restart2data than execute restart2data RESTARTFILE
I'm not sure if the tool needs to slightly modified to match the new granular style used in liggghts3.

I'm not an associate of DCS GmbH and not a core developer of LIGGGHTS®
ResearchGate | Contact

ravirasoon1991 | Mon, 02/16/2015 - 05:02

Thanks for the reply.

I followed your instructions and I am getting this error:
"" Reading restart file ...
WARNING Restart file version does not match restart2data version
restart2data version = 17 May 2012
ERROR: Unknown pair style gran ""

I am not a proficient in C++, if possible may I know how to introduce "pair style gran" in this restart2data file?

ckloss's picture

ckloss | Mon, 02/23/2015 - 12:36

Hi,

restart2data is now deprecated, it has been succeeded by "write_data"

Best wishes
Christoph

clarence91 | Fri, 03/13/2015 - 17:05

Hi all,

1) For PARALLEL runs do I need to define the "write_restart " command in a different way ?

2) Is it possible to write the restart file (append) like for every 1 hour or 2 hours or may be for certain time-steps?

Thank you.

clarence91 | Fri, 03/13/2015 - 17:05

Hi all,

1) For PARALLEL runs do I need to define the "write_restart " command in a different way ?

2) Is it possible to write the restart file (append) like for every 1 hour or 2 hours or may be for certain time-steps?

Thank you.

richti83's picture

richti83 | Fri, 03/13/2015 - 22:15

1) no
2) use restart NNN restart*.bin to write a restartfile every NNN steps

I'm not an associate of DCS GmbH and not a core developer of LIGGGHTS®
ResearchGate | Contact

clarence91 | Sat, 03/14/2015 - 05:16

Thanks for your reply.

I tried in all possible ways given in the DOCUMENTATION too but still restart file is not being written.
I would atleast be happy if I get any error but I dont even get that too.

richti83's picture

richti83 | Sat, 03/14/2015 - 20:08

have you defined restart command before run command ?
eq:
restart 1000 restart*.bin
run 10000
should produce restart1000.bin, restart2000.bin ... restart10000.bin
does the path exists (eg. when you dump to RESTART/restart*.bin the folder RESTART needs to exists.
Is your harddrive full ?
does ligggths reach the step a restartfile should be written? In very rare cases restart crashes liggghts with a segfault and does not write (in a not reproducable way) but in this case you should see a segmentation fault / code 11 / MPI_Abort message at the end of console output.
Mind sharing your script where you try to use restart NNN file*.extension.

I'm not an associate of DCS GmbH and not a core developer of LIGGGHTS®
ResearchGate | Contact

clarence91 | Sun, 03/15/2015 - 21:26

Problem resolved.

Restart command was after run command.

Thank you.