MathGroup Archive 2004

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Re: More on Delete Problems

  • To: mathgroup at smc.vnet.net
  • Subject: [mg51716] Re: [mg51691] Re: More on Delete Problems
  • From: Andrzej Kozlowski <andrzej at akikoz.net>
  • Date: Sun, 31 Oct 2004 01:15:22 -0500 (EST)
  • References: <cl9t75$7nl$1@smc.vnet.net> <200410270554.BAA24546@smc.vnet.net> <clpq73$9qe$1@smc.vnet.net> <200410290739.DAA03434@smc.vnet.net> <819AE943-299F-11D9-986A-000A95B4967A@akikoz.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Just one more thing. Since this has been fixed in Mathematica 5.01 
(together with other similar PackedArray related problems discussed 
earlier on this list) it is unlikely that WRI will acknowledge 
anything, since this is now an "obsolete" bug that has been fixed.

Andrzej


On 29 Oct 2004, at 20:41, Andrzej Kozlowski wrote:

> No, I have good reason to believe that the problem is relate to Packed 
> Arrays. I also have reaosn to beleive that your suggestion is just a 
> red herring.
>
> Theorem 1.
> Packed arrays are relevant here.
>
> a = {{1., 2., 3.}, {4., 5., 6.}};
> b = {{1, 0, 1}, {0, -2, 3}, {0, 1, 0}};
> c = a.b
>
> Developer`PackedArrayQ[c]
>
> True
>
> Now if we unpack the packed array and use delete we do not get a 
> crash, if we do not we get a crash every time.
>
> Now, if you understand what packed arrays do you will see how this may 
> well be related to the crash. Of course this is not a strict 
> mathemaitcal  proof but it far more convincing than your suggestion, 
> as I will prove next.
>
> Theorem 2
> Your suggestion is a "red herring", and has nothing to do with this 
> problem.
>
> Proof.
>
>
> a={{1.,2.,3.},{4.,5.,6.}};
>
>
> b={{1,0,1},{0,-2,3},{0,1,0}};
>
> c=a.b;
>
>
> <<Algebra`AlgebraicInequalities`
>
>
> Delete[c,{1,1}]
>
> At this point I get a kernel crash every time!
>
>
> $Version
>
> In[1]:=
> $Version
>
> Out[1]=
> 5.0 for Mac OS X (June 10, 2003)
>
>
> If my conclusion was "premature' what would you call yours?
>
> Andrzej Kozlowski
> Chiba, Japan
> http://www.akikoz.net/~andrzej/
> http://www.mimuw.edu.pl/~akoz/
>
>
> On 29 Oct 2004, at 16:39, Peter Valko wrote:
>
>> *This message was transferred with a trial version of CommuniGate(tm) 
>> Pro*
>> Dear Andrej,
>>
>> I do not really see why you used packed arrays here.
>> If your message is intended to suggest that the crash problem is
>> somehow related to the PackedArrays, your conclusion is premature. To
>> show this I do:
>>
>> a = {{1., 2., 3.}, {4., 5., 6.}};
>> b = {{1, 0, 1}, {0, -2, 3}, {0, 1, 0}};
>> c = a . b
>> {{1., -1., 7.}, {4., -4., 19.}}
>> << Algebra`AlgebraicInequalities`
>> Delete[c, {1, 1}]
>> {{-1., 7.}, {4., -4., 19.}}
>>
>> Without including the "<< Algebra`AlgebraicInequalities`" line,
>> Mathematica crashes.
>>
>> Including the "<<Algebra`AlgebraicInequalities`" line eliminated the
>> crash problem, but it does not mean the
>> "Algebra`AlgebraicInequalities" has anything to do with the root of
>> the problem. (I selected it because it is clearly a neutral,
>> ambivalent package for the given case.) My conclusion is that with
>> including a package (any package) more initialization is done and that
>> helps to avoid the root of the crash problem.
>>
>> This example is good, because it is simple and reproducible and it
>> shows the existence of a problem (I suspect one related to dynamic
>> allocation of space) that might be more difficult to discover in a
>> real situation. It is possible, that a simple fix can be built in
>> temporarily into the init.m file, for instance. A light
>> acknowledgement and advice from somebody associated with WRI would
>> help us a lot, even if the disclamer ("this is not the official
>> opinion of my employer" might show up with it.)
>>
>> Regards
>> Peter
>>
>>
>>
>> Andrzej Kozlowski <andrzej at akikoz.net> wrote in message 
>> news:<clpq73$9qe$1 at smc.vnet.net>...
>>> Packed Arrays strike again!
>>>
>>> Try this:
>>>
>>>
>>> In[1]:=
>>> a = {{1., 2., 3.}, {4., 5., 6.}};
>>>
>>> In[2]:=
>>> b = {{1, 0, 1}, {0, -2, 3}, {0, 1, 0}};
>>>
>>> In[3]:=
>>> c = Developer`FromPackedArray[a . b];
>>>
>>> In[4]:=
>>> Delete[c, {1, 1}]
>>>
>>> Out[4]=
>>> {{-1., 7.}, {4., -4., 19.}}
>>>
>>> No crash.
>>>
>>> Andrzej Kozlowski
>>>
>>> Andrzej Kozlowski
>>> Chiba, Japan
>>> http://www.akikoz.net/~andrzej/
>>> http://www.mimuw.edu.pl/~akoz/
>>>
>>>
>>>
>>>
>>> On 27 Oct 2004, at 14:54, Peter Valko wrote:
>>>
>>>> For the record:
>>>>
>>>> $Version
>>>> 5.0 for Microsoft Windows (June 11, 2003)
>>>>
>>>> a={{1.,2.,3.},{4.,5.,6.}}
>>>> b = {{1,0,1},{0,-2,3}, {0,1,0}}
>>>> c = a . b
>>>> Delete[c,{1,1}]
>>>>
>>>> crashes Mathematica on my machine, exactly as Give Effinger said.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Gove Effinger <effinger at skidmore.edu> wrote in message
>>>> news:<cl9t75$7nl$1 at smc.vnet.net>...
>>>>> Here's simple code which bombs for me:
>>>>>
>>>>> a={{1.,2.,3.},{4.,5.,6.}}
>>>>>
>>>>> b = {{1,0,1},{0,-2,3}, {0,1,0}}
>>>>>
>>>>> c = a . b
>>>>>
>>>>> Delete[c,{1,1}]
>>>>>
>>>>> Why?
>>>>>
>>>>> G. Effinger
>>>>
>>>>
>>
>>
>


  • Prev by Date: Re: Mathematica's (and others) ancient widget toolkit ... why?
  • Next by Date: Re: Re: More on Delete Problems
  • Previous by thread: Re: Re: More on Delete Problems
  • Next by thread: Re: Re: More on Delete Problems