Author Topic: Restart a calculation using checkpoint file error  (Read 1672 times)

0 Members and 1 Guest are viewing this topic.

Offline ruyam

  • Heavy QuantumATK user
  • ***
  • Posts: 60
  • Country: in
  • Reputation: 0
    • View Profile
Restart a calculation using checkpoint file error
« on: November 24, 2014, 08:36 »
I ran a calculation and it got ended. I tried to restart it using the checkpoint file, but it showed the following error:

  File "/home/ruyam/.vnl/test/test-1.py", line 1142, in <module>
    device_configuration.update(force_restart=True)
  File "./zipdir/NL/CommonConcepts/Configurations/AtomicConfiguration.py", line 1009, in update
NL.ComputerScienceUtilities.Exceptions.NLValueError: A calculator must be attached to the configuration for an update to execute.

I used the instruction given on the following QW link: http://quantumwise.com/publications/tutorials/item/502-restarting-stopped-calculations

Offline Umberto Martinez

  • Supreme QuantumATK Wizard
  • *****
  • Posts: 479
  • Country: dk
  • Reputation: 26
    • View Profile
Re: Restart a calculation using checkpoint file error
« Reply #1 on: November 25, 2014, 10:24 »
can you attach your script? As the message says you need to attach a calculator to the configuration before the update line. This is done by the setCalculator line below
Code
configuration = nlread("checkpointfile.nc")[0]
configuration.setCalculator(configuration.calculator(), initial_state=configuration)
configuration.update(force_restart=True)
nlsave("file.nc",configuration)