File: parallel.rst

package info (click to toggle)
python-ase 3.26.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 15,484 kB
  • sloc: python: 148,112; xml: 2,728; makefile: 110; javascript: 47
file content (29 lines) | stat: -rw-r--r-- 1,029 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.. module:: ase.parallel

=====================
Parallel calculations
=====================

ASE will automatically run in parallel, if it can import an MPI communicator
from any of the supported libraries. ASE will attempt to import communicators
from these external libraries: GPAW, Asap, Scientific MPI and
MPI4PY.

If a parallel library is found, the :func:`ase.io.read` function will always
read only on master (of the MPI world object) and broadcast the atoms to all
other cores. Therefore, always when using :func:`ase.io.read`, all cores must
read the same atoms in same order, for example in the case of a NEB
calculation.

If one requires an individual core/cores to read a particular file, please
use :func:`~ase.io.Trajectory`:

>>> from ase.io import Trajectory
>>> from ase.parallel import world
>>> atoms = Trajectory('myfile_{}.traj'.format(world.rank))[-1]

.. autofunction:: paropen
.. autofunction:: parprint
.. autofunction:: broadcast
.. autofunction:: parallel_function
.. autofunction:: parallel_generator