Getting started with linux
Download
1 / 39

Getting Started with Linux - PowerPoint PPT Presentation


  • 301 Views
  • Uploaded on

Getting Started with Linux Douglas Thain [email protected] University of Wisconsin, Computer Sciences Condor Project October 2000 Who are we? Mr. Douglas Thain ([email protected]) University of Wisconsin (Formerly University of Minnesota) I/O in widely distributed systems

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Getting Started with Linux' - JasminFlorian


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
Getting started with linux l.jpg

Getting Started with Linux

Douglas Thain

[email protected]

University of Wisconsin, Computer Sciences

Condor Project

October 2000


Who are we l.jpg
Who are we?

  • Mr. Douglas Thain ([email protected])

    • University of Wisconsin

    • (Formerly University of Minnesota)

    • I/O in widely distributed systems

  • Dr. Patrick Schelling ([email protected])

    • Argonne National Labs

    • (Formerly University of Minnesota)

    • Atomic modeling

  • Both resident at NCST October 15-27


Lectures and workshops l.jpg
Lectures and Workshops

  • “Getting Started with Linux”

    • Editing, compiling, and graphing on the new Linux machines.

  • “Condor by Example”

    • Managing 100s of jobs over weeks or months with Condor.

  • “Installing and Managing Condor”

    • Technical matters of running Condor.


Overview l.jpg
Overview

  • Lecture

    • Cluster Overview

    • What is Linux?

    • Software

  • Workshop

    • Logging In and Getting Help

    • Compiling a Program

    • Graphing Results


Linux cluster l.jpg
Linux Cluster

  • One large server

    • 800 MHz CPU, 512 MB memory, 20 GB disk

  • Five smaller client machines

    • 666 MHz CPU, 128 MB memory, 10 GB disk

  • All run the Linux operating system

  • Managed by Condor software


Cluster overview l.jpg
Cluster Overview

  • People may sit and work at any client.

  • Condor software will make use of clients that are not in use.

    • Jobs restarted after power failures.

    • Jobs moved to idle machines.

    • Jobs run in the middle of the night.

  • More about Condor at 2nd lecture.


Cluster overview7 l.jpg
Cluster Overview

Server

Work managed by Condor

Client

Client

Client

Client

Client


Cluster overview8 l.jpg
Cluster Overview

Server

Work managed by Condor

Client

Client

Client

Client

Client


Cluster overview9 l.jpg
Cluster Overview

Server

Work managed by Condor

Client

Client

Client

Client

Client


What is linux l.jpg
What is Linux?

  • Linux is a free operating system.

  • An operating system is the basic software which manages a computer.

    • Windows NT

    • Macintosh OS

  • Linux is a variant of the UNIX operating system.

    • Solaris

    • IRIX


Advantages of linux l.jpg
Advantages of Linux

  • Linux is free:

    • Price is zero.

    • Unlimited copies permitted.

    • Read and change source code.

  • Manuals are on-line.

  • Common in scientific circles.

  • Text interface is good for batch processing and management.


Disadvantages of linux l.jpg
Disadvantages of Linux

  • Text interface is not as user-friendly as Windows.

    • But, has StarOffice software which is looks much like Windows.

  • Less commercial software available.

    • But, more scientific software available.

  • More difficult to set up.

    • But, once set up, easy to manage.


Available software l.jpg
Available Software

  • Most software for Linux is also free!

  • The GNU project is the source of much free software: gcc, g77, emacs

  • Workshop will concentrate on these text-based programs.


Available software14 l.jpg
Available Software

  • Compilers:

    • G77 (FORTRAN 77)

    • Gcc ( C )

    • g++ (C++)

  • Text editors

    • Emacs

  • Typesetting

    • Troff, TeX

  • Graphing

    • Gnuplot


Available software16 l.jpg
Available Software

  • StarOffice provides a Windows-like environment:

    • Word processor

    • Spreadsheet

    • Overhead slide designer

  • Can load and save existing files created on a Windows computer.


Workshop l.jpg
Workshop

  • Logging In

  • Running a FORTRAN Program

  • Graphing and Printing Results

  • Managing Files

  • Logging Out



Create a shell window l.jpg
Create a Shell Window

  • Press the _____ button to create a shell window.

  • To move the window, grab the top.

  • To resize the window, grab the corners.


Create another l.jpg
Create Another

  • You will type commands into a shell.

  • If you like, you may do several things at once.

  • Make another shell and arrange them side by side.


Create a program l.jpg
Create a Program

  • Three steps to creating a program

    • Create a source file

    • Compile the source into a program

    • Run the program


Create a source file l.jpg
Create a Source File

  • Let’s write a simple FORTRAN program and store it in the file “simple.f”.

  • Type:

    • emacs simple.f &

  • In the new window, enter the simple program on the next page:


Create a source file24 l.jpg
Create a Source File

PROGRAM SIMPLE

REAL I

DO I=1, 100

PRINT *, I, SIN(I)*(I**2)

END DO

END

Important:

Indent 7 spaces

Type in all CAPITALS


Create a source file25 l.jpg
Create a Source File

  • When you are done typing, click “files” then “save buffer”.


Compile the source l.jpg
Compile the Source

  • Use the GNU FORTRAN 77 compiler to convert the source file into an executable program.

  • In the shell window, type:

    • g77 simple.f -o simple

Run the FORTRAN compiler.

Read the source from “simple.f”

Create the program in “simple”


Run the program l.jpg
Run the Program

  • Type ./ and the name of the program:

    • ./simple

  • It will display a table of x2sin(x) for all x from 1 to 100:

    1. 0.842470957

    2. 3.63718963

    3. 1.27007997


Saving the output l.jpg
Saving the Output

  • To save the output in a file:

    • ./simple > output

  • To look at the output later:

    • cat output

  • The output is very long! To look at it slowly:

    • cat output | more

  • To print out the output:

    • lpr output

  • To print out the source:

    • lpr simple.f


Graphing results l.jpg
Graphing Results

  • To graph the output of our simple program, start gnuplot and then direct it to the output file:

    • gnuplot

    • plot “output”

  • There are many different options for plotting:

    • plot “output” with lines

    • plot “output” with dots

  • When done plotting, quit gnuplot:

    • quit


Graphing results30 l.jpg
Graphing Results

  • To save a graph in a file:

    • gnuplot

    • set terminal postscript

    • set output “graph.ps”

    • plot “output”

    • Quit

  • To view the graph later:

    • gv graph.ps

  • To print the graph:

    • lpr graph.ps


Managing files l.jpg
Managing Files

  • To list files:

    • ls

  • To move files:

    • mv

  • To copy files:

    • cp

  • To remove files:

    • rm


Managing files32 l.jpg
Managing Files

  • Look at all your files:

    • ls

      simple.f simple output graph.ps

Source code

Output file

Saved graph

Compiled program


Managing files33 l.jpg
Managing Files

  • Try moving one file to another name:

    • mv output oldoutput

  • Now list again to see the results:

    • ls

      simple.f simple oldoutput graph.ps


Managing files34 l.jpg
Managing Files

  • Make a copy of the saved graph:

    • cp graph.ps graph2.ps

  • Now list again to see the results:

    • ls

      simple.f simple oldoutput graph.ps graph2.ps


Managing files35 l.jpg
Managing Files

  • Remove the output file: (be careful!)

    • rm oldoutput

  • Now list again to see the results:

    • ls

      simple.f simple graph.ps graph2.ps


Online manuals l.jpg
Online Manuals

  • Each of these commands has many different options. Use the “man” command to read online manuals:

    • man ls

    • man g77

  • If you don’t know exactly what command to use, use “apropos” to propose man pages:

    • man -k delete


Logging out l.jpg
Logging Out

  • When done, you must log out of the machine so others may use it.

  • Quit all open programs:

    • In gnuplot, type “quit”.

    • In emacs, select “files” then “exit”

    • In a shell window, type “exit”

  • Finally, press the “logout” button.


More things to try l.jpg
More Things to Try

  • The StarOffice tools:

    • soffice

  • Online manuals:

    • man ls

  • Help with gnuplot options:

    • gnuplot

    • help


Change to workshop l.jpg
Change to Workshop

  • Meet in room ____ at _____

  • Bring printouts to follow along.


ad