Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Multicore GPU programming
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Ylva Selling
Multicore GPU programming
Commits
983f478d
Commit
983f478d
authored
4 years ago
by
dansa828
Browse files
Options
Downloads
Patches
Plain Diff
measurements lab2
parent
19e864d6
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
Lab1/runinterminal.txt
+9
-1
9 additions, 1 deletion
Lab1/runinterminal.txt
Lab2/measurementslab2.txt
+180
-0
180 additions, 0 deletions
Lab2/measurementslab2.txt
Lab2/stack.c
+2
-2
2 additions, 2 deletions
Lab2/stack.c
Lab2/test.c
+2
-2
2 additions, 2 deletions
Lab2/test.c
with
193 additions
and
5 deletions
Lab1/runinterminal.txt
+
9
−
1
View file @
983f478d
for i in {1..16}
for i in {1..16}
do
do
make NB_THREADS=$i MEASURE=
2
make NB_THREADS=$i MEASURE=
1
./stack
./stack
done
done
make clean
for i in {1..8}
do
make NB_THREADS=$i MEASURE=2 NON_BLOCKING=1
./stack
make clean
done
for i in {1..16}
for i in {1..16}
do
do
./mandelbrot-256-500-375--2-0.6--1-1-$i-2
./mandelbrot-256-500-375--2-0.6--1-1-$i-2
...
...
This diff is collapsed.
Click to expand it.
Lab2/measurementslab2.txt
0 → 100644
+
180
−
0
View file @
983f478d
pop NON_BLOCKING = 0
Thread 0 time: 0.000133
Thread 0 time: 0.000640
Thread 1 time: 0.000630
Thread 0 time: 0.000279
Thread 1 time: 0.000419
Thread 2 time: 0.000404
Thread 0 time: 0.000596
Thread 1 time: 0.000637
Thread 2 time: 0.000560
Thread 3 time: 0.000597
Thread 0 time: 0.000240
Thread 1 time: 0.000643
Thread 2 time: 0.000653
Thread 3 time: 0.000647
Thread 4 time: 0.000600
Thread 0 time: 0.000216
Thread 1 time: 0.000275
Thread 2 time: 0.000556
Thread 3 time: 0.000531
Thread 4 time: 0.000515
Thread 5 time: 0.000505
Thread 0 time: 0.000100
Thread 1 time: 0.000230
Thread 2 time: 0.000586
Thread 3 time: 0.000484
Thread 4 time: 0.000545
Thread 5 time: 0.000527
Thread 6 time: 0.000380
Thread 0 time: 0.000116
Thread 1 time: 0.000690
Thread 2 time: 0.000581
Thread 3 time: 0.000717
Thread 4 time: 0.000702
Thread 5 time: 0.000573
Thread 6 time: 0.000681
Thread 7 time: 0.000654
push NON_BLOCKING = 0
Thread 0 time: 0.000144
Thread 0 time: 0.000405
Thread 1 time: 0.000422
Thread 0 time: 0.000242
Thread 1 time: 0.000453
Thread 2 time: 0.000442
Thread 0 time: 0.000398
Thread 1 time: 0.000496
Thread 2 time: 0.000475
Thread 3 time: 0.000442
Thread 0 time: 0.000334
Thread 1 time: 0.000471
Thread 2 time: 0.000347
Thread 3 time: 0.000432
Thread 4 time: 0.000406
Thread 0 time: 0.000047
Thread 1 time: 0.000347
Thread 2 time: 0.000443
Thread 3 time: 0.000454
Thread 4 time: 0.000414
Thread 5 time: 0.000356
Thread 0 time: 0.000028
Thread 1 time: 0.000303
Thread 2 time: 0.000200
Thread 3 time: 0.000418
Thread 4 time: 0.000418
Thread 5 time: 0.000410
Thread 6 time: 0.000348
Thread 0 time: 0.000039
Thread 1 time: 0.000356
Thread 2 time: 0.000528
Thread 3 time: 0.000569
Thread 4 time: 0.000481
Thread 5 time: 0.000523
Thread 6 time: 0.000500
Thread 7 time: 0.000457
pop NON_BLOCKING =1
Thread 0 time: 0.000097
Thread 0 time: 0.000255
Thread 1 time: 0.000279
Thread 0 time: 0.000598
Thread 1 time: 0.000637
Thread 2 time: 0.000636
Thread 0 time: 0.000324
Thread 1 time: 0.000675
Thread 2 time: 0.000622
Thread 3 time: 0.000652
Thread 0 time: 0.000434
Thread 1 time: 0.000837
Thread 2 time: 0.000874
Thread 3 time: 0.000852
Thread 4 time: 0.000807
Thread 0 time: 0.000017
Thread 1 time: 0.000130
Thread 2 time: 0.000548
Thread 3 time: 0.000584
Thread 4 time: 0.000567
Thread 5 time: 0.000547
Thread 0 time: 0.000321
Thread 1 time: 0.000946
Thread 2 time: 0.000969
Thread 3 time: 0.000975
Thread 4 time: 0.000928
Thread 5 time: 0.000897
Thread 6 time: 0.000917
Thread 0 time: 0.000027
Thread 1 time: 0.000376
Thread 2 time: 0.000637
Thread 3 time: 0.000601
Thread 4 time: 0.000740
Thread 5 time: 0.000755
Thread 6 time: 0.000430
Thread 7 time: 0.000694
push NON_BLOCKING=1
Thread 0 time: 0.000110
Thread 0 time: 0.000286
Thread 1 time: 0.000297
Thread 0 time: 0.000381
Thread 1 time: 0.000446
Thread 2 time: 0.000427
Thread 0 time: 0.000335
Thread 1 time: 0.000426
Thread 2 time: 0.000455
Thread 3 time: 0.000440
Thread 0 time: 0.000112
Thread 1 time: 0.000441
Thread 2 time: 0.000458
Thread 3 time: 0.000433
Thread 4 time: 0.000416
Thread 0 time: 0.000026
Thread 1 time: 0.000221
Thread 2 time: 0.000336
Thread 3 time: 0.000326
Thread 4 time: 0.000299
Thread 5 time: 0.000129
Thread 0 time: 0.000082
Thread 1 time: 0.000192
Thread 2 time: 0.000229
Thread 3 time: 0.000221
Thread 4 time: 0.000267
Thread 5 time: 0.000155
Thread 6 time: 0.000018
Thread 0 time: 0.000015
Thread 1 time: 0.000017
Thread 2 time: 0.000019
Thread 3 time: 0.000015
Thread 4 time: 0.000029
Thread 5 time: 0.000075
Thread 6 time: 0.000149
Thread 7 time: 0.000113
This diff is collapsed.
Click to expand it.
Lab2/stack.c
+
2
−
2
View file @
983f478d
...
@@ -57,13 +57,13 @@ stack_check(stack_t *stack)
...
@@ -57,13 +57,13 @@ stack_check(stack_t *stack)
#elif MEASURE == 2
#elif MEASURE == 2
int
gt
=
((
MAX_PUSH_POP
/
NB_THREADS
)
*
NB_THREADS
);
int
gt
=
((
MAX_PUSH_POP
/
NB_THREADS
)
*
NB_THREADS
);
#endif
#endif
if
(
size
==
gt
)
{
/*
if(size == gt) {
printf("%s\n", "Stack is in good state! :)");
printf("%s\n", "Stack is in good state! :)");
printf("%s %i %s %i\n", "Counter:", size, "Size:", gt);
printf("%s %i %s %i\n", "Counter:", size, "Size:", gt);
}
}
else {
else {
printf("%s%i%s%i\n", "Stack is in bad state! :( No of nodes is ", size, " but should be ", gt);
printf("%s%i%s%i\n", "Stack is in bad state! :( No of nodes is ", size, " but should be ", gt);
}
}
*/
// This test fails if the task is not allocated or if the allocation failed
// This test fails if the task is not allocated or if the allocation failed
assert
(
stack
!=
NULL
);
assert
(
stack
!=
NULL
);
...
...
This diff is collapsed.
Click to expand it.
Lab2/test.c
+
2
−
2
View file @
983f478d
...
@@ -193,7 +193,7 @@ test_teardown()
...
@@ -193,7 +193,7 @@ test_teardown()
{
{
// Do not forget to free your stacks after each test
// Do not forget to free your stacks after each test
// to avoid memory leaks
// to avoid memory leaks
print_sizes
(
stack
);
//
print_sizes(stack);
for
(
int
i
=
0
;
i
<
NB_THREADS
;
i
++
)
for
(
int
i
=
0
;
i
<
NB_THREADS
;
i
++
)
{
{
...
@@ -410,7 +410,7 @@ setbuf(stdout, NULL);
...
@@ -410,7 +410,7 @@ setbuf(stdout, NULL);
stack_measure_arg_t
arg
[
NB_THREADS
];
stack_measure_arg_t
arg
[
NB_THREADS
];
pthread_attr_init
(
&
attr
);
pthread_attr_init
(
&
attr
);
test_setup
();
test_setup
();
print_sizes
(
stack
);
//
print_sizes(stack);
clock_gettime
(
CLOCK_MONOTONIC
,
&
start
);
clock_gettime
(
CLOCK_MONOTONIC
,
&
start
);
for
(
i
=
0
;
i
<
NB_THREADS
;
i
++
)
for
(
i
=
0
;
i
<
NB_THREADS
;
i
++
)
...
...
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