File: ex-3.13.py

package info (click to toggle)
mpi4py 4.0.3-4
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 4,196 kB
  • sloc: python: 32,170; ansic: 13,449; makefile: 602; sh: 314; f90: 178; cpp: 148
file content (14 lines) | stat: -rw-r--r-- 290 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
from mpi4py import MPI

blens = (1, 1)
disps = (0, MPI.DOUBLE.size)
types = (MPI.DOUBLE, MPI.CHAR)
type1 = MPI.Datatype.Create_struct(blens, disps, types)

B = (2, 1, 3)
D = (0, 16, 26)
T = (MPI.FLOAT, type1, MPI.CHAR)
dtype = MPI.Datatype.Create_struct(B, D, T)

type1.Free()
dtype.Free()