[Pw_forum] A small bug of QE when nat >= 100, and the solution
juan sotelo
jasotelo at gmail.com
Mon Mar 14 21:54:04 CET 2011
It seems the problem could be solved by creating a fortran-format on
the fly, e.g.,
=====
program foo
! hints from http://www.sdsc.edu/~tkaiser/f90.html
implicit none
character (len=30)fstr ! create a format on the fly
integer n_dgts, na, nb
na = 30000
nb = 1000000
n_dgts = floor(log10(abs(real(max(na,nb)))))+1
!create a format on the fly
write(fstr,'("(2i",i4,")")')n_dgts+1
write(*,fstr) na, nb
end program
=====
Output:
30000 1000000
juan sotelo
Dpto Fisica & Informatica & Matematica
Univ. Per. Cayetano Heredia. Lima-Peru
On Mon, Mar 14, 2011 at 1:07 PM, Nicola Marzari
<nicola.marzari at materials.ox.ac.uk> wrote:
> On 3/14/11 6:02 PM, Paolo Giannozzi wrote:
>> lfhuang wrote:
>>
>>> This bug also has not been fixed in the recent Version-4.3a
>>
>> this is the fix:
>>
>> $ diff espresso-4.2.1/PH/write_dyn_on_file.f90 espresso/PH/
>> 29c29
>> < write (iudyn, '(2i3)') na, nb
>> ---
>> > write (iudyn, '(2i5)') na, nb
>>
>>
>
> I tried it, but it doesn't work when nat>= 10000 .
> What shall I do? Please help.
>
> nicola
>
>
> --
> ----------------------------------------------------------------------
> Prof Nicola Marzari Department of Materials University of Oxford
> Chair of Materials Modelling Director, Materials Modelling Laboratory
> nicola.marzari at materials.ox.ac.uk http://mml.materials.ox.ac.uk/NM
> _______________________________________________
> Pw_forum mailing list
> Pw_forum at pwscf.org
> http://www.democritos.it/mailman/listinfo/pw_forum
>
More information about the users
mailing list