MCPcopy Create free account
hub / github.com/Kitware/VTK / PRINT

Function PRINT

Parallel/MPI4Py/Testing/Python/TestParallelNumpy.py:35–44  ·  view source on GitHub ↗
(text, values)

Source from the content-addressed store, hash-verified

33size = c.GetNumberOfProcesses()
34
35def PRINT(text, values):
36 if values is dsa.NoneArray:
37 values = numpy.array(0, dtype=numpy.float64)
38 else:
39 values = numpy.array(numpy.sum(values)).astype(numpy.float64)
40 res = numpy.array(values)
41 MPI.COMM_WORLD.Allreduce([values, MPI.DOUBLE], [res, MPI.DOUBLE], MPI.SUM)
42 assert numpy.abs(res) < 1E-5
43 if rank == 0:
44 print(text, res)
45
46def testArrays(rtData, rtData2, grad, grad2, total_npts):
47 " Test various parallel algorithms."

Callers 14

testArraysFunction · 0.85
InitializeMethod · 0.85
CreatePrototypeMethod · 0.85
PreparePointMethod · 0.85
NextTaskMethod · 0.85
SendMethod · 0.85
ReceiveMethod · 0.85
RequestDataMethod · 0.85
TraceMethod · 0.85
TraceOneStepMethod · 0.85
PrependMethod · 0.85

Calls 5

arrayMethod · 0.80
printFunction · 0.50
astypeMethod · 0.45
sumMethod · 0.45
absMethod · 0.45

Tested by

no test coverage detected