0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

ADDA > stop / resume the numerical simulation using checkpoint file

Last updated at Posted at 2016-12-16
My_Environment
Ubuntu 14.04 LTS Japanese Remix
on VMWare Fusion v8.5.2 (4635224)
on OS X El Captian v10.11.4

GNU bash, version 4.3.11(1)-release

gcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4 
(also for g++)
ADDA v.1.3b6

This article is related to ADDA (light scattering simulator based on the discrete dipole approximation).

Related: http://qiita.com/7of9/items/9537252c79f5318d8f55
Related: http://qiita.com/7of9/items/4966f131d405cd89ee07

Checkpoint file

used to stop/restart the simulation

See Section 12.5 Checkpoints of the manual.
https://github.com/adda-team/adda/blob/master/doc/manual.pdf

Stop simulation (save checkpoint)

$ ./adda -grid 25 -chp_type normal -chpoint 1s

where -grid 25 is arbitrarily added (so that the simulation should not finish within 1s).

Restart simulation (loading checkpoint)

add -chp_load parameter

$ ./adda -grid 25 -chp_type normal -chp_load -chpoint 1s

where -grid 25 is arbitrarily added (so that the simulation should not finish within 1s).

Errors in 1st/resumed simulation

1st_run
$ ./adda -grid 25 -chp_type normal -chpoint 1s
...
RE_158 = 3.2576107253E-01  -+
RE_159 = 3.2536855335E-01  -+
RE_160 = 3.2481980329E-01  -+
RE_161 = 3.2428023219E-01  -+
RE_162 = 3.2369514141E-01  -+
RE_163 = 3.2327797275E-01  -+
resumed_run
$ ./adda -grid 25 -chp_type normal -chp_load -chpoint 1s
...
RE_360 = 2.6048015704E-01  -+
RE_361 = 2.6011168142E-01  -+
RE_362 = 2.5952229833E-01  -+
RE_363 = 2.5892752389E-01  -+
RE_364 = 2.5832770551E-01  + 

As you can see, the relative error (RE_XXX) becomes smaller for the resumed run which means that the checkpoint file is loaded at the resumed run.

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?