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
a207d0bc
Commit
a207d0bc
authored
Sep 28, 2017
by
Matthieu Schaller
Browse files
Code formatting
parent
f83e83e8
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/cell.c
View file @
a207d0bc
...
...
@@ -209,7 +209,8 @@ int cell_pack(struct cell *restrict c, struct pcell *restrict pc) {
*
* @return The number of cells created.
*/
int
cell_unpack
(
struct
pcell
*
restrict
pc
,
struct
cell
*
restrict
c
,
struct
space
*
restrict
s
)
{
int
cell_unpack
(
struct
pcell
*
restrict
pc
,
struct
cell
*
restrict
c
,
struct
space
*
restrict
s
)
{
#ifdef WITH_MPI
...
...
@@ -275,7 +276,8 @@ int cell_unpack(struct pcell *restrict pc, struct cell *restrict c, struct space
*
* @return The number of packed cells.
*/
int
cell_pack_end_step
(
struct
cell
*
restrict
c
,
struct
pcell_step
*
restrict
pcells
)
{
int
cell_pack_end_step
(
struct
cell
*
restrict
c
,
struct
pcell_step
*
restrict
pcells
)
{
#ifdef WITH_MPI
...
...
@@ -308,12 +310,13 @@ int cell_pack_end_step(struct cell *restrict c, struct pcell_step *restrict pcel
*
* @return The number of cells created.
*/
int
cell_unpack_end_step
(
struct
cell
*
restrict
c
,
struct
pcell_step
*
restrict
pcells
)
{
int
cell_unpack_end_step
(
struct
cell
*
restrict
c
,
struct
pcell_step
*
restrict
pcells
)
{
#ifdef WITH_MPI
/* Unpack this cell's data. */
c
->
ti_end_min
=
pcells
[
0
].
ti_end_min
;
c
->
ti_end_min
=
pcells
[
0
].
ti_end_min
;
c
->
dx_max_part
=
pcells
[
0
].
dx_max_part
;
c
->
dx_max_gpart
=
pcells
[
0
].
dx_max_gpart
;
...
...
src/cell.h
View file @
a207d0bc
...
...
@@ -112,7 +112,6 @@ struct pcell {
}
SWIFT_STRUCT_ALIGN
;
/**
* @brief Cell information at the end of a time-step.
*/
...
...
src/scheduler.c
View file @
a207d0bc
...
...
@@ -1275,9 +1275,9 @@ void scheduler_enqueue(struct scheduler *s, struct task *t) {
#ifdef WITH_MPI
if
(
t
->
subtype
==
task_subtype_tend
)
{
t
->
buff
=
malloc
(
sizeof
(
struct
pcell_step
)
*
t
->
ci
->
pcell_size
);
err
=
MPI_Irecv
(
t
->
buff
,
t
->
ci
->
pcell_size
*
sizeof
(
struct
pcell_step
),
MPI_BYTE
,
t
->
ci
->
nodeID
,
t
->
flags
,
MPI_COMM_WORLD
,
&
t
->
req
);
err
=
MPI_Irecv
(
t
->
buff
,
t
->
ci
->
pcell_size
*
sizeof
(
struct
pcell_step
),
MPI_BYTE
,
t
->
ci
->
nodeID
,
t
->
flags
,
MPI_COMM_WORLD
,
&
t
->
req
);
}
else
if
(
t
->
subtype
==
task_subtype_xv
||
t
->
subtype
==
task_subtype_rho
||
t
->
subtype
==
task_subtype_gradient
)
{
...
...
@@ -1311,9 +1311,9 @@ void scheduler_enqueue(struct scheduler *s, struct task *t) {
if
(
t
->
subtype
==
task_subtype_tend
)
{
t
->
buff
=
malloc
(
sizeof
(
struct
pcell_step
)
*
t
->
ci
->
pcell_size
);
cell_pack_end_step
(
t
->
ci
,
t
->
buff
);
err
=
MPI_Isend
(
t
->
buff
,
t
->
ci
->
pcell_size
*
sizeof
(
struct
pcell_step
),
MPI_BYTE
,
t
->
c
j
->
nodeID
,
t
->
flags
,
MPI_COMM_WORLD
,
&
t
->
req
);
err
=
MPI_Isend
(
t
->
buff
,
t
->
c
i
->
pcell_size
*
sizeof
(
struct
pcell_step
),
MPI_BYTE
,
t
->
cj
->
nodeID
,
t
->
flags
,
MPI_COMM_WORLD
,
&
t
->
req
);
}
else
if
(
t
->
subtype
==
task_subtype_xv
||
t
->
subtype
==
task_subtype_rho
||
t
->
subtype
==
task_subtype_gradient
)
{
...
...
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