<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="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<title>segfault with galib</title>
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:#606420;
        text-decoration:underline;}
p
        {mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman";}
span.EstiloCorreo18
        {mso-style-type:personal;
        font-family:Arial;
        color:navy;}
span.EstiloCorreo19
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:navy;}
@page Section1
        {size:595.3pt 841.9pt;
        margin:70.85pt 3.0cm 70.85pt 3.0cm;}
div.Section1
        {page:Section1;}
-->
</style>

</head>

<body lang=ES link=blue vlink="#606420">

<div class=Section1>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'>Hi<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'>I have create an object
and initialized  some members of the ClusterSimulator class in the Objective
function and it  works properly for the initial population, but it doesn´t work
for the following generation, what can I do? Could you help me?<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'>Regards,<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'>Alicia<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<div>

<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>

<hr size=2 width="100%" align=center tabindex=-1>

</span></font></div>

<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>De:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>
galib-bounces@MIT.EDU [mailto:galib-bounces@MIT.EDU] <b><span style='font-weight:
bold'>En nombre de </span></b>Acero Fernandez Alicia<br>
<b><span style='font-weight:bold'>Enviado el:</span></b> miércoles, 18 de mayo
de 2011 17:12<br>
<b><span style='font-weight:bold'>Para:</span></b> galib@MIT.EDU<br>
<b><span style='font-weight:bold'>Asunto:</span></b> Re: [galib] segfault with
galib</span></font><o:p></o:p></p>

</div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Hello,<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'>I have to call a function
from the objective function and something extrange happens because when I call
this function the error appears and it disappears when I take out the function.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'>Could anyone help me, please?<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'>Regards<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<div>

<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>

<hr size=2 width="100%" align=center tabindex=-1>

</span></font></div>

<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>De:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>
galib-bounces@mit.edu [mailto:galib-bounces@mit.edu] <b><span style='font-weight:
bold'>En nombre de </span></b>Acero Fernandez Alicia<br>
<b><span style='font-weight:bold'>Enviado el:</span></b> miércoles, 18 de mayo
de 2011 16:09<br>
<b><span style='font-weight:bold'>Para:</span></b> galib@mit.edu<br>
<b><span style='font-weight:bold'>Asunto:</span></b> [galib] segfault with
galib</span></font><o:p></o:p></p>

</div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal style='margin-bottom:12.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<p><font size=2 face=Arial><span lang=EN-GB style='font-size:10.0pt;font-family:
Arial'>Hello,</span></font><o:p></o:p></p>

<p><font size=2 face=Arial><span lang=EN-GB style='font-size:10.0pt;font-family:
Arial'>Could anyone help me?</span></font><span lang=EN-GB> </span><font
size=2 face=Arial><span lang=EN-GB style='font-size:10.0pt;font-family:Arial'>I
am trying to use galib with a c++ code but</span></font><span lang=EN-GB> </span><font
size=2 face=Arial><span lang=EN-GB style='font-size:10.0pt;font-family:Arial'>I</span></font><span
lang=EN-GB> </span><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'>only</span></font><span lang=EN-GB> </span><font
size=2 face=Arial><span lang=EN-GB style='font-size:10.0pt;font-family:Arial'>get</span></font><span
lang=EN-GB> </span><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'>a segfault. I tried to analyse it with valgrind and I
can see the following:</span></font><o:p></o:p></p>

<p class=MsoNormal style='margin-bottom:12.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<p><font size=2 face=Arial><span lang=EN-GB style='font-size:10.0pt;font-family:
Arial'>==5419== Use of uninitialised value of size 8</span></font><o:p></o:p></p>

<p><font size=2 face=Arial><span lang=EN-GB style='font-size:10.0pt;font-family:
Arial'>==5419==&nbsp;&nbsp;&nbsp; at 0x41D112:
ClusterSimulator::simulate(std::vector&lt;unsigned int, std::allocator&lt;unsigned
int&gt; &gt; const&amp;) (in
/home/u5077/simulador/Scheduling/Simulator/schedulers)</span></font><o:p></o:p></p>

<p><font size=2 face=Arial><span lang=EN-GB style='font-size:10.0pt;font-family:
Arial'>==5419==&nbsp;&nbsp;&nbsp; by 0x42E0FF: Objective(GAGenome&amp;) (in
/home/u5077/simulador/Scheduling/Simulator/schedulers)</span></font><o:p></o:p></p>

<p><font size=2 face=Arial><span lang=EN-GB style='font-size:10.0pt;font-family:
Arial'>==5419==&nbsp;&nbsp;&nbsp; by 0x4417A3: GAGenome::evaluate(_GABoolean)
const (GAGenome.C:83)</span></font><o:p></o:p></p>

<p><font size=2 face=Arial><span lang=EN-GB style='font-size:10.0pt;font-family:
Arial'>==5419==&nbsp;&nbsp;&nbsp; by 0x43DFC8:
GAPopulation::DefaultEvaluator(GAPopulation&amp;) (GAPopulation.C:38)</span></font><o:p></o:p></p>

<p><font size=2 face=Arial><span lang=EN-GB style='font-size:10.0pt;font-family:
Arial'>==5419==&nbsp;&nbsp;&nbsp; by 0x43D180:
GAPopulation::evaluate(_GABoolean) (GAPopulation.h:123)</span></font><o:p></o:p></p>

<p><font size=2 face=Arial><span lang=EN-GB style='font-size:10.0pt;font-family:
Arial'>==5419==&nbsp;&nbsp;&nbsp; by 0x43C500: GASimpleGA::initialize(unsigned
int) (GASimpleGA.C:148)</span></font><o:p></o:p></p>

<p><font size=2 face=Arial><span lang=EN-GB style='font-size:10.0pt;font-family:
Arial'>==5419==&nbsp;&nbsp;&nbsp; by 0x434A5B:
GAGeneticAlgorithm::evolve(unsigned int) (GABaseGA.h:136)</span></font><o:p></o:p></p>

<p><font size=2 face=Arial><span lang=EN-GB style='font-size:10.0pt;font-family:
Arial'>==5419==&nbsp;&nbsp;&nbsp; by 0x42E3D3: pruebas(std::vector&lt;unsigned
int, std::allocator&lt;unsigned int&gt; &gt; const&amp;) (in
/home/u5077/simulador/Scheduling/Simulator/schedulers)</span></font><o:p></o:p></p>

<p><font size=2 face=Arial><span lang=EN-GB style='font-size:10.0pt;font-family:
Arial'>==5419==&nbsp;&nbsp;&nbsp; by 0x42EB1B: main (in
/home/u5077/simulador/Scheduling/Simulator/schedulers)</span></font><o:p></o:p></p>

<p><font size=2 face=Arial><span lang=EN-GB style='font-size:10.0pt;font-family:
Arial'>==5419==</span></font><o:p></o:p></p>

<p><font size=2 face=Arial><span lang=EN-GB style='font-size:10.0pt;font-family:
Arial'>==5419== Invalid read of size 8</span></font><o:p></o:p></p>

<p><font size=2 face=Arial><span lang=EN-GB style='font-size:10.0pt;font-family:
Arial'>==5419==&nbsp;&nbsp;&nbsp; at 0x41D112:
ClusterSimulator::simulate(std::vector&lt;unsigned int,
std::allocator&lt;unsigned int&gt; &gt; const&amp;) (in /home/u5077/simulador/Scheduling/Simulator/schedulers)</span></font><o:p></o:p></p>

<p><font size=2 face=Arial><span lang=EN-GB style='font-size:10.0pt;font-family:
Arial'>==5419==&nbsp;&nbsp;&nbsp; by 0x42E0FF: Objective(GAGenome&amp;) (in
/home/u5077/simulador/Scheduling/Simulator/schedulers)</span></font><o:p></o:p></p>

<p><font size=2 face=Arial><span lang=EN-GB style='font-size:10.0pt;font-family:
Arial'>==5419==&nbsp;&nbsp;&nbsp; by 0x4417A3: GAGenome::evaluate(_GABoolean)
const (GAGenome.C:83)</span></font><o:p></o:p></p>

<p><font size=2 face=Arial><span lang=EN-GB style='font-size:10.0pt;font-family:
Arial'>==5419==&nbsp;&nbsp;&nbsp; by 0x43DFC8:
GAPopulation::DefaultEvaluator(GAPopulation&amp;) (GAPopulation.C:38)</span></font><o:p></o:p></p>

<p><font size=2 face=Arial><span lang=EN-GB style='font-size:10.0pt;font-family:
Arial'>==5419==&nbsp;&nbsp;&nbsp; by 0x43D180:
GAPopulation::evaluate(_GABoolean) (GAPopulation.h:123)</span></font><o:p></o:p></p>

<p><font size=2 face=Arial><span lang=EN-GB style='font-size:10.0pt;font-family:
Arial'>==5419==&nbsp;&nbsp;&nbsp; by 0x43C500: GASimpleGA::initialize(unsigned
int) (GASimpleGA.C:148)</span></font><o:p></o:p></p>

<p><font size=2 face=Arial><span lang=EN-GB style='font-size:10.0pt;font-family:
Arial'>==5419==&nbsp;&nbsp;&nbsp; by 0x434A5B:
GAGeneticAlgorithm::evolve(unsigned int) (GABaseGA.h:136)</span></font><o:p></o:p></p>

<p><font size=2 face=Arial><span lang=EN-GB style='font-size:10.0pt;font-family:
Arial'>==5419==&nbsp;&nbsp;&nbsp; by 0x42E3D3: pruebas(std::vector&lt;unsigned
int, std::allocator&lt;unsigned int&gt; &gt; const&amp;) (in
/home/u5077/simulador/Scheduling/Simulator/schedulers)</span></font><o:p></o:p></p>

<p><font size=2 face=Arial><span lang=EN-GB style='font-size:10.0pt;font-family:
Arial'>==5419==&nbsp;&nbsp;&nbsp; by 0x42EB1B: main (in
/home/u5077/simulador/Scheduling/Simulator/schedulers)</span></font><o:p></o:p></p>

<p><font size=2 face=Arial><span lang=EN-GB style='font-size:10.0pt;font-family:
Arial'>==5419==&nbsp; Address 0x141 is not stack'd, malloc'd or (recently)
free'd</span></font><o:p></o:p></p>

<p><font size=2 face=Arial><span lang=EN-GB style='font-size:10.0pt;font-family:
Arial'>==5419==</span></font><o:p></o:p></p>

<p><font size=2 face=Arial><span lang=EN-GB style='font-size:10.0pt;font-family:
Arial'>==5419==</span></font><o:p></o:p></p>

<p><font size=2 face=Arial><span lang=EN-GB style='font-size:10.0pt;font-family:
Arial'>==5419== Process terminating with default action of signal 11 (SIGSEGV)</span></font><o:p></o:p></p>

<p><font size=2 face=Arial><span lang=EN-GB style='font-size:10.0pt;font-family:
Arial'>==5419==&nbsp; Access not within mapped region at address 0x141</span></font><o:p></o:p></p>

<p><font size=2 face=Arial><span lang=EN-GB style='font-size:10.0pt;font-family:
Arial'>==5419==&nbsp;&nbsp;&nbsp; at 0x41D112:
ClusterSimulator::simulate(std::vector&lt;unsigned int,
std::allocator&lt;unsigned int&gt; &gt; const&amp;) (in
/home/u5077/simulador/Scheduling/Simulator/schedulers)</span></font><o:p></o:p></p>

<p><font size=2 face=Arial><span lang=EN-GB style='font-size:10.0pt;font-family:
Arial'>==5419==&nbsp;&nbsp;&nbsp; by 0x42E0FF: Objective(GAGenome&amp;) (in
/home/u5077/simulador/Scheduling/Simulator/schedulers)</span></font><o:p></o:p></p>

<p><font size=2 face=Arial><span lang=EN-GB style='font-size:10.0pt;font-family:
Arial'>==5419==&nbsp;&nbsp;&nbsp; by 0x4417A3: GAGenome::evaluate(_GABoolean)
const (GAGenome.C:83)</span></font><o:p></o:p></p>

<p><font size=2 face=Arial><span lang=EN-GB style='font-size:10.0pt;font-family:
Arial'>==5419==&nbsp;&nbsp;&nbsp; by 0x43DFC8:
GAPopulation::DefaultEvaluator(GAPopulation&amp;) (GAPopulation.C:38)</span></font><o:p></o:p></p>

<p><font size=2 face=Arial><span lang=EN-GB style='font-size:10.0pt;font-family:
Arial'>==5419==&nbsp;&nbsp;&nbsp; by 0x43D180: GAPopulation::evaluate(_GABoolean)
(GAPopulation.h:123)</span></font><o:p></o:p></p>

<p><font size=2 face=Arial><span lang=EN-GB style='font-size:10.0pt;font-family:
Arial'>==5419==&nbsp;&nbsp;&nbsp; by 0x43C500: GASimpleGA::initialize(unsigned
int) (GASimpleGA.C:148)</span></font><o:p></o:p></p>

<p><font size=2 face=Arial><span lang=EN-GB style='font-size:10.0pt;font-family:
Arial'>==5419==&nbsp;&nbsp;&nbsp; by 0x434A5B:
GAGeneticAlgorithm::evolve(unsigned int) (GABaseGA.h:136)</span></font><o:p></o:p></p>

<p><font size=2 face=Arial><span lang=EN-GB style='font-size:10.0pt;font-family:
Arial'>==5419==&nbsp;&nbsp;&nbsp; by 0x42E3D3: pruebas(std::vector&lt;unsigned
int, std::allocator&lt;unsigned int&gt; &gt; const&amp;) (in
/home/u5077/simulador/Scheduling/Simulator/schedulers)</span></font><o:p></o:p></p>

<p><font size=2 face=Arial><span lang=EN-GB style='font-size:10.0pt;font-family:
Arial'>==5419==&nbsp;&nbsp;&nbsp; by 0x42EB1B: main (in
/home/u5077/simulador/Scheduling/Simulator/schedulers)</span></font><o:p></o:p></p>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>---------------------------- Confidencialidad: Este mensaje y sus
ficheros adjuntos se dirige exclusivamente a su destinatario y puede contener
información privilegiada o confidencial. Si no es vd. el destinatario indicado,
queda notificado de que la utilización, divulgación y/o copia sin autorización
está prohibida en virtud de la legislación vigente. Si ha recibido este mensaje
por error, le rogamos que nos lo comunique inmediatamente respondiendo al
mensaje y proceda a su destrucción. Disclaimer: This message and its attached
files is intended exclusively for its recipients and may contain confidential
information. If you received this e-mail in error you are hereby notified that
any dissemination, copy or disclosure of this communication is strictly
prohibited and may be unlawful. In this case, please notify us by a reply and
delete this email and its contents immediately. ---------------------------- <o:p></o:p></span></font></p>

</div>

</body>

</html>