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

Paolo Giannozzi p.giannozzi at gmail.com
Tue Jul 14 20:29:55 CEST 2020


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 <jqhuang16b at imr.ac.cn> 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:jqhuang16b at imr.ac.cn
>
>
> _______________________________________________
> Quantum ESPRESSO is supported by MaX (www.max-centre.eu/quantum-espresso)
> users mailing list users at lists.quantum-espresso.org
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quantum-espresso.org/pipermail/users/attachments/20200714/0e586fae/attachment.html>


More information about the users mailing list