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
666109a0
Commit
666109a0
authored
Jul 15, 2016
by
Matthieu Schaller
Browse files
Simpler error messages
parent
7130ce5a
Changes
6
Hide whitespace changes
Inline
Side-by-side
src/hydro/Gadget2/hydro_iact.h
View file @
666109a0
...
...
@@ -111,8 +111,7 @@ __attribute__((always_inline)) INLINE static void runner_iact_vec_density(
struct
part
**
pj
)
{
error
(
"A vectorised version of the Gadget2 density interaction function does "
"not exist yet! Configure with '--disable-vec' to call the "
"non-vectorised version."
)
"not exist yet!"
);
}
/**
...
...
@@ -171,8 +170,7 @@ runner_iact_nonsym_vec_density(float *R2, float *Dx, float *Hi, float *Hj,
struct
part
**
pi
,
struct
part
**
pj
)
{
error
(
"A vectorised version of the Gadget2 non-symmetric density interaction "
"function does not exist yet! Configure with '--disable-vec' to call the "
"non-vectorised version."
)
"function does not exist yet!"
);
}
/**
...
...
@@ -280,8 +278,7 @@ __attribute__((always_inline)) INLINE static void runner_iact_vec_force(
struct
part
**
pj
)
{
error
(
"A vectorised version of the Gadget2 force interaction function does not "
"exist yet! Configure with '--disable-vec' to call the non-vectorised "
"version."
)
"exist yet!"
);
}
/**
...
...
@@ -381,9 +378,8 @@ __attribute__((always_inline)) INLINE static void runner_iact_nonsym_vec_force(
float
*
R2
,
float
*
Dx
,
float
*
Hi
,
float
*
Hj
,
struct
part
**
pi
,
struct
part
**
pj
)
{
error
(
"A vectorised version of the Gadget2 non-symmetric density interaction "
"function does not exist yet! Configure with '--disable-vec' to call the "
"non-vectorised version."
)
"A vectorised version of the Gadget2 non-symmetric force interaction "
"function does not exist yet!"
);
}
#endif
/* SWIFT_RUNNER_IACT_LEGACY_H */
src/hydro/Minimal/hydro_iact.h
View file @
666109a0
...
...
@@ -69,8 +69,7 @@ __attribute__((always_inline)) INLINE static void runner_iact_vec_density(
struct
part
**
pj
)
{
error
(
"A vectorised version of the Minimal density interaction function does "
"not exist yet! Configure with '--disable-vec' to call the "
"non-vectorised version."
)
"not exist yet!"
);
}
/**
...
...
@@ -105,8 +104,7 @@ runner_iact_nonsym_vec_density(float *R2, float *Dx, float *Hi, float *Hj,
struct
part
**
pi
,
struct
part
**
pj
)
{
error
(
"A vectorised version of the Minimal non-symmetric density interaction "
"function does not exist yet! Configure with '--disable-vec' to call the "
"non-vectorised version."
)
"function does not exist yet!"
);
}
/**
...
...
@@ -189,8 +187,7 @@ __attribute__((always_inline)) INLINE static void runner_iact_vec_force(
struct
part
**
pj
)
{
error
(
"A vectorised version of the Minimal force interaction function does not "
"exist yet! Configure with '--disable-vec' to call the non-vectorised "
"version."
)
"exist yet!"
);
}
/**
...
...
@@ -265,9 +262,8 @@ __attribute__((always_inline)) INLINE static void runner_iact_nonsym_vec_force(
float
*
R2
,
float
*
Dx
,
float
*
Hi
,
float
*
Hj
,
struct
part
**
pi
,
struct
part
**
pj
)
{
error
(
"A vectorised version of the Minimal non-symmetric density interaction "
"function does not exist yet! Configure with '--disable-vec' to call the "
"non-vectorised version."
)
"A vectorised version of the Minimal non-symmetric force interaction "
"function does not exist yet!"
);
}
#endif
/* SWIFT_RUNNER_IACT_MINIMAL_H */
tests/test27cells.c
View file @
666109a0
...
...
@@ -239,7 +239,7 @@ int main(int argc, char *argv[]) {
char
outputFileNameExtension
[
200
]
=
""
;
char
outputFileName
[
200
]
=
""
;
int
vel
=
velocity_zero
;
/* Initialize CPU frequency, this also starts time. */
unsigned
long
long
cpufreq
=
0
;
clocks_set_cpufreq
(
cpufreq
);
...
...
@@ -331,7 +331,7 @@ int main(int argc, char *argv[]) {
cells
[
i
*
9
+
j
*
3
+
k
]
=
make_cell
(
particles
,
offset
,
size
,
h
,
rho
,
&
partId
,
perturbation
,
vel
);
runner_do_sort
(
&
runner
,
cells
[
i
*
9
+
j
*
3
+
k
],
0x1FFF
,
0
);
runner_do_sort
(
&
runner
,
cells
[
i
*
9
+
j
*
3
+
k
],
0x1FFF
,
0
);
}
}
}
...
...
@@ -347,7 +347,7 @@ int main(int argc, char *argv[]) {
const
ticks
tic
=
getticks
();
#if defined(DEFAULT_SPH) || !defined(WITH_VECTORIZATION)
/* Run all the pairs */
for
(
int
j
=
0
;
j
<
27
;
++
j
)
if
(
cells
[
j
]
!=
main_cell
)
...
...
@@ -357,7 +357,7 @@ int main(int argc, char *argv[]) {
runner_doself1_density
(
&
runner
,
main_cell
);
#endif
const
ticks
toc
=
getticks
();
time
+=
toc
-
tic
;
...
...
@@ -392,7 +392,7 @@ int main(int argc, char *argv[]) {
self_all_density
(
&
runner
,
main_cell
);
#endif
const
ticks
toc
=
getticks
();
/* Let's get physical ! */
...
...
tests/testKernel.c
View file @
666109a0
...
...
@@ -54,7 +54,7 @@ int main() {
printf
(
"-------------
\n
"
);
#ifdef WITH_VECORIZATION
for
(
int
i
=
0
;
i
<
numPoints
;
i
+=
VEC_SIZE
)
{
vector
vx
,
vx_h
;
...
...
tests/testPair.c
View file @
666109a0
...
...
@@ -247,7 +247,6 @@ int main(int argc, char *argv[]) {
runner_do_sort
(
&
runner
,
ci
,
0x1FFF
,
0
);
runner_do_sort
(
&
runner
,
cj
,
0x1FFF
,
0
);
time
=
0
;
for
(
size_t
i
=
0
;
i
<
runs
;
++
i
)
{
/* Zero the fields */
...
...
@@ -260,7 +259,7 @@ int main(int argc, char *argv[]) {
/* Run the test */
runner_dopair1_density
(
&
runner
,
ci
,
cj
);
#endif
toc
=
getticks
();
time
+=
toc
-
tic
;
...
...
tests/testSPHStep.c
View file @
666109a0
...
...
@@ -64,7 +64,6 @@ struct cell *make_cell(size_t N, float cellSize, int offset[3], int id_offset) {
++
part
;
part
->
ti_begin
=
0
;
part
->
ti_end
=
1
;
}
}
}
...
...
@@ -84,7 +83,7 @@ struct cell *make_cell(size_t N, float cellSize, int offset[3], int id_offset) {
cell
->
sorted
=
0
;
cell
->
sort
=
NULL
;
cell
->
sortsize
=
0
;
return
cell
;
}
...
...
@@ -100,7 +99,7 @@ int main() {
#ifndef DEFAULT_SPH
return
0
;
#else
int
i
,
j
,
k
,
offset
[
3
];
struct
part
*
p
;
...
...
@@ -115,7 +114,7 @@ int main() {
/* Get some randomness going */
srand
(
0
);
/* Create cells */
struct
cell
*
cells
[
27
];
for
(
i
=
0
;
i
<
3
;
i
++
)
...
...
@@ -147,7 +146,7 @@ int main() {
struct
engine
e
;
e
.
s
=
&
space
;
struct
runner
r
;
r
.
e
=
&
e
;
...
...
@@ -157,7 +156,7 @@ int main() {
e
.
timeOld
=
0
.;
e
.
time
=
0
.
1
f
;
e
.
ti_current
=
1
;
/* The tracked particle */
p
=
&
(
ci
->
parts
[
N
*
N
*
N
/
2
+
N
*
N
/
2
+
N
/
2
]);
...
...
@@ -169,20 +168,19 @@ int main() {
}
message
(
"Sorting done"
);
/* Initialise the particles */
for
(
j
=
0
;
j
<
27
;
++
j
)
{
runner_do_init
(
&
r
,
cells
[
j
],
0
);
}
message
(
"Init done"
);
/* Compute density */
runner_doself1_density
(
&
r
,
ci
);
message
(
"Self done"
);
for
(
int
j
=
0
;
j
<
27
;
++
j
)
if
(
cells
[
j
]
!=
ci
)
runner_dopair1_density
(
&
r
,
ci
,
cells
[
j
]);
if
(
cells
[
j
]
!=
ci
)
runner_dopair1_density
(
&
r
,
ci
,
cells
[
j
]);
message
(
"Density done"
);
...
...
@@ -203,6 +201,4 @@ int main() {
return
0
;
#endif
}
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