add R wrapper for stage 1
authorBenjamin Auder <benjamin.auder@somewhere>
Sun, 16 Oct 2016 23:00:12 +0000 (01:00 +0200)
committerBenjamin Auder <benjamin.auder@somewhere>
Sun, 16 Oct 2016 23:00:12 +0000 (01:00 +0200)
code/stage1/wrapper.R [new file with mode: 0644]

diff --git a/code/stage1/wrapper.R b/code/stage1/wrapper.R
new file mode 100644 (file)
index 0000000..2549f1f
--- /dev/null
@@ -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)
+}