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
71
Issues
71
List
Boards
Labels
Service Desk
Milestones
Merge Requests
5
Merge Requests
5
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
OPAL
src
Commits
099e06ba
Commit
099e06ba
authored
Aug 09, 2012
by
gsell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bugfix in Fieldmap::readHeader(): under some conditions the H5hut file wasn't closed
parent
736432c8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
classic/5.0/src/Fields/Fieldmap.cpp
classic/5.0/src/Fields/Fieldmap.cpp
+10
-10
No files found.
classic/5.0/src/Fields/Fieldmap.cpp
View file @
099e06ba
...
...
@@ -270,7 +270,7 @@ MapType Fieldmap::readHeader(std::string Filename) {
h5_size_t
grid_dims
[
3
];
h5_size_t
field_dims
;
char
name
[
20
];
h5_size_t
len_name
=
20
;
h5_size_t
len_name
=
sizeof
(
name
)
;
h5_int64_t
ftype
;
h5_file_t
*
file
=
H5OpenFile
(
Filename
.
c_str
(),
H5_O_RDONLY
,
Ippl
::
getComm
());
...
...
@@ -279,25 +279,25 @@ MapType Fieldmap::readHeader(std::string Filename) {
if
(
h5err
!=
H5_SUCCESS
)
ERRORMSG
(
"H5 rc= "
<<
h5err
<<
" in "
<<
__FILE__
<<
" @ line "
<<
__LINE__
<<
endl
);
h5_int64_t
num_fields
=
H5BlockGetNumFields
(
file
);
MapType
maptype
=
UNKNOWN
;
for
(
h5_ssize_t
i
=
0
;
i
<
num_fields
;
++
i
)
{
/*
Work around API changes in H5Block
*/
h5err
=
H5BlockGetFieldInfo
(
file
,
(
h5_size_t
)
i
,
name
,
len_name
,
&
grid_rank
,
grid_dims
,
&
field_dims
,
&
ftype
);
if
(
h5err
!=
H5_SUCCESS
)
ERRORMSG
(
"H5 rc= "
<<
h5err
<<
" in "
<<
__FILE__
<<
" @ line "
<<
__LINE__
<<
endl
);
if
(
strcmp
(
name
,
"Bfield"
)
==
0
)
{
// using dataset name "Bfield" and "Hfield" to distinguish the type
return
T3DMagnetoStaticH5Block
;
// using field name "Bfield" and "Hfield" to distinguish the type
if
(
strcmp
(
name
,
"Bfield"
)
==
0
)
{
maptype
=
T3DMagnetoStaticH5Block
;
break
;
}
else
if
(
strcmp
(
name
,
"Hfield"
)
==
0
)
{
return
T3DDynamicH5Block
;
maptype
=
T3DDynamicH5Block
;
break
;
}
}
h5err
=
H5CloseFile
(
file
);
if
(
h5err
!=
H5_SUCCESS
)
ERRORMSG
(
"H5 rc= "
<<
h5err
<<
" in "
<<
__FILE__
<<
" @ line "
<<
__LINE__
<<
endl
);
//return T3DDynamicH5Block;
if
(
maptype
!=
UNKNOWN
)
return
maptype
;
}
}
if
(
strcmp
(
magicnumber
,
"Astr"
)
==
0
)
{
...
...
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