Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TurTLE
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository 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
TurTLE
TurTLE
Commits
353244cd
Commit
353244cd
authored
9 years ago
by
Cristian Lalescu
Browse files
Options
Downloads
Patches
Plain Diff
fix write
parent
92ad8b22
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bfps/cpp/distributed_particles.cpp
+21
-18
21 additions, 18 deletions
bfps/cpp/distributed_particles.cpp
with
21 additions
and
18 deletions
bfps/cpp/distributed_particles.cpp
+
21
−
18
View file @
353244cd
...
@@ -273,25 +273,28 @@ void distributed_particles<particle_type, rnumber, interp_neighbours>::write(
...
@@ -273,25 +273,28 @@ void distributed_particles<particle_type, rnumber, interp_neighbours>::write(
MPI_SUM
,
MPI_SUM
,
this
->
comm
);
this
->
comm
);
delete
[]
yy
;
delete
[]
yy
;
std
::
string
temp_string
=
(
std
::
string
(
this
->
name
)
+
if
(
this
->
myrank
==
0
)
std
::
string
(
"/"
)
+
{
std
::
string
(
dset_name
));
std
::
string
temp_string
=
(
std
::
string
(
this
->
name
)
+
hid_t
dset
=
H5Dopen
(
data_file_id
,
temp_string
.
c_str
(),
H5P_DEFAULT
);
std
::
string
(
"/"
)
+
hid_t
mspace
,
wspace
;
std
::
string
(
dset_name
));
hsize_t
count
[
3
],
offset
[
3
];
hid_t
dset
=
H5Dopen
(
data_file_id
,
temp_string
.
c_str
(),
H5P_DEFAULT
);
wspace
=
H5Dget_space
(
dset
);
hid_t
mspace
,
wspace
;
H5Sget_simple_extent_dims
(
wspace
,
count
,
NULL
);
hsize_t
count
[
3
],
offset
[
3
];
count
[
0
]
=
1
;
wspace
=
H5Dget_space
(
dset
);
offset
[
0
]
=
this
->
iteration
/
this
->
traj_skip
;
H5Sget_simple_extent_dims
(
wspace
,
count
,
NULL
);
offset
[
1
]
=
0
;
count
[
0
]
=
1
;
offset
[
2
]
=
0
;
offset
[
0
]
=
this
->
iteration
/
this
->
traj_skip
;
mspace
=
H5Screate_simple
(
3
,
count
,
NULL
);
offset
[
1
]
=
0
;
H5Sselect_hyperslab
(
wspace
,
H5S_SELECT_SET
,
offset
,
NULL
,
count
,
NULL
);
offset
[
2
]
=
0
;
H5Dwrite
(
dset
,
H5T_NATIVE_DOUBLE
,
mspace
,
wspace
,
H5P_DEFAULT
,
data
);
mspace
=
H5Screate_simple
(
3
,
count
,
NULL
);
H5Sselect_hyperslab
(
wspace
,
H5S_SELECT_SET
,
offset
,
NULL
,
count
,
NULL
);
H5Dwrite
(
dset
,
H5T_NATIVE_DOUBLE
,
mspace
,
wspace
,
H5P_DEFAULT
,
data
);
H5Sclose
(
mspace
);
H5Sclose
(
wspace
);
H5Dclose
(
dset
);
}
delete
[]
data
;
delete
[]
data
;
H5Sclose
(
mspace
);
H5Sclose
(
wspace
);
H5Dclose
(
dset
);
}
}
template
<
int
particle_type
,
class
rnumber
,
int
interp_neighbours
>
template
<
int
particle_type
,
class
rnumber
,
int
interp_neighbours
>
...
...
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