Author Topic: UnboundLocalError: local variable 'periodicity' referenced before assignment  (Read 2303 times)

0 Members and 1 Guest are viewing this topic.

Offline njuxyh

  • QuantumATK Guru
  • ****
  • Posts: 163
  • Reputation: 0
    • View Profile
Hi :
i face a relax problem, the error log is

Traceback (most recent call last):
  File "./relax-Device-fr-relaxed-D3-five-layer-Au-fix-bottom-3layer-fr-relaxed-Au-111-by-vasp-fr-relaxed-Au-by-vasp-change-a-b-POSCAR-relaxed-by-liming.py", line 802, in <module>
    optimizer_method=LBFGS(),
  File "./zipdir/NL/Dynamics/Optimization/OptimizeGeometry.py", line 331, in OptimizeGeometry
  File "./zipdir/NL/Dynamics/Optimization/OptimizeGeometry.py", line 467, in runSimultaneousRelaxation
  File "./zipdir/NL/Dynamics/Optimization/OptimizeGeometry.py", line 376, in runRelaxation
  File "./zipdir/NL/Dynamics/ASEAtomsInterface.py", line 289, in get_forces
  File "./zipdir/NL/Dynamics/ASEAtomsInterface.py", line 164, in _update
  File "./zipdir/NL/Calculators/LCAOCalculator/Analysis/FastEnergyForcesStress.py", line 34, in energyFunction
  File "./zipdir/NL/Calculators/LCAOCalculator/Analysis/FastEnergyForcesStress.py", line 71, in _checkAndUpdate
  File "./zipdir/NL/Calculators/LCAOCalculator/Analysis/FastEnergyForcesStress.py", line 107, in _update
  File "./zipdir/NL/ComputerScienceUtilities/Timer.py", line 45, in __call__
  File "./zipdir/NL/Calculators/LCAOCalculator/Analysis/FastEnergyForcesStress.py", line 106, in <lambda>
  File "./zipdir/NL/Calculators/LCAOCalculator/Analysis/EnergyForcesStress.py", line 254, in calculateLCAOEnergyForcesStress
  File "./zipdir/NL/Calculators/GenericParameters/GrimmeDFTD3.py", line 461, in _adjustStress
  File "./zipdir/NL/Calculators/GenericParameters/GrimmeDFTD3.py", line 495, in _calculateCorrections
  File "./zipdir/NL/Calculators/GenericParameters/GrimmeDFTD3.py", line 670, in __buildCPPObjects
UnboundLocalError: local variable 'periodicity' referenced before assignment

and at the end of output file, , there are information below, i don not konw whether the relax is complete or not, because there are words:  Calculation Converged in 17 steps , does it meaming the relaxed is complete or not?

 
+------------------------------------------------------------------------------+
|                                                                              |
| Size of dense matrices =  3060 x  3060 [143 MB per matrix]                   |
|                                                                              |
+------------------------------------------------------------------------------+
+------------------------------------------------------------------------------+
|  213  Au   [   2.079 ,  14.792 ,  66.928 ]   10.98515  -0.01485              |
|  214  Au   [   0.840 ,   9.714 ,  66.939 ]   11.01089   0.01089              |
|  215  Au   [   4.116 ,  12.264 ,  66.939 ]   10.98587  -0.01413              |
|  216  Ti   [   0.859 ,  18.756 ,  67.452 ]    3.86359  -0.13641              |
|  217   S   [   3.337 ,  19.732 ,  67.456 ]    6.08704   0.08704              |
|  218   S   [   2.275 ,  23.070 ,  67.460 ]    5.98240  -0.01760              |
|  219   S   [   4.364 ,  23.102 ,  67.461 ]    5.99040  -0.00960              |
+------------------------------------------------------------------------------+
|  17 E = -503.204 dE =  9.084030e-05 dH =  3.281213e-05                       |
+------------------------------------------------------------------------------+
| Calculation Converged in 17 steps                                            |
+------------------------------------------------------------------------------+
+------------------------------------------------------------------------------+
|                                                                              |
| Device DFT Calculation  [Finished Mon Mar  7 16:30:18 2016]                  |
|                                                                              |
+------------------------------------------------------------------------------+
+------------------------------------------------------------------------------+
|                                                                              |
| Size of dense matrices =  3060 x  3060 [143 MB per matrix]                   |
|                                                                              |
+------------------------------------------------------------------------------+
+------------------------------------------------------------------------------+
|                                                                              |
| Storage of orbitals in real space is disabled.                               |
| Enabling storage requires an additional  1177 MB.                            |
|                                                                              |
+------------------------------------------------------------------------------+
+------------------------------------------------------------------------------+
|                                                                              |
| Real space grid sampling is (37, 374, 502) in a, b, and c directions.        |
|                                                                              |
+------------------------------------------------------------------------------+
+------------------------------------------------------------------------------+
|                                                                              |
| Real space grid sampling is (37, 374, 101) in a, b, and c directions.        |
|                                                                              |
+------------------------------------------------------------------------------+
+------------------------------------------------------------------------------+
|                                                                              |
| Size of dense matrices =   882 x   882 [12 MB per matrix]                    |
|                                                                              |
+------------------------------------------------------------------------------+
+------------------------------------------------------------------------------+
|                                                                              |
| Real space grid sampling is (37, 374, 101) in a, b, and c directions.        |
|                                                                              |
+------------------------------------------------------------------------------+
+------------------------------------------------------------------------------+
|                                                                              |
| Storage of atomic core grids requires    10 MB per grid                      |
|                                                                              |
+------------------------------------------------------------------------------+

+------------------------------------------------------------------------------+
|                                                                              |
| Real space grid sampling is (37, 374, 101) in a, b, and c directions.        |
|                                                                              |
+------------------------------------------------------------------------------+
+------------------------------------------------------------------------------+
|                                                                              |
| Size of dense matrices =   882 x   882 [12 MB per matrix]                    |
|                                                                              |
+------------------------------------------------------------------------------+
+------------------------------------------------------------------------------+
|                                                                              |
| Real space grid sampling is (37, 374, 101) in a, b, and c directions.        |
|                                                                              |
+------------------------------------------------------------------------------+
+------------------------------------------------------------------------------+
|                                                                              |
| Storage of atomic core grids requires    10 MB per grid                      |
|                                                                              |
+------------------------------------------------------------------------------+

+------------------------------------------------------------------------------+
|                                                                              |
| Real space grid sampling is (37, 374, 101) in a, b, and c directions.        |
|                                                                              |
+------------------------------------------------------------------------------+
+------------------------------------------------------------------------------+
|                                                                              |
| Size of dense matrices =  3060 x  3060 [143 MB per matrix]                   |
|                                                                              |
+------------------------------------------------------------------------------+
+------------------------------------------------------------------------------+
|                                                                              |
| Real space grid sampling is (37, 374, 101) in a, b, and c directions.        |
|                                                                              |
+------------------------------------------------------------------------------+
+------------------------------------------------------------------------------+
|                                                                              |
| Size of dense matrices =  3060 x  3060 [143 MB per matrix]                   |
|                                                                              |
+------------------------------------------------------------------------------+
+------------------------------------------------------------------------------+
|                                                                              |
| Storage of atomic core grids requires    52 MB per grid                      |
|                                                                              |
+------------------------------------------------------------------------------+

+------------------------------------------------------------------------------+
|                                                                              |
| Real space grid sampling is (37, 374, 101) in a, b, and c directions.        |
|                                                                              |
+------------------------------------------------------------------------------+
+------------------------------------------------------------------------------+
|                                                                              |
| Storage of atomic core grids requires    10 MB per grid                      |
|                                                                              |
+------------------------------------------------------------------------------+

+------------------------------------------------------------------------------+
|                                                                              |
| Real space grid sampling is (37, 374, 101) in a, b, and c directions.        |
|                                                                              |
+------------------------------------------------------------------------------+
+------------------------------------------------------------------------------+
|                                                                              |
| Storage of atomic core grids requires    10 MB per grid                      |
|                                                                              |
+------------------------------------------------------------------------------+

| Left electrode chemical potential  =   -4.019404 eV                          |
| Right electrode chemical potential =   -4.019404 eV                          |
+------------------------------------------------------------------------------+

                            |--------------------------------------------------|
Calculating Density Matrix : ==================================================

                            |--------------------------------------------------|
Calculating Kinetic Matrix : ==================================================

                            |--------------------------------------------------|
Calculating Kinetic Matrix : ==================================================

                            |--------------------------------------------------|
Calculating Kinetic Matrix : ==================================================

                            |--------------------------------------------------|
Calculating Kinetic Matrix : ==================================================

                            |--------------------------------------------------|
Calculating Nonlocal Part  : ==================================================

                            |--------------------------------------------------|
Calculating Nonlocal Part  : ==================================================

                            |--------------------------------------------------|
Calculating Nonlocal Part  : ==================================================

                            |--------------------------------------------------|
Calculating Nonlocal Part  : ==================================================

Timing:                          Total     Per Step        %

--------------------------------------------------------------------------------

Diagonalization         :   84569.99 s    1595.66 s      66.94% |=============|
Density Matrix          :   26163.15 s    1453.51 s      20.71% |===|
Setting Density Matrix  :   22052.99 s    7351.00 s      17.46% |===|
Exchange-Correlation    :    1690.38 s      22.84 s       1.34% |
Real Space Integral     :     599.67 s       8.10 s       0.47% |
Valence Density         :     483.24 s       6.53 s       0.38% |
Hartree Potential       :     212.15 s       2.87 s       0.17% |
Mixing                  :      17.42 s       0.25 s       0.01% |
Constant Terms          :      15.87 s       7.93 s       0.01% |
Difference Density      :      12.14 s       0.22 s       0.01% |
Real Space Basis        :       9.70 s       3.23 s       0.01% |
Loading Modules + MPI   :       3.95 s       3.95 s       0.00% |
Core Density            :       3.66 s       0.07 s       0.00% |
Neutral Atom Potential  :       3.41 s       1.70 s       0.00% |
Basis Set Generation    :       2.30 s       0.77 s       0.00% |
File IO, nlsave         :       0.24 s       0.24 s       0.00% |
Hubbard Term            :       0.00 s       0.00 s       0.00% |
Fixed Spins Term        :       0.00 s       0.00 s       0.00% |
--------------------------------------------------------------------------------
Total                   :  126329.92 s (1d11h05m29.92s)

===================================================================================
=   BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES
=   EXIT CODE: 1
=   CLEANING UP REMAINING PROCESSES
=   YOU CAN IGNORE THE BELOW CLEANUP MESSAGES
===================================================================================

Offline Jess Wellendorff

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 933
  • Country: dk
  • Reputation: 29
    • View Profile
This looks like a bug. Which version of ATK are you running? Could you upload the script?