A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
cut the backtrace displayed from sthread to the sthread_create to hide useless cruft
[simgrid.git]
/
teshsuite
/
smpi
/
type-hvector
/
type-hvector.c
diff --git
a/teshsuite/smpi/type-hvector/type-hvector.c
b/teshsuite/smpi/type-hvector/type-hvector.c
index ef277acbd0ec84a4a10ce1a1d0241e9d47b25675..b303b8dc7c25ce39cbc1ace579fbd9cb0d2a653d 100644
(file)
--- a/
teshsuite/smpi/type-hvector/type-hvector.c
+++ b/
teshsuite/smpi/type-hvector/type-hvector.c
@@
-1,4
+1,4
@@
-/* Copyright (c) 2012-20
14
. The SimGrid Team.
+/* Copyright (c) 2012-20
23
. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
@@
-9,7
+9,7
@@
#define SIZE 4
int main(int argc, char **argv) {
#define SIZE 4
int main(int argc, char **argv) {
- int rank
, i, j
;
+ int rank;
double a[SIZE][SIZE] = {{0}};
MPI_Datatype columntype;
double a[SIZE][SIZE] = {{0}};
MPI_Datatype columntype;
@@
-20,18
+20,17
@@
int main(int argc, char **argv) {
MPI_Type_hvector(SIZE, 1, SIZE*sizeof(double), MPI_DOUBLE, &columntype);
MPI_Type_commit(&columntype);
MPI_Type_hvector(SIZE, 1, SIZE*sizeof(double), MPI_DOUBLE, &columntype);
MPI_Type_commit(&columntype);
-
if (rank == 0) {
if (rank == 0) {
- for
(i=0; i <SIZE;
i++)
- for
(j=0; j <SIZE;
j++)
- a[i][j] = i
*SIZE+
j;
+ for
(int i = 0; i < SIZE;
i++)
+ for
(int j = 0; j < SIZE;
j++)
+ a[i][j] = i
* SIZE +
j;
}
}
- /* only one column is sen
d this is an exemple for non-contign
ous data*/
+ /* only one column is sen
t this is an example for non-contigu
ous data*/
MPI_Bcast(a, 1, columntype, 0, MPI_COMM_WORLD);
MPI_Bcast(a, 1, columntype, 0, MPI_COMM_WORLD);
- for
(i=0; i<SIZE; i++)
{
- for (
j=
0; j < SIZE; j++) {
+ for
(int i = 0; i < SIZE; i++)
{
+ for (
int j =
0; j < SIZE; j++) {
printf("rank= %d, a[%d][%d]=%f\n", rank, i, j, a[i][j]);
}
printf("\n");
printf("rank= %d, a[%d][%d]=%f\n", rank, i, j, a[i][j]);
}
printf("\n");
@@
-41,4
+40,3
@@
int main(int argc, char **argv) {
MPI_Finalize();
return 0;
}
MPI_Finalize();
return 0;
}
-