pantry/projects/open-mpi.org/hello.c
Andrew 8ded6b7ce3
open-mpi.org (#2306)
* open-mpi.org

* test

* autoconf for darwin & MACOSX_DEPLOYMENT_TARGET env

* sed

* CXX & CC

* without sed

* modified:   projects/open-mpi.org/package.yml

* replace hardcoded paths

* wip

* wip

* wip

* OPAL_PREFIX

* make check fails due to unfixed @rpaths

* env

* more env

* try letting it find stuff

* let's see what we can give it

* more flags

* hmmmm

* suggested possibility

* compiler and linker flags

* this shouldn't be linux-only

* gha runs as root

---------

Co-authored-by: Jacob Heider <jacob@tea.xyz>
2023-09-07 12:32:16 -04:00

14 lines
No EOL
362 B
C

#include <mpi.h>
#include <stdio.h>
int main() {
int size, rank, nameLen;
char name[MPI_MAX_PROCESSOR_NAME];
MPI_Init(NULL, NULL);
MPI_Comm_size(MPI_COMM_WORLD, &size);
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
MPI_Get_processor_name(name, &nameLen);
printf("[%d/%d] Hello, world! My name is %s.\\n", rank, size, name);
MPI_Finalize();
return 0;
}