Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • error occurred while loading ado

    I have written a program that has 10000 lines. When I try to run it in Stata 13 and 11, I receive this message
    Code:
    system limit exceeded - see manual
    (error occurred while loading asm.ado)
    r(1000);
    My best guess is that the error message is either related to number of lines in the program or if qualifiers. The manual says that a program can contain at maximum of 3500 lines, but when I checked, the outreg2 has around 10,000 lines. Your comments will be appreciated on this issue.
    Regards
    --------------------------------------------------
    Attaullah Shah, PhD.
    Professor of Finance, Institute of Management Sciences Peshawar, Pakistan
    FinTechProfessor.com
    https://asdocx.com
    Check out my asdoc program, which sends outputs to MS Word.
    For more flexibility, consider using asdocx which can send Stata outputs to MS Word, Excel, LaTeX, or HTML.

  • #2
    I hadn't heard of this particular limit before. Is your program a single monster program, or does it have a bunch of subprograms within it? Outreg2 has several program commands, so maybe the 3500 limit applies to each program separately. You could always split your program up and have it call the different programs that are required.
    -------------------------------------------
    Richard Williams, Notre Dame Dept of Sociology
    StataNow Version: 19.5 MP (2 processor)

    EMAIL: [email protected]
    WWW: https://academicweb.nd.edu/~rwilliam/

    Comment


    • #3
      Richard is correct. A program is not the same thing as an ado-file. The limit applies to the lines enclosed within a program and an end statement. But even 3,500 lines in a single program seems like a bad idea, anyway. Many people that do not have a computer science background tend to write way too long (sub)routines - and this includes my own work.

      Have a look at Bill Gould's excellent presentation on programming in Stata (and Mata): http://www.stata.com/meeting/uk10/UKSUG10.Gould.pdf

      Best
      Daniel

      Comment


      • #4
        I never had this problem before either.

        Are you using Stata SE or MP? If yes, you may want to try this

        To check how much memory is allocated to ado files type:

        Code:
         display c(adosize)
        You can increase the space using:

        Code:
        set adosize # [, permanently ]        10 < # < 10000
        I am not sure if that will work.

        Comment


        • #5
          adosize controls the amount of memory (in KB) available to ado-files, which probably has little to do with the number of lines an ado-file can have. Use help limits to see that the program line limit is 3,500 lines for all versions of Stata; this limit cannot be raised or lowered.

          Comment


          • #6
            Thank you gentlemen for your suggestions and replies. I followed Richards suggestions and developed sub-routines, which reduced the number of lines from 10000 to 1000, now the ado files properly loads. There is a small problem with efficiency of the program, it takes a little longer, especially on Stata 13.1 compared to Stata 11.2. If someone on the Statalist is kind enough to look into my ado file and suggest improvements, it would serve not my purpose but a whole lot of people as I am going to share this program on SSC.
            Regards
            --------------------------------------------------
            Attaullah Shah, PhD.
            Professor of Finance, Institute of Management Sciences Peshawar, Pakistan
            FinTechProfessor.com
            https://asdocx.com
            Check out my asdoc program, which sends outputs to MS Word.
            For more flexibility, consider using asdocx which can send Stata outputs to MS Word, Excel, LaTeX, or HTML.

            Comment


            • #7
              Ataullah,

              You'll have a better chance of having someone offer to review your ado file if you give a description of what it's about. Most of us have well-defined areas of interest and disinterest. Reviewing a program that largely uses techniques that we seldom or never use would waste your time and ours. Reviewing a program that is in our areas of interest could be fun and useful.

              Comment

              Working...
              X