Author Topic: two questiones about the checkpoint file name in ATK 2008.10  (Read 6440 times)

0 Members and 1 Guest are viewing this topic.

Offline zdhlover

  • Global Moderator
  • QuantumATK Guru
  • *****
  • Posts: 106
  • Reputation: 2
    • View Profile
 :D Hi,every one ,I have two questiones about the checkpoint file name in ATK 2008.10

Frist:
In the script:
import ATK
import numpy
for voltage in numpy.arange(0.0, 1.01, 0.1):
  # Store each calculation in a separate NetCDF file
 
  ATK.setCheckpointFilename('nonsy-tmr--anti-dn-%.2f.nc' % voltage)
  scf = restoreSelfConsistentCalculation(m)   .......

what is the correct string that can be substitute for  m ?  CheckpointFilename? checkpointFilename ?checkpoint_filename?seems are all incorrect?why?
Second:
  After the sentence"ATK.setCheckpointFilename('nonsy-tmr--anti-dn-%.2f.nc' % voltage)",why I can't use"print checkpointFilename()"  in which the error pointed out that he "checkpointFilename" was not defined?

Thanks a lot

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5413
  • Country: dk
  • Reputation: 89
    • View Profile
    • QuantumATK at Synopsys
Re: two questiones about the checkpoint file name in ATK 2008.10
« Reply #1 on: April 25, 2011, 23:42 »
"m" should simply be the filename of the checkpoint file. The manual is your friend ;) However, perhaps not always - sometimes it can fool you too :o In another part of the manual, I believe there is a typo; you need
Code: python
print ATK.checkpointFileName()
« Last Edit: April 25, 2011, 23:45 by Anders Blom »

Offline zdhlover

  • Global Moderator
  • QuantumATK Guru
  • *****
  • Posts: 106
  • Reputation: 2
    • View Profile
Re: two questiones about the checkpoint file name in ATK 2008.10
« Reply #2 on: April 26, 2011, 09:05 »
 :)

Thanks a lot

Offline zdhlover

  • Global Moderator
  • QuantumATK Guru
  • *****
  • Posts: 106
  • Reputation: 2
    • View Profile
Re: two questiones about the checkpoint file name in ATK 2008.10
« Reply #3 on: April 26, 2011, 13:07 »
 :)
Hi, everyone, I want to process a series of nc files,so I write a crappy script as follow:
from ATK.TwoProbe import *
from ATK.MPI import processIsMaster
import ATK
import numpy
for voltage in numpy.arange(0.0, 1.181, 0.02):
  # Store each calculation in a separate NetCDF file
  ATK.setCheckpointFilename('nonsy-tmr--para-dn-%.2f.nc' % voltage)
  scf = restoreSelfConsistentCalculation(checkpointFilename)
  ......


And I don't know what is the correct string that can be substitute for checkpointFilename?

please help me, thanks

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5413
  • Country: dk
  • Reputation: 89
    • View Profile
    • QuantumATK at Synopsys
Re: two questiones about the checkpoint file name in ATK 2008.10
« Reply #4 on: April 26, 2011, 13:14 »
Well, it should be the filename of the file you wish to restore, so presumable it's exactly the same string as that used to save the NC files.

Offline zdhlover

  • Global Moderator
  • QuantumATK Guru
  • *****
  • Posts: 106
  • Reputation: 2
    • View Profile
Re: two questiones about the checkpoint file name in ATK 2008.10
« Reply #5 on: April 26, 2011, 15:27 »
oh, I am sorry , I have use the modified ivcurve script and compute the I-V curve of a junction. As a result, I have a series of nc files as shown in fig 1,then I want to restore the nc files to  calculate the physical properties, so I write a crappy script as before

so I want to know how can I write the script snippet to restore series nc files to compute the same physical properties in one script?
from ATK.TwoProbe import *
from ATK.MPI import processIsMaster
import ATK
import numpy
for voltage in numpy.arange(0.0, 1.181, 0.02):
  # Store each calculation in a separate NetCDF file
  ATK.setCheckpointFilename('nonsy-tmr--para-dn-%.2f.nc' % voltage)
  scf = restoreSelfConsistentCalculation(checkpointFilename)  ......

And I don't know what is the correct string that can be substitute for checkpointFilename in the bracket ?

please help me, thanks
« Last Edit: April 26, 2011, 15:31 by zdhlover »

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5413
  • Country: dk
  • Reputation: 89
    • View Profile
    • QuantumATK at Synopsys
Re: two questiones about the checkpoint file name in ATK 2008.10
« Reply #6 on: April 26, 2011, 15:29 »
As I mentioned above, the same string as used to make the files. That is:
Code: python
for voltage in numpy.arange(0.0, 1.181, 0.02):
  scf = restoreSelfConsistentCalculation('nonsy-tmr--para-dn-%.2f.nc' % voltage)

Offline zdhlover

  • Global Moderator
  • QuantumATK Guru
  • *****
  • Posts: 106
  • Reputation: 2
    • View Profile
Re: two questiones about the checkpoint file name in ATK 2008.10
« Reply #7 on: April 26, 2011, 15:56 »
Thanks ,I have test it ,but the error indicate that NLValueError: Invalid NetcDFFile.

I have test the fist script, it is right, but the second script (I delete the structure content of the script) I write as you said is wrong? why?

please help me

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5413
  • Country: dk
  • Reputation: 89
    • View Profile
    • QuantumATK at Synopsys
Re: two questiones about the checkpoint file name in ATK 2008.10
« Reply #8 on: April 26, 2011, 16:10 »
The "Invalid NetCDFFile" usually actually means it cannot find the file. If you run the script from the command line, make sure to run it in the same directory as the NC files. If you run via VNL Job Manager, you should include the full path of the files.

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5413
  • Country: dk
  • Reputation: 89
    • View Profile
    • QuantumATK at Synopsys
Re: two questiones about the checkpoint file name in ATK 2008.10
« Reply #9 on: April 26, 2011, 16:13 »
However, I'm a little bit confused... You are mixing checkpoint files and "restore" statements bit...

In the script which does the self-consistent calculation, you had a checkpoint file statement. This is not needed anymore, for the analysis. So, in the long script (22.py) remove this line (it's not critical, but not needed).

In the short script (11.py), you don't need it either, but also you are not using "restoreSelf..."?

So, the "checkpointfile" statements are only used when SAVING the file, in the scf loop. The "restore" statements are used to READ them, in the post-scf analysis.

Offline zdhlover

  • Global Moderator
  • QuantumATK Guru
  • *****
  • Posts: 106
  • Reputation: 2
    • View Profile
Re: two questiones about the checkpoint file name in ATK 2008.10
« Reply #10 on: April 26, 2011, 16:23 »
Thanks a lot , you are smart, that's the question what you say.

;D ;D

However, I'm a little bit confused... You are mixing checkpoint files and "restore" statements bit...

In the script which does the self-consistent calculation, you had a checkpoint file statement. This is not needed anymore, for the analysis. So, in the long script (22.py) remove this line (it's not critical, but not needed).

In the short script (11.py), you don't need it either, but also you are not using "restoreSelf..."?

So, the "checkpointfile" statements are only used when SAVING the file, in the scf loop. The "restore" statements are used to READ them, in the post-scf analysis.
I understand what you mean, the short script (11.py)only a test that I think it can help me understand how to use the "checkpointfile"?
and I also try to delete the "checkpointfile" statements (ATK.setCheckpointFilename('nonsy-tmr--para-dn-%.2f.nc' % voltage)
),the long script (22.py) works also good ,thanks a lot.

I think this  can be helpful for us to think how can we systematically analyse  a series results.

btw: now I am busy, after I finish the doctor degree,I will often come here, and help to answer the questiones and improve the software.

Thanks
« Last Edit: April 26, 2011, 16:39 by zdhlover »

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5413
  • Country: dk
  • Reputation: 89
    • View Profile
    • QuantumATK at Synopsys
Re: two questiones about the checkpoint file name in ATK 2008.10
« Reply #11 on: April 26, 2011, 16:28 »
I look forward to that. Good luck with finishing the PhD, hope you don't have to stress too much about it.

We have great plans for VNL 11.8 - you will be amazed. I just saw a demo today of the new Builder, it is ultracool!

Offline zdhlover

  • Global Moderator
  • QuantumATK Guru
  • *****
  • Posts: 106
  • Reputation: 2
    • View Profile
Re: two questiones about the checkpoint file name in ATK 2008.10
« Reply #12 on: April 26, 2011, 16:44 »
I look forward to that. Good luck with finishing the PhD, hope you don't have to stress too much about it.

We have great plans for VNL 11.8 - you will be amazed. I just saw a demo today of the new Builder, it is ultracool!

Very good ,  and I am really looking forward to the ultracool version VNL 11.8!
Happy everyone and good luck.