From 8f67e9bd88a7f2d4e088410a0e4c6d1f42dd4681 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pavel=20Gajdu=C5=A1ek?= <gajdusek.pavel@gmail.com>
Date: Mon, 25 Sep 2017 12:23:41 +0200
Subject: [PATCH] added MPI.NET

---
 docs.it4i/software/csc.md | 38 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git a/docs.it4i/software/csc.md b/docs.it4i/software/csc.md
index 22d871553..0ec91fb1d 100644
--- a/docs.it4i/software/csc.md
+++ b/docs.it4i/software/csc.md
@@ -68,4 +68,42 @@ csharp> from f in Directory.GetFiles ("mydirectory")
 { "mydirectory/mynewfile.cs", "mydirectory/script.sh" }
 ```
 
+## MPI.NET
+
+MPI is available for mono.
+
+```csc
+using System;
+using MPI;
+
+class MPIHello
+{
+    static void Main(string[] args)
+    {
+        using (new MPI.Environment(ref args))
+        {
+           Console.WriteLine("Greetings from node {0} of {1} running on {2}",
+           Communicator.world.Rank, Communicator.world.Size,
+           MPI.Environment.ProcessorName);
+        }
+    }
+}
+```
+
+Compile and run the program on Anselm:
+
+```console
+$ qsub -I -A DD-13-5 -q qexp -l select=2:ncpus=16,walltime=00:30:00
+
+$ ml mpi.net
+
+$ mcs -out:csc.exe -reference:/apps/tools/mpi.net/1.0.0-mono-3.12.1/lib/MPI.dll csc.cs
+
+$ mpirun -n 4 mono csc.exe
+Greetings from node 2 of 4 running on cn204
+Greetings from node 0 of 4 running on cn204
+Greetings from node 3 of 4 running on cn199
+Greetings from node 1 of 4 running on cn199
+```
+
 For more informations look at [Mono documentation page](http://www.mono-project.com/docs/).
-- 
GitLab