[Pw_forum] different computing cores lead to different results when calculating phonon spectrum by ph.x

Axel Kohlmeyer akohlmey at gmail.com
Mon Sep 12 19:50:54 CEST 2016


On Mon, Sep 12, 2016 at 1:43 PM, XIAOMING ZHANG <xiaom.zhang at utah.edu> wrote:
> Dear Paolo:
>
> Thanks for your quick reply. But do you know the reason why different

have a look at this:
http://blog.reverberate.org/2014/09/what-every-computer-programmer-should.html
and this: http://blog.reverberate.org/2016/02/06/floating-point-demystified-part2.html

there are many more ways to get (insignificantly) different results,
not just the number of MPI tasks.

> computing cores lead to different results? And How to fix it? I really

you would need to re-implement all of Q-E with fixed point math, which
- unlike floating point - is associative.

> confusing about this.

then you better learn quickly. when using numerical computations, you
cannot escape the "mysteries of floating point math".

axel.


>
> Thanks for your time,
> Xiaoming
> Department of Materials Science and Engineering,
> University of Utah
>
>
> ________________________________
> From: pw_forum-bounces at pwscf.org [pw_forum-bounces at pwscf.org] on behalf of
> Paolo Giannozzi [p.giannozzi at gmail.com]
> Sent: Sunday, September 11, 2016 12:51 PM
> To: PWSCF Forum
> Subject: Re: [Pw_forum] different computing cores lead to different results
> when calculating phonon spectrum by ph.x
>
> The frequencies you report are 0 by definition, almost 0 when computed:
> http://www.quantum-espresso.org/faq/phonons/#7.2 . No available solution
> other than imposing the Acoustic Sum Rule (ASR) afterwards.
> Basically, the ASR violation is numerical noise, and as such, rather
> unpredictable.
>
> Paolo
>
> On Sun, Sep 11, 2016 at 8:10 PM, XIAOMING ZHANG <xiaom.zhang at utah.edu>
> wrote:
>>
>> Dear all,
>>
>> I have several questions when calculating phonons by ph.x:
>>
>> (1) Using the same input files, I got different output files of dynamical
>> matrices when using different computing cores;
>>
>> take q = (    0.000000000   0.000000000   0.000000000 ) as an example:
>>
>> Using 96 computing cores, the results after the line "Dynamical Matrix in
>> cartesian axes"
>>
>> and the q-value are:
>>
>>
>> **************************************************************************
>>      freq (    1) =      -1.940214 [THz] =     -64.718584 [cm-1]
>>  (  0.000000  0.000000 -0.000000  0.000000 -0.237593  0.000000 )
>>  (  0.000000  0.000000 -0.000000  0.000000 -0.237593  0.000000 )
>>  (  0.000000  0.000000 -0.000000  0.000000 -0.237593  0.000000 )
>>  (  0.000000  0.000000 -0.000000  0.000000 -0.237593  0.000000 )
>>  (  0.000000  0.000000 -0.000000  0.000000 -0.237593  0.000000 )
>>  (  0.000000  0.000000 -0.000000  0.000000 -0.237593  0.000000 )
>>  (  0.000000  0.000000 -0.000000  0.000000 -0.209687  0.000000 )
>>  (  0.000000  0.000000 -0.000000  0.000000 -0.209687  0.000000 )
>>  (  0.000000  0.000000 -0.000000  0.000000 -0.209687  0.000000 )
>>  (  0.000000  0.000000 -0.000000  0.000000 -0.209687  0.000000 )
>>  (  0.000000  0.000000 -0.000000  0.000000 -0.209687  0.000000 )
>>  (  0.000000  0.000000 -0.000000  0.000000 -0.209687  0.000000 )
>>  (  0.000000  0.000000 -0.000000  0.000000 -0.363998  0.000000 )
>>  (  0.000000  0.000000 -0.000000  0.000000 -0.363998  0.000000 )
>>  (  0.000000  0.000000 -0.000000  0.000000 -0.363998  0.000000 )
>>      freq (    2) =       0.946381 [THz] =      31.567870 [cm-1]
>>  (  0.000000  0.000000 -0.000000  0.000000 -0.101981  0.000000 )
>>  (  0.000000  0.000000 -0.000000  0.000000 -0.101981  0.000000 )
>>  (  0.000000  0.000000 -0.000000  0.000000  0.101979  0.000000 )
>>  (  0.000000  0.000000 -0.000000  0.000000  0.101979  0.000000 )
>>  (  0.000000  0.000000 -0.000000  0.000000  0.000001  0.000000 )
>>  (  0.000000  0.000000 -0.000000  0.000000  0.000001  0.000000 )
>>  (  0.000000  0.000000 -0.000000  0.000000 -0.384498  0.000000 )
>>  ( -0.000000  0.000000 -0.000000  0.000000 -0.384498  0.000000 )
>>  (  0.000000  0.000000 -0.000000  0.000000  0.384493  0.000000 )
>>  (  0.000000  0.000000 -0.000000  0.000000  0.384493  0.000000 )
>>  (  0.000000  0.000000 -0.000000  0.000000  0.000005  0.000000 )
>>  (  0.000000  0.000000 -0.000000  0.000000  0.000005  0.000000 )
>>  (  0.000000  0.000000 -0.000000  0.000000  0.428402  0.000000 )
>>  ( -0.000000  0.000000 -0.000000  0.000000 -0.428397  0.000000 )
>>  (  0.000000  0.000000 -0.000000  0.000000 -0.000006  0.000000 )
>>      freq (    3) =       0.946381 [THz] =      31.567870 [cm-1]
>>  (  0.000000  0.000000 -0.000000  0.000000 -0.058877  0.000000 )
>>  (  0.000000  0.000000 -0.000000  0.000000 -0.058877  0.000000 )
>>  (  0.000000  0.000000 -0.000000  0.000000 -0.058879  0.000000 )
>>
>> However, when I using 128 computing cores, the corresponding results turn
>> to be:
>>
>> **************************************************************************
>>      freq (    1) =      -1.941478 [THz] =     -64.760743 [cm-1]
>>  ( -0.000000  0.000000 -0.000000  0.000000  0.237504  0.000000 )
>>  ( -0.000000  0.000000 -0.000000  0.000000  0.237504  0.000000 )
>>  ( -0.000000  0.000000 -0.000000  0.000000  0.237504  0.000000 )
>>  ( -0.000000  0.000000 -0.000000  0.000000  0.237504  0.000000 )
>>  ( -0.000000  0.000000 -0.000000  0.000000  0.237504  0.000000 )
>>  ( -0.000000  0.000000 -0.000000  0.000000  0.237504  0.000000 )
>>  ( -0.000000  0.000000 -0.000000  0.000000  0.209612  0.000000 )
>>  ( -0.000000  0.000000 -0.000000  0.000000  0.209612  0.000000 )
>>  ( -0.000000  0.000000 -0.000000  0.000000  0.209612  0.000000 )
>>  ( -0.000000  0.000000 -0.000000  0.000000  0.209612  0.000000 )
>>  ( -0.000000  0.000000 -0.000000  0.000000  0.209612  0.000000 )
>>  ( -0.000000  0.000000 -0.000000  0.000000  0.209612  0.000000 )
>>  ( -0.000000  0.000000 -0.000000  0.000000  0.364201  0.000000 )
>>  ( -0.000000  0.000000 -0.000000  0.000000  0.364201  0.000000 )
>>  ( -0.000000  0.000000 -0.000000  0.000000  0.364201  0.000000 )
>>      freq (    2) =      -0.797967 [THz] =     -26.617308 [cm-1]
>>  ( -0.217955  0.000000 -0.132999  0.000000 -0.000000  0.000000 )
>>  ( -0.217955  0.000000 -0.132999  0.000000 -0.000000  0.000000 )
>>  ( -0.212134  0.000000 -0.133209  0.000000  0.000000  0.000000 )
>>  ( -0.212134  0.000000 -0.133209  0.000000  0.000000  0.000000 )
>>  ( -0.215227  0.000000 -0.138145  0.000000  0.000000  0.000000 )
>>  ( -0.215227  0.000000 -0.138145  0.000000  0.000000  0.000000 )
>>  ( -0.230258  0.000000 -0.129133  0.000000 -0.000000  0.000000 )
>>  ( -0.230258  0.000000 -0.129133  0.000000 -0.000000  0.000000 )
>>  ( -0.205571  0.000000 -0.130026  0.000000  0.000000  0.000000 )
>>  ( -0.205571  0.000000 -0.130026  0.000000  0.000000  0.000000 )
>>  ( -0.218687  0.000000 -0.150959  0.000000  0.000000  0.000000 )
>>  ( -0.218687  0.000000 -0.150959  0.000000  0.000000  0.000000 )
>>  ( -0.228822  0.000000 -0.140474  0.000000  0.000000  0.000000 )
>>  ( -0.224086  0.000000 -0.140645  0.000000 -0.000000  0.000000 )
>>  ( -0.226602  0.000000 -0.144661  0.000000 -0.000000  0.000000 )
>>      freq (    3) =      -0.797967 [THz] =     -26.617308 [cm-1]
>>  ( -0.136570  0.000000  0.212256  0.000000 -0.000000  0.000000 )
>>  ( -0.136570  0.000000  0.212256  0.000000 -0.000000  0.000000 )
>>  ( -0.136360  0.000000  0.218077  0.000000  0.000000  0.000000 )
>>
>> So, why do different computing cores lead to different results? Does
>> someone encounter the same problems?
>>
>> By the way, is it reasonable for the negative frequency (such as freq (
>> 1) =      -1.940214 [THz] =     -64.718584 [cm-1]) ?
>>
>>
>> (2) With different computing cores, I always get the phonon spectrum with
>> small imaginary frequency no matter how I adjust the parameters suggested by
>> other guys.
>>
>> So can someone give me some useful suggestions to eliminate the imaginary
>> frequency?
>>
>>
>> Thanks for your time,
>>
>> Xiaoming
>>
>> Department of Materials Science and Engineering, University of Utah
>>
>>
>>
>> _______________________________________________
>> Pw_forum mailing list
>> Pw_forum at pwscf.org
>> http://pwscf.org/mailman/listinfo/pw_forum
>
>
>
>
> --
> 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
>
>
> _______________________________________________
> Pw_forum mailing list
> Pw_forum at pwscf.org
> http://pwscf.org/mailman/listinfo/pw_forum



-- 
Dr. Axel Kohlmeyer  akohlmey at gmail.com  http://goo.gl/1wk0
College of Science & Technology, Temple University, Philadelphia PA, USA
International Centre for Theoretical Physics, Trieste. Italy.



More information about the users mailing list