MPI parallel interface

Module contents for quippy.mpi_context:

Classes

MPI_context(…) mpi_context_initialise([communicator,context,dims,periods,error])

Functions

push_mpi_error(info,fn,line)
Parameters:

Attributes

Name Value
ROOT 0
class quippy.mpi_context.MPI_context([communicator, context, dims, periods, error])

Bases: quippy.oo_fortran.FortranDerivedType

mpi_context_initialise([communicator,context,dims,periods,error])

Parameters:
communicator : input int, optional
context : MPI_context object, optional
dims : input rank-1 array(‘i’) with bounds (3), optional
periods : input rank-1 array(‘i’) with bounds (3), optional
error : in/output rank-0 array(int,’i’), optional

References

Routine is wrapper around Fortran routine __init__initialise defined in file src/libAtoms/MPI_context.f95. Class is wrapper around Fortran type MPI_context defined in file src/libAtoms/MPI_context.f95.

Methods

all(v,[error]) mpi_context_all(v,[error])
any(v,[error]) mpi_context_any(v,[error])
barrier([error]) mpi_context_barrier([error])
bcast(self, \*args, \*\*kwargs) Wrapper around Fortran interface bcast containing multiple routines:
cart_shift(direction,displ,[error]) mpi_context_cart_shift(direction,displ,[error])
collect(v_in,n2,n3,[error]) mpi_context_collect(v_in,n2,n3,[error])
collect_real2(v_in,n2,n3,[error])
Parameters:
free_context([error]) mpi_context_free_context([error])
is_same_fortran_object(self, other) Test if self and other point to the same Fortan object.
max(self, \*args, \*\*kwargs) Wrapper around Fortran interface max containing multiple routines:
min(self, \*args, \*\*kwargs) Wrapper around Fortran interface min containing multiple routines:
mpi_print(lines)
Parameters:
print_([file]) mpi_context_print([file])
sendrecv(self, \*args, \*\*kwargs) Wrapper around Fortran interface sendrecv containing multiple routines:
shallow_copy(self) Return a shallow copy of self.
shallow_copy_from(self, other) Transform self into a shallow copy of other.
split_context(split_index,[error]) mpi_context_split_context(split_index,[error])
sum(self, \*args, \*\*kwargs) Wrapper around Fortran interface sum containing multiple routines:
sum_in_place(self, \*args, \*\*kwargs) Wrapper around Fortran interface sum_in_place containing multiple routines:
all(v[, error])

mpi_context_all(v,[error])

Parameters:
v : input int
error : in/output rank-0 array(int,’i’), optional
Returns:
ret_mpi_context_all : int

References

Routine is wrapper around Fortran routine all defined in file src/libAtoms/MPI_context.f95.

any(v[, error])

mpi_context_any(v,[error])

Parameters:
v : input int
error : in/output rank-0 array(int,’i’), optional
Returns:
ret_mpi_context_any : int

References

Routine is wrapper around Fortran routine any defined in file src/libAtoms/MPI_context.f95.

barrier([error])

mpi_context_barrier([error])

Parameters:
error : in/output rank-0 array(int,’i’), optional

References

Routine is wrapper around Fortran routine barrier defined in file src/libAtoms/MPI_context.f95.

bcast(self, *args, **kwargs)

Wrapper around Fortran interface bcast containing multiple routines:

bcast(v[, root, error])
Parameters:
  • v (in/output rank-1 array('d') with bounds (qp_n0)) –
  • root (input int, optional) –
  • error (in/output rank-0 array(int,'i'), optional) –

Routine is wrapper around Fortran routine mpi_context_bcast_real1 defined in file src/libAtoms/MPI_context.f95.

bcast(v[, root, error])
Parameters:
  • v (in/output rank-2 array('d') with bounds (qp_n0,qp_n1)) –
  • root (input int, optional) –
  • error (in/output rank-0 array(int,'i'), optional) –

Routine is wrapper around Fortran routine mpi_context_bcast_real2 defined in file src/libAtoms/MPI_context.f95.

bcast(v[, error])
Parameters:
  • v (in/output rank-1 array('i') with bounds (qp_n0)) –
  • error (in/output rank-0 array(int,'i'), optional) –

Routine is wrapper around Fortran routine mpi_context_bcast_logical1 defined in file src/libAtoms/MPI_context.f95.

bcast(v[, error])
Parameters:
  • v (in/output rank-2 array('i') with bounds (qp_n0,qp_n1)) –
  • error (in/output rank-0 array(int,'i'), optional) –

Routine is wrapper around Fortran routine mpi_context_bcast_logical2 defined in file src/libAtoms/MPI_context.f95.

bcast(v[, error])
Parameters:
  • v (in/output rank-1 array('D') with bounds (qp_n0)) –
  • error (in/output rank-0 array(int,'i'), optional) –

Routine is wrapper around Fortran routine mpi_context_bcast_c1 defined in file src/libAtoms/MPI_context.f95.

bcast(v[, error])
Parameters:
  • v (in/output rank-2 array('D') with bounds (qp_n0,qp_n1)) –
  • error (in/output rank-0 array(int,'i'), optional) –

Routine is wrapper around Fortran routine mpi_context_bcast_c2 defined in file src/libAtoms/MPI_context.f95.

bcast(v[, error])
Parameters:
  • v (in/output rank-0 array(int,'i')) –
  • error (in/output rank-0 array(int,'i'), optional) –

Routine is wrapper around Fortran routine mpi_context_bcast_logical defined in file src/libAtoms/MPI_context.f95.

bcast(v[, root, error])
Parameters:
  • v (in/output rank-2 array('S') with bounds (qp_n0,(*))) –
  • root (input int, optional) –
  • error (in/output rank-0 array(int,'i'), optional) –

Routine is wrapper around Fortran routine mpi_context_bcast_char1 defined in file src/libAtoms/MPI_context.f95.

bcast(v[, root, error])
Parameters:
  • v (in/output rank-3 array('S') with bounds (qp_n0,qp_n1,(*))) –
  • root (input int, optional) –
  • error (in/output rank-0 array(int,'i'), optional) –

Routine is wrapper around Fortran routine mpi_context_bcast_char2 defined in file src/libAtoms/MPI_context.f95.

bcast(v[, root, error])
Parameters:
  • v (in/output rank-0 array(int,'i')) –
  • root (input int, optional) –
  • error (in/output rank-0 array(int,'i'), optional) –

Routine is wrapper around Fortran routine mpi_context_bcast_int defined in file src/libAtoms/MPI_context.f95.

bcast(v[, root, error])
Parameters:
  • v (in/output rank-0 array(float,'d')) –
  • root (input int, optional) –
  • error (in/output rank-0 array(int,'i'), optional) –

Routine is wrapper around Fortran routine mpi_context_bcast_real defined in file src/libAtoms/MPI_context.f95.

bcast(v[, error])
Parameters:
  • v (in/output rank-2 array('i') with bounds (qp_n0,qp_n1)) –
  • error (in/output rank-0 array(int,'i'), optional) –

Routine is wrapper around Fortran routine mpi_context_bcast_int2 defined in file src/libAtoms/MPI_context.f95.

bcast(v[, error])
Parameters:
  • v (in/output rank-1 array('i') with bounds (qp_n0)) –
  • error (in/output rank-0 array(int,'i'), optional) –

Routine is wrapper around Fortran routine mpi_context_bcast_int1 defined in file src/libAtoms/MPI_context.f95.

bcast(v[, root, error])
Parameters:
  • v (in/output rank-0 array(string(len=-1),'c')) –
  • root (input int, optional) –
  • error (in/output rank-0 array(int,'i'), optional) –

Routine is wrapper around Fortran routine mpi_context_bcast_char defined in file src/libAtoms/MPI_context.f95.

cart_shift(direction, displ[, error])

mpi_context_cart_shift(direction,displ,[error])

Parameters:
direction : input int
displ : input int
source : int
dest : int
error : in/output rank-0 array(int,’i’), optional

References

Routine is wrapper around Fortran routine cart_shift defined in file src/libAtoms/MPI_context.f95.

collect(v_in, n2, n3[, error])

mpi_context_collect(v_in,n2,n3,[error])

Parameters:
v_in : input rank-2 array(‘d’) with bounds (qp_n0,qp_n1)
n2 : input int

shape(qp_v_out,0)

n3 : input int

shape(qp_v_out,1)

error : in/output rank-0 array(int,’i’), optional
Returns:
v_out : rank-2 array(‘d’) with bounds (qp_n2,qp_n3)

References

Routine is wrapper around Fortran routine collect_real2 defined in file src/libAtoms/MPI_context.f95.

collect_real2(v_in, n2, n3[, error])
Parameters:
v_in : input rank-2 array(‘d’) with bounds (qp_n0,qp_n1)
n2 : input int

shape(qp_v_out,0)

n3 : input int

shape(qp_v_out,1)

error : in/output rank-0 array(int,’i’), optional
Returns:
v_out : rank-2 array(‘d’) with bounds (qp_n2,qp_n3)

References

Routine is wrapper around Fortran routine mpi_context_collect_real2 defined in file src/libAtoms/MPI_context.f95.

free_context([error])

mpi_context_free_context([error])

Parameters:
error : in/output rank-0 array(int,’i’), optional

References

Routine is wrapper around Fortran routine free_context defined in file src/libAtoms/MPI_context.f95.

max(self, *args, **kwargs)

Wrapper around Fortran interface max containing multiple routines:

max(v[, error])
Parameters:
  • v (input float) –
  • error (in/output rank-0 array(int,'i'), optional) –
Returns:

ret_mpi_context_max_real – float

Routine is wrapper around Fortran routine mpi_context_max_real defined in file src/libAtoms/MPI_context.f95.

max(v[, error])
Parameters:
  • v (input int) –
  • error (in/output rank-0 array(int,'i'), optional) –
Returns:

ret_mpi_context_max_int – int

Routine is wrapper around Fortran routine mpi_context_max_int defined in file src/libAtoms/MPI_context.f95.

min(self, *args, **kwargs)

Wrapper around Fortran interface min containing multiple routines:

min(v[, error])
Parameters:
  • v (input int) –
  • error (in/output rank-0 array(int,'i'), optional) –
Returns:

ret_mpi_context_min_int – int

Routine is wrapper around Fortran routine mpi_context_min_int defined in file src/libAtoms/MPI_context.f95.

min(v[, error])
Parameters:
  • v (input float) –
  • error (in/output rank-0 array(int,'i'), optional) –
Returns:

ret_mpi_context_min_real – float

Routine is wrapper around Fortran routine mpi_context_min_real defined in file src/libAtoms/MPI_context.f95.

mpi_print(lines)
Parameters:
lines : input rank-2 array(‘S’) with bounds (qp_n0,(*))

References

Routine is wrapper around Fortran routine mpi_print defined in file src/libAtoms/MPI_context.f95.

print_([file])

mpi_context_print([file])

Parameters:
file : InOutput object, optional

References

Routine is wrapper around Fortran routine print_ defined in file src/libAtoms/MPI_context.f95.

sendrecv(self, *args, **kwargs)

Wrapper around Fortran interface sendrecv containing multiple routines:

sendrecv(sendbuf, dest, sendtag, source, recvtag, n1[, nrecv, error])
Parameters:
  • sendbuf (input rank-1 array('d') with bounds (qp_n0)) –
  • dest (input int) –
  • sendtag (input int) –
  • n1 (input int) – shape(qp_recvbuf,0)
  • source (input int) –
  • recvtag (input int) –
  • nrecv (in/output rank-0 array(int,'i'), optional) –
  • error (in/output rank-0 array(int,'i'), optional) –
Returns:

recvbuf – rank-1 array(‘d’) with bounds (qp_n1)

Routine is wrapper around Fortran routine mpi_context_sendrecv_ra defined in file src/libAtoms/MPI_context.f95.

sendrecv(sendbuf, dest, sendtag, source, recvtag[, error])
Parameters:
  • sendbuf (input float) –
  • dest (input int) –
  • sendtag (input int) –
  • source (input int) –
  • recvtag (input int) –
  • error (in/output rank-0 array(int,'i'), optional) –
Returns:

recvbuf – float

Routine is wrapper around Fortran routine mpi_context_sendrecv_r defined in file src/libAtoms/MPI_context.f95.

sendrecv(sendbuf, dest, sendtag, source, recvtag, n1[, nrecv, error])
Parameters:
  • sendbuf (input rank-2 array('S') with bounds (qp_n0,(1))) –
  • dest (input int) –
  • sendtag (input int) –
  • n1 (input int) – shape(qp_recvbuf,0)
  • source (input int) –
  • recvtag (input int) –
  • nrecv (in/output rank-0 array(int,'i'), optional) –
  • error (in/output rank-0 array(int,'i'), optional) –
Returns:

recvbuf – rank-2 array(‘S’) with bounds (qp_n1,(1))

Routine is wrapper around Fortran routine mpi_context_sendrecv_c1a defined in file src/libAtoms/MPI_context.f95.

split_context(split_index[, error])

mpi_context_split_context(split_index,[error])

Parameters:
split_index : input int
error : in/output rank-0 array(int,’i’), optional
Returns:
new_context : MPI_context object

References

Routine is wrapper around Fortran routine split_context defined in file src/libAtoms/MPI_context.f95.

sum(self, *args, **kwargs)

Wrapper around Fortran interface sum containing multiple routines:

sum(v[, error])
Parameters:
  • v (input int) –
  • error (in/output rank-0 array(int,'i'), optional) –
Returns:

ret_mpi_context_sum_int – int

Routine is wrapper around Fortran routine mpi_context_sum_int defined in file src/libAtoms/MPI_context.f95.

sum(v[, error])
Parameters:
  • v (input float) –
  • error (in/output rank-0 array(int,'i'), optional) –
Returns:

ret_mpi_context_sum_real – float

Routine is wrapper around Fortran routine mpi_context_sum_real defined in file src/libAtoms/MPI_context.f95.

sum_in_place(self, *args, **kwargs)

Wrapper around Fortran interface sum_in_place containing multiple routines:

sum_in_place(v[, error])
Parameters:
  • v (in/output rank-1 array('D') with bounds (qp_n0)) –
  • error (in/output rank-0 array(int,'i'), optional) –

Routine is wrapper around Fortran routine mpi_context_sum_in_place_complex1 defined in file src/libAtoms/MPI_context.f95.

sum_in_place(v[, error])
Parameters:
  • v (in/output rank-2 array('D') with bounds (qp_n0,qp_n1)) –
  • error (in/output rank-0 array(int,'i'), optional) –

Routine is wrapper around Fortran routine mpi_context_sum_in_place_complex2 defined in file src/libAtoms/MPI_context.f95.

sum_in_place(v[, error])
Parameters:
  • v (in/output rank-1 array('i') with bounds (qp_n0)) –
  • error (in/output rank-0 array(int,'i'), optional) –

Routine is wrapper around Fortran routine mpi_context_sum_in_place_int1 defined in file src/libAtoms/MPI_context.f95.

sum_in_place(v[, error])
Parameters:
  • v (in/output rank-0 array(int,'i')) –
  • error (in/output rank-0 array(int,'i'), optional) –

Routine is wrapper around Fortran routine mpi_context_sum_in_place_int0 defined in file src/libAtoms/MPI_context.f95.

sum_in_place(v[, error])
Parameters:
  • v (in/output rank-1 array('d') with bounds (qp_n0)) –
  • error (in/output rank-0 array(int,'i'), optional) –

Routine is wrapper around Fortran routine mpi_context_sum_in_place_real1 defined in file src/libAtoms/MPI_context.f95.

sum_in_place(v[, error])
Parameters:
  • v (in/output rank-0 array(float,'d')) –
  • error (in/output rank-0 array(int,'i'), optional) –

Routine is wrapper around Fortran routine mpi_context_sum_in_place_real0 defined in file src/libAtoms/MPI_context.f95.

sum_in_place(v[, error])
Parameters:
  • v (in/output rank-3 array('d') with bounds (qp_n0,qp_n1,qp_n2)) –
  • error (in/output rank-0 array(int,'i'), optional) –

Routine is wrapper around Fortran routine mpi_context_sum_in_place_real3 defined in file src/libAtoms/MPI_context.f95.

sum_in_place(v[, error])
Parameters:
  • v (in/output rank-2 array('d') with bounds (qp_n0,qp_n1)) –
  • error (in/output rank-0 array(int,'i'), optional) –

Routine is wrapper around Fortran routine mpi_context_sum_in_place_real2 defined in file src/libAtoms/MPI_context.f95.

quippy.mpi_context.push_mpi_error(info, fn, line)
Parameters:
info : in/output rank-0 array(int,’i’)

MPI error code

fn : input string(len=-1)
line : input int

References

Routine is wrapper around Fortran routine push_mpi_error defined in file src/libAtoms/MPI_context.f95.