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
2d829953
Commit
2d829953
authored
8 years ago
by
Matthieu Schaller
Browse files
Options
Downloads
Patches
Plain Diff
Make sure the tests in the test suite still pass...
parent
c8ccc9c8
No related branches found
No related tags found
1 merge request
!310
Star particles and gparts links over MPI
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tests/benchmarkInteractions.c
+5
-1
5 additions, 1 deletion
tests/benchmarkInteractions.c
tests/testReading.c
+4
-3
4 additions, 3 deletions
tests/testReading.c
with
9 additions
and
4 deletions
tests/benchmarkInteractions.c
+
5
−
1
View file @
2d829953
...
...
@@ -237,9 +237,9 @@ void test_interactions(struct part test_part, struct part *parts, size_t count,
float
r2
[
count
]
__attribute__
((
aligned
(
array_align
)));
float
dx
[
3
*
count
]
__attribute__
((
aligned
(
array_align
)));
#ifdef WITH_VECTORIZATION
struct
part
*
piq
[
count
],
*
pjq
[
count
];
#ifdef WITH_VECTORIZATION
float
r2q
[
count
]
__attribute__
((
aligned
(
array_align
)));
float
hiq
[
count
]
__attribute__
((
aligned
(
array_align
)));
float
dxq
[
count
]
__attribute__
((
aligned
(
array_align
)));
...
...
@@ -338,10 +338,12 @@ void test_interactions(struct part test_part, struct part *parts, size_t count,
/* Only dump data on first run. */
if
(
k
==
0
)
{
#ifdef WITH_VECTORIZATION
/* Dump state of particles before vector interaction. */
dump_indv_particle_fields
(
vec_filename
,
piq
[
0
]);
for
(
size_t
i
=
0
;
i
<
count
;
i
++
)
dump_indv_particle_fields
(
vec_filename
,
pjq
[
i
]);
#endif
}
/* Perform vector interaction. */
...
...
@@ -407,10 +409,12 @@ void test_interactions(struct part test_part, struct part *parts, size_t count,
fprintf
(
file
,
"
\n
# PARTICLES AFTER INTERACTION:
\n
"
);
fclose
(
file
);
#ifdef WITH_VECTORIZATION
/* Dump result of serial interaction. */
dump_indv_particle_fields
(
vec_filename
,
piq
[
0
]);
for
(
size_t
i
=
0
;
i
<
count
;
i
++
)
dump_indv_particle_fields
(
vec_filename
,
pjq
[
i
]);
#endif
#ifdef WITH_VECTORIZATION
/* Check serial results against the vectorised results. */
...
...
This diff is collapsed.
Click to expand it.
tests/testReading.c
+
4
−
3
View file @
2d829953
...
...
@@ -25,13 +25,14 @@
int
main
()
{
size_t
Ngas
=
0
,
Ngpart
=
0
;
size_t
Ngas
=
0
,
Ngpart
=
0
,
Nspart
=
0
;
int
periodic
=
-
1
;
int
flag_entropy_ICs
=
-
1
;
int
i
,
j
,
k
;
double
dim
[
3
];
struct
part
*
parts
=
NULL
;
struct
gpart
*
gparts
=
NULL
;
struct
spart
*
sparts
=
NULL
;
/* Default unit system */
struct
UnitSystem
us
;
...
...
@@ -43,8 +44,8 @@ int main() {
const
double
rho
=
2
.;
/* Read data */
read_ic_single
(
"input.hdf5"
,
&
us
,
dim
,
&
parts
,
&
gparts
,
&
Nga
s
,
&
Ng
part
,
&
periodic
,
&
flag_entropy_ICs
,
0
);
read_ic_single
(
"input.hdf5"
,
&
us
,
dim
,
&
parts
,
&
gparts
,
&
spart
s
,
&
Ng
as
,
&
Ngpart
,
&
Nspart
,
&
periodic
,
&
flag_entropy_ICs
,
1
,
1
,
0
,
0
);
/* Check global properties read are correct */
assert
(
dim
[
0
]
==
boxSize
);
...
...
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