Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
S
src
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
6
Issues
6
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Code Review
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
H5hut
src
Commits
b795b592
Commit
b795b592
authored
Sep 20, 2006
by
gsell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test/H5BlockTestAttributes.c
- can be compiled parallel and non-parallel now
parent
26eb035e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
19 deletions
+39
-19
test/H5BlockTestAttributes.c
test/H5BlockTestAttributes.c
+39
-19
No files found.
test/H5BlockTestAttributes.c
View file @
b795b592
...
...
@@ -7,9 +7,11 @@
#ifdef PARALLEL_IO
#include <mpi.h>
#else
typedef
MPI_Comm
int
;
typedef
int
MPI_Comm
;
#ifndef MPI_COMM_WORLD
#define MPI_COMM_WORLD 0
#endif
#endif
struct
H5BlockPartition
Layout1
[
1
]
=
{
{
0
,
63
,
0
,
63
,
0
,
511
}
...
...
@@ -78,14 +80,20 @@ _write_file (
printf
(
"PROC[%d]: Open file
\"
%s
\"
for writing ...
\n
"
,
myproc
,
fname
);
#ifdef PARALLEL_IO
f
=
H5PartOpenFileParallel
(
fname
,
H5PART_WRITE
,
comm
);
#else
f
=
H5PartOpenFile
(
fname
,
H5PART_WRITE
#ifdef PARALLEL_IO
,
comm
#endif
);
#endif
if
(
f
==
NULL
)
return
-
1
;
herr
=
H5PartSetStep
(
f
,
timestep
);
...
...
@@ -114,13 +122,19 @@ _write_attributes (
printf
(
"PROC[%d]: Open file
\"
%s
\"
for writing ...
\n
"
,
myproc
,
fname
);
#ifdef PARALLEL_IO
H5PartFile
*
f
=
H5PartOpenFileParallel
(
fname
,
H5PART_WRITE
#ifdef PARALLEL_IO
,
comm
#endif
H5PART_APPEND
,
comm
);
#else
H5PartFile
*
f
=
H5PartOpenFile
(
fname
,
H5PART_APPEND
);
#endif
if
(
f
==
NULL
)
return
-
1
;
h5part_int64_t
herr
=
H5PartSetStep
(
f
,
timestep
);
...
...
@@ -275,14 +289,18 @@ _read_file (
printf
(
"PROC[%d]: Open file
\"
%s
\"
for reading ...
\n
"
,
myproc
,
fname
);
#ifdef PARALLEL_IO
f
=
H5PartOpenFileParallel
(
fname
,
H5PART_READ
,
comm
);
#else
f
=
H5PartOpenFile
(
fname
,
H5PART_READ
#ifdef PARALLEL_IO
,
comm
#endif
);
#endif
if
(
f
==
NULL
)
return
-
1
;
herr
=
H5PartSetStep
(
f
,
timestep
);
...
...
@@ -311,19 +329,23 @@ _read_attributes (
printf
(
"PROC[%d]: Open file
\"
%s
\"
for writing ...
\n
"
,
myproc
,
fname
);
#ifdef PARALLEL_IO
H5PartFile
*
f
=
H5PartOpenFileParallel
(
fname
,
H5PART_WRITE
,
comm
);
#else
H5PartFile
*
f
=
H5PartOpenFile
(
fname
,
H5PART_WRITE
#ifdef PARALLEL_IO
,
comm
#endif
);
#endif
if
(
f
==
NULL
)
return
-
1
;
h5part_int64_t
herr
=
H5PartSetStep
(
f
,
timestep
);
if
(
herr
<
0
)
return
herr
;
char
sval
[
16
];
herr
=
H5BlockReadFieldAttrib
(
f
,
...
...
@@ -376,7 +398,6 @@ main (
)
{
char
*
fname
=
"blockfile0.h5"
;
int
myproc
=
0
;
int
nprocs
=
1
;
int
opt_read
=
0
;
int
opt_write
=
0
;
...
...
@@ -435,4 +456,3 @@ cleanup:
#endif
return
ex
;
}
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