Dear Paolo,



"plotrho" was devised to be run interactively.

Now I see. I ignored that unit=5 denotes input from the keyboard by default. 
Thank you.




Best regards,

Jian-qi Huang




-----原始邮件-----
发件人:"Paolo Giannozzi" <[email protected]>
发送时间:2020-07-15 02:29:55 (星期三)
收件人: "Quantum ESPRESSO users Forum" <[email protected]>
抄送:
主题: Re: [QE-users] a problem in the source code of plotrho.f90


It is a (very old) programming choice: "plotrho" was devised to be run 
interactively, so if it does not prompt for a variable, there is no need to 
supply it


Paolo



On Tue, Jul 14, 2020 at 4:41 PM <[email protected]> wrote:


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:[email protected]




_______________________________________________
Quantum ESPRESSO is supported by MaX (www.max-centre.eu/quantum-espresso)
users mailing list [email protected]
https://lists.quantum-espresso.org/mailman/listinfo/users


--

Paolo Giannozzi, Dip. Scienze Matematiche Informatiche e Fisiche,
Univ. Udine, via delle Scienze 208, 33100 Udine, Italy
Phone +39-0432-558216, fax +39-0432-558222

_______________________________________________
Quantum ESPRESSO is supported by MaX (www.max-centre.eu/quantum-espresso)
users mailing list [email protected]
https://lists.quantum-espresso.org/mailman/listinfo/users

Reply via email to