Introduction To Computing

From MDWiki
Jump to navigationJump to search

Introduction

Hi there! This page is designed to give you a general introduction to computing at the MD lab. There are a number of topics.

General Policy

The computers are there to share. Anyone should be able to login to any computer, so please logout when you are not using the computer (within reason). Please don't switch off the computers. If there is a problem with the computer, such as the screen freezing, it is probably a problem with the network. If this occurs, please talk to a post-doc rather than just rebooting the computer. If the computer needs to be shutdown or rebooted, whether there is a problem or not, you should check to see if anyone is running a job on the computer using the top command and you should check to see if anyone is logged in using the who command.

Using Linux

Linux may be quite new to you, so a short introduction is provided here. Linux, like Microsoft Windows, is an Operating System, which means it is a priviledged program that manages the hardware and software on your computer. You will probably log on into a Graphical Desktop Environment such as GNOME, which should look similar to other Desktop Environments you have used in the past. The most important part of the Linux desktop is in fact a much older technology called the terminal. By selecting the Applications->Accessories (or Applicaitions->System Tools) menu you can click on the "Terminal" link, which brings up a Terminal emulator program, which runs, inside it, a shell (usually your shell is the program /bin/bash). This looks like this:

Terminal.png

Commands

Try running a command. ls <ENTER> will list the files in the current working directory. A good list of commands may be found [here].

Shells

There are different families of shells, such as /bin/tcsh, /bin/bash. The main different is the syntax used for shell scripts. Type echo $SHELL to work out which shell you have been given. A system administrator can change it for you.

Let's assume you are using bash. Whenever you login via SSH to a computer a special file called .bash_profile in your home directory (Type echo $HOME to see its location) is read, and the commands within it are run by the new shell instance. Whenever a new shell is created by opening a new Terminal window, a /different/ file (.bashrc) is similarly processed. This means that different commands may be run depending on how the shell is started.

Jobs on Workstations

The workstations are configured like the cluster which means that you can run jobs on them. To run a job on a workstation you don't need to use qsub, just execute the script directly in your shell. Please make sure that one core is free at all times (otherwise the person sitting in front of the computer will get poor performance). You can check what is running on the computer using the top command.

Jobs on Cluster