Computer lab for Physics 420/580
Physical access
There are two AICT-administered computer labs housed in CCIS rooms L1-150 and L1-207. These labs are equipped, respectively, with 34 and 26 desktop PCs running GNU/Linux, an open-source version of the Unix operating system. All the computers are installed with a common disk image, so the local setup and list of available software are identical from machine to machine. Students are welcome to use these computers to complete their labs, assignments, and projects. The rooms will be open 8:00 AM to 10:00 PM weekdays. Unfortunately, the proximity card reader on the door is not yet activated, so the room will not be accessible after hours.
Remote access
All your files reside in a home directory that is network-mounted using the Andrew
File System (afs). You have remote access to this storage space via
AICT's head login node, which is named gpu.srv.
ssh -l CCID gpu.srv.ualberta.ca CCID@gpu.srv.ualberta.ca's password: Last login: Tue Sep 13 16:24:39 2011 from 142.244.191.50 OpenBSD 4.1 (GENERIC) #1435: Sat Mar 10 19:07:45 MST 2007 ******************************************************************************* * Welcome to OpenBSD on the CNS login server. * * * * Help on the login server may be obtained through the following resources: * * * * WWW: http://www.ualberta.ca/HELP/GPU/ * * * * Email: helpdesk@ualberta.ca * * * * Phone: Help Desk 492-9400 * * * * NOTE: Changes have been made to the pine mail reader on login.srv * * that you will notice if you use pine - pine will ask for your * * password when you connect to the mail server. * ******************************************************************************* CCID@login1> env | grep SHELL SHELL=/bin/ksh CCID@login1>
Keep in mind that this
machine runs OpenBSD rather than Linux, and the default shell is ksh
instead of bash. It is also the case that most of the numerical
libraries we'll need are not installed, so compiling and executing your codes from
here may not be feasible. Still, gpu.srv is useful if you want
to move files to and from your storage space:
$ scp assignment1.tex CCIS@srv.gpu.ualberta.ca: $ scp CCIS@srv.gpu.ualberta.ca:assignment1.cpp .
It is not currently possible to gain remote access to individual machines in the lab. I'm looking into whether this can be changed.
C++ compilers for your own computer
There are many commercial C/C++ compilers available. There are also good alternatives that are completely free.
- If you have the Linux operating system on your machine, it's almost certain that you already have the GNU Compiler Collection (GCC) installed. Some of the Labs and Assignments also require OpenGL support, so you may want to check that you have the mesa, freeglut, and freeglut-development packages installed.
- If you are on a Mac, you're also in luck. The Macintosh operating
system is based on Unix, and GCC is the default compiler. Open the program
/Applications/Utilities/Terminal and type “g++” at the
prompt. If you see something like
$ g++ i686-apple-darwin9-g++-4.0.1: no input files
then the GNU C++ compiler is ready to go. If, however, you see$ g++ -bash: g++: command not found
then you'll have to install Apple's developer tools or acquireXcodefrom the Apps Store. - If you are a Windows user, a good option is to download Visual C++ Express, a stripped-down version of Microsoft Visual Studio. The full version is also available for a 90-day trial. You could also have a look at non-commerical freeware compilers and development environments, such as Dev-C++ and Code::Blocks. Another possibility is to access the GNU Compiler Collection by running Linux on your machine. The easiest way to get started with Linux is to install it inside a Virtual Machine or by booting from a live CD or USB stick. Alternatively, you could configure your machine to dual boot into Linux (somewhat complicated). It's also possible to run GCC under Cygwin, which is an emulation layer that provides parts of the Linux API to Windows.
- In the long term, the Low-Level Virtual Machine (LLVM) project is likely to supplant the established GNU compiler suite. LLVM is a new code generation framework that forms tha basis for an emerging set of open-source compilers. The LLVM C++ compiler is clang. While quality of the executables it produces is not yet comparable to g++, clang compiles code more quickly and tends to generate more useful (i.e., human-readable) error messages.