Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Michael Buehlmann
GenericIO
Commits
ef727a64
Commit
ef727a64
authored
Aug 26, 2016
by
Hal Finkel
Browse files
Some python cleanups and an example
parent
bd84570e
Changes
3
Hide whitespace changes
Inline
Side-by-side
GNUmakefile
View file @
ef727a64
...
...
@@ -145,9 +145,6 @@ endif
$(FEDIR)/libpygio.so
:
$(FEDIR)/GenericIO.o $(FEDIR)/python/lib/gio.o $(FE_BLOSC_O)
$(CXX)
$(FE_CFLAGS)
$(FE_SHARED)
-o
$@
$^
$(FEDIR)/gio.py
:
python/gio.py
cp
-f
$<
$@
$(FEDIR)/GenericIOSQLite.so
:
$(FEDIR)/GenericIOSQLite.o $(FEDIR)/GenericIO.o $(FE_BLOSC_O)
$(CXX)
$(FE_CFLAGS)
$(FE_SHARED)
-o
$@
$^
...
...
@@ -190,7 +187,7 @@ $(MPIDIR)/GenericIOBenchmarkWrite: $(MPIDIR)/GenericIOBenchmarkWrite.o $(MPIDIR)
$(MPIDIR)/GenericIORewrite
:
$(MPIDIR)/GenericIORewrite.o $(MPIDIR)/GenericIO.o $(MPI_BLOSC_O)
$(MPICXX)
$(MPI_CFLAGS)
-o
$@
$^
frontend-progs
:
$(FEDIR)/GenericIOPrint $(FEDIR)/GenericIOVerify $(FEDIR)/libpygio.so
$(FEDIR)/gio.py
frontend-progs
:
$(FEDIR)/GenericIOPrint $(FEDIR)/GenericIOVerify $(FEDIR)/libpygio.so
fe-progs
:
frontend-progs
mpi-progs
:
$(MPIDIR)/GenericIOPrint $(MPIDIR)/GenericIOVerify $(MPIDIR)/GenericIOBenchmarkRead $(MPIDIR)/GenericIOBenchmarkWrite $(MPIDIR)/GenericIORewrite
...
...
python/example.py
0 → 100644
View file @
ef727a64
import
sys
import
gio
name
=
sys
.
argv
[
1
]
gio
.
gio_inspect
(
name
)
x
=
gio
.
gio_read
(
name
,
"x"
)
print
x
python/gio.py
View file @
ef727a64
...
...
@@ -27,7 +27,7 @@
# *****************************************************************************
#
# DISCLAIMER
# THE SOFTWARE IS SUPPLIED
“
AS IS
”
WITHOUT WARRANTY OF ANY KIND. NEITHER THE
# THE SOFTWARE IS SUPPLIED
"
AS IS
"
WITHOUT WARRANTY OF ANY KIND. NEITHER THE
# UNTED STATES GOVERNMENT, NOR THE UNITED STATES DEPARTMENT OF ENERGY, NOR
# UCHICAGO ARGONNE, LLC, NOR ANY OF THEIR EMPLOYEES, MAKES ANY WARRANTY,
# EXPRESS OR IMPLIED, OR ASSUMES ANY LEGAL LIABILITY OR RESPONSIBILITY FOR THE
...
...
@@ -43,7 +43,7 @@ import os
#Define where the library is and load it
_path
=
os
.
path
.
dirname
(
'__file__'
)
libpygio
=
ct
.
CDLL
(
os
.
path
.
abspath
(
'libpygio.so'
))
libpygio
=
ct
.
CDLL
(
os
.
path
.
abspath
(
'
../frontend/
libpygio.so'
))
#we need to define the return type ("restype") and
#the argument types
libpygio
.
get_elem_num
.
restype
=
ct
.
c_int64
...
...
Write
Preview
Markdown
is supported
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