Author Topic: NLInputOutputError: Unable to access file  (Read 5496 times)

0 Members and 1 Guest are viewing this topic.

Offline Roc

  • QuantumATK Guru
  • ****
  • Posts: 104
  • Reputation: 0
    • View Profile
NLInputOutputError: Unable to access file
« on: January 5, 2009, 02:44 »
Dear everyone,

During two-probe calculation ATK gives the error:

Traceback (most recent call last):
  File "Au-molecular-Au_script.py", line 283, in ?
    if processIsMaster(): file.addToSample(transmission_eigenvalue, 'Linear Chain-molecular-Linear Chain', label)
NLInputOutputError: Unable to access file Au-molecular-Au.vnl


In my script, line283 is that:

if processIsMaster(): file.addToSample(transmission_eigenvalue, 'Linear Chain-molecular-Linear Chain', label)

How to deal with it?
Thanks, regards!


Moderator edit: Clarified subject for searching
« Last Edit: January 7, 2009, 22:49 by Anders Blom »

Offline ipsecog

  • Heavy QuantumATK user
  • ***
  • Posts: 35
  • Country: se
  • Reputation: 0
    • View Profile
Re: Some errors
« Reply #1 on: January 6, 2009, 22:23 »
Is the error reproducible? Try running the script again and see if it reappears. Is a file called "Au-molecular-Au.vnl" produced at all? Do you have write privileges in the directory where it's supposed to go? If running via a queue, this may not be the case as the local directory under execution can be a system directory. For this reason, always use a full absolute path name to the VNL file (like, /home/username/calcs/myfile.vnl), which of course should be a valid path on the system, accessible from each node on the cluster. Also, see if you can run this simple test script in parallel without errors:
Code
from ATK.KohnSham import *
from ATK.MPI import processIsMaster

if processIsMaster(): file = VNLFile('test.vnl')
if processIsMaster(): 
    print 'Master node'

elements = [Hydrogen, Hydrogen]
coordinates = [[ 0.        ,  0.        , -0.36999989],
               [ 0.        ,  0.        ,  0.36999989]]*Angstrom
molecule_configuration = MoleculeConfiguration(elements,coordinates)

if processIsMaster(): file.addToSample(molecule_configuration, 'molecule_configuration')
Check in particular if the text "Master node" is written to the terminal (stdout) only once. If it is printed twice (when running on two nodes), you have a problem in your parallel setup (typically, this appears when not using MPICH2 as the parallelization library) which will prevent you from running ATK in parallel properly anyway, so you need to address and fix this issue (by installing MPICH2, in case you haven't).

Offline Roc

  • QuantumATK Guru
  • ****
  • Posts: 104
  • Reputation: 0
    • View Profile
Re: Some errors
« Reply #2 on: January 7, 2009, 02:34 »
Thank you, ipsecog !

 I just run it in my PC with one CPU because the submitting job is simple(just needing about twenty minitutes).

More detail:
When I caculate at 0V,0.5V,-0.5V,1.0V, -1.0V , my job are all successful, but when I change it to 1.5V,-1.5V, 2.0V,-2.0V, the error happens. Another, it seems that they can still get the whole out document.

So, it confuses me!
Thanks!

Offline Nordland

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 812
  • Reputation: 18
    • View Profile
Re: Some errors
« Reply #3 on: January 7, 2009, 14:39 »
Are you submitting the job more than once?

I have only see this error if I don't have write-permission on the disk or if I am trying to write to the file from another script at the same time.

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5405
  • Country: dk
  • Reputation: 89
    • View Profile
    • QuantumATK at Synopsys
Re: Some errors
« Reply #4 on: January 7, 2009, 22:48 »
It certainly seems confusing, but perhaps a simple explanation can be found. To proceed, however, I think we need to see the script you are using, and the exact command line arguments, in sequence, and at what point and how the error occurs. Also, is a VNL file produced? (Start by removing it, before running any script.) What does it contain? (Use the Result Browser in VNL to inspect its contents.)

You can remove the configuration from the script if you wish, it probably makes no difference for this issue anyway.
« Last Edit: January 7, 2009, 22:51 by Anders Blom »