[Pw_forum] bug in mm_dispersion.f90

Javier Fuhr javier.fuhr at gmail.com
Tue Sep 29 17:12:10 CEST 2009


Dear Gabriele and Stefano,
Thanks for your answers,

On Tue, Sep 29, 2009 at 11:25 AM, Gabriele Sclauzero <sclauzer at sissa.it>wrote:

> Dear Javier,
>
>   I don't know that (pretty new) part of the code, but at a first glance to
> that
> subroutine I would say that you must be wrong.
> The parallelization is done inside each pool over atoms, hence you only
> need to collect
> the partial sums over subsets of atoms from the processes in the pool.
> Using more than one pool will not improve the speedup of that part of the
> code, but
> neither change the result of energy_london.
>
> The parallelization is done to all processes (nproc), and if I understand
correctly the sum should be performed over all processes. Looking better at
the different parallelizations, I think the correct way is to replace, in
mm_dispersion.f90, intra_pool_comm by world_comm, i.e., the diff between
original and modified file is:
-----------------------------
261c261
<     USE mp_global,    ONLY : mpime , nproc , intra_pool_comm
---
>     USE mp_global,    ONLY : mpime , nproc , world_comm
362c362
< 999 CALL mp_sum ( energy_london , intra_pool_comm )
---
> 999 CALL mp_sum ( energy_london , world_comm )
377c377
<     USE mp_global,    ONLY : mpime , nproc , intra_pool_comm
---
>     USE mp_global,    ONLY : mpime , nproc , world_comm
503c503
< 999 CALL mp_sum ( force_london , intra_pool_comm )
---
> 999 CALL mp_sum ( force_london , world_comm )
519c519
<     USE mp_global,    ONLY : mpime , nproc , intra_pool_comm
---
>     USE mp_global,    ONLY : mpime , nproc , world_comm
660c660
< 999 CALL mp_sum ( stres_london , intra_pool_comm )
---
> 999 CALL mp_sum ( stres_london , world_comm )
-----------------------------



> If you have (reproducible) evidence that the same calculation performed
> with more than one
> pool gives a different result, please provide some simple input file.
>
> Thanks,
>
> GS
>
> I attach an input file which the original version of the subroutine gives
me
     Dispersion Correction     =      -0.05035543 Ry
for "-npool 1", and
     Dispersion Correction     =      -0.02587314 Ry
for "-npool 2". With the modified version of mm_dispersion.f90, I get the
same value for 1 o 2 pools.


-- 
Dr. Javier Daniel Fuhr
Grupo Física de Superficies
División Colisiones Atómicas
Centro Atómico Bariloche
TE : ++54 2944 44 5100  Int. 5524
FAX: ++54 2944 44 5299
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quantum-espresso.org/pipermail/users/attachments/20090929/add9d603/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gaas.scf.in
Type: application/octet-stream
Size: 494 bytes
Desc: not available
URL: <http://lists.quantum-espresso.org/pipermail/users/attachments/20090929/add9d603/attachment.obj>


More information about the users mailing list