-/* Copyright (c) 2009-2020. The SimGrid Team.
+/* Copyright (c) 2009-2023. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
MPI_Comm_size(MPI_COMM_WORLD, &nbNodes);
- printf("rank %d: Alive \n", rank);
+ printf("rank %d: Alive\n", rank);
MPI_Barrier(MPI_COMM_WORLD);
MPI_Cart_create(MPI_COMM_WORLD, DIM, dims, periods, reorder, &gridComm);
if (gridComm == MPI_COMM_NULL)
- printf("error grid NULLCOMM \n");
+ printf("error grid NULLCOMM\n");
MPI_Comm_rank(gridComm, &myGridRank);
MPI_Comm_size(gridComm, &gridSize);
MPI_Bcast(A, N * N, MPI_INT, root, lineComm);
/* Print A */
- printf("process:(%d,%d) \n", myLineRank, myColRank);
+ printf("process:(%d,%d)\n", myLineRank, myColRank);
printf("-------------------\n");
for (int i = 0; i < N; i++) {
for (int j = 0; j < N; j++) {
- printf("%d ", *(A + (i * N) + j));
+ printf(" %d", *(A + (i * N) + j));
}
printf("\n");
}