Search Docs by Keyword

Table of Contents

Stata on the FASRC clusters

In order to connect to the cluster, you need a Research Computing account. You can find information on requesting an account here.

Open OnDemand
Stata can be run from VDI/Open on Demand by clicking its icon or choosing it from the Interactive Apps menu, and specifying your resource needs. Hit Submit, wait for the session to start, and click the “Launch Stata” button. You can use our VDI (Virtual Desktop Interface) to launch a virtual Linux desktop, Jupyter, Rstudio, Tensorboard, Matlab, and more.

Alternatively, you can use an X11 environment:

WINDOWS USERS
You will need an X11 environment to display X11-enabled apps like xstata and an SSH client. We recommend Xming and PuTTY, respectively.
Please see the X11 section in our Access and Login page for more information.
Alternately, you can use our VDI (Virtual Desktop Interface) to launch a virtual Linux desktop, Jupyter, Rstudio, Tensorboard, Matlab, and more.

RUNNING STATA
If you are using Xming or X11/Xquartz, you will first need to launch an interactive session with X11 forwarding enabled (please do not try to run Stata on the login nodes). See Interactive jobs and salloc for more details.
For example, once logged into the cluster, to start an interactive session with 4GB of memory on the test partition, you would type:
salloc -p test --pty --x11=first --mem 4000 -t 0-06:00 /bin/bash
You can then proceed to set up and start Stata inside that session. To see the currently available versions of stata on our Modules Search.
So, for example, once you have your interactive session started you might type:
module load stata/15.0-fasrc01
Loading module stata/15.0-fasrc01
stata
The Stata GUI will then launch.

OUTPUT FILE PERMISSIONS
Stata appears to override filesystem-level permissions structures such as file-ACLs.  In a test using stata/14.0-fasrc01 the .dta files produced by Stata were consistent with the user’s umask, despite default file-ACLs that should have created different effective permissions.  It appears as though Stata is modifying the permissions after writing the file (i.e. after the default file-ACLs have been applied).  The solution for this should be to set the desired umask in the Slurm submission script or on the command line prior to submitting the batch job (though a ‘umask’ command in the Slurm submission script would be preferable in most cases).

RUNNING STATA ON FASSE
Stata sometimes loads libraries via http.  For security reasons, http access on FASSE must happen via a proxy.  Proxy access can be configured in stata with the following commands:

set httpproxy on
set httpproxyhost rcproxy.rc.fas.harvard.edu
set httpproxyport 3128

Proxy settings appear to persist after stata is closed, so it is recommended to issue the following command when exiting stata:

set httpproxy off

Proxy settings can be added to a stata startup script, with the understanding that the set httpproxy off command should be used every time when exiting stata.

 


© The President and Fellows of Harvard College
Except where otherwise noted, this content is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International license.