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
7c9a3897
Commit
7c9a3897
authored
11 years ago
by
Pedro Gonnet
Browse files
Options
Downloads
Patches
Plain Diff
prioritize tasks with foreign cells, fix weighting bug in subs.
Former-commit-id: a67303c6dbb3908667a36f5ec45066c62efdc224
parent
be6e7abd
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/scheduler.c
+18
-6
18 additions, 6 deletions
src/scheduler.c
with
18 additions
and
6 deletions
src/scheduler.c
+
18
−
6
View file @
7c9a3897
...
...
@@ -617,6 +617,7 @@ void scheduler_reweight ( struct scheduler *s ) {
int
k
,
j
,
nr_tasks
=
s
->
nr_tasks
,
*
tid
=
s
->
tasks_ind
;
struct
task
*
t
,
*
tasks
=
s
->
tasks
;
int
nodeID
=
s
->
nodeID
;
float
sid_scale
[
13
]
=
{
0
.
1897
,
0
.
4025
,
0
.
1897
,
0
.
4025
,
0
.
5788
,
0
.
4025
,
0
.
1897
,
0
.
4025
,
0
.
1897
,
0
.
4025
,
0
.
5788
,
0
.
4025
,
0
.
5788
};
...
...
@@ -643,13 +644,20 @@ void scheduler_reweight ( struct scheduler *s ) {
t
->
weight
+=
10
*
t
->
ci
->
count
*
t
->
ci
->
count
;
break
;
case
task_type_pair
:
t
->
weight
+=
20
*
t
->
ci
->
count
*
t
->
cj
->
count
*
sid_scale
[
t
->
flags
];
if
(
t
->
ci
->
nodeID
!=
nodeID
||
t
->
cj
->
nodeID
!=
nodeID
)
t
->
weight
+=
30
*
t
->
ci
->
count
*
t
->
cj
->
count
*
sid_scale
[
t
->
flags
];
else
t
->
weight
+=
20
*
t
->
ci
->
count
*
t
->
cj
->
count
*
sid_scale
[
t
->
flags
];
break
;
case
task_type_sub
:
if
(
t
->
cj
!=
NULL
)
t
->
weight
+=
10
*
t
->
ci
->
count
*
t
->
cj
->
count
*
sid_scale
[
t
->
flags
];
if
(
t
->
cj
!=
NULL
)
{
if
(
t
->
ci
->
nodeID
!=
nodeID
||
t
->
cj
->
nodeID
!=
nodeID
)
t
->
weight
+=
30
*
t
->
ci
->
count
*
t
->
cj
->
count
*
sid_scale
[
t
->
flags
];
else
t
->
weight
+=
20
*
t
->
ci
->
count
*
t
->
cj
->
count
*
sid_scale
[
t
->
flags
];
}
else
t
->
weight
+=
2
0
*
t
->
ci
->
count
*
t
->
ci
->
count
;
t
->
weight
+=
1
0
*
t
->
ci
->
count
*
t
->
ci
->
count
;
break
;
case
task_type_ghost
:
if
(
t
->
ci
==
t
->
ci
->
super
)
...
...
@@ -659,6 +667,10 @@ void scheduler_reweight ( struct scheduler *s ) {
case
task_type_kick2
:
t
->
weight
+=
t
->
ci
->
count
;
break
;
case
task_type_send_xv
:
case
task_type_send_rho
:
t
->
weight
*=
2
;
break
;
}
}
// message( "weighting tasks took %.3f ms." , (double)( getticks() - tic ) / CPU_TPS * 1000 );
...
...
@@ -767,7 +779,7 @@ void scheduler_enqueue ( struct scheduler *s , struct task *t ) {
}
// message( "recieving %i parts with tag=%i from %i to %i." ,
// t->ci->count , t->flags , t->ci->nodeID , s->nodeID ); fflush(stdout);
qid
=
-
1
;
qid
=
0
;
#else
error
(
"SWIFT was not compiled with MPI support."
);
#endif
...
...
@@ -783,7 +795,7 @@ void scheduler_enqueue ( struct scheduler *s , struct task *t ) {
}
// message( "sending %i parts with tag=%i from %i to %i." ,
// t->ci->count , t->flags , s->nodeID , t->cj->nodeID ); fflush(stdout);
qid
=
-
1
;
qid
=
0
;
#else
error
(
"SWIFT was not compiled with MPI support."
);
#endif
...
...
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