Download presentation
Presentation is loading. Please wait.
1
Getting Started with Linux Douglas Thain thain@cs.wisc.edu University of Wisconsin, Computer Sciences Condor Project October 2000
2
Who are we? Mr. Douglas Thain (thain@cs.wisc.edu) University of Wisconsin (Formerly University of Minnesota) I/O in widely distributed systems Dr. Patrick Schelling (schelling@anl.gov) Argonne National Labs (Formerly University of Minnesota) Atomic modeling Both resident at NCST October 15-27
3
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.
4
Overview Lecture Cluster Overview What is Linux? Software Workshop Logging In and Getting Help Compiling a Program Graphing Results
5
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
6
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.
7
Cluster Overview Server Client Work managed by Condor
8
Cluster Overview Server Client Work managed by Condor
9
Cluster Overview Server Client Work managed by Condor
10
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
11
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.
12
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.
13
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.
14
Available Software Compilers: G77 (FORTRAN 77) Gcc ( C ) g++ (C++) Text editors Emacs Typesetting Troff, TeX Graphing Gnuplot
16
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.
18
Workshop Logging In Running a FORTRAN Program Graphing and Printing Results Managing Files Logging Out
19
Logging In
20
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.
21
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.
22
Create a Program Three steps to creating a program Create a source file Compile the source into a program Run the program
23
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:
24
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
25
Create a Source File When you are done typing, click “files” then “save buffer”.
26
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”
27
Run the Program Type./ and the name of the program:./simple It will display a table of x 2 sin(x) for all x from 1 to 100: 1. 0.842470957 2. 3.63718963 3. 1.27007997 …
28
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
29
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
30
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
31
Managing Files To list files: ls To move files: mv To copy files: cp To remove files: rm
32
Managing Files Look at all your files: ls simple.f simple output graph.ps Source code Compiled program Output file Saved graph
33
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
34
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
35
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
36
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
37
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.
38
More Things to Try The StarOffice tools: soffice Online manuals: man ls Help with gnuplot options: gnuplot help
39
Change to Workshop Meet in room ____ at _____ Bring printouts to follow along.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.