Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
ADIOS2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Podhorszki, Norbert
ADIOS2
Commits
9f001183
Commit
9f001183
authored
7 years ago
by
Atkins, Charles Vernon
Browse files
Options
Downloads
Patches
Plain Diff
Fix flake8 config
parent
0edb7269
No related branches found
No related tags found
1 merge request
!8
Integrate groupless
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
bindings/python/test_hello.py
+28
-24
28 additions, 24 deletions
bindings/python/test_hello.py
flake8.cfg
+4
-3
4 additions, 3 deletions
flake8.cfg
with
32 additions
and
27 deletions
bindings/python/test_hello.py
+
28
−
24
View file @
9f001183
...
...
@@ -7,38 +7,42 @@ from ADIOSPy import *
import
numpy
as
np
# Create ADIOS and verify MPI Comm is passed correctly
adios
=
ADIOSPy
(
MPI
.
COMM_WORLD
,
True
)
#Pass communicator and debug flag is True
# Pass communicator and debug flag is True
adios
=
ADIOSPy
(
MPI
.
COMM_WORLD
,
True
)
rank
=
MPI
.
COMM_WORLD
.
Get_rank
()
size
=
MPI
.
COMM_WORLD
.
Get_size
()
size
=
MPI
.
COMM_WORLD
.
Get_size
()
# User data
myArray
=
np
.
array
(
[
1
,
2
,
3
,
4
])
myArray
=
np
.
array
([
1
,
2
,
3
,
4
])
if
(
rank
%
2
==
1
):
# odd ranks only
oddRankArray
=
np
.
array
(
[
11.
,
12.
,
13.
,
14.
]
)
if
(
rank
%
2
==
1
):
# odd ranks only
oddRankArray
=
np
.
array
([
11.
,
12.
,
13.
,
14.
])
# ADIOS Define Variables
ioArray
=
adios
.
DefineVariable
(
"
ioArray
"
,
[
myArray
.
size
],
[],
[]
)
if
(
rank
%
2
==
1
):
# odd ranks only
ioOddRankArray
=
adios
.
DefineVariable
(
"
ioMyFloats
"
,
[
oddRankArray
.
size
],
[],
[]
)
# ADIOS Define Variables
ioArray
=
adios
.
DefineVariable
(
"
ioArray
"
,
[
myArray
.
size
],
[],
[])
#Setup method and print summary
if
(
rank
%
2
==
1
):
# odd ranks only
ioOddRankArray
=
adios
.
DefineVariable
(
"
ioMyFloats
"
,
[
oddRankArray
.
size
],
[],
[])
# Setup method and print summary
ioSettings
=
adios
.
DeclareMethod
(
"
adiosSettings
"
)
ioSettings
.
SetParameters
(
profile_units
=
'
mus
'
)
ioSettings
.
AddTransport
(
'
File
'
,
have_metadata_file
=
'
no
'
,
profile_units
=
'
mus
'
)
# POSIX is default, just checking
ioSettings
.
SetParameters
(
profile_units
=
'
mus
'
)
# POSIX is default, just checking
ioSettings
.
AddTransport
(
'
File
'
,
have_metadata_file
=
'
no
'
,
profile_units
=
'
mus
'
)
# Start Engine
# Open files using N-to-N method, None means no new MPI communicator
bpFileWriter
=
adios
.
Open
(
"
file.bp
"
,
"
w
"
,
ioSettings
,
None
)
bpFileWriter
.
Write
(
ioArray
,
myArray
)
#Start Engine
bpFileWriter
=
adios
.
Open
(
"
file.bp
"
,
"
w
"
,
ioSettings
,
None
)
# Open files using N-to-N method, None means no new MPI communicator
bpFileWriter
.
Write
(
ioArray
,
myArray
)
if
(
rank
%
2
==
1
):
bpFileWriter
.
Write
(
ioOddRankArray
,
oddRankArray
)
if
(
rank
%
2
==
1
):
bpFileWriter
.
Write
(
ioOddRankArray
,
oddRankArray
)
bpFileWriter
.
Close
(
)
bpFileWriter
.
Close
()
if
(
rank
==
0
):
print
"
Done writing
"
+
str
(
size
)
+
"
bp files
"
ioSettings
.
PrintAll
(
)
# just prints a summary of Method/Transport parameters
if
(
rank
==
0
):
print
"
Done writing
"
+
str
(
size
)
+
"
bp files
"
ioSettings
.
PrintAll
(
)
This diff is collapsed.
Click to expand it.
flake8.cfg
+
4
−
3
View file @
9f001183
[flake8]
max-line-length:
80
max-complexity:
14
format:
pylint
max-line-length
= 80
max-complexity
= 14
format
= pylint
ignore
= F403,F405,F999
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment