/********************************************************************* * Pour compiler et exécuter * - mpicc -o test mpi-test.c * - mpirun --hostfile hostfile -np 10 ./test * | | * | -> nombre de processus * -> un fichier contenant «localhost slots=25» **********************************************************************/ #include #include #include "mpi.h" /* Répartiteur */ int master_io(MPI_Comm master_comm, MPI_Comm comm) { int i,j, size; char buf[256]; MPI_Status status; MPI_Comm_size(master_comm, &size); for (j=1; j<=2; j++) { for (i=1; i