Hello,recently i run a test script[Device.py] to set the 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 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!
The modified code i restart the job is 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)
The jobs stopped instanly and a another occurred :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:
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?