Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
QuickSched
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
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
QuickSched
Commits
80d1e8b6
Commit
80d1e8b6
authored
9 years ago
by
Matthieu Schaller
Browse files
Options
Downloads
Patches
Plain Diff
Added script to plot tasks as a function of wallclock time.
parent
0fe84c7a
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
examples/plot.py
+1
-1
1 addition, 1 deletion
examples/plot.py
examples/test_bh_new.c
+7
-4
7 additions, 4 deletions
examples/test_bh_new.c
examples/test_fmm.c
+10
-7
10 additions, 7 deletions
examples/test_fmm.c
with
18 additions
and
12 deletions
examples/plot.py
+
1
−
1
View file @
80d1e8b6
...
...
@@ -127,7 +127,7 @@ plot(id, errx_new , 'b.')
text
(
id
[
-
1
],
0.18
,
"
B-H: $%5.3f
\\
pm%5.3f$
\n
QuickShed: $%5.3f
\\
pm%5.3f$
"
%
(
meanx_bh
,
stdx_bh
,
meanx_new
,
stdx_new
),
backgroundcolor
=
"
w
"
,
va
=
"
top
"
,
ha
=
"
right
"
)
ylim
(
-
0.02
,
0.0
2
)
ylim
(
-
2
,
2
)
xlim
(
0
,
id
[
-
1
])
grid
()
...
...
This diff is collapsed.
Click to expand it.
examples/test_bh_new.c
+
7
−
4
View file @
80d1e8b6
...
...
@@ -38,7 +38,7 @@
/* Some local constants. */
#define cell_pool_grow 1000
#define cell_maxparts 128
#define task_limit 1e
8
#define task_limit 1e
7
#define const_G 1 // 6.6738e-8
#define dist_min 0.5
/* Used for legacy walk only */
#define dist_cutoff_ratio 1.5
...
...
@@ -1498,9 +1498,12 @@ void test_bh(int N, int nr_threads, int runs, char *fileName) {
#endif
/* Dump the tasks. */
/* for ( k = 0 ; k < s.count ; k++ ) */
/* printf( " %i %i %lli %lli\n" , s.tasks[k].type , s.tasks[k].qid , */
/* s.tasks[k].tic , s.tasks[k].toc ); */
FILE
*
taskFile
=
fopen
(
"output_bh_new.out"
,
"w"
);
for
(
k
=
0
;
k
<
s
.
count
;
k
++
)
fprintf
(
taskFile
,
" %i %i %lli %lli
\n
"
,
s
.
tasks
[
k
].
type
,
s
.
tasks
[
k
].
qid
,
s
.
tasks
[
k
].
tic
,
s
.
tasks
[
k
].
toc
);
fclose
(
taskFile
);
/* Dump the costs. */
message
(
"costs: setup=%lli ticks, run=%lli ticks."
,
tot_setup
,
...
...
This diff is collapsed.
Click to expand it.
examples/test_fmm.c
+
10
−
7
View file @
80d1e8b6
...
...
@@ -38,7 +38,7 @@
/* Some local constants. */
#define cell_pool_grow 1000
#define cell_maxparts 128
#define task_limit 1
#define task_limit 1
e8
#define const_G 1 // 6.6738e-8
#define dist_min 0.5
/* Used for legacy walk only */
#define dist_cutoff_ratio 1.5
...
...
@@ -1268,7 +1268,7 @@ void test_bh(int N, int nr_threads, int runs, char *fileName) {
parts
[
k
].
x
[
0
]
=
((
double
)
rand
())
/
RAND_MAX
;
parts
[
k
].
x
[
1
]
=
((
double
)
rand
())
/
RAND_MAX
;
parts
[
k
].
x
[
2
]
=
((
double
)
rand
())
/
RAND_MAX
;
parts
[
k
].
mass
=
((
double
)
rand
())
/
RAND_MAX
;
parts
[
k
].
mass
=
1
.;
//
((double)rand()) / RAND_MAX;
parts
[
k
].
a_legacy
[
0
]
=
0
.
0
;
parts
[
k
].
a_legacy
[
1
]
=
0
.
0
;
parts
[
k
].
a_legacy
[
2
]
=
0
.
0
;
...
...
@@ -1338,7 +1338,7 @@ void test_bh(int N, int nr_threads, int runs, char *fileName) {
}
message
(
"Average number of parts per leaf is %f."
,
((
double
)
N
)
/
nr_leaves
);
#if ICHECK > 0
#if
0 //
ICHECK > 0
printf("----------------------------------------------------------\n");
/* Do a N^2 interactions calculation */
...
...
@@ -1431,6 +1431,7 @@ void test_bh(int N, int nr_threads, int runs, char *fileName) {
tic
=
getticks
();
qsched_run
(
&
s
,
nr_threads
,
runner
);
#ifndef DOWN_AS_TASK
// message("comp down");
comp_down
(
root
);
#endif
toc_run
=
getticks
();
...
...
@@ -1484,9 +1485,11 @@ void test_bh(int N, int nr_threads, int runs, char *fileName) {
#endif
/* Dump the tasks. */
/* for ( k = 0 ; k < s.count ; k++ )
printf( " %i %i %lli %lli\n" , s.tasks[k].type , s.tasks[k].qid ,
s.tasks[k].tic , s.tasks[k].toc ); */
FILE
*
taskFile
=
fopen
(
"output_fmm.out"
,
"w"
);
for
(
k
=
0
;
k
<
s
.
count
;
k
++
)
fprintf
(
taskFile
,
" %i %i %lli %lli
\n
"
,
s
.
tasks
[
k
].
type
,
s
.
tasks
[
k
].
qid
,
s
.
tasks
[
k
].
tic
,
s
.
tasks
[
k
].
toc
);
fclose
(
taskFile
);
/* Dump the costs. */
message
(
"costs: setup=%lli ticks, run=%lli ticks."
,
tot_setup
,
...
...
@@ -1531,7 +1534,7 @@ int main(int argc, char *argv[]) {
char
fileName
[
100
]
=
{
0
};
/* Die on FP-exceptions. */
feenableexcept
(
FE_DIVBYZERO
|
FE_INVALID
|
FE_OVERFLOW
);
//
feenableexcept(FE_DIVBYZERO | FE_INVALID | FE_OVERFLOW);
/* Get the number of threads. */
#pragma omp parallel shared(nr_threads)
...
...
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