[ase-users] disabling parallelism in ASE MD

Noam Bernstein noam.bernstein at nrl.navy.mil
Sat Apr 18 19:33:29 CEST 2020


Thanks Ask.  I'll try it.  I agree that it'd be nicer if automated mpi usage was more explicit, ideally in a way that let the calling program specify the communicator.

										Noam

> On Apr 17, 2020, at 5:48 PM, Ask Hjorth Larsen <asklarsen at gmail.com> wrote:
> 
> 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
> 

____________
||
|U.S. NAVAL|
|_RESEARCH_|
LABORATORY
Noam Bernstein, Ph.D.
Center for Materials Physics and Technology
U.S. Naval Research Laboratory
T +1 202 404 8628  F +1 202 404 7546
https://www.nrl.navy.mil <https://www.nrl.navy.mil/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.fysik.dtu.dk/pipermail/ase-users/attachments/20200418/dbf91c51/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5653 bytes
Desc: not available
URL: <http://listserv.fysik.dtu.dk/pipermail/ase-users/attachments/20200418/dbf91c51/attachment.p7s>


More information about the ase-users mailing list