Author Topic: problem about restarting from a check point  (Read 2729 times)

0 Members and 1 Guest are viewing this topic.

Offline ATK-user-zuox

  • Heavy QuantumATK user
  • ***
  • Posts: 26
  • Country: cn
  • Reputation: 1
    • View Profile
problem about restarting from a check point
« on: January 9, 2016, 06:48 »
Hello,recently i run a test script[Device.py] to set the
Code
DeviceLCAOCalculator( checkpoint_handler= CheckpointHandler('checkpoint-2.nc', 1*Minute),
and kille the job for restarting the jobs.i also get the [checkpoint-2.nc],but when i run the new py script[Device-restart.py], i get the  error message instantly
Code
Traceback (most recent call last):
  File "Device.py", line 495, in <module>
    device_configuration.setCalculator(DeviceLCAOCalculator(), initial_state= device_configuration)
  File "./zipdir/NL/CommonConcepts/Configurations/AtomicConfiguration.py", line 1222, in setCalculator
  File "./zipdir/NL/CommonConcepts/Calculator.py", line 58, in _supportConfiguration
  File "./zipdir/NL/CommonConcepts/Calculator.py", line 48, in _supportConfigurationType
  File "./zipdir/NL/Analysis/AnalysisUtilities.py", line 78, in checkConfiguration
NL.ComputerScienceUtilities.Exceptions.NLTypeError: The parameter, configuration, must be an instance of one of the following SurfaceConfiguration, DeviceConfiguration, NudgedElasticBand.
I have already read the Restarting stopped calculations toturial ,forum ,and the manual and i can't fix the problem in my code. Hope anyone could help! me!

Offline ATK-user-zuox

  • Heavy QuantumATK user
  • ***
  • Posts: 26
  • Country: cn
  • Reputation: 1
    • View Profile
Re: problem about restarting from a check point
« Reply #1 on: January 9, 2016, 06:53 »
The modified code i restart the job is
Code
device_configuration = nlread("checkpoint-2.nc",)[0]
device_configuration.setCalculator(DeviceLCAOCalculator(), initial_state= device_configuration)
nlprint(device_configuration)
device_configuration.update(force_restart=True)
nlsave('Device Gold.nc', device_configuration)

Offline Jess Wellendorff

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 933
  • Country: dk
  • Reputation: 29
    • View Profile
Re: problem about restarting from a check point
« Reply #2 on: January 14, 2016, 09:28 »
So this solves the problem?

Offline kanna

  • Regular QuantumATK user
  • **
  • Posts: 19
  • Reputation: 0
    • View Profile
Re: problem about restarting from a check point
« Reply #3 on: January 17, 2016, 08:42 »
Does this restart from where the simulation ended at 1 Minute ?

Offline ATK-user-zuox

  • Heavy QuantumATK user
  • ***
  • Posts: 26
  • Country: cn
  • Reputation: 1
    • View Profile
Re: problem about restarting from a check point
« Reply #4 on: January 17, 2016, 13:08 »
The jobs stopped instanly and  a another occurred :
Code
Traceback (most recent call last):
  File "Device.py", line 494, in <module>
    device_configuration = nlread("checkpoint-2.nc", DeviceConfiguration)[0]
IndexError: list index out of range
, i clear the
  • and another error occurred:
    Code
    Traceback (most recent call last):[/li][/list]
      File "Device.py", line 495, in <module>
        device_configuration.setCalculator(DeviceLCAOCalculator(), initial_state= device_configuration)
    AttributeError: 'list' object has no attribute 'setCalculator'
    i will test the restarting function after running a long time .Did anyone can explain why i can't restart?

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5435
  • Country: dk
  • Reputation: 89
    • View Profile
    • QuantumATK at Synopsys
Re: problem about restarting from a check point
« Reply #5 on: January 18, 2016, 10:18 »
The jobs stopped instanly and  a another occurred :
Code
Traceback (most recent call last):
  File "Device.py", line 494, in <module>
    device_configuration = nlread("checkpoint-2.nc", DeviceConfiguration)[0]
IndexError: list index out of range
This means there are no DeviceConfigurations in the file "checkpoint-2.nc". Probably you never even got to the device part. It is probably better to start the job from scratch.