1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Parallel Workers Running MS Windows via Wine</title>
<style>
body {
font-family: sans-serif;
line-height: 1.6;
padding-left: 3ex;
padding-right: 3ex;
background-color: white;
color: black;
}
a {
color: #4183C4;
text-decoration: none;
}
h1, h2, h3 {
margin: 2ex 0 1ex;
padding: 0;
font-weight: bold;
-webkit-font-smoothing: antialiased;
cursor: text;
position: relative;
}
h2 {
border-bottom: 1px solid #cccccc;
}
code {
margin: 0 2px;
padding: 0 5px;
white-space: nowrap;
border: 1px solid #eaeaea;
background-color: #f8f8f8;
border-radius: 3px;
}
pre code {
margin: 0;
padding: 0;
white-space: pre;
border: none;
background: transparent;
}
pre {
background-color: #f8f8f8;
border: 1px solid #cccccc;
line-height: 2.5x;
overflow: auto;
padding: 0.6ex 1ex;
border-radius: 3px;
}
pre code {
background-color: transparent;
border: none;
}
</style>
</head>
<body>
<h1>Parallel Workers Running MS Windows via Wine</h1>
<!--
%\VignetteIndexEntry{Parallel Workers Running MS Windows via Wine}
%\VignetteAuthor{Henrik Bengtsson}
%\VignetteKeyword{R}
%\VignetteKeyword{package}
%\VignetteKeyword{vignette}
%\VignetteEngine{parallelly::selfonly}
-->
<h1>Introduction</h1>
<p>This vignette shows how to set up parallel workers running on MS
Windows via Wine (<a href="https://www.winehq.org/">https://www.winehq.org/</a>) on Linux and macOS.</p>
<h2>Install R for MS Windows 10</h2>
<p>To install R for MS Windows in Wine, first configure Wine to use
Windows 10;</p>
<pre><code class="language-sh">$ winecfg
</code></pre>
<p>In the GUI, set ‘Windows version’ to ‘Windows 10’. Then, install R for
Windows in Wine, by:</p>
<pre><code class="language-sh">$ wget https://cran.r-project.org/bin/windows/base/R-4.4.2-win.exe
$ wine R-4.4.2-win.exe /SILENT
</code></pre>
<p>Finally, verify that R is available in Wine;</p>
<pre><code class="language-sh">$ wine "C:/Program Files/R/R-4.4.2/bin/x64/Rscript.exe" --version
...
Rscript (R) version 4.4.2 (2024-10-31)
</code></pre>
<h1>Examples</h1>
<h2>Example: Parallel workers running MS Windows via Wine</h2>
<p>This example shows how to launch one worker running in Wine for Linux
on the local machine.</p>
<pre><code class="language-r">cl <- makeClusterPSOCK(
1L,
rscript = c(
## Silence Wine warnings
"WINEDEBUG=fixme-all",
## Don't pass LC_* and R_LIBS* environments from host to Wine
sprintf("%s=", grep("^(LC_|R_LIBS)", names(Sys.getenv()), value = TRUE)),
"wine",
"C:/Program Files/R/R-4.4.2/bin/x64/Rscript.exe"
)
)
print(cl)
#> Socket cluster with 1 nodes where 1 node is on host 'localhost'
#> (R version 4.4.2 (2024-10-31 ucrt), platform x86_64-w64-mingw32)
</code></pre>
</body>
</html>
|