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
539edc89
Commit
539edc89
authored
Oct 19, 2015
by
Matthieu Schaller
Browse files
And fixed it as well in parallel i/o mode.
parent
1cf52206
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/parallel_io.c
View file @
539edc89
...
...
@@ -110,9 +110,9 @@ void readArrayBackEnd(hid_t grp, char* name, enum DATA_TYPE type, int N,
offsets
[
0
]
=
offset
;
offsets
[
1
]
=
0
;
}
else
{
rank
=
1
;
rank
=
2
;
shape
[
0
]
=
N
;
shape
[
1
]
=
0
;
shape
[
1
]
=
1
;
offsets
[
0
]
=
offset
;
offsets
[
1
]
=
0
;
}
...
...
@@ -238,13 +238,13 @@ void read_ic_parallel(char* fileName, double dim[3], struct part** parts,
dim
[
1
]
=
(
boxSize
[
1
]
<
0
)
?
boxSize
[
0
]
:
boxSize
[
1
];
dim
[
2
]
=
(
boxSize
[
2
]
<
0
)
?
boxSize
[
0
]
:
boxSize
[
2
];
/* message("Found %d particles in a %speriodic box of size [%f %f %f].", */
/* N_total, (periodic ? "": "non-"), dim[0], dim[1], dim[2]); */
/* Divide the particles among the tasks. */
offset
=
mpi_rank
*
N_total
/
mpi_size
;
*
N
=
(
mpi_rank
+
1
)
*
N_total
/
mpi_size
-
offset
;
/* message("Found %d particles in a %speriodic box of size [%f %f %f].", */
/* *N, (periodic ? "": "non-"), dim[0], dim[1], dim[2]); */
/* Close header */
H5Gclose
(
h_grp
);
...
...
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