[ase-users] disabling parallelism in ASE MD
Ask Hjorth Larsen
asklarsen at gmail.com
Fri Apr 17 23:48:44 CEST 2020
Dear Noam,
Am Di., 14. Apr. 2020 um 17:14 Uhr schrieb Noam Bernstein via
ase-users <ase-users at listserv.fysik.dtu.dk>:
>
> Is there a general way of enabling/disabling parallelism in ASE, specifically in MD-related routines? I'm running several MD trajectories side-by side, each in a single MPI task (using mpi4py). I've already run into an issue for ase.md.velocitydistribution._maxwellboltzmanndisitribution, which insists on calling communicator.broadcast() without any way of disabling it. MDLogger is also behaving badly, outputting just on the master and trying to do clever but unnecessary things for global numbers of atoms, for example.
I think you can apply this hack:
from ase.parallel import world, DummyMPI
world.comm = DummyMPI()
(IMHO: All MPI use should be made explicit, which would magically fix
100% of these inconveniences. Then people have to actively say if
they want special parallel behaviour, which isn't all that bad
either.)
Best regards
Ask
>
> Patching _maxwellboltzmanndisitribution() is easy enough (restrict the broadcast to "if communicator is not None", or something like that), but I'm wondering if I'm missing some way of telling ASE to treat an MD dynamics run as a completely serial task.
>
> thanks,
>
>
> _______________________________________________
> ase-users mailing list
> ase-users at listserv.fysik.dtu.dk
> https://listserv.fysik.dtu.dk/mailman/listinfo/ase-users
More information about the ase-users
mailing list