Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
CodeVault
hpc-kernels
structured_grids
Commits
c0da02c3
Commit
c0da02c3
authored
Oct 12, 2016
by
Thomas Ponweiser
Browse files
structured_grids/cellular_automaton: fixed some warnings in C example
parent
8a205098
Changes
4
Hide whitespace changes
Inline
Side-by-side
cellular_automaton/wireworld_c/configuration.c
View file @
c0da02c3
...
...
@@ -2,6 +2,7 @@
#include
<mpi.h>
#include
<stdlib.h>
#include
<stdio.h>
#include
<string.h>
#include
"configuration.h"
...
...
cellular_automaton/wireworld_c/main.c
View file @
c0da02c3
...
...
@@ -67,7 +67,6 @@ void broadcast_configuration(conf_t *c) {
void
read_input
(
const
conf_t
*
c
,
world_t
*
world
)
{
int
rank
;
MPI_Comm
cart_comm
;
char
input_filename
[
FILE_NAME_SZ
];
MPI_File
file
;
...
...
cellular_automaton/wireworld_c/simulation.c
View file @
c0da02c3
...
...
@@ -200,7 +200,7 @@ void do_simulation_persistent_request_no_overlap(world_t *world, size_t n_genera
const
size_t
n_neighbors
=
world
->
transfer
.
n_neighbors
;
const
size_t
sz
=
world_get_storage_size
(
world
);
size_t
g
,
i
;
size_t
g
;
MPI_Request
*
requests
=
world
->
transfer
.
persistent_requests
;
for
(
g
=
0
;
g
<
n_generations
;
g
++
)
{
...
...
@@ -225,7 +225,7 @@ void do_simulation_persistent_request_overlap(world_t *world, size_t n_generatio
const
size_t
n_neighbors
=
world
->
transfer
.
n_neighbors
;
const
size_t
sz
=
world_get_storage_size
(
world
);
size_t
g
,
i
;
size_t
g
;
MPI_Request
*
requests
=
world
->
transfer
.
persistent_requests
;
for
(
g
=
0
;
g
<
n_generations
;
g
++
)
{
...
...
cellular_automaton/wireworld_c/world.c
View file @
c0da02c3
#include
<string.h>
#include
<stdlib.h>
#include
"world.h"
...
...
@@ -44,7 +45,6 @@ void world_init(world_t *world, size_t *global_size, const conf_t *c)
{
int
dim
,
lo
,
hi
;
int
nprocs
[
2
],
periods
[
2
],
proc_coord
[
2
];
char
*
buffer
;
size_t
storage_size
;
MPI_Comm
cart_comm
;
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment