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]
st: Mata invalid opcode error message
From
"Parham, Robert" <[email protected]>
To
"[email protected]" <[email protected]>
Subject
st: Mata invalid opcode error message
Date
Wed, 12 Mar 2014 03:52:52 +0000
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/