Physics 210: Computational Physics

Course Software for personal machines


INDEX

NOTE: For the impatient, I've included links for "immediate downloads" in the index.  However, if you haven't used the app before, I recommend that you also follow the links to the appropriate sections of this page to get some information (and further links) on configuration, usage ...  It may save you some time and aggravation.

IMPORTANT

For those of you who use PCs, laptops, etc. that run Windows, it is highly recommended that you download and install PuTTY (or some other ssh client for Windows) and Xming.  The former will allow you to establish a ssh connection to hyper from your Windows machine using an application that looks much like the terminal app that we use on the lab machines.  You can then work within a shell on hyper and run text/command-line versions of maple and Matlab.  With Xming you can do even more: the software, in conjunction with the ssh client will allow you to login to hyper and then run graphical applications, such as kate, xmaple, desktop/GUI Matlab, etc. that will appear on your personal machine.

WARNING! Depending on the speed of your network connection, response time for applications such as xmaple and Matlab may be so sluggish as to make working with it infeasible, so you should be prepared to spend some time in Hennings 205 (outside of the labs per se) as necessary.

Which text editor should you I use if I'm working remotely

I recommend that you use gedit rather than kate when working remotely.  It appears that gedit's performance is much superior to kate's in this context, and for the purposes of the course, the two editors are equivalent.

PuTTY  (ssh client for Windows)

If you don't have a ssh client installed on your Windows machine(s), you can download and install the free package, PuTTY HERE. I recommend that you click the "A Windows installer for everything except PuTTYtel" link in the "latest release version (beta 0.63)" section, save the file to disk, then double click on the file icon to inititate the installation.  As described above, once installed, you will be able to use PuTTY to open terminal windows to remote machines such as hyper. This in turn will allow you to do basic command-line work on hyper, and other machines that accept ssh connections, from within Windows.

Note that the terminal sessions that you initiate to hyper via ssh will only provide you with the facility to run commands/programs that use the terminal window itself for all input and output.  This includes commands such as cd, pwd, ls, grep, as well as command-line maple and command-line Matlab.  If you wish to use applications which "draw on the screen", such as kate, remotely---i.e. running on hyper, but displaying on your personal Windows machine---you can install the Xming package, per the following section.  Note that I cannot guarantee that the installation of Xming on any given system will be successful, but it you are using a laptop, I can try to assist you at the end of a lab session or, preferably, during my office hours (listed on the main course page).

When you set up your PuTTY connection to hyper be sure that you enable X11 forwarding.  See HERE for instructions.

XMing: (X11 server for Windows)

Installation of this free software on your PC/laptop running Windows will allow you to run an X server on your system (without installing Linux).  In particular, your will then be able to ssh into hyper.phas.ubc.ca and start up graphical applications such as kedit, xmaple etc., and the applications will appear on your Windows screen.  Performance won't be as good as it would be if you had Linux installed and were running applications locally, but provided that your network connection is sufficiently fast, it should suffice for you to do at least some of your homework and term project work outside of the computer lab.

The software can be downloaded from HERE, and there is additional documentation about installing and using it HERE

IMPORTANT!  Before you install XMing, you should install the PuTTY ssh-client (see above), which you will use to establish connections between your Windows machine and hyper.  During the process of installing Xming you will be presented with a Select Components dialog: choose the Normal PuTYY Link SSH client option.

Once you have installed Xming, and assuming you have placed an Xming icon on your desktop, you start the server simply by clicking on the icon (alternately, you can start Xming from the All Programs menu).  Once the server starts, you won't see any specific windows etc. associated with Xming, but an "X" icon should appear on the panel, indicating that it is running.  Right clicking on the icon will give you a pull-down menu that includes an option to exit the server.

Also, when using PuTTY in conjunction with Xming, you should ensure that any connections that you establish to hyper, or other machines on which you wish to run graphical applications, have X forwarding enabled; otherwise those applications (like kate or gnuplot) will not be able to display on your Windows system.  Note that PuTTY has a facility for saving and loading sessions (with the configuration settings saved as well), that you should learn how to use.

Again, see HERE for information on how to configure PuTTY for X forwarding.

Important note for Mac users wanting to run remote X11 applications  (kate, gedit ...)

Mac OS is a Unix-based system and comes with a terminal program that you should be able to locate in Applications -> Utilities (see e.g. HERE), and from which you should be able to initiate connections to remote machines via ssh. Providing that you invoke ssh with X forwarding enabled (using the -X or -Y options; see below), you should then be able to run graphically based applications, such as gedit, on the remote machine (e.g. hyper).

IMPORTANT! On newer versions of Mac OS-X, including 10.8 and 10.9 (Mountain Lion / Mavericks), you may need to download and install some additional software (XQuarz), and then configure your system so that X forwarding will work.  See HERE for instructions: once you have installed XQuarz, the specific command that you will need to execute to give hyper access to your display ("Add your remove [sic] server to host:") is
% sudo xhost + hyper.phas.ubc.ca
Irrespective of which version of Mac OS-X you are running, connect to hyper
% ssh -X hyper.phas.ubc.ca -l your-login-on-hyper
and if that doesn't appear to work (e.g. the kate window does not display when you start the editor on hyper), try using the -Y option instead of -X, i.e.
% ssh -Y hyper.phas.ubc.ca -l your-login-on-hyper

Installing command-line- and X11-based software on Max OS

There are several systems (essentially package managers) available that will allow you to install much of the open source software available for Linux on Mac OSX

See HERE for a list of some of the current possibilties.  Of those listed, I would recommend
  1. MacPorts
  2. fink
likely in than order. I have personal experience with fink, and it works reasonably well. MacPorts appears to be more actively supported/developed and is probably more user friendly than fink.

FileZilla

FileZilla is an application based on FTP (File Transfer Protocol) that will allow you to easily transfer files to and from your personal machine(s) and any machine, which includes hyper, that will allow an FTP connection. You can also accomplish these tasks using scp (pscp in PuTTY) but I think most of you will find FileZilla more convenient.

The software is available for Windows (all flavours), Mac OSX and Linux and the main download site is HERE.

Caution: Beware that if you do download from the main site, you will probably be offered additional software to install.  I recommend that you do not install any of it, at least not at that time that you install FileZilla.  It is therefore perhaps best to go directly to the download per se using one of the following links:

Note: For those of you using Linux, note that you should be able to use your package installer to install FileZilla; in fact it might even be installed already.  Use

% which filezilla

to see whether it is.

Once you have installed the application, open it and enter the following in the type-in fields at the top

  • Host: sftp://hyper.phas.ubc.ca
  • Username: your-login-name
  • Password: your-password (the one you use to access the lab machines)
  • Important:  Be sure to use sftp:// before hyper.phas.ubc.ca in the Host field.  If you simply use hyper.phas.ubc.ca, the application will try to connect using an unencrypted FTP connection, and hyper will refuse that.

Once you've connected, you'll see a view of the remote directory structure in the right pane of the app.  Here's a snapshot of a session open on my PC (don't tell the world that I actually run Windows from time-to-time!)

To transfer files:

  • Browse to the appropriate local folder on your personal machine (left pane, top part browses directories only, bottom part browses directories and displays regular files)
  • Browse to the appropriate remote folder on hyper (right pane, same comments re top/bottom parts)
  • Use drag-and-drop or double left-mouse clicks on the files that you want to transfer (either way)

It will probably be less confusing for you to always browse from the bottom subpanes.  Also note that the full path of the directories being viewed are shown in the Local site: and Remote site: widgets, and that you can type pathnames into those widgets rather than using the icon-based browsing facility.

Caution: Be particularly careful to browse to the correct destination directory on hyper.  For example, if you want to copy an image file to /phys210/$LOGNAME/public_html, start from /, then select phys210, then your login-named folder, then public_html.  It will be good practice (in two senses of the word) to have a shell window open to hyper (using PuTTY e.g.) while you do the transfers so that you can verify that the files are ending up where you want them to.

Linux

Should you wish, you can install a version of Linux on your laptop and/or home machine, and, if necessary, we can try to help you with the process.  Assuming that you are a Linux-newbie, Ubuntu is arguably the best choice for you: the default desktop will be different from that we will be using in the lab, but that shouldn't pose too much difficultly.

If your machine runs Windows Vista or 7:

If you want to install Linux on a PC/laptop that is running Windows Vista or 7, then it is usually a relatively easy process to perform the installation so that your computer is "dual-boot", i.e. so that, after the Linux install, you can boot into either Linux or your previous Windows installation as you wish.  

In the case of Ubuntu, an even more straightforward and less risky approach is to use Wubi, which will install Ubuntu more or less as a regular software package under Windows.  See HERE for instructions.

If your machine runs Windows 8:

Here, the situation is a little more challenging, especially if you're not comfortable with topics such as upgrading firmware on your computer, adjusting BIOS settings, configuring software and especially if you don't want to face the possibility of having to reinstall Windows and recover all of your personal files (which you will certainly want to back up before you make any : unless you're sure you know what you're doing, it's probably safest to talk to us about the

If you do attempt to install Linux in conjunction with Windows, (even if you are using the wubi approach), it is strongly recommended that you perform a backup before the install since, unfortunately, there's a reason Murphy's Law is called a "law"!  Moreover, we cannot assume responsibility for any files, data, etc. that you lose as a result of an installation attempt.

Maple

Maple is a commercial product, so if you wish to install it on a personal machine, you will have to purchase it (about $100). A link to the on-line store is HERE.  However, you certainly do not have to have your own copy to do the Maple work in this course.

IMPORTANT!  Once more, even if you have Xming installed on a Windows box (see below), or are using a Mac, do not expect to be able to effectively use xmaple remotely (i.e running on hyper, but displaying on your personal machine).  Xmaple simply requires too much information to be transmitted to the display to be handled by most people's home network setups.  Thus, expect that you will need to do your xmaple work in the computer lab.

Matlab

Matlab is also commercial software so you will need to purchase it should you want a personal copy  installed on your own machine.   Specially priced student versions are available from this MathWorks web site: Note that the Matlab Student (unbundled) version, which at $50 US is about half the price of the standard student offering, should suffice for the purposes of the course.

Octave

Octave is an open-source Matlab clone available for Linux and, provided that you have one of the package management systems mentioned above, Mac OSX.

Almost all of the Matlab that we study and use in the course will work on octave as well.

Maintained by choptuik@physics.ubc.ca.