UCLA Mathematics Computing
The UCLA Mathematics department maintains a large heterogeneous network of Windows and Linux computers. All offices in the department have at least one PC running either Windows or Linux, and a broad variety of application software is available. Both platforms can also be found in our public computer labs. Back-end fileservers provide storage for all users, and a Beowulf-style computing cluster is available for intensive computation.
The Mathematics Computing Group (MCG) is available to answer questions and to assist with all types of computing issues. The MCG maintains the Mathematics Computer Consulting Office (MCCO) in room MS 6121, which for historical reasons is called “The Bugs Office”. A consultant is on duty weekdays from 8:00 AM to 5:00 PM.
For prompt assistance, your best bet is to report problems by sending email to firstname.lastname@example.org. Be sure to be specific about the problem, and include the machine name, the time, and any error messages. Drop-in consulting is available in MS 6121 daily from 10:00 AM to 12:00 PM, and again from 2:00 PM to 4:00 PM (drop-in hours are 10:00 AM to 12:00 PM when classes are not in session). Here is the current bugs manager schedule:
The Mathematics department expects everyone to use computer resources prudently and legally. Please take a few minutes to familiarize yourself with the campus and UC acceptable use policies for computing, which can be found at http://www.bol.ucla.edu/policies.
There are a number of articles in our Knowledge Base that can be used to help you get started or answer general questions.
Here are some of the more commonly viewed topics:
The e-mail clients currently supported by the Department of Mathematics are:
In the following pages, each mail client will be described in detail, with graphical instructions on what to do to set it up correctly to connect with Math. To accomplish this, we set up a ‘sample’ user called Math User, username = mathuser.
The home machine of mathuser is cedar, or cedar.math.ucla.edu. Please replace any instance of this home machine hostname with your hostname, be it walnut.math.ucla.edu, or tupelo.math.ucla.edu, julia.math.ucla.edu, or sassafras.math.ucla.edu. Also, replace any instance of ‘mathuser’ with YOUR username, which is your ‘login’ name, your ‘email’ name, or your ‘unix’ name (any one of these 3 that you are familiar with).
These instructions are given from the point of view of ‘first’ installing the mail client on the system, which is not limited to but includes first clicking on the mail client’s icon. It naturally takes you through a setup process. You may not have to go through this whole process if you have already performed some setup of your preferred mail client. If that is the case, just make sure the settings for connecting to the MathNet are just like they are in the graphical pictures in the following pages (e.g., the IMAP port number, Certification, etc.).
This article will demonstrate how to turn on (and off) your vacation auto-responder.
If you are a Windows user, you will have to use an SSH client such as PuTTY to connect to a UNIX machine to do this. PuTTY is included on all Math Department Windows machines under ‘All Programs > SSH’.
- In the text field for Host Name (or IP address), enter the host name of your home directory server (this will only properly work on your account’s homedir server) and click ‘Open’ to continue.
*if you are prompted by a PuTTY Security Alert, you must click ‘Yes’ to continue.
- Enter your username and password to continue.
From this point on, the instructions are the same whether you are using a Windows or UNIX machine.
- In the prompt, type vacation and you should be prompted to turn on (or off, if it was already on) your vacation auto-responder.
- You will be brought into a vi or vim editor to create / edit your vacation message; the message that will be used in the auto-response.
If you are unfamiliar with vi / vim commands and hot keys, here is a quick primer that can be used to edit this document:
k, l, j, h Moves the cursor up, forward, down and back, respectively; when not editing. i, a Inserts text before and after the cursor, respectively. Starts editing mode. ESC Ends editing mode – enters command mode.
For more information, consult a vi / vim reference.
- After you finish creating or editing the message, press ‘ESC‘ and type ‘:wq‘ to save and quit. If you wish to discard, use ‘:q!‘ or ‘:q‘, the latter will prompt you.
- Once the message has been saved, the prompt should read like this:
And now the vacation is message has been turned on and will auto-respond until you turn it off.
Current estimates are that 85% to 95% of all E-mail is spam.
At UCLA math, spam filtering is done on an opt-in basis using the industry-standard SpamAssassin program. To enable spam filtering, all you need to do is login to your Linux account via SSH or Putty, type “spamscript” and follow the simple menu-driven directions. Most folks are happy with the default anti-spam settings.
If you choose to do nothing, you will continue to receive all mail addressed to you, both legitimate and spam.
If you do opt-in, your mail will be automatically sorted by the anti-spam filter. Mail the filter thinks is legitimate goes into your inbox as normal, and and rest will be placed in a mail folder called “spam”.
Please be aware that no anti-spam filter is perfect. There’s always a small chance that legitimate mail will be tagged as spam and automatically filed away in your spam folder (a “false positive”). You should review the contents of your spam folder at regular intervals and look for legitimate E-mail misfiled as spam, and delete everything else there. There’s no reason to save spam.
Every once in a while, spam will sneak past the filter and make it into your inbox (a “false negative”). As long as it doesn’t happen too often, your best bet is just to ignore it and delete it. If, however, you’re seeing enough spam slip past the filter to be annoying, there are a couple things you can do.
The easiest thing you can do is increase the sensitivity of the anti-spam filter to spam by using the Advanced Menu option in spamscript to lower your Spam Hit Level. If you do this, however, you’ll likely increase your False Positive rate, so use caution. Our standard recommendation is to decrease your Spam Hit Level by no more than 0.5 points at a time.
If you really, really, hate spam, you can “train” your anti-spam filter using a Bayesian classifier. To do this, you should save your False Negatives (spam that slipped through) in their own mail folder. Once you have a critical mass (say, 100 or so messages), you can use the sa-update program to train the filter. You can also use sa-learn to train the filter to recognize legitimate Email (known as “ham”), making it even more accurate. For instructions on how to use the sa-learn command go to the Advanced Spam Filtering knowledge base article.
Remember, UCLA IT Staff and the Mathematics Computing Group will NEVER ask you to provide both your username and password via e-mail.
Everyone in the department is asked to use the printers responsibly. While faculty and staff are not subject to printing quotas, graduate students are limited to 300 free pages of printing each quarter. Unused pages are carried over to the next quarter, except at the end of the summer, when all printing quotas are reset. General printing is available in the public labs. Additional printers can be found in the department copy room (faculty/staff only).
- Student printers are located in 3347 MS (printer name: gclps), and 6187 MS (printer name: aclps)
- Additional pages are $5.00 for 100 pages ($0.05/page)
- To add pages, bring deposit to 6370 MS; office will contact bugs and credit your account
- To check quota, contact bugs (please limit queries).
The NEMO cluster is a set of 9 Intel Xeon rack machines, with 3.4 GHz speed, and 9.0GB memory per node. These machines run the current version of SuSE Linux, 10.3. The nodes are numbered, nemo01 – nemo09.
The nine machines of the Nemo Cluster were donated to UCLA Math by Tony DeRose and his colleagues at Pixar. They were formerly part of the giant Pixar rendering farm.
The purpose of these machines is to run serial and parallel computing jobs, generally for parametric studies and algorithmic development. The Extended Memory is substantial, and ideal for memory oriented jobs such as those which employ large matrices.
The job queuing system has been disabled so just log into any node and run your compilation and/or computation from there. Do be mindful of other users by checking if others are on the system. Commands like “w” or “who” can see who is logged on.
Here is a video demonstrating the instructions below.
Web files and presentation occur on the UNIX / Linux system. If you are already a UNIX user, you may skip this next section demonstrating how to connect to your UNIX account from Windows. To accomplish this, we set up a ‘sample’ user called Math User, username = mathuser. Once the page has been set up and published, this sample site could be accessed from http://www.math.ucla.edu/~mathuser – where after the ‘~’ would be your username.
If you are a Windows user, you will need to connect to a UNIX system in order to proceed, there are two options that you can use either ‘Xming‘ (a XWindows client) or ‘PuTTY‘ (a SSH client). Both are included on standard issue Department of Mathematics Windows machines and can be used right away, otherwise they can be downloaded from their respective links. This document will not cover their installation and is currently only intended to provide a demonstration using the console (for Windows, this means using PuTTY).
From Windows, begin by launching PuTTY (generally found under ‘All Programs’ > ‘SSH’).
In this example, we will be connecting to julia.math.ucla.edu, which as been entered in the ‘Host Name (or IP address)’ field.
You would connect to your homedir server or a UNIX / Linux machine that you access regularly. After you connect, you will be prompted for your username and password to continue.
From here on, the instructions will be working from the console, even though the screenshots will be in PuTTY, the information will be the same for both Windows and UNIX users.
If this is your first web page at Mathnet, you probably don’t have a ‘public_html’ directory, where your webpage files need to be. So we will begin by creating it and giving the webserver permission to hunt within it for files.
- Use the following commands to create the directory and give the webserver the necessary permissions: (pressing enter after each line)
- cd $HOME
- mkdir public_html
- chmod 755 public_html
- cd public_html
- Now you are in your ‘public_html’ directory where your webpage files can be placed.
- Copy a simple template page into your directory using:
- cp -p /net/arachne/h1/www/htdocs/templates/homepage.html index.html
The ‘-p’ switch keeps the original permission allowing the webserver to read the file, if you didn’t include ‘-p’ you can use: ‘chmod 644 index.html’ to reset the permissions.
- The page must be named index.html to be your home page.
Editing your Web Page
On Linux you can use your favorite file editor, such as vi or nano, to edit the new page. Nano is easier to use. You would do this by typing ‘vi index.html’ or ‘nano index.html’ to get started. To save and quit in nano, press CTRL+X, and follow the prompts to save your file.
If you are unfamiliar with editing html or using vi or nano, you can search for help with your favorite search engine.
You can also download/upload from/to your public_html folder using WinSCP (on Windows) or Filezilla (on Mac). Make sure your files have the appropriate permissions.
To improve the styling of your page, please refer to the W3C Wiki Page for general syntax and element references as well as Sitepoint’s CSS reference.
Posting Solutions Online
If you decide to post solutions to homework problems (or quizzes or exams) online, it is probably a good idea to do so under some password protection. Not only may you want to limit the access to those solutions concurrently, but in particular for the future. The mathematics computing group has written a script which makes it very easy for you to create a password protected directory (see www.math.ucla.edu/computing/kb/password-policy).
How to password protect your web page using the command ‘mkwebpass’ on your UNIX account
• First, log in to your UNIX account. To do this, you will need to use Secure Shell SSH, or X-windows.
• Once you have logged in to your UNIX account, move (change) to the directory (where the web page is located) which you want to protect.
• Then, type the following: mkwebpass
• You will then be prompted to type in a username/password (please use ones that are ‘different’ from your UNIX username/password).
• This creates the .htaccessj.htpasswd file in the web page directory.
• If you want a different username/password combination, then simply re-run the command.
• If you want to remove the password protection, simply delete the files .htaccess and .htpasswd.
UCLA-Mathnet has several mathematical software packages installed for both Windows and Linux hosts. Most of these are licensed; the Mathematics Department has purchased licenses for a certain number of simultaneous users. When you have finished working on your project and will be away from it for several hours or overnight, please close the program, so others can use the license. (And log out from your computer at the end of the day, for security.)
The best way to use mathematical software is to use the subroutines it provides, rather than implementing complex algorithms using their scripting language. For example, if you compute a Fourier transform or find the eigenvectors of a matrix, the package can do this for you with one subroutine call, whereas if you write the algorithm yourself you could put a lot more effort into a possibly inferior implementation, and give a lot more work to the computer too.
If you have your own desktop workstation, Mathnet recommends that you use the software packages there, because the workstations are generally faster than the servers, you don’t have to share with other users, and users without their own workstations need server resources.
The licensed packages may be used only at Mathnet.
Maple by Waterloo Maple Inc. is for symbolic mathematics. In other words, you give it formulae and it can substitute one into another, solve for one of the variables, solve a differential equation symbolically, and numerous other activities. It can then go on to evaluate the resulting formulae including numerical solution of differential equations. Follow this link to an index of Maple’s features.
We have the 2015 x86_64 version. This software is licensed.
To start it, type maple at the command prompt. This gives you a textmode interface. If you give the -x option or use the command xmaple, you will get an X-Windows interface. Alternatively find it in your desktop environment’s software menu in the Mathematics category. (If we or they had set that up…)
Mathematica by Wolfram Research is another symbolic mathematics package with a similar function as Maple but quite a contrasting style. Particularly see the reference document on the Wolfram Language.
We have the latest version 10. OK on both x86_64 and i686. This software is licensed. Wolfram has a cloud service, which is not cheap.
To start Mathematica, type mathematica at the command prompt. Alternatively find it in your desktop environment’s software menu in the Mathematics category. (If we or they had set that up…) You get an X-Windows interface.
Matlab by Mathworks is mainly intended for numerical and matrix computations, and data visualization. See this link for a summary of key features of Matlab.
We have version R2016a. OK on both x86_64 and i686. Available for Linux and Windows. This software is licensed. We also have licenses for a number of Matlab toolboxes.
To start Matlab, type matlab at the command prompt. Alternatively find it in your desktop environment’s software menu in the Mathematics category. (If we or they had set that up…)
Octave from GNU is intended for numerical computations and data visualization. It has been described as a free Matlab; the programming language is very similar and programs are easily ported from one to the other.
We have version 3.6.4; the latest is 3.8.2. OK on both x86_64 and i686. Octave is free software under GPL; client licenses are not required.
To start it, type octave at the command prompt. This is a text interface (not a GUI); however, graphs are plotted using X-Windows (OpenGL).
- To see the online documentation do tkinfo octave
- The reference manual is available online.
- The support page has links to the FAQ, wiki, and other resources.
Sage is a free open-source mathematics software framework that incorporates many other open-source packages, including:
- GAP (computational discrete algebra, computational group theory)
- PARI/GP (number theory)
- Maxima (symbolic mathematics, descendant of Macsyma)
- mwrank (elliptic curves)
- R (statistics)
- singular (polynomial rings and noncommutative algebras)
- KANT/Kash (algebraic number theory)
- Macaulay2 (algebraic geometry and commutative algebras)
- And quite a number of others, plus infrastructure
- The framework language is Python.
We have version 4.7; latest is 6.5. OK for x86_64 and i686. Sage and its components are free software; client licenses are not required.
To start Sage, just type sage at the command line. It takes a while to start up. When you get its command prompt (sage:), you can enter commands or type notebook() for a GUI. It will open an instance of Firefox on the local machine and you can use Sage from the web form.
An alternate way to use Sage is via the SageMathCloud. This is a free service hosted at the University of Washington.
- Math Libraries
Mathnet hosts have a range of mathematical software and libraries installed in addition to the major packages listed above.
- liblapack3: Simultaneous linear equations, least squares, eigenvalues, singular value problems. We have version 3.4.2, latest is 3.5.0. The man pages are also installed; see also the Users Guide.
- libfftw3-3, libfftw3_threads3: Discrete Fourier transform. We have version 3.3.3; latest is 3.3.4. See the project page for links to the documentation.
- gsl: Gnu Scientific Library, for linear algebra, roots of polynomials, Fourier transform, wavelet transformations, differential equations, and many more areas.
- singular: Polynomial rings and noncommutative algebras