[ase-users] disabling parallel I/O

Noam Bernstein noam.bernstein at nrl.navy.mil
Tue Jun 27 17:11:34 CEST 2017


> On Jun 27, 2017, at 11:08 AM, Ask Hjorth Larsen <asklarsen at gmail.com> wrote:
> 
> Hi Noam,
> 
> 2017-06-27 16:49 GMT+02:00 Noam Bernstein via ase-users
> <ase-users at listserv.fysik.dtu.dk>:
>> Hi - is there any way to disable the automatically parallelized I/O in ASE
>> (ideally on a per-call basis)?  I’d like to read a trajectory file into a
>> parallel program, have each process operate on a subset of the
>> configurations, and write its results to a separate file for each input
>> configuration.  The simplest way to code this is to have the parallel input
>> in ase.io.read, but not in ase.io.write.  Is there any way to achieve that?
>> 
>> The documentation seems to imply that if mpi4py is available it’ll be used
>> automagically.
> 
> I am not quite sure what your situation is.  In which way is your
> program parallel?

It’s running with MPI active, and each MPI task will operate on a subset of the trajectory that was read in.

> 
> That being said, you make all the cores write by calling Trajectory
> directly and giving the 'master' flag on all cores:
> 
>  fd = Trajectory(filename, 'w', master=True)

Thanks, that’s exactly what I needed.

									Noam


____________
||
|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/20170627/58d8ef28/attachment.html>


More information about the ase-users mailing list