<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<br>
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
<p style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-size:
14px; vertical-align: baseline; clear: both; color: rgb(0, 0, 0);
font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif;
font-style: normal; font-variant: normal; font-weight: normal;
letter-spacing: normal; line-height: 17.804800033569336px;
orphans: auto; text-align: left; text-indent: 0px; text-transform:
none; white-space: normal; widows: auto; word-spacing: 0px;
-webkit-text-stroke-width: 0px; background: rgb(255, 255, 255);"><span
class="Apple-converted-space"> </span>I am developing a parallel
R code using the Snow package, but when calling C++ code using the
Rcpp package the program just hangs and is unresponsive.</p>
<p style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-size:
14px; vertical-align: baseline; clear: both; color: rgb(0, 0, 0);
font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif;
font-style: normal; font-variant: normal; font-weight: normal;
letter-spacing: normal; line-height: 17.804800033569336px;
orphans: auto; text-align: left; text-indent: 0px; text-transform:
none; white-space: normal; widows: auto; word-spacing: 0px;
-webkit-text-stroke-width: 0px; background: rgb(255, 255, 255);">as
an example... I have the following code in R that is using snow to
split into certain number of processes</p>
<pre class="lang-r prettyprint prettyprinted" style="margin: 0px 0px 10px; padding: 5px; border: 0px; font-size: 14px; vertical-align: baseline; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; overflow: auto; width: auto; max-height: 600px; word-wrap: normal; color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 17.804800033569336px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background: rgb(238, 238, 238);"><code style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; white-space: inherit; background: rgb(238, 238, 238)
;"><span
class="pln" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;"> MyRFunction</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;"><-</span><span class="kwd" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 139); background: transparent;">function</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;">(</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;">i</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;"
>)</span>
<span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;"> </span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;">{</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;">
n</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;">=</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;">i
.Call</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;">(</span><span class="str" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(128, 0, 0); background: transparent;">"CppFunction"</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;">,</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;">n</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;">,</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: tr
ansparent
;">PACKAGE</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;">=</span><span class="str" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(128, 0, 0); background: transparent;">"MyPackage"</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;">)</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;">
</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;">}</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;">
</span><span class="kwd" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 139); background: transparent;">if</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;"> </span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;">(</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;">mpi</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;">)</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;"> </s
pan><span
class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;">{</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;">
cl</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;"><-</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;">getMPIcluster</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;">()</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;">
clusterExport</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;">(</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;">cl</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;">,</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;"> list</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;">(</span><span class="str" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(128, 0, 0); background: t
ransparen
t;">"set.user.Random.seed"</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;">))</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;">
clusterEvalQ</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;">(</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;">cl</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;">,</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;"> </span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;">{</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transpar
ent;">lib
rary</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;">(</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;">Rcpp</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;">);</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;"> </span><span class="lit" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(128, 0, 0); background: transparent;">NULL</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;">
})</span>
<span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;">
out</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;"><-</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;">clusterApply</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;">(</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;">cl</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;">,</span><span class="lit" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(128, 0, 0); background:
transpare
nt;">1</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;">:</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;">mc.cores</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;">,</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;">MyRFunction</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;">)</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: tran
sparent;"
>
stopCluster</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;">(</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;">cl</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;">)</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;">
</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;">}</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;">
</span><span class="kwd" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 139); background: transparent;">else</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;">
out </span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;"><-</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;"> parallel</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;">::</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;">mclapply</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;">(</span><span class="lit" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(128, 0, 0); backgro
und: tran
sparent;">1</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;">:</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;">mc.cores</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;">,</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;">MyRFunction</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;">)</span></code></pre>
<p style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-size:
14px; vertical-align: baseline; clear: both; color: rgb(0, 0, 0);
font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif;
font-style: normal; font-variant: normal; font-weight: normal;
letter-spacing: normal; line-height: 17.804800033569336px;
orphans: auto; text-align: left; text-indent: 0px; text-transform:
none; white-space: normal; widows: auto; word-spacing: 0px;
-webkit-text-stroke-width: 0px; background: rgb(255, 255, 255);">Whereas
my C++ function looks like...</p>
<pre class="lang-r prettyprint prettyprinted" style="margin: 0px 0px 10px; padding: 5px; border: 0px; font-size: 14px; vertical-align: baseline; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; overflow: auto; width: auto; max-height: 600px; word-wrap: normal; color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 17.804800033569336px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background: rgb(238, 238, 238);"><code style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; white-space: inherit; background: rgb(238, 238, 238)
;"><span
class="pln" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;"> RcppExport SEXP CppFunction</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;">(</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;">SEXP n</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;">)</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;"> </span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: trans
parent;">
{</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;">
int n</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;">=</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;">as</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;"><</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;">int</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;">>(</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transp
arent;">n
</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;">);</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;">
</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;">}</span></code></pre>
<p style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-size:
14px; vertical-align: baseline; clear: both; color: rgb(0, 0, 0);
font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif;
font-style: normal; font-variant: normal; font-weight: normal;
letter-spacing: normal; line-height: 17.804800033569336px;
orphans: auto; text-align: left; text-indent: 0px; text-transform:
none; white-space: normal; widows: auto; word-spacing: 0px;
-webkit-text-stroke-width: 0px; background: rgb(255, 255, 255);">If
I run it with mpi=false and mc.cores=[some number of threads] the
program runs beautifully BUT if i run it with mpi=true, therefore
using snow, the program just hangs at int=as<int>(n) ?????
On the other hand if I define the C++ function as...</p>
<pre class="lang-r prettyprint prettyprinted" style="margin: 0px 0px 10px; padding: 5px; border: 0px; font-size: 14px; vertical-align: baseline; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; overflow: auto; width: auto; max-height: 600px; word-wrap: normal; color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 17.804800033569336px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background: rgb(238, 238, 238);"><code style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; white-space: inherit; background: rgb(238, 238, 238)
;"><span
class="pln" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;"> RcppExport SEXP CppFunction</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;">(</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;">SEXP n</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;">)</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;"> </span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: trans
parent;">
{</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;">
CharacterVector nn</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;">(</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;">n</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;">);</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;">
int n</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;">=</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;">boost</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;">::</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;">lexical_cast</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;"><</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); backgroun
d: transp
arent;">int</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;">>(</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;">nn</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;">[</span><span class="lit" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(128, 0, 0); background: transparent;">0</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;">]);</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transpa
rent;">
</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; color: rgb(0, 0, 0); background: transparent;">}</span></code></pre>
<p style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-size:
14px; vertical-align: baseline; clear: both; color: rgb(0, 0, 0);
font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif;
font-style: normal; font-variant: normal; font-weight: normal;
letter-spacing: normal; line-height: 17.804800033569336px;
orphans: auto; text-align: left; text-indent: 0px; text-transform:
none; white-space: normal; widows: auto; word-spacing: 0px;
-webkit-text-stroke-width: 0px; background: rgb(255, 255, 255);">The
program runs perfectly on each mpi thread?? The problem is that it
works for integers doubles etc, but not matrices Also, I must use
lexical_cast from the boost package to make it works since
as<> does not.</p>
<p style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-size:
14px; vertical-align: baseline; clear: both; color: rgb(0, 0, 0);
font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif;
font-style: normal; font-variant: normal; font-weight: normal;
letter-spacing: normal; line-height: 17.804800033569336px;
orphans: auto; text-align: left; text-indent: 0px; text-transform:
none; white-space: normal; widows: auto; word-spacing: 0px;
-webkit-text-stroke-width: 0px; background: rgb(255, 255, 255);">Does
anybody know why this is, and what I am missing here, so I can
load my matrices as well?</p>
Cheers<br>
Henric<br>
</body>
</html>