cluster:software
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
cluster:software [2018/10/01 17:18] – [R] mcloughlin | cluster:software [2024/11/14 14:47] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Cluster Software ====== | + | ======Cluster Software====== |
- | ===== C ===== | + | |
- | The cluster can compile C or C++ code using the [[http:// | + | |
- | ===== Fortran ===== | + | |
- | The cluster has at least Fortran compiling capability from the [[http:// | + | |
- | It also has IMSL Fortran Library 7.0 License Service. | + | The list of currently |
- | ===== Gauss ===== | + | |
- | Gauss is installed on the Cluster. To run it in interactive mode, use the command **tgauss**. | + | |
- | To run Gauss in Batch Mode, run: | + | ^Software ^Version ^Terminal Command ^ |
+ | | GCC | 11.4.1 | gcc | | ||
+ | | Matlab | R2023a | matlab | | ||
+ | | Python | 3.9 | python | | ||
+ | | Python | 3.11 | python3.11 | | ||
+ | | R | 4.4.2 | R | | ||
+ | | Stata | 18 MP8 | stata-mp | | ||
+ | |||
+ | =====Python===== | ||
+ | |||
+ | To run a pre-written python script, type < | ||
+ | |||
+ | ==== Installing Libraries via VENV ==== | ||
+ | |||
+ | To install a library that doesn' | ||
+ | < | ||
+ | after creating, activate the environment | ||
+ | < | ||
+ | (you should now see the environment on the far left of the terminal line). After that, you can simply install any library using pip from the command line | ||
+ | < | ||
+ | |||
+ | =====R===== | ||
+ | ====Batch Mode==== | ||
+ | You can run an R file in batch mode with < | ||
+ | To run your R command in the background, see [[cluster: | ||
+ | |||
+ | ====Installing Packages===== | ||
+ | To install an R package, type in the interactive mode < | ||
+ | |||
+ | ====Introduction to R==== | ||
+ | The following section comes initially from an introductory talk on R given by Paul Bailey in February 2011. The data used in the examples is located at [[http:// | ||
+ | |||
+ | ===R Background=== | ||
+ | * Based on Bell Labs S | ||
+ | * Open source software | ||
+ | * Large group of contributors | ||
+ | * Most R code is written in R | ||
+ | * Computationally intensive code written in FORTRAN or C | ||
+ | * Datasets, matrices are native types | ||
+ | * Easy, customizable graphics | ||
+ | |||
+ | ===R Pros=== | ||
+ | * Free | ||
+ | * Easy to get a sense of what is going on with data | ||
+ | * Excellent at simulation | ||
+ | * Interfaces with lots of other software (i.e. WINBUGS, SQL) | ||
+ | |||
+ | ===R Cons=== | ||
+ | * Uses RAM to store data | ||
+ | * Support mainly via listserves | ||
+ | * Difficult to get started | ||
+ | |||
+ | ===Read in Data=== | ||
+ | * Some type specific methods, and a general method < | ||
+ | |||
+ | ===Getting Help=== | ||
+ | * You can use the following command to get the help page for a command: < | ||
+ | * To search for text in help text use the following command: < | ||
+ | |||
+ | ===Summary=== | ||
+ | * Getting summaries is easy: '' | ||
+ | * You can also focus on one variable | ||
< | < | ||
- | tgauss -v -b gauss.in > gauss.out | + | summary(dat$num_child) |
+ | table(dat$num_child) | ||
</ | </ | ||
- | ===== Mathematica ===== | ||
- | (NEW LICENSES AVAILABLE: We are glad to announce that Mathematica is newly installed on econ1 and econ2, feel free to scatter the jobs on the unused resource on econ1 and econ2. In order to request a certain node (e.g. econ1), please refer to Request Node.) | ||
- | Mathematica is currently installed on cluster econ8. To run it in interactive mode, type the command in the command prompt: | + | ===Subset Data=== |
+ | * When you reference something with '' | ||
< | < | ||
- | math | + | dat.lf <- dat[dat$emp %in% c(" |
+ | dat.hs <- dat.lf[dat.lf$educ==39, | ||
</ | </ | ||
- | To run Mathematica in batch mode, use: | + | ===Linear Models=== |
+ | * The **lm** function fits linear models with a formula: | ||
< | < | ||
- | nohup math -noprompt | + | lm1 <- lm(weekly_earn ~ age + year, |
+ | summary(lm1) | ||
+ | </code> | ||
+ | * You can also treat a variable as a factor: | ||
+ | <code> | ||
+ | dat$yearf <- as.factor(dat$year) | ||
+ | lm2 <- lm(weekly_earn ~ age + yearf, | ||
+ | summary(lm2) | ||
+ | </code> | ||
+ | * And change constraints: | ||
+ | < | ||
+ | contrasts(dat$yearf) <- " | ||
+ | lm3 <- lm(weekly_earn ~ age + yearf, | ||
+ | summary(lm3) | ||
</ | </ | ||
- | To run the GUI version, make sure you have X Forwarding working. | + | ===Aggregate=== |
- | ===== Matlab | + | * Allows you to create summary statistics for groups |
+ | * First argument is what you want to summarize | ||
+ | * Second argument is what you want to group by | ||
+ | * Their argument is what to do to the groups | ||
+ | < | ||
+ | agg.hs <- aggregate(dat.hs$emps, | ||
+ | </ | ||
+ | * Results names a little odd. | ||
+ | * | ||
+ | ===Merge=== | ||
+ | * Groups two datasets by shared columns | ||
+ | < | ||
+ | merged <- merge(data.a, | ||
+ | </ | ||
+ | * Lots of options for this one | ||
- | The cluster has Matlab R2013a and R2014a. | + | ===Parallel=== |
+ | Some basic info can be found at the [[http://cran.r-project.org/web/ | ||
- | Using just the below command will also work, though it will give errors from failing to find a display:< | + | You can also use [[http:// |
- | To run Matlab in batch mode, use the command <code>matlab < your-file.m</code> | + | ^^OpenMPI^MPICH2^ |
+ | |Before anything (installation or usage)|>module load openmpi-x86_64|> | ||
+ | |Installation| R> | ||
- | This command will print the results of **your-file.m** onto the screen. If you want to redirect this to an output file, use < | + | A good intro guide is [[http:// |
- | ==== Graphics ==== | + | ===Other functions=== |
- | You should bear in mind that the cluster excels at numerical analysis and NOT graphics. | + | |
+ | * '' | ||
+ | * '' | ||
+ | * [[http:// | ||
- | If you want to create graphs, this is still possible. | + | =====Stata===== |
+ | ====Batch Mode===== | ||
+ | You can run a .do file in batch mode with | ||
< | < | ||
- | h = plot(x,y) | + | stata-mp -b do dofile.do |
- | saveas(h,' | + | |
</ | </ | ||
- | ==== Tomlab ==== | + | To allow your do-file to continue running when you log off from your terminal, preface the command with " |
- | The department has a license for Tomlab, which contains several optimization algorithms that improve on Matlab' | + | < |
+ | nohup stata-mp -b do dofile.do & | ||
+ | </ | ||
+ | |||
+ | For more information on how to run your Stata command in the background, see [[Managing_Jobs|Managing Jobs]] | ||
- | ==== Dynare | + | ==== Temporary Files ==== |
- | Dynare is able to handle large class of dynamic economic models, especially good for solving DSGE and OLG models. Dynare is currently available on the cluster as a toolbox. You will need to modify | + | By default, Stata saves tempfiles (from -tempfile- or -preserve-) |
< | < | ||
- | addpath | + | export STATATMP=$HOME/statatmp |
</ | </ | ||
- | For more information on how to use Dynare visit the [[http://www.dynare.org/ | + | One reason you might want to do this is that files are removed from /home/stata-tmp/ if they haven' |
- | ==== Parallel | + | ==== Installing Extra Packages |
- | The cluster | + | If you are using extra packages on your home/work computer and need them installed on the cluster, you can install them via ssc: |
+ | < | ||
+ | ssc install outreg | ||
+ | </ | ||
- | ===== SAS ===== | + | You will then have a folder installed within your home directory called " |
- | ===== Stata ===== | + | |
- | ===== Other Software ===== | + |
cluster/software.1538414283.txt.gz · Last modified: 2018/10/01 17:18 (external edit)