X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/53ab1525ab0a15ba7323171aba78be415fd64fd6..596e36117322c22fd31372e7803bc197bcd4a016:/teshsuite/smpi/topo-cart-sub/topo-cart-sub.c diff --git a/teshsuite/smpi/topo-cart-sub/topo-cart-sub.c b/teshsuite/smpi/topo-cart-sub/topo-cart-sub.c index fc64b7dcbc..afb0917932 100644 --- a/teshsuite/smpi/topo-cart-sub/topo-cart-sub.c +++ b/teshsuite/smpi/topo-cart-sub/topo-cart-sub.c @@ -1,14 +1,14 @@ -/* Copyright (c) 2019. Jonathan Borne. -*/ -/* Copyright (c) 2009-2019. 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 * under the terms of the license (GNU LGPL) which comes with this package. */ +/* Copyright (c) 2019. Jonathan Borne. */ + +#include #include #include -#include #define DIM 2 #define Q 2 @@ -17,101 +17,109 @@ #define N 3 /* Local matrices size N*N */ -int main(int argc, char **argv){ - /* Nb of nodes in the grid: - initialized by MPI_Comm_size according to commandline -np value */ - int nbNodes; - - /* Communicators */ - MPI_Comm gridComm, lineComm; - /* Current process ranks */ - int rank, gridSize, myGridRank, myLineRank, myColRank; - /* coords: used to get myLineRank and myColRank - initialized by MPI_Cart_coords - */ - int coords[DIM]; - /* dims: Integer array of size ndims specifying the number - of processes in each dimension. - if init value is 0 it is reset by MPI_Dims_create. - */ - int dims[DIM]; - for(int i=0; i