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: problems with finding mata libraries in the PLUS directory


From   "William Gould, StataCorp LP" <[email protected]>
To   [email protected]
Subject   Re: st: problems with finding mata libraries in the PLUS directory
Date   Mon, 01 Aug 2011 10:53:55 -0500

Christophe Kolodziejczyk <[email protected]> writes, 

> I have some problems with a library which is stored in the PLUS
> directory but does not appear in the list of libraries to be searched
> after having run mata mlib index command.  [...]

Christophe then goes on to show a helpful example, which example ends 
with the line 

    : mata mlib index
    .mlib libraries to be searched are now

    lmatabase;lmataado;lmataopt;lcopula;lghquad;lhce;lib_beh_slp;lib_econ;
    lib_struct;llib_benchmarksurv;llib_id;llib_matabench;llib_nid;
    llib_psw;lnicolib;lnwspgr;lorenz;lpersonal;lplack;lpscorelib;lsimul_hce;
    ltauchen;ltaxben;lvfunckw;lfhh;lhalton;lkdens;lsq

Christophe expected to see "laddition" listed after "lsq", but it is
not there.  I've taken the liberty of cleaning up the output; the only
point I want to make is that Chrstophe has lots of Mata libraries.

The current versions of Stata 11 and Stata 12 allow up to 255
characters for the list of libraries.  Adding ";laddition" pushes
length of the string beyond 255, and thus it was not added.

That the limit is 255 can only be termed a bug.  We will fix this in 
both Stata 11 and Stata 12.  

In the meantime, I suggest Christophe work around the problem by
shortening the names of some libraries.  I warn Cristophe that I would
not be surprised if there is no file named lsq.mlib.  "lsq" appears at
the end of the list.  The string Christophe showed has exactly 254
characters, meaning 255 once the terminating binary zero is added, and
thus I suspect the name "lsq" has been truncated.

Christophe can rename *.mlib libraries without rebuilding them, but I 
also caution him that renaming *.mlib libraries obtained from SSC 
will confuse -ssc update-, -ssc install-, and -ssc uninstall-.  

-ssc- will think any renamed library is personal rather than part of a
downloaded package, and it will think that the downloaded library has
been accidentally erased.  -ssc update- and -ssc install- used to
update a package will replace the original library.  -ssc uninstall-
will not erase the renamed library.  

If Christophe must rename a SSC *.mlib file, just do so, and then be
aware that if he uses -ssc- to update to re-install an existing
package, he will after to erase the renamed libary and then the new
library to the shorter name.

-- Bill
[email protected]
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


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