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
ac74d8fd
Commit
ac74d8fd
authored
9 years ago
by
Pedro Gonnet
Browse files
Options
Downloads
Patches
Plain Diff
wrap tag IDs to prevent going into bad territory, clean out runner_dosend.
Former-commit-id: 67253fd5d24b593bdd7822863d0b25781cb1e744
parent
324bd359
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/cell.c
+1
-1
1 addition, 1 deletion
src/cell.c
src/cell.h
+1
-0
1 addition, 0 deletions
src/cell.h
src/runner.c
+0
-37
0 additions, 37 deletions
src/runner.c
with
2 additions
and
38 deletions
src/cell.c
+
1
−
1
View file @
ac74d8fd
...
@@ -181,7 +181,7 @@ int cell_pack ( struct cell *c , struct pcell *pc ) {
...
@@ -181,7 +181,7 @@ int cell_pack ( struct cell *c , struct pcell *pc ) {
pc
->
dt_min
=
c
->
dt_min
;
pc
->
dt_min
=
c
->
dt_min
;
pc
->
dt_max
=
c
->
dt_max
;
pc
->
dt_max
=
c
->
dt_max
;
pc
->
count
=
c
->
count
;
pc
->
count
=
c
->
count
;
c
->
tag
=
pc
->
tag
=
cell_next_tag
++
;
c
->
tag
=
pc
->
tag
=
atomic_inc
(
cell_next_tag
)
%
cell_max_tag
;
/* Fill in the progeny, depth-first recursion. */
/* Fill in the progeny, depth-first recursion. */
for
(
k
=
0
;
k
<
8
;
k
++
)
for
(
k
=
0
;
k
<
8
;
k
++
)
...
...
This diff is collapsed.
Click to expand it.
src/cell.h
+
1
−
0
View file @
ac74d8fd
...
@@ -19,6 +19,7 @@
...
@@ -19,6 +19,7 @@
/* Some constants. */
/* Some constants. */
#define cell_sid_dt 13
#define cell_sid_dt 13
#define cell_max_tag (1 << 16)
/* Global variables. */
/* Global variables. */
...
...
This diff is collapsed.
Click to expand it.
src/runner.c
+
0
−
37
View file @
ac74d8fd
...
@@ -101,43 +101,6 @@ const char runner_flip[27] = { 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1
...
@@ -101,43 +101,6 @@ const char runner_flip[27] = { 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1
#include
"runner_doiact_grav.h"
#include
"runner_doiact_grav.h"
/**
* @brief Send a local cell's particle data to another node.
*
* @param r The #runner.
* @param c The #cell.
* @param nodeID The destination node's ID.
* @param tag bit to distinguish between xv and rho sends.
*/
void
runner_dosend
(
struct
runner
*
r
,
struct
cell
*
c
,
int
nodeID
,
int
tag
)
{
#ifdef WITH_MPI
MPI_Request
req
;
/* First check if all the density tasks have been run. */
if
(
tag
&
1
)
if
(
c
->
parts
[
0
].
rho
==
0
.
0
)
error
(
"Attempting to send rhos before ghost task completed."
);
/* Emit the isend. */
if
(
MPI_Isend
(
c
->
parts
,
sizeof
(
struct
part
)
*
c
->
count
,
MPI_BYTE
,
nodeID
,
tag
,
MPI_COMM_WORLD
,
&
req
)
!=
MPI_SUCCESS
)
error
(
"Failed to isend particle data."
);
message
(
"sending %i parts with tag=%i from %i to %i."
,
c
->
count
,
tag
,
r
->
e
->
nodeID
,
nodeID
);
fflush
(
stdout
);
/* Free the request handler as we don't care what happens next. */
MPI_Request_free
(
&
req
);
#else
error
(
"SWIFT was not compiled with MPI support."
);
#endif
}
/**
/**
* @brief Sort the entries in ascending order using QuickSort.
* @brief Sort the entries in ascending order using QuickSort.
*
*
...
...
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