This tutorial is really for the development on a Linux style operating system. If you are installing your development environment on Linux, you need to install Linux on a workstation or a laptop. Alternatively, you can install a virtual machine environment. Personally, I have found the virtual machine environment on windows to be a somewhat tedious environment to work in because (1) I prefer to work with multiple monitors, and (2) virtual machines partitions your hardware leading to poor performance on a workstation which is already not preferable to an MPI environment. As a result, if you are thinking of using a virtual machine, I would just suggesting getting used to development on development nodes of your cluster environment.
I do development on a OSX laptop most of the time, but at home I use an older PC that I have converted to a dedicated Linux machine. The computer is a 5 year old gaming rig, but is more than adequate for development purposes. The easiest way to do an installation is a USB installation to your computer.
In order to get familiarized with the UNIX operating system, I recommend the following tutorials.
Command Line, by Linux Journey
Text-Fu, by Linux Journey
Advanced Text-Fu, by Linux Journey
Permissions, by Linux Journey
Processes, by Linux Journey
Network Sharing, by Linux Journey [the only really essential section is File Sharing Overview with scp]
Unlike windows operating systems, the UNIX operating systems do not refer to devices directly (e.g. C:\, D:\). Instead all this information is abstracted from you. Unless you are administering a UNIX operating system, this is not important to you at this time. All directories roll up to a single point known as 'root' or '/', to go to the root of the filesystem, we can change directories using the command 'cd
'
$ cd /
Most of your work will be done in your home directory, where the shortcut is indicated by ~/
. You can move to your home directory with the command
$ cd ~/
At any time, you determine where you are in the file directory using the pwd
command, which stands for 'present working directory' and often referred to as the 'current working directory' or the 'current path'
$ pwd
/home/username
Directories can be added to your existing Making directories in your user directory.
mkdir ~/bin
mkdir ~/usr
mkdir ~/usr/local
mkdir ~/opt
mkdir ~/work
mkdir ~/repos
This sets up your local environment with a directory structure similar to the root operating system environment. Briefly, the ~/bin
directory will contain compiled binary executables (e.g. programs) or scripts written a scripting language. This consolidates the executables into one location.
The purpose of ~/usr
and ~/usr/local
are for object file libaries such as .so which would normally be in /usr
and /usr/local
if you had administrative control of the computer. However, it is often more convenient just maintain a local library than work out library problems with an administrator, particularly if your research environment doesn't have adequate administrator support.
The ~/opt
directory is often where I will put third party packages and applications.
The ~/work directory is where I organize my work for simulations.
You will need an editor to edit files. Since we predominantly work in Linux/Unix environments, this will require knowing an editor that works by Unix command line. I personally is the vi
editor.
http://soliton.ae.gatech.edu/classes/ae6382/documents/vi/ed03.pdf
Since we will be editing a lot of python files, it makes sense to modify your ~/.vimrc file to deal with editing of python files. A guide to the configuration of vim can be found here.
add the following line to your .bash_profile
file
export PATH=<home_directory>/bin:$PATH