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
4a6add67
Commit
4a6add67
authored
8 years ago
by
Pedro Gonnet
Browse files
Options
Downloads
Patches
Plain Diff
hide the task 'rid' behind an ifdef, still need to add this to the configure script.
parent
6568085f
No related branches found
No related tags found
1 merge request
!282
Scheduler activate root
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
examples/main.c
+8
-4
8 additions, 4 deletions
examples/main.c
src/runner.c
+4
-0
4 additions, 0 deletions
src/runner.c
src/scheduler.c
+3
-0
3 additions, 0 deletions
src/scheduler.c
src/task.h
+5
-0
5 additions, 0 deletions
src/task.h
with
20 additions
and
4 deletions
examples/main.c
+
8
−
4
View file @
4a6add67
...
...
@@ -551,6 +551,7 @@ int main(int argc, char *argv[]) {
/* Dump the task data using the given frequency. */
if
(
dump_tasks
&&
(
dump_tasks
==
1
||
j
%
dump_tasks
==
1
))
{
#ifdef SWIFT_TASK_DUMP
#ifdef WITH_MPI
/* Make sure output file is empty, only on one rank. */
...
...
@@ -580,8 +581,8 @@ int main(int argc, char *argv[]) {
for
(
int
l
=
0
;
l
<
e
.
sched
.
nr_tasks
;
l
++
)
{
if
(
!
e
.
sched
.
tasks
[
l
].
implicit
&&
e
.
sched
.
tasks
[
l
].
toc
!=
0
)
{
fprintf
(
file_thread
,
" %03i %i %i %i %lli %lli %i %i %i %i %i
\n
"
,
myrank
,
e
.
sched
.
tasks
[
l
].
type
,
file_thread
,
" %03i %i %i %i
%i
%lli %lli %i %i %i %i %i
\n
"
,
myrank
,
e
.
sched
.
tasks
[
l
].
rid
,
e
.
sched
.
tasks
[
l
].
type
,
e
.
sched
.
tasks
[
l
].
subtype
,
(
e
.
sched
.
tasks
[
l
].
cj
==
NULL
),
e
.
sched
.
tasks
[
l
].
tic
,
e
.
sched
.
tasks
[
l
].
toc
,
(
e
.
sched
.
tasks
[
l
].
ci
!=
NULL
)
?
e
.
sched
.
tasks
[
l
].
ci
->
count
...
...
@@ -615,8 +616,8 @@ int main(int argc, char *argv[]) {
for
(
int
l
=
0
;
l
<
e
.
sched
.
nr_tasks
;
l
++
)
{
if
(
!
e
.
sched
.
tasks
[
l
].
implicit
&&
e
.
sched
.
tasks
[
l
].
toc
!=
0
)
{
fprintf
(
file_thread
,
" %i %i %i %lli %lli %i %i %i %i
\n
"
,
e
.
sched
.
tasks
[
l
].
type
,
file_thread
,
" %i %i %i
%i
%lli %lli %i %i %i %i
\n
"
,
e
.
sched
.
tasks
[
l
].
rid
,
e
.
sched
.
tasks
[
l
].
type
,
e
.
sched
.
tasks
[
l
].
subtype
,
(
e
.
sched
.
tasks
[
l
].
cj
==
NULL
),
e
.
sched
.
tasks
[
l
].
tic
,
e
.
sched
.
tasks
[
l
].
toc
,
(
e
.
sched
.
tasks
[
l
].
ci
==
NULL
)
?
0
:
e
.
sched
.
tasks
[
l
].
ci
->
count
,
...
...
@@ -626,6 +627,9 @@ int main(int argc, char *argv[]) {
}
}
fclose
(
file_thread
);
#endif
#else
error
(
"Task dumping not enabled at compile-time."
);
#endif
}
}
...
...
This diff is collapsed.
Click to expand it.
src/runner.c
+
4
−
0
View file @
4a6add67
...
...
@@ -1293,6 +1293,10 @@ void *runner_main(void *data) {
/* Get the cells. */
struct
cell
*
ci
=
t
->
ci
;
struct
cell
*
cj
=
t
->
cj
;
#ifdef SWIFT_TASK_DUMP
t
->
rid
=
r
->
id
;
#endif
/* Check that we haven't scheduled an inactive task */
#ifdef SWIFT_DEBUG_CHECKS
...
...
This diff is collapsed.
Click to expand it.
src/scheduler.c
+
3
−
0
View file @
4a6add67
...
...
@@ -713,6 +713,9 @@ struct task *scheduler_addtask(struct scheduler *s, enum task_types type,
t
->
tic
=
0
;
t
->
toc
=
0
;
t
->
nr_unlock_tasks
=
0
;
#ifdef SWIFT_TASK_DUMP
t
->
rid
=
-
1
;
#endif
/* Add an index for it. */
// lock_lock( &s->lock );
...
...
This diff is collapsed.
Click to expand it.
src/task.h
+
5
−
0
View file @
4a6add67
...
...
@@ -147,6 +147,11 @@ struct task {
/*! Is this task implicit (i.e. does not do anything) ? */
char
implicit
;
#ifdef SWIFT_TASK_DUMP
/* ID of the last thread to execute this task. */
short
int
rid
;
#endif // SWIFT_TASK_DUMP
}
SWIFT_STRUCT_ALIGN
;
...
...
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