<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.19328"></HEAD>
<BODY bgColor=#ffffff text=#000000>
<DIV dir=ltr align=left><SPAN class=358411308-25092012><FONT color=#0000ff 
size=2 face=Arial>Dear Serge,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=358411308-25092012><FONT color=#0000ff 
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=358411308-25092012><FONT color=#0000ff 
size=2 face=Arial>thanks for this first answer ...</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=358411308-25092012><FONT color=#0000ff 
size=2 face=Arial>... thus I've understood :</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=358411308-25092012><FONT color=#0000ff 
size=2 face=Arial>- it'll be necessary to build first the full form of each 6x6 
matrix in order to compute eigen values and so on (need to optimize chronology 
in order to make it only ounce)</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=358411308-25092012><FONT color=#0000ff 
size=2 face=Arial>- it might be relevant to have a look in parallel 
postprocessing (I've up to 8 cores in my working station),</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=358411308-25092012><FONT color=#0000ff 
size=2 face=Arial>- concerning vectorization, I need to have a deeper look on it 
in order to understand what is it, when it's relevant to use it and when we can 
not</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=358411308-25092012><FONT color=#0000ff 
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=358411308-25092012><FONT color=#0000ff 
size=2 face=Arial>Regards</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=358411308-25092012><FONT color=#0000ff 
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=358411308-25092012><FONT color=#0000ff 
size=2 face=Arial>Paul</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=358411308-25092012><FONT color=#0000ff 
size=2 face=Arial></FONT></SPAN> </DIV><BR>
<DIV dir=ltr lang=fr class=OutlookMessageHeader align=left>
<HR tabIndex=-1>
<FONT size=2 face=Tahoma><B>De :</B> users-bounces@lists.scilab.org 
[mailto:users-bounces@lists.scilab.org] <B>De la part de</B> Serge 
Steer<BR><B>Envoyé :</B> mardi 25 septembre 2012 10:11<BR><B>À :</B> 
International users mailing list for Scilab.<BR><B>Objet :</B> Re: 
[Scilab-users] advices in optimizing matrix calculations<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV class=moz-cite-prefix>Le 24/09/2012 22:46, Paul Carrico a 
écrit :<BR></DIV>
<BLOCKQUOTE cite=mid:004001cd9a95$bbbb95d0$3332c170$@carrico@free.fr 
type="cite">
  <META name=Generator 
  content="Microsoft Word 12 (filtered         medium)">
  <STYLE>@font-face {
        font-family: Wingdings;
}
@font-face {
        font-family: Cambria Math;
}
@font-face {
        font-family: Calibri;
}
@page WordSection1 {size: 612.0pt 792.0pt; margin: 70.85pt 70.85pt 70.85pt 70.85pt; }
P.MsoNormal {
        MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman","serif"; FONT-SIZE: 12pt
}
LI.MsoNormal {
        MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman","serif"; FONT-SIZE: 12pt
}
DIV.MsoNormal {
        MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman","serif"; FONT-SIZE: 12pt
}
A:link {
        COLOR: blue; TEXT-DECORATION: underline; mso-style-priority: 99
}
SPAN.MsoHyperlink {
        COLOR: blue; TEXT-DECORATION: underline; mso-style-priority: 99
}
A:visited {
        COLOR: purple; TEXT-DECORATION: underline; mso-style-priority: 99
}
SPAN.MsoHyperlinkFollowed {
        COLOR: purple; TEXT-DECORATION: underline; mso-style-priority: 99
}
P.MsoListParagraph {
        MARGIN: 0cm 0cm 0pt 36pt; FONT-FAMILY: "Times New Roman","serif"; FONT-SIZE: 12pt; mso-style-priority: 34
}
LI.MsoListParagraph {
        MARGIN: 0cm 0cm 0pt 36pt; FONT-FAMILY: "Times New Roman","serif"; FONT-SIZE: 12pt; mso-style-priority: 34
}
DIV.MsoListParagraph {
        MARGIN: 0cm 0cm 0pt 36pt; FONT-FAMILY: "Times New Roman","serif"; FONT-SIZE: 12pt; mso-style-priority: 34
}
SPAN.EmailStyle17 {
        FONT-FAMILY: "Calibri","sans-serif"; COLOR: windowtext; mso-style-type: personal-compose
}
.MsoChpDefault {
        mso-style-type: export-only
}
DIV.WordSection1 {
        page: WordSection1
}
OL {
        MARGIN-BOTTOM: 0cm
}
UL {
        MARGIN-BOTTOM: 0cm
}
</STYLE>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
  <DIV class=WordSection1>
  <P class=MsoNormal><SPAN style="FONT-FAMILY: 'Calibri','sans-serif'">Dear 
  all,<O:P></O:P></SPAN></P>
  <P class=MsoNormal><SPAN 
  style="FONT-FAMILY: 'Calibri','sans-serif'"><O:P></O:P></SPAN></P>
  <P class=MsoNormal><SPAN 
  style="FONT-FAMILY: 'Calibri','sans-serif'"><O:P></O:P></SPAN></P>
  <P class=MsoNormal><SPAN style="FONT-FAMILY: 'Calibri','sans-serif'" 
  lang=EN-US>May I ask some advice in matrix calculation issue, in order to 
  optimize the code ?<O:P></O:P></SPAN></P>
  <P class=MsoNormal><SPAN style="FONT-FAMILY: 'Calibri','sans-serif'" 
  lang=EN-US><O:P></O:P></SPAN></P>
  <P class=MsoNormal><SPAN style="FONT-FAMILY: 'Calibri','sans-serif'" 
  lang=EN-US>The matrix hereafter is the first trial in treating a (m x 6) 
  matrix where :<O:P></O:P></SPAN></P>
  <P style="TEXT-INDENT: -18pt; mso-list: l0 level1 lfo1" 
  class=MsoListParagraph><SPAN class=358411308-25092012><FONT color=#0000ff 
  size=2 face=Arial> - </FONT></SPAN><SPAN 
  style="FONT-FAMILY: 'Calibri','sans-serif'" lang=EN-US>The first line is the 
  upper part of a symmetrical 6x6 tensor (the 3 first components are the 
  diagonal terms)<O:P></O:P></SPAN></P>
  <P style="TEXT-INDENT: -18pt; mso-list: l0 level1 lfo1" 
  class=MsoListParagraph><SPAN class=358411308-25092012><FONT color=#0000ff 
  size=2 face=Arial> - </FONT></SPAN><SPAN 
  style="FONT-FAMILY: 'Calibri','sans-serif'" lang=EN-US>m may correspond to 
  millions of lines<O:P></O:P></SPAN></P>
  <P style="TEXT-INDENT: -18pt; mso-list: l0 level1 lfo1" 
  class=MsoListParagraph><SPAN class=358411308-25092012><FONT color=#0000ff 
  size=2 face=Arial> - </FONT></SPAN><SPAN 
  style="FONT-FAMILY: 'Calibri','sans-serif'" lang=EN-US>each line is 
  independent from the other)<O:P></O:P></SPAN></P>
  <P class=MsoNormal><SPAN style="FONT-FAMILY: 'Calibri','sans-serif'" 
  lang=EN-US><O:P></O:P></SPAN></P>
  <P class=MsoNormal><SPAN style="FONT-FAMILY: 'Calibri','sans-serif'" 
  lang=EN-US>I had a look in some function (such as schur, spec, bdiag and so 
  on) in order to see if I can use this symmetrical specificity … but I don’t 
  see anything </SPAN><SPAN style="FONT-FAMILY: Wingdings" 
  lang=EN-US>è</SPAN><SPAN style="FONT-FAMILY: 'Calibri','sans-serif'" 
  lang=EN-US> Am I wrong ?<O:P></O:P></SPAN></P>
  <P class=MsoNormal><SPAN style="FONT-FAMILY: 'Calibri','sans-serif'" 
  lang=EN-US><O:P></O:P></SPAN></P></DIV></BLOCKQUOTE>The <SPAN 
style="FONT-FAMILY: 'Calibri','sans-serif'" lang=EN-US>schur, spec, bdiag 
function internally check if the matrix is symmetric and if yes apply specific 
algorithm. But the matrix must be passed in its full form.<BR><BR></SPAN>
<BLOCKQUOTE cite=mid:004001cd9a95$bbbb95d0$3332c170$@carrico@free.fr 
type="cite">
  <DIV class=WordSection1>
  <P class=MsoNormal><SPAN style="FONT-FAMILY: 'Calibri','sans-serif'" 
  lang=EN-US>Several calculations will be done: Eigen values calculation for 
  each submatrix, summation, multiplication and so on …<O:P></O:P></SPAN></P>
  <P class=MsoNormal><SPAN style="FONT-FAMILY: 'Calibri','sans-serif'" 
  lang=EN-US><O:P></O:P></SPAN></P>
  <P class=MsoNormal><SPAN style="FONT-FAMILY: 'Calibri','sans-serif'" 
  lang=EN-US>Vectorization can be useful to improve speedup 
?</SPAN></P></DIV></BLOCKQUOTE>I did not see any possible vectorization  
(there is no way to compute several schur decompositions with only one call to a 
primitive function)<BR>If you have a multicore processor you can try the 
parallel_run function.<BR><BR>Serge Steer<BR>INRIA<BR>
<BLOCKQUOTE cite=mid:004001cd9a95$bbbb95d0$3332c170$@carrico@free.fr 
type="cite">
  <DIV class=WordSection1>
  <P class=MsoNormal><SPAN style="FONT-FAMILY: 'Calibri','sans-serif'" 
  lang=EN-US><O:P></O:P></SPAN></P>
  <P class=MsoNormal><SPAN style="FONT-FAMILY: 'Calibri','sans-serif'" 
  lang=EN-US><O:P></O:P></SPAN></P>
  <P class=MsoNormal><SPAN style="FONT-FAMILY: 'Calibri','sans-serif'" 
  lang=EN-US>Any advices ?<O:P></O:P></SPAN></P>
  <P class=MsoNormal><SPAN style="FONT-FAMILY: 'Calibri','sans-serif'" 
  lang=EN-US><O:P></O:P></SPAN></P>
  <P class=MsoNormal><SPAN style="FONT-FAMILY: 'Calibri','sans-serif'" 
  lang=EN-US>Thanks in advance<O:P></O:P></SPAN></P>
  <P class=MsoNormal><SPAN style="FONT-FAMILY: 'Calibri','sans-serif'" 
  lang=EN-US><O:P></O:P></SPAN></P>
  <P class=MsoNormal><SPAN style="FONT-FAMILY: 'Calibri','sans-serif'" 
  lang=EN-US>Paul<O:P></O:P></SPAN></P>
  <P class=MsoNormal><SPAN style="FONT-FAMILY: 'Calibri','sans-serif'" 
  lang=EN-US><O:P></O:P></SPAN></P>
  <P class=MsoNormal><SPAN style="FONT-FAMILY: 'Calibri','sans-serif'" 
  lang=EN-US>PS : M is made from a text file … its structure can be change in 
  order to be as efficient as possible …<O:P></O:P></SPAN></P>
  <P class=MsoListParagraph><SPAN style="FONT-FAMILY: 'Calibri','sans-serif'" 
  lang=EN-US><O:P></O:P></SPAN></P>
  <P class=MsoNormal><SPAN style="FONT-FAMILY: 'Calibri','sans-serif'" 
  lang=EN-US>Mat = [<O:P></O:P></SPAN></P>
  <P class=MsoNormal><SPAN style="FONT-FAMILY: 'Calibri','sans-serif'" 
  lang=EN-US>    9.315        
  9.315        28.41  - 0.0000999  
  - 3.169      - 3.169     ; 
  <BR>    2.945        
  2.945        28.45    
  0.04826    - 3.175      - 
  3.175      ;<BR>    
  8.486        
  9.341        25.73    
  0.0101     - 3.179      - 
  3.189      ;<BR>    
  2.043        
  2.939        25.73    
  0.038      - 3.185      - 
  3.182      ;<BR>    
  9.341        
  8.486        25.73    
  0.0101     - 3.189      - 
  3.179      ;<BR>    
  2.939        
  2.043        25.73    
  0.038      - 3.182      - 
  3.185      ;<BR>    
  8.492        
  8.492        
  23.      0.02036    - 
  3.179      - 3.179      
  ;<BR>    2.018        
  2.018        22.97    
  0.02779    - 3.172      - 
  3.172     ;<BR>    
  9.108        
  8.179        25.01    
  0.01326    - 3.197      - 
  1.608     ;<BR>    
  4.695        
  2.302        25.04    
  0.0905     - 3.199      - 
  1.61       ;<BR>    
  8.271        
  8.186        22.27    
  0.02824    - 3.212      - 
  1.601     ; <BR>    
  3.842        
  2.302        22.29    
  0.07548    - 3.214      - 
  1.599     ; <BR>    
  9.134        
  8.128        24.91    
  0.01554    - 3.278      - 
  1.61      
  ;       <BR>    
  4.675        
  2.145        24.9     
  0.08819    - 3.276      - 
  1.612     ;   <O:P></O:P></SPAN></P>
  <P class=MsoNormal><SPAN style="FONT-FAMILY: 'Calibri','sans-serif'" 
  lang=EN-US>    …<O:P></O:P></SPAN></P>
  <P class=MsoNormal><SPAN style="FONT-FAMILY: 'Calibri','sans-serif'" 
  lang=EN-US>    …   <BR>    
  8.291        
  8.129        22.16    
  0.03055    - 3.263      - 1.598  
  ] ;<O:P></O:P></SPAN></P>
  <P class=MsoNormal><SPAN style="FONT-FAMILY: 'Calibri','sans-serif'" 
  lang=EN-US>    sub11        
  sub22       sub33    
  sub12        
  sub23       sub13 … where sub is a submatrix == 
  1 line<O:P></O:P></SPAN></P>
  <P class=MsoNormal><SPAN 
  style="FONT-FAMILY: 'Calibri','sans-serif'; FONT-SIZE: 11pt" 
  lang=EN-US><O:P></O:P></SPAN></P></DIV><BR>
  <FIELDSET class=mimeAttachmentHeader></FIELDSET> <BR><PRE wrap="">_______________________________________________
users mailing list
<A class=moz-txt-link-abbreviated href="mailto:users@lists.scilab.org">users@lists.scilab.org</A>
<A class=moz-txt-link-freetext href="http://lists.scilab.org/mailman/listinfo/users">http://lists.scilab.org/mailman/listinfo/users</A>
</PRE></BLOCKQUOTE><BR></BODY></HTML>

<pre>--------------------------------------------------------------------------------


Le présent mail et ses pièces jointes sont confidentiels et destinés à la personne ou aux personnes visée(s) ci-dessus. Si vous avez reçu cet e-mail par erreur, veuillez contacter immédiatement l'expéditeur et effacer le message de votre système. Toute divulgation, copie ou distribution de cet e-mail est strictement interdite.

This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error, please contact the sender and delete the email from your system. If you are not the named addressee you should not disseminate, distribute or copy this email.