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
9b262cc3
Commit
9b262cc3
authored
9 years ago
by
Peter W. Draper
Browse files
Options
Downloads
Patches
Plain Diff
Handle drift and kick tasks in partition weights
parent
56fcc973
No related branches found
No related tags found
2 merge requests
!136
Master
,
!76
Add new initial partition schemes and extend repartition ones.
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/engine.c
+6
-4
6 additions, 4 deletions
src/engine.c
with
6 additions
and
4 deletions
src/engine.c
+
6
−
4
View file @
9b262cc3
...
@@ -372,7 +372,8 @@ void engine_repartition(struct engine *e) {
...
@@ -372,7 +372,8 @@ void engine_repartition(struct engine *e) {
/* Skip un-interesting tasks. */
/* Skip un-interesting tasks. */
if
(
t
->
type
!=
task_type_self
&&
t
->
type
!=
task_type_pair
&&
if
(
t
->
type
!=
task_type_self
&&
t
->
type
!=
task_type_pair
&&
t
->
type
!=
task_type_sub
&&
t
->
type
!=
task_type_ghost
&&
t
->
type
!=
task_type_sub
&&
t
->
type
!=
task_type_ghost
&&
t
->
type
!=
task_type_kick1
&&
t
->
type
!=
task_type_kick2
)
t
->
type
!=
task_type_drift
&&
t
->
type
!=
task_type_kick
&&
t
->
type
!=
task_type_init
)
continue
;
continue
;
/* Get the task weight. */
/* Get the task weight. */
...
@@ -403,8 +404,8 @@ void engine_repartition(struct engine *e) {
...
@@ -403,8 +404,8 @@ void engine_repartition(struct engine *e) {
int
cid
=
ci
-
cells
;
int
cid
=
ci
-
cells
;
/* Different weights for different tasks. */
/* Different weights for different tasks. */
if
(
t
->
type
==
task_type_ghost
||
t
->
type
==
task_type_
kick1
||
if
(
t
->
type
==
task_type_ghost
||
t
->
type
==
task_type_
drift
||
t
->
type
==
task_type_kick
2
)
{
t
->
type
==
task_type_kick
)
{
/* Particle updates add only to vertex weight. */
/* Particle updates add only to vertex weight. */
weights_v
[
cid
]
+=
w
;
weights_v
[
cid
]
+=
w
;
...
@@ -1971,7 +1972,7 @@ void engine_makeproxies(struct engine *e) {
...
@@ -1971,7 +1972,7 @@ void engine_makeproxies(struct engine *e) {
* @param grid The grid.
* @param grid The grid.
*/
*/
void
engine_split
(
struct
engine
*
e
,
int
*
grid
)
{
void
engine_split
(
struct
engine
*
e
,
struct
initpart
*
ipart
)
{
#ifdef WITH_MPI
#ifdef WITH_MPI
...
@@ -2115,6 +2116,7 @@ void engine_split(struct engine *e, int *grid) {
...
@@ -2115,6 +2116,7 @@ void engine_split(struct engine *e, int *grid) {
free
(
s
->
xparts
);
free
(
s
->
xparts
);
s
->
parts
=
parts_new
;
s
->
parts
=
parts_new
;
s
->
xparts
=
xparts_new
;
s
->
xparts
=
xparts_new
;
#endif
}
}
#if defined(HAVE_LIBNUMA) && defined(_GNU_SOURCE)
#if defined(HAVE_LIBNUMA) && defined(_GNU_SOURCE)
...
...
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