[QE-users] a problem in the source code of plotrho.f90

jqhuang16b at imr.ac.cn jqhuang16b at imr.ac.cn
Tue Jul 14 16:40:45 CEST 2020


Dear QE developers,




There seems to be a problem in the plotrho.f90 code(qe6.5, also in previous version), between line 93 and 99, as following:




  IF (rhomin > 0.d0) THEN
     WRITE( stdout,'("Logarithmic scale (y/n)? > ")', advance="NO")
     READ (5, '(a)') ans
     logarithmic_scale = ans/='n'.and.ans/='N'
  ELSE
     logarithmic_scale = .false.
  ENDIF




for the case rhomin < 0.d0 (may occur due to the error in the numerical calculation), it won't read from the unit=5 file, 

which leads to the program termination in the subsequent read because of the wrong data type.

So a tiny modification as follows can solve the problem




  IF (rhomin > 0.d0) THEN
     WRITE( stdout,'("Logarithmic scale (y/n)? > ")', advance="NO")
     READ (5, '(a)') ans
     logarithmic_scale = ans/='n'.and.ans/='N'
  ELSE

      READ (5, '(a)') ans
     logarithmic_scale = .false.
  ENDIF










Best regards,

Jian-qi Huang 






Jian-qi Huang

Magnetism and Magnetic Materials Division
Institute of Metal Research
Chinese Academy of Sciences
72 Wenhua Road, Shenyang 110016, China

email:jqhuang16b at imr.ac.cn


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quantum-espresso.org/pipermail/users/attachments/20200714/b7c5d162/attachment.html>


More information about the users mailing list