Author Topic: checkpoint_handler  (Read 1609 times)

0 Members and 1 Guest are viewing this topic.

Offline ramkrishna

  • Supreme QuantumATK Wizard
  • *****
  • Posts: 253
  • Country: us
  • Reputation: 5
    • View Profile
checkpoint_handler
« on: December 4, 2013, 19:22 »
Dear Sir,       My simulation crashes after running 3 days. So I want to restart the simulation by using the checkpoint file. Now, the default location of the checkpoint file is in the directory TEMP but I am running the simulations in a cluster and so it is admin protected. For this, I want to specify the checkpoint handler manually in the script so that it can go directly in the desktop. I was checking the manual http://quantumwise.com/documents/manuals/latest/ReferenceManual/index.html/ref.checkpointhandler.html how to specify this. Here, I am little confused. Should I have to put the command checkpoint_handler = CheckpointHandler('/home/checkpoint.nc', 20*Minute) calculator = LCAOCalculator(checkpoint_handler=checkpoint_handler) within the device calculator in the following manner?? or where exactly I have put this command
Code
 #----------------------------------------
# Device Calculator
#----------------------------------------
calculator = DeviceLCAOCalculator(
    basis_set=basis_set,
    exchange_correlation=exchange_correlation,
    numerical_accuracy_parameters=device_numerical_accuracy_parameters,
    electrode_calculators=
        [left_electrode_calculator, right_electrode_calculator],
    )

# Set Checkpoint file[/color]
checkpoint_handler = CheckpointHandler('/Desktop/checkpoint.nc', 20*Minute)

calculator = LCAOCalculator(checkpoint_handler=checkpoint_handler)


device_configuration.setCalculator(calculator)
nlprint(device_configuration)
device_configuration.update()
nlsave('Device_1.nc', device_configuration)
Please help. Regards Ramkrishna
« Last Edit: December 4, 2013, 19:24 by ramkrishna »

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5429
  • Country: dk
  • Reputation: 89
    • View Profile
    • QuantumATK at Synopsys
Re: checkpoint_handler
« Reply #1 on: December 4, 2013, 22:29 »
That is basically correct, but both "/home/checkpoint.nc" and "/Desktop" would likely not work... Probably it should be more like /home/yourusername/Desktop/checkpoint.nc or just /home/yourusername/checkpoint.nc.

Well, the idea is correct. Your code is wrong. The checkpoint must be set on the DeviceLCAOCalculator - you cannot set an LCAOCalculator on a DeviceConfiguration anyway.