Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Mata invalid opcode error message


From   "Parham, Robert" <[email protected]>
To   "'[email protected]'" <[email protected]>
Subject   Re: st: Mata invalid opcode error message
Date   Thu, 13 Mar 2014 23:00:34 +0000

Nick, thank you for the swift reply.

I verified in advance that classes are supported on Stata 11. Googling only came after that :)

I further verified and no problems arise when using Stata 13.1. I'm going to assume this is a problem with the implementation of classes in Stata 11 and move on.

Thanks again for the reply,
Robert.

On 12 Mar 2014 09:03, Nick Cox 
<[email protected]> wrote:
>
>Classes weren't in Mata from the beginning. That may be the nub of the
>problem here. The answer lies not in Googling, but in looking at
>documentation for Stata 11, to see whether it supported classes in
>Mata.
>
>Nick
>[email protected]
>
>
>On 12 March 2014 03:52, Parham, Robert
><[email protected]> wrote:
>> Hi Statalisters,
>>
>> 1. I'm attempting to pack a Mata class into an mlib file.
>> 2. I follow the best practices for doing so from [M-3] mata mlib (which doesn't mention classes directly) and [M-2] struct.
>> 3. I receive an error message: "revpgm: invalid opcode 158"
>> 4. This specific string gets 0 Google hits
>> 5. This only happens on Stata 11, not on Stata 12 (where all is fine and well), haven't tried it on Stata 13 yet.
>>
>> The offending code:
>> --BEGIN CODE--
>> mata: mata clear
>> do "Symbolic.mata"
>>
>> mata:
>> mata mlib create lEW , replace
>> mata mlib add lEW Symbolic()
>> mata mlib index
>> end
>> --END CODE-
>>
>> The error is thrown on the "mata mlib add lEW Symbolic()" command.
>>
>> Has anyone encountered something like it? Ideas on how to investigate? I'd like the code to be backward compatible to Stata 11, if possible.
>>
>> Thanks!
>> Robert
>>
>> p.s. the Symbolic() class implements the symbolic (analytical) algebra over the multivariate polynomial ring with coefficients in the complex field. It can be thought of as an extension of the [M-5] polyeval() suite to the multivariate case, and packed in a class so it behaves like a data type. If anyone is interested in having a look, a link to the GitHub is on my website. Symbolic() is great for calculating analytical gradients and Hessians of complicated or auto-generated functions.
>>
>>
>> ---
>> http://kn.owled.ge


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index