Announcement

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

  • How to point tmpdir to another folder?

    Hi all -

    The default location that tmpdir points to on our site does not have much space and the program freezes when working with large datasets. I tried setting the STATATMP, TMP, TEMP, TMPDIR environment variables to a different folder prior to starting Stata, but c(tmpdir) still points to the default. Consequently all tempfile files are assigned to that folder as well.

    (Running Stata 12 on a Windows platform)

    Any ideas?

    --Suresh

  • #2
    You didn't say what you tried. See if any of these Stata FAQs help: http://www.stata.com/search.php?search=environment

    Comment


    • #3
      Is this related to setting up the Citrix environment we discussed yesterday? Or are you logging onto the server directly and launching Stata from your desktop on the server? It is not clear to me where or how you are setting the environment variables and how the application is subsequently launched.

      Since you set STATATMP I assume you are familiar with this Stata FAQ.

      In the Citrix environment where you are serving the Stata application (rather than an entire virtual machine) which I haven't used in several years, I think you may need to be sure STATATMP is set in the user's environment on his or her desktop system, if that environment is transmitted to the application on the Citrix server the way it would be transmitted to the application on the desktop. That seems awful. I think it's possible to configure the Citrix server to set environment variables as part of launching the application, but I'm not an expert.

      This code will interrogate the environment from which Stata was launched and display the value of the environment variable foo. Modified suitably you can use it to tell if the environment variable you tried to set was indeed set in the environment that Stata is running in.
      Code:
      local bar : environment foo
      display "`bar'"
      Finally, I remember thinking yesterday that if your user had Stata installed on his or her desktop system before Stata was moved to the Citrix server, then there's the possibility that environment settings etc. left behind on the desktop system are confusing the issue. For initial debugging your Citrix setup, you might want to use a Windows account that has never had access to Stata on the desktop system so there are no traces of Stata configuration lying about.

      That's pretty much what I can think of that might help. Let us know your further experiences. Please make it clear at each stage whether you are dealing with the Citrix environment or not, that's a critical piece of information. Don't assume the reader is familiar with your previous posts.

      Comment


      • #4
        All - thanks so much for your input. I believe we are close to a fix - we are currently running the program. I did do a search and found this document helpful: http://www.stata.com/support/faqs/da...ary-directory/.

        I now have a startup batch script (DOS) where I set the environment variables: STATATMP, TEMP, TMP and TMPDIR (though I believe TEMP is the key) to folders on the remote machine before starting Stata with the switch /UseRegistryStartin. Additionally I have a profile.do file in the user's My Documents folder where I modify the sysdir folders SITE, PLUS, PERSONAL and OLDPLACE variables, again pointing to the remote folders. Once Stata is up, I check to see that the changes have been effected by typing the commands: sysdir and display "`c(tmpdir)'". Finding that they are I loaded my do file. I am monitoring the new TEMP folder and I see a bunch of large ST* temp files being created which, as suspected, were being sent over a slow network link to a local drive earlier.

        I think we are in business now - thanks again for all your assistance and feedback.

        --Suresh

        Comment

        Working...
        X