Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
La programmation parallèle pour les gens
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
baptiste.coudray
La programmation parallèle pour les gens
Commits
a4248035
Verified
Commit
a4248035
authored
3 years ago
by
baptiste.coudray
Browse files
Options
Downloads
Patches
Plain Diff
Beginning test
parent
82e66a2f
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
game_of_life/benchmark/main.c
+11
-8
11 additions, 8 deletions
game_of_life/benchmark/main.c
with
11 additions
and
8 deletions
game_of_life/benchmark/main.c
+
11
−
8
View file @
a4248035
...
@@ -15,6 +15,7 @@
...
@@ -15,6 +15,7 @@
#define ROOT_RANK 0
#define ROOT_RANK 0
#define FPS 60
#define FPS 60
#define N_MEASURES 15
void
init_chunk_board
(
chunk_info_t
*
ci
)
{
void
init_chunk_board
(
chunk_info_t
*
ci
)
{
for
(
int
i
=
0
;
i
<
ci
->
dimensions
[
0
];
++
i
)
{
for
(
int
i
=
0
;
i
<
ci
->
dimensions
[
0
];
++
i
)
{
...
@@ -65,8 +66,8 @@ void compute_next_chunk_board(struct dispatch_context *dc, struct futhark_contex
...
@@ -65,8 +66,8 @@ void compute_next_chunk_board(struct dispatch_context *dc, struct futhark_contex
futhark_context_sync
(
fc
);
futhark_context_sync
(
fc
);
futhark_entry_next_chunk_board
(
fc
,
&
fut_next_chunk_board
,
fut_chunk_board
,
fut_north_west
,
fut_north
,
futhark_entry_next_chunk_board
(
fc
,
&
fut_next_chunk_board
,
fut_chunk_board
,
fut_north_west
,
fut_north
,
fut_north_east
,
fut_west
,
fut_east
,
fut_south_west
,
fut_south
,
fut_north_east
,
fut_west
,
fut_east
,
fut_south_west
,
fut_south
,
fut_south_east
);
fut_south_east
);
futhark_context_sync
(
fc
);
futhark_context_sync
(
fc
);
futhark_values_i8_2d
(
fc
,
fut_next_chunk_board
,
ci
->
data
);
futhark_values_i8_2d
(
fc
,
fut_next_chunk_board
,
ci
->
data
);
...
@@ -111,14 +112,16 @@ int main(int argc, char *argv[]) {
...
@@ -111,14 +112,16 @@ int main(int argc, char *argv[]) {
chunk_info_t
ci
=
get_chunk_info
(
disp_context
);
chunk_info_t
ci
=
get_chunk_info
(
disp_context
);
init_chunk_board
(
&
ci
);
init_chunk_board
(
&
ci
);
double
start
=
MPI_Wtime
();
for
(
int
i
=
0
;
i
<
N_MEASURES
;
++
i
)
{
compute_next_chunk_board
(
disp_context
,
fut_context
,
&
ci
);
double
start
=
MPI_Wtime
();
double
finish
=
MPI_Wtime
();
compute_next_chunk_board
(
disp_context
,
fut_context
,
&
ci
);
double
finish
=
MPI_Wtime
();
if
(
my_rank
==
ROOT_RANK
)
{
if
(
my_rank
==
ROOT_RANK
)
{
printf
(
"%d;%d;%d;%d;%f
\n
"
,
world_size
,
nb_devices
,
board_n
,
board_m
,
finish
-
start
);
printf
(
"%d;%d;%d;%d;%f
\n
"
,
world_size
,
nb_devices
,
board_n
,
board_m
,
finish
-
start
);
}
}
}
dispatch_context_free
(
disp_context
);
dispatch_context_free
(
disp_context
);
futhark_context_config_free
(
fut_config
);
futhark_context_config_free
(
fut_config
);
futhark_context_free
(
fut_context
);
futhark_context_free
(
fut_context
);
...
...
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