Fixed the bug reported by V.Sokolov, Fiber Optics Research Center, Russian Academy of Sciences:


There is a problem with QE 5.1.
If I try to restart vc-relax cell and atomic positions optimization, 
pw.x (QE 5.1) terminates with the following message:

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      Error in routine invmat (1):
      error in DGETRF
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

The same task is restarted without problems in QE 5.0.3.

As far as I can understand, the error occurs in
        CALL invmat (3, rot, overlap, value)
(sym_base.f90, line 240) since all elements of the rot(3,3) array are zero.


The problem was caused inside input.f90 (subroutine iosys) by "at" being overwritten with "at_old" (in read_config_from_file) before at_old was actually set. I have also changed read_config_from_file to take arguments instead of manipulating global variables, to make the dependence more evident.

Beware of collateral effects: especially wrong k-points, wrong G-vectors when restarting vc-relax.

Please test.

LP



git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@11153 c92efa57-630b-4861-b058-cf58834340f0