/usr/lib/python2.7/dist-packages/PySPH-1.0a4.dev0-py2.7-linux-x86_64.egg/pyzoltan/core/zoltan.pxd is in python-pysph 0~20160514.git91867dc-4build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 | cimport mpi4py.MPI as mpi
from mpi4py cimport mpi_c as mpic
# Zoltan imports
from pyzoltan.czoltan cimport czoltan
from pyzoltan.czoltan.czoltan cimport Zoltan_Struct
# Zoltan type imports
from pyzoltan.czoltan.czoltan_types cimport ZOLTAN_ID_PTR, ZOLTAN_ID_TYPE, \
ZOLTAN_OK, ZOLTAN_WARN, ZOLTAN_FATAL, ZOLTAN_MEMERR
# NUMPY
import numpy as np
cimport numpy as np
# Carrays
from carray cimport UIntArray, IntArray, LongArray, DoubleArray
# Compatibility for older MPI versions and later
# mpi4py releases (Ubuntu 14.04 is one such).
cdef extern from 'mpi-compat.h': pass
# Error checking for Zoltan
cdef _check_error(int ierr)
# Pointer to the Zoltan struct
cdef struct _Zoltan_Struct:
czoltan.Zoltan_Struct* zz
cdef class PyZoltan:
# problem dimensionsionality
cdef public int dim
# version number
cdef public double version
# mpi.Comm object and associated rank and size
cdef public object comm
cdef public int rank, size
# Pointer to the Zoltan structure upon creation
cdef _Zoltan_Struct _zstruct
# string to store the current load balancing method
cdef public str lb_method
# Arrays returned by Zoltan
cdef public UIntArray exportGlobalids
cdef public UIntArray exportLocalids
cdef public IntArray exportProcs
cdef public UIntArray importGlobalids
cdef public UIntArray importLocalids
cdef public IntArray importProcs
# the number of objects to import/export
cdef public int numImport, numExport
cdef public np.ndarray procs # processors of range size
cdef public np.ndarray parts # partitions of range size
# data array for the object weights
cdef public DoubleArray weights
# General Zoltan parameters (refer the user guide)
cdef public str debug_level
cdef public str obj_weight_dim
cdef public str edge_weight_dim
cdef public str return_lists
###############################################################
# Member functions
###############################################################
# after a load balance, copy the Zoltan allocated lists to local
# numpy arrays. The Zoltan lists are subsequently deallocated
cdef _set_zoltan_lists(
self,
int numExport, # number of objects to export
ZOLTAN_ID_PTR _exportGlobal, # global indices of export objects
ZOLTAN_ID_PTR _exportLocal, # local indices of export objects
int* _exportProcs, # target processors to export
int numImport, # number of objects to import
ZOLTAN_ID_PTR _importGlobal, # global indices of import objects
ZOLTAN_ID_PTR _importLocal, # local indices of import objects
int* _importProcs # target processors to import
)
# Invert the export lists. Given a situation where every processor
# knows which objects must be exported to remote processors, a
# call to invert lists will return a list of objects that must be
# imported from remote processors.
cpdef Zoltan_Invert_Lists(self)
# User defined data for the RCB, RIB and HSFC methods
cdef struct CoordinateData:
# flag for using weights
bint use_weights
# dimensionality of the problem
int dim
# number of local/global points
int numGlobalPoints
int numMyPoints
# pointers to the object data
ZOLTAN_ID_PTR myGlobalIDs
double* obj_wts
double* x
double* y
double *z
cdef class ZoltanGeometricPartitioner(PyZoltan):
# data arrays for the coordinates
cdef public DoubleArray x, y, z
# data array for the global indices
cdef public UIntArray gid
# User defined structure to hold the coordinate data for the
# Zoltan interface
cdef CoordinateData _cdata
# number of global and local objects
cdef public int num_global_objects, num_local_objects
# ZOLTAN parameters for Geometric partitioners
cdef public str keep_cuts
|