Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SWIFT
SWIFTsim
Commits
39498fc7
Commit
39498fc7
authored
Mar 22, 2016
by
Matthieu Schaller
Browse files
Don't close the group tags on the rank 0
parent
b8293057
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/serial_io.c
View file @
39498fc7
...
...
@@ -722,10 +722,6 @@ void write_output_serial(struct engine* e, struct UnitSystem* us, int mpi_rank,
/* Don't do anything if no particle of this kind */
if
(
N_total
[
ptype
]
==
0
)
continue
;
/* Add the global information for that particle type to the XMF meta-file
*/
writeXMFgroupheader
(
xmfFile
,
fileName
,
N_total
[
ptype
],
ptype
);
/* Open the particle group in the file */
char
partTypeGroupName
[
PARTICLE_GROUP_BUFFER_SIZE
];
snprintf
(
partTypeGroupName
,
PARTICLE_GROUP_BUFFER_SIZE
,
"/PartType%d"
,
...
...
@@ -738,9 +734,6 @@ void write_output_serial(struct engine* e, struct UnitSystem* us, int mpi_rank,
/* Close particle group */
H5Gclose
(
h_grp
);
/* Close this particle group in the XMF file as well */
writeXMFgroupfooter
(
xmfFile
,
ptype
);
}
/* Close file */
...
...
@@ -763,6 +756,10 @@ void write_output_serial(struct engine* e, struct UnitSystem* us, int mpi_rank,
/* Don't do anything if no particle of this kind */
if
(
N_total
[
ptype
]
==
0
)
continue
;
/* Add the global information for that particle type to the XMF meta-file */
if
(
mpi_rank
==
0
)
writeXMFgroupheader
(
xmfFile
,
fileName
,
N_total
[
ptype
],
ptype
);
/* Open the particle group in the file */
char
partTypeGroupName
[
PARTICLE_GROUP_BUFFER_SIZE
];
snprintf
(
partTypeGroupName
,
PARTICLE_GROUP_BUFFER_SIZE
,
"/PartType%d"
,
...
...
@@ -807,6 +804,10 @@ void write_output_serial(struct engine* e, struct UnitSystem* us, int mpi_rank,
/* Close particle group */
H5Gclose
(
h_grp
);
/* Close this particle group in the XMF file as well */
if
(
mpi_rank
==
0
)
writeXMFgroupfooter
(
xmfFile
,
ptype
);
}
/* Close file */
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment