-
-
Save NielsMinssen/36230588bf22d6dbe3ce123d08f8cb4a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <mpi.h> | |
#include <stdio.h> | |
int main(int argc, char** argv) { | |
MPI_Init(NULL, NULL); | |
// Récupération du nombre de processus | |
int world_size; | |
MPI_Comm_size(MPI_COMM_WORLD, &world_size); | |
// Récupération de l'identifiant du processus | |
int world_rank; | |
MPI_Comm_rank(MPI_COMM_WORLD, &world_rank); | |
printf("Hello from process %d of %d\n", world_rank, world_size); | |
MPI_Finalize(); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment