Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
SWIFTsim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
SWIFT
SWIFTsim
Commits
20fc8a25
Commit
20fc8a25
authored
6 years ago
by
Matthieu Schaller
Browse files
Options
Downloads
Patches
Plain Diff
Un-tested parallel-io version.
parent
60ed4235
No related branches found
No related tags found
1 merge request
!710
Snapshot offsets
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/common_io.c
+2
-2
2 additions, 2 deletions
src/common_io.c
src/parallel_io.c
+15
-0
15 additions, 0 deletions
src/parallel_io.c
with
17 additions
and
2 deletions
src/common_io.c
+
2
−
2
View file @
20fc8a25
...
...
@@ -489,8 +489,8 @@ void io_write_cell_offsets(hid_t h_grp, const int cdim[3],
MPI_COMM_WORLD
);
#endif
message
(
"offsets=%lld %lld"
,
offset_part
[
0
],
offset_part
[
1
]);
message
(
"counts=%lld %lld"
,
count_part
[
0
],
count_part
[
1
])
;
/* Only rank 0 actually writes */
if
(
nodeID
!=
0
)
return
;
/* Write some meta-information first */
hid_t
h_subgrp
=
...
...
This diff is collapsed.
Click to expand it.
src/parallel_io.c
+
15
−
0
View file @
20fc8a25
...
...
@@ -1282,6 +1282,21 @@ void write_output_parallel(struct engine* e, const char* baseName,
snprintf
(
fileName
,
FILENAME_BUFFER_SIZE
,
"%s_%04i.hdf5"
,
baseName
,
e
->
snapshot_output_count
);
if
(
nodeID
==
0
)
{
h_file
=
H5Fopen
(
fileName
,
H5F_ACC_RDWR
,
H5P_DEFAULT
);
if
(
h_file
<
0
)
error
(
"Error while opening file '%s' on rank %d."
,
fileName
,
mpi_rank
);
}
else
{
h_file
=
0
;
}
io_write_cell_offsets
(
h_file
,
e
->
s
->
cdim
,
e
->
s
->
cells_top
,
e
->
s
->
nr_cells
,
e
->
s
->
width
,
e
->
nodeID
,
N_total
,
offset
);
if
(
nodeID
==
0
)
{
H5Fclose
(
h_file
);
}
/* Prepare some file-access properties */
hid_t
plist_id
=
H5Pcreate
(
H5P_FILE_ACCESS
);
...
...
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