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
f8c92e57
Commit
f8c92e57
authored
Jun 16, 2016
by
Matthieu Schaller
Browse files
Remove the part<->gpart link checks. These can be commented back in when debugging.
parent
7e2d978b
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/engine.c
View file @
f8c92e57
...
...
@@ -481,27 +481,26 @@ void engine_redistribute(struct engine *e) {
} */
/* Verify that the links are correct */
/* MATTHIEU: To be commented out once we are happy */
for
(
size_t
k
=
0
;
k
<
nr_gparts
;
++
k
)
{
/* for (size_t k = 0; k < nr_gparts; ++k) { */
if
(
gparts_new
[
k
].
id
>
0
)
{
/*
if (gparts_new[k].id > 0) {
*/
if
(
gparts_new
[
k
].
part
->
gpart
!=
&
gparts_new
[
k
])
error
(
"Linking problem !"
);
/*
if (gparts_new[k].part->gpart != &gparts_new[k])
*/
/*
error("Linking problem !");
*/
if
(
gparts_new
[
k
].
x
[
0
]
!=
gparts_new
[
k
].
part
->
x
[
0
]
||
gparts_new
[
k
].
x
[
1
]
!=
gparts_new
[
k
].
part
->
x
[
1
]
||
gparts_new
[
k
].
x
[
2
]
!=
gparts_new
[
k
].
part
->
x
[
2
])
error
(
"Linked particles are not at the same position !"
);
}
}
for
(
size_t
k
=
0
;
k
<
nr_parts
;
++
k
)
{
/*
if (gparts_new[k].x[0] != gparts_new[k].part->x[0] ||
*/
/*
gparts_new[k].x[1] != gparts_new[k].part->x[1] ||
*/
/*
gparts_new[k].x[2] != gparts_new[k].part->x[2])
*/
/*
error("Linked particles are not at the same position !");
*/
/* } */
/* } */
/*
for (size_t k = 0; k < nr_parts; ++k) {
*/
if
(
parts_new
[
k
].
gpart
!=
NULL
)
{
/*
if (parts_new[k].gpart != NULL) {
*/
if
(
parts_new
[
k
].
gpart
->
part
!=
&
parts_new
[
k
])
error
(
"Linking problem !"
);
}
}
/*
if (parts_new[k].gpart->part != &parts_new[k]) error("Linking problem !");
*/
/* } */
/* } */
/* Set the new part data, free the old. */
free
(
parts
);
...
...
@@ -2447,26 +2446,25 @@ void engine_split(struct engine *e, struct partition *initial_partition) {
if
(
s
->
gparts
[
k
].
id
>
0
)
s
->
gparts
[
k
].
part
->
gpart
=
&
s
->
gparts
[
k
];
/* Verify that the links are correct */
/* MATTHIEU: To be commented out once we are happy */
for
(
size_t
k
=
0
;
k
<
s
->
nr_gparts
;
++
k
)
{
/* for (size_t k = 0; k < s->nr_gparts; ++k) { */
if
(
s
->
gparts
[
k
].
id
>
0
)
{
/*
if (s->gparts[k].id > 0) {
*/
if
(
s
->
gparts
[
k
].
part
->
gpart
!=
&
s
->
gparts
[
k
])
error
(
"Linking problem !"
);
/*
if (s->gparts[k].part->gpart != &s->gparts[k]) error("Linking problem !");
*/
if
(
s
->
gparts
[
k
].
x
[
0
]
!=
s
->
gparts
[
k
].
part
->
x
[
0
]
||
s
->
gparts
[
k
].
x
[
1
]
!=
s
->
gparts
[
k
].
part
->
x
[
1
]
||
s
->
gparts
[
k
].
x
[
2
]
!=
s
->
gparts
[
k
].
part
->
x
[
2
])
error
(
"Linked particles are not at the same position !"
);
}
}
for
(
size_t
k
=
0
;
k
<
s
->
nr_parts
;
++
k
)
{
/*
if (s->gparts[k].x[0] != s->gparts[k].part->x[0] ||
*/
/*
s->gparts[k].x[1] != s->gparts[k].part->x[1] ||
*/
/*
s->gparts[k].x[2] != s->gparts[k].part->x[2])
*/
/*
error("Linked particles are not at the same position !");
*/
/* } */
/* } */
/*
for (size_t k = 0; k < s->nr_parts; ++k) {
*/
if
(
s
->
parts
[
k
].
gpart
!=
NULL
)
{
/*
if (s->parts[k].gpart != NULL) {
*/
if
(
s
->
parts
[
k
].
gpart
->
part
!=
&
s
->
parts
[
k
])
error
(
"Linking problem !"
);
}
}
/*
if (s->parts[k].gpart->part != &s->parts[k]) error("Linking problem !");
*/
/* } */
/* } */
#else
error
(
"SWIFT was not compiled with MPI support."
);
...
...
@@ -2485,7 +2483,7 @@ void engine_dump_snapshot(struct engine *e) {
if
(
e
->
verbose
)
message
(
"writing snapshot at t=%f."
,
e
->
time
);
/* Dump... */
/* Dump... */
#if defined(WITH_MPI)
#if defined(HAVE_PARALLEL_HDF5)
write_output_parallel
(
e
,
e
->
snapshotBaseName
,
e
->
snapshotUnits
,
e
->
nodeID
,
...
...
src/space.c
View file @
f8c92e57
...
...
@@ -597,26 +597,25 @@ void space_rebuild(struct space *s, double cell_max, int verbose) {
free
(
gind
);
/* Verify that the links are correct */
/* MATTHIEU: To be commented out once we are happy */
for
(
size_t
k
=
0
;
k
<
nr_gparts
;
++
k
)
{
/* for (size_t k = 0; k < nr_gparts; ++k) { */
if
(
s
->
gparts
[
k
].
id
>
0
)
{
/*
if (s->gparts[k].id > 0) {
*/
if
(
s
->
gparts
[
k
].
part
->
gpart
!=
&
s
->
gparts
[
k
])
error
(
"Linking problem !"
);
/*
if (s->gparts[k].part->gpart != &s->gparts[k]) error("Linking problem !");
*/
if
(
s
->
gparts
[
k
].
x
[
0
]
!=
s
->
gparts
[
k
].
part
->
x
[
0
]
||
s
->
gparts
[
k
].
x
[
1
]
!=
s
->
gparts
[
k
].
part
->
x
[
1
]
||
s
->
gparts
[
k
].
x
[
2
]
!=
s
->
gparts
[
k
].
part
->
x
[
2
])
error
(
"Linked particles are not at the same position !"
);
}
}
for
(
size_t
k
=
0
;
k
<
nr_parts
;
++
k
)
{
/*
if (s->gparts[k].x[0] != s->gparts[k].part->x[0] ||
*/
/*
s->gparts[k].x[1] != s->gparts[k].part->x[1] ||
*/
/*
s->gparts[k].x[2] != s->gparts[k].part->x[2])
*/
/*
error("Linked particles are not at the same position !");
*/
/* } */
/* } */
/*
for (size_t k = 0; k < nr_parts; ++k) {
*/
if
(
s
->
parts
[
k
].
gpart
!=
NULL
)
{
/*
if (s->parts[k].gpart != NULL) {
*/
if
(
s
->
parts
[
k
].
gpart
->
part
!=
&
s
->
parts
[
k
])
error
(
"Linking problem !"
);
}
}
/*
if (s->parts[k].gpart->part != &s->parts[k]) error("Linking problem !");
*/
/* } */
/* } */
/* Hook the cells up to the parts. */
// tic = getticks();
...
...
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