From f1fea2229d365a222b5aff0cb1b4d346c4437e8b Mon Sep 17 00:00:00 2001
From: Benjamin Auder <benjamin.auder@somewhere>
Date: Mon, 17 Oct 2016 01:00:12 +0200
Subject: [PATCH] add R wrapper for stage 1

---
 code/stage1/wrapper.R | 9 +++++++++
 1 file changed, 9 insertions(+)
 create mode 100644 code/stage1/wrapper.R

diff --git a/code/stage1/wrapper.R b/code/stage1/wrapper.R
new file mode 100644
index 0000000..2549f1f
--- /dev/null
+++ b/code/stage1/wrapper.R
@@ -0,0 +1,9 @@
+ppam_exe = function(pathToExe, nbProcess, ...)
+{
+	command_line = paste("mpirun -np ",nbProcess," ",pathToExe,"/ppam.exe",sep="")
+	args = list(...)
+	for (i in 1:length(args))
+		command_line = paste(command_line, args[[i]])
+	print(paste("EXECUTE: '", command_line,"'",sep=""))
+	system(command_line)
+}
-- 
2.44.0