Announcement

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

  • How to add the memory to provide more space to Stata to run a code

    Dear all,

    I would like to expand my data, I have 7500 individuals and for each individual, I would like observation on day, month, and year since the person was born until December 2001. Let s say the average year is 4 years. I would like to have 7500*365*4=10950000 observations.
    When I run the code, I have this from Stata,
    Code:
    op. sys. refuses to provide memory
        Stata's data-storage memory manager has already allocated 12480m bytes and it just attempted to allocate another 32m bytes.  The operating system said no.  Perhaps you are running
        another memory-consuming task and the command will work later when the task completes.  Perhaps you are on a multiuser system that is especially busy and the command will work later
        when activity quiets down.  Perhaps a system administrator has put a limit on what you can allocate; see help memory.  Or perhaps that's all the memory your computer can allocate to
        Stata.
    I use the following codes but it does not work,
    Code:
    set max_memory 10g, permanently
    My question is how to add my memory so I can have my 10950000 observations. I have Stata 14

    Thank you very much,

    Eric

  • #2
    This is not a Stata problem, it's a computer problem. Your computer does not have more memory available for Stata. You may be able to use compress to make your dataset smaller. You may use the additional options in use to use a smaller portion of your dataset. Or you may get a computer with more RAM, or get your operating system to provide more virtual memory. See these FAQs:

    http://www.stata.com/support/faqs/wi...-requirements/
    http://www.stata.com/support/faqs/da...large-dataset/
    Jorge Eduardo Pérez Pérez
    www.jorgeperezperez.com

    Comment


    • #3
      More RAM without 64 bit operating system will be of little use. I think only 4 GB of the RAM will be usable with 32 bit operating system.
      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


      • #4
        If I understand the error message correctly, Stata had allocated 12480 MB before it failed. That is over 12 GB. I think that means the operating system must be 64 bits. I also think it means the set max_memory 10g was a step backward, limiting memory to 10 GB.

        Comment


        • #5
          use enaho.dta, clear
          "op. sys. refuses to provide memory
          Stata's data-storage memory manager has already allocated 1488m bytes and it just
          attempted to allocate another 16m bytes. The operating system said no. Perhaps
          you are running another memory-consuming task and the command will work later when
          the task completes. Perhaps you are on a multiuser system that is especially busy
          and the command will work later when activity quiets down. Perhaps a system
          administrator has put a limit on what you can allocate; see help memory. Or
          perhaps that's all the memory your computer can allocate to Stata."
          Mi sistema operativo es de 64 bits
          ¿Qué puedo hacer?

          Comment


          • #6
            There is very little you can do, Andres.

            You can restart your computer, and try to open your file before any other programs have started running.

            How many gigabytes of physical memory you have installed on your computer?

            Comment


            • #7

              I rebooted the computer and the problem persists. My computer has 8GB of physical memory

              Comment


              • #8
                This is horrible ! Being able to use 1.5GB for work on 8GB installed psychical memory is simply horrible...

                Andres, can you please check and report your exact operating system, and make sure that it is 64bit? (E.g., my operating system is Windows 7, 32bit, 4GB installed RAM, I see this under the system properties.)

                I had similar question, and here is the very educational and very sad answer by StataCorp, basically there is nothing we can do about this problem...

                https://www.statalist.org/forums/for...in64-and-linux

                Comment


                • #9

                  Gracias Joro Kolev, mi sistema operativo es Windows 10, 64 bits, 8 GB de RAM instalada. Ya solucioné mi problema. Simplemente abrí Stata-64 y el problema desapareció. El error apareció abriendo StataMP

                  Comment

                  Working...
                  X