From 18160e819b52b9736a8fc321f59fa11e38ab6c10 Mon Sep 17 00:00:00 2001
From: "61sima1bif@hft-stuttgart.de" <hs_61sima1bif@uc2n995.localdomain>
Date: Sun, 16 May 2021 22:02:40 +0200
Subject: [PATCH] added helloworld.c

---
 helloworld.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
 create mode 100644 helloworld.c

diff --git a/helloworld.c b/helloworld.c
new file mode 100644
index 0000000..7565014
--- /dev/null
+++ b/helloworld.c
@@ -0,0 +1,16 @@
+#include <stdio.h>
+#include <mpi.h>
+int main(int argc, char *argv[])
+{
+int rank, size;
+MPI_Init(&argc, &argv); /* starts MPI */
+MPI_Comm_rank(MPI_COMM_WORLD, &rank); /* get current process id */
+MPI_Comm_size (MPI_COMM_WORLD, &size); /* get processor count*/
+if (rank == 0)
+printf( "Hello world from process %d of %d\n", rank, size );
+else
+printf( "Hello world from process %d of %d\n", rank, size );
+sleep(1);
+MPI_Finalize();
+return 0;
+}
-- 
GitLab