Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
VTK
VTK
Commits
55ab30f9
Commit
55ab30f9
authored
Aug 14, 2015
by
Andrew Maclean
Committed by
David Gobbi
Aug 19, 2015
Browse files
A fix to enable this script to work with Py3k.
parent
aa4e0d02
Changes
1
Hide whitespace changes
Inline
Side-by-side
IO/ParallelXML/Testing/Python/testParallelXMLWriters.py
View file @
55ab30f9
...
...
@@ -82,7 +82,7 @@ def GetSource(dataType):
pts
=
vtk
.
vtkPoints
()
sg
.
SetPoints
(
pts
)
npts
=
input
.
GetNumberOfPoints
()
for
i
in
x
range
(
npts
):
for
i
in
range
(
npts
):
pts
.
InsertNextPoint
(
input
.
GetPoint
(
i
))
sg
.
GetPointData
().
ShallowCopy
(
input
.
GetPointData
())
...
...
@@ -97,7 +97,7 @@ def TestDataType(dataType, reader, writer, ext, numTris):
writer
.
SetInputConnection
(
s
.
GetOutputPort
())
npieces
=
16
writer
.
SetNumberOfPieces
(
npieces
)
pperrank
=
npieces
/
nranks
pperrank
=
npieces
/
/
nranks
start
=
pperrank
*
rank
end
=
start
+
pperrank
-
1
writer
.
SetStartPiece
(
start
)
...
...
@@ -130,7 +130,7 @@ def TestDataType(dataType, reader, writer, ext, numTris):
contr
.
AllReduce
(
da
,
da2
,
vtk
.
vtkCommunicator
.
SUM_OP
)
if
rank
==
0
:
print
da2
.
GetValue
(
0
)
print
(
da2
.
GetValue
(
0
)
)
import
os
os
.
remove
(
filename
)
for
i
in
range
(
npieces
):
...
...
David Gobbi
@dgobbi
mentioned in commit
0589e57d
·
Aug 22, 2015
mentioned in commit
0589e57d
mentioned in commit 0589e57d9a9bef10d4cb3a4555db0b8c494dac9e
Toggle commit list
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment