Skip to content

Instantly share code, notes, and snippets.

@ankona
Created July 1, 2025 19:24
Show Gist options
  • Save ankona/9686dada09c167ef0ce9850e9e9d7114 to your computer and use it in GitHub Desktop.
Save ankona/9686dada09c167ef0ce9850e9e9d7114 to your computer and use it in GitHub Desktop.
Simplest MPI test program
#include <stdio.h>
#include <mpi.h>
main(int argc, char **argv)
{
int node;
MPI_Init(&argc, &argv);
MPI_Comm_rank(MPI_COMM_WORLD, &node);
printf("MPI test from node %d\n", node);
MPI_Finalize();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment