<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:"Consolas",serif;}
span.EmailStyle21
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style>
</head>
<body lang="SV" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">Hi,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">I agree. The lack of a working solution for parallel computations is a problem on modern server type machines with many cores. We typically try to work around this by having scilab functions
 that generate scilab scripts that are executed by spawned headless scilab processes. Communication is achieved by writing and reading files.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">Needless to say, this is not a great solution, and with scilab 6 it is starting to become unpractical as writing and reading hdf files is extremely slow compared to the scilab 5 file
 format.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">Cheers,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">Arvid<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" style="margin-left:36.0pt"><b><span style="font-size:12.0pt;color:black">From:
</span></b><span style="font-size:12.0pt;color:black">Scilab Users List <users-bounces@lists.scilab.org> on behalf of Antoine Monmayrant <antoine.monmayrant@laas.fr><br>
<b>Reply to: </b>Users mailing list for Scilab <users@lists.scilab.org><br>
<b>Date: </b>Tuesday, 24 September 2019 at 09:32<br>
<b>To: </b>"users@lists.scilab.org" <users@lists.scilab.org><br>
<b>Subject: </b>Re: [Scilab-users] ?= Re: ?= =?utf-8?q? parallel_run<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><o:p> </o:p></p>
</div>
<p style="margin-left:36.0pt"><o:p> </o:p></p>
<div>
<p class="MsoNormal" style="margin-left:36.0pt">Le 23/09/2019 à 23:13, <a href="mailto:stephane.mottelet@utc.fr">
stephane.mottelet@utc.fr</a> a écrit :<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p style="margin-left:36.0pt">Hello Antoine,<br>
<br>
Before judging that some code is just a "dirty hack" you should first get into the code and see hows things are written. The implementation in 5.5.2 was using OpenMP so I don't see anything dirty here. The implementation was unstable under OSX and Linux, and
 under Windows parallel_run was just making calls sequentially. So no "dirty hack" under Windows but just a shortcut. Octave does also the same with Matlatb's parfor : it just does things sequentially. However, even unstable, parallel_run was very useful (I
 used it a lot under Linux to do some Monte Carlo estimation on a 40 processor machine). It is a pity that it's re-engineering for 6.0 familiy was not a priority.
<o:p></o:p></p>
</blockquote>
<p style="margin-left:36.0pt">Hello Stephane,<o:p></o:p></p>
<p style="margin-left:36.0pt">I'm sorry, I did not want to sound rude calling it a "dirty hack".<br>
It's just the explanation I got from scilab developers last time I discussed with them about it.<br>
We were trying to get similar performances under linux/osx/windows with some code using parallel_run.<br>
That was a dead end.<o:p></o:p></p>
<p style="margin-left:36.0pt">Having any sort of parallel computing under scilab 6.0.2 would be a real step forward for us.<br>
I have played a bit with julia to see what it means parallelizing some code in julia.<br>
It was quite easy.<br>
I don't know whether a similar approach can be implemented in scilab.<o:p></o:p></p>
<p style="margin-left:36.0pt"><o:p> </o:p></p>
<p style="margin-left:36.0pt">Antoine<o:p></o:p></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p style="margin-left:36.0pt"><br>
S. <br>
<br>
Quoting Antoine Monmayrant <<a href="mailto:amonmayr@laas.fr">amonmayr@laas.fr</a>>:<o:p></o:p></p>
<blockquote style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 9.0pt;margin-left:1.5pt;margin-top:5.0pt;margin-bottom:5.0pt">
<p style="margin-left:36.0pt">Hello,<br>
<br>
Are you using Windows or anything else?<br>
Because as far as I remember, parallel_run is just a dirty hack that only works under windows.<br>
On my linux install of scilab 6.0.2, I also have:<br>
--> parallel_run<br>
<br>
Undefined variable: parallel_run<br>
<br>
So it might be a bug in the documentation that should mention "windows only" like some other functions.<br>
<br>
Antoine<br>
<br>
<br>
Le Lundi, Septembre 23, 2019 15:46 CEST, fujimoto2005 <<a href="mailto:fujimoto2005@gmail.com">fujimoto2005@gmail.com</a>> a écrit:<o:p></o:p></p>
<blockquote style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 9.0pt;margin-left:1.5pt;margin-top:5.0pt;margin-bottom:5.0pt">
<p style="margin-left:36.0pt">I wanted to use "parallel_run" and tried the sample script in the help page.<br>
But it did not work with the error message "undefined<br>
variable:parallel_run".<br>
Please teach me what is wrong?<br>
<br>
The sample script I used is as follows<br>
******<br>
for i = 1:10<br>
  res(i) = i*i;<br>
end;<br>
// for parallel_run, we need to have a function performing the computation<br>
function a=g(arg1)<br>
  a=arg1*arg1<br>
endfunction<br>
<br>
res = parallel_run(1:10, g);<br>
// => res = [1  4  9  16  25  36  49  64  81  100];<br>
*********<br>
<br>
<br>
<br>
<br>
<br>
--<br>
Sent from: <a href="https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html" target="_blank">
https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html</a><br>
_______________________________________________<br>
users mailing list<br>
<a href="mailto:users@lists.scilab.org">users@lists.scilab.org</a><br>
<a href="https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users" target="_blank">https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users</a><o:p></o:p></p>
</blockquote>
<p class="MsoNormal" style="margin-left:36.0pt">_______________________________________________<br>
users mailing list<br>
<a href="mailto:users@lists.scilab">users@lists.scilab</a>.<a href="orghttps://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users" target="_blank">orghttps://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users</a><o:p></o:p></p>
</blockquote>
<p style="mso-margin-top-alt:5.0pt;margin-right:0cm;margin-bottom:12.0pt;margin-left:36.0pt">
<o:p> </o:p></p>
<p class="MsoNormal" style="margin-left:36.0pt"><br>
<br>
<o:p></o:p></p>
<pre style="margin-left:36.0pt">_______________________________________________<o:p></o:p></pre>
<pre style="margin-left:36.0pt">users mailing list<o:p></o:p></pre>
<pre style="margin-left:36.0pt"><a href="mailto:users@lists.scilab.org">users@lists.scilab.org</a><o:p></o:p></pre>
<pre style="margin-left:36.0pt"><a href="http://lists.scilab.org/mailman/listinfo/users">http://lists.scilab.org/mailman/listinfo/users</a><o:p></o:p></pre>
</blockquote>
</div>
</body>
</html>