Getting started: Basics Outline: I.Connecting to cluster: ssh II.Connecting outside UCF firewall: VPN client III.Introduction to Linux IV.Intoduction to.

Slides:



Advertisements
Similar presentations
Linux, it's not Windows A short introduction to the sub-department's computer systems Gareth Thomas.
Advertisements

Learning Unix/Linux Bioinformatics Orientation 2008 Eric Bishop.
Cosc 4750 Getting Started in UNIX Don’t be afraid of the prompt, in linux it can be your best friend. In some cases, the only way to do certain things.
Dayu Zhang 9/8/2014 Lab02. Example of Commands pwd --- show your current directory This is home of venus, not your home directory Tilde: means you are.
CSCI 1411 FUNDAMENTALS OF COMPUTING LAB Lab Introduction 1 Shane Transue MSCS.
Introduction to UNIX Working in a multi-user environment.
Getting Started with Linux Douglas Thain University of Wisconsin, Computer Sciences Condor Project October 2000.
Introducing the Command Line CMSC 121 Introduction to UNIX Much of the material in these slides was taken from Dan Hood’s CMSC 121 Lecture Notes.
Working Environment - - Linux - -.
Basic linux shell commands and Makefiles. Log on to engsoft.rutgers.edu Open SSH Secure Shell – Quick Connect Hostname: engsoft.rutgers.edu Username/password:
CS1020: Intro Workshop. Topics CS1020Intro Workshop Login to UNIX operating system 2. …………………………………… 3. …………………………………… 4. …………………………………… 5. ……………………………………
Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect 4P. 1Winter Quarter Introduction to UNIX.
Prof. R. Willingale Department of Physics and Astronomy 2nd Year C+R 2 nd Year C and R Workshop Part of module PA2930 – 2.5 credits Venue: Computer terminal.
A crash course in njit’s Afs
L INUX C OMMAND L INE I NTERFACE G UNAANBAN.G
Using Macs and Unix Nancy Griffeth January 6, 2014 Funding for this workshop was provided by the program “Computational Modeling and Analysis of Complex.
The Unix Environment and Compiling. Getting Set Up Your programs will be compiled and tested on the Departmental server ‘linprog’ The linprog servers.
Help session: Unix basics Keith 9/9/2011. Login in Unix lab  User name: ug0xx Password: ece321 (initial)  The password will not be displayed on the.
Unix Primer. Unix Shell The shell is a command programming language that provides an interface to the UNIX operating system. The shell is a “regular”
Linux environment ● Graphical interface – X-window + window manager ● Text interface – terminal + shell.
IPC144 Introduction to Programming Using C Week 1 – Lesson 2
1 SEEM3460 Tutorial Unix Introduction. 2 Introduction Unix-like system is everywhere Linux Android for smartphones Google Chrome OS for Chromebook Web.
AN INTRO TO UNIX/LINUX COMMANDS BY: JIAYANG WANG.
The UNIX development environment CS 400/600 – Data Structures.
1 Editing a C Program 01/16/15. 2 Objective Use Linux to edit, compile and execute a C program.
Session 2 Wharton Summer Tech Camp Basic Unix. Agenda Cover basic UNIX commands and useful functions.
1 Lab 2 “Hello world” in Unix/Linux #include "std_lib_facilities_4.h" int main(){ cout
1 Operating Systems and Using Linux Topics What is an Operating System? Linux Overview Frequently Used Linux Commands Some content in this lecture added.
1 Operating Systems and Using Linux Topics What is an Operating System? Linux Overview Frequently Used Linux Commands Reading None.
Introduction to UNIX Geraint Vaughan. What is UNIX? Command-line operating system (not point- and click) Designed for ‘experts’ Lots of different variants.
Unix and Samba By: IC Labs (Raj Kidambi). What is Unix?  Unix stands for UNiplexed Information and Computing System. (It was originally spelled "Unics.")
Text Editing February 2 nd, 2004 Class Meeting 3.
1May 16, 2005 Week 2 Lab Agenda Command Line FTP Commands Review More UNIX commands to learn File name expansion - * Introduction of vi.
Week 8: Linux / ubuntu Dr. I. H. Shah. / CSCS 301 Fall 2009.
Introduction to Programming Using C An Introduction to Operating Systems.
More on Using onyx 8/28/13. Program 1 Due a week from today. See website for details.
Unix Servers Used in This Class  Two Unix servers set up in CS department will be used for some programming projects  Machine name: eustis.eecs.ucf.edu.
1 Getting Started with C++ Part 2 Linux. 2 Getting Started on Linux Now we will look at Linux. See how to copy files between Windows and Linux Compile.
AN INTRO TO UNIX/LINUX COMMANDS BY: JIAYANG WANG.
CSE 1320 Basics Dr. Sajib Datta
Dr. Sajib Datta Jan 16,  The website is up.  Course lectures will be uploaded there ◦ Check regularly for assignments and update.
CS 120 Extra: The CS1 Server Tarik Booker CS 120.
Learning Unix/Linux Based on slides from: Eric Bishop.
INTRODUCTION TO SHELL SCRIPTING By Byamukama Frank
Assignprelim.1 Assignment Preliminaries © 2012 B. Wilkinson/Clayton Ferner. Modification date: Jan 16a, 2014.
CMSC 104, Version 9/011 Operating Systems and Using Linux Topics What is an Operating System? Linux Overview Frequently Used Linux Commands Reading None.
Review Why do we use protection levels? Why do we use constructors?
Tutorial Six Linux Basics CompSci Semester Two 2016.
Precept I : Lab Environment, Unix, Bash, Emacs
UNIX To do work for the class, you will be using the Unix operating system. Once connected to the system, you will be presented with a login screen. Once.
First Day in Lab Making a C++ program
Tutorial of Unix Command & shell scriptS 5027
CS1010: Intro Workshop.
Development Environment Basics
Getting started with CentOS Linux
Tutorial Six Recap & Linux Basics CompSci Semester Two 2016.
UNIX The Basics Source:
Andy Wang Object Oriented Programming in C++ COP 3330
Some Linux Commands.
Tutorial of Unix Command & shell scriptS 5027
Tutorial of Unix Command & shell scriptS 5027
Operating Systems and Using Linux
Operating Systems and Using Linux
Tutorial of Unix Command & shell scriptS 5027
Run Java file with Window cmd
Getting started with CentOS Linux
Andy Wang Object Oriented Programming in C++ COP 3330
UNIX/LINUX Commands Using BASH Copyright © 2017 – Curt Hill.
Module 6 Working with Files and Directories
Video Notes.
Presentation transcript:

Getting started: Basics Outline: I.Connecting to cluster: ssh II.Connecting outside UCF firewall: VPN client III.Introduction to Linux IV.Intoduction to vi text editor-- other options V.Basics of F90 programming VI.Start for class project #1

I. Connecting to cluster: ssh 1.MAC OSX-- Unix environment! a) open up a terminal window b) ssh -l student c) password 2. Windows-- putty utility a) b) Download and install putty c) Use putty to ssh to cluster, IP address above

II. Connecting outside UCF firewall: VPN client 1. First go to the NOC page 2. Then log on to the NOC intranet with your PID and myucf password 3. Click on VPN link to download and install VPN client Then…. 1.First open VPN client, and then log on to VPN server 2. Finally you can ssh to cluster as in preceding slide

III. Introduction to Linux 1.Linux is an operating system similar to UNIX 2.Graphical interfaces exist, but we will just use text-based 3.After ssh to cluster… password: student]$ ls 4. The ls command shows the contents of the directory group1 group2 group3 group4 group5 group6 rs.f student]$ cd group1 group1]$ ls group1]$ Directory is empty! It has no files or subdirectories.

Creating a new directory… 1.Let’s create a new directory for project #1 2.From your bash shell group1]$mkdir proj1 group1]$ ls proj1 group1]$ cd proj1 proj1]$ ls proj1]$ Again new directory is empty! We will place source code for project #1 here.

Moving files around… copying 1.Rather than clicking and dragging, we need the cp command to create duplicate files 2. In the student top directory, you will need rs.f for the first project 3. Copy this file to student/group1/proj1 in the following way: proj1]$ cd../../ student]$ ls group1 group2 group3 group4 group5 group6 rs.f student]$ cp rs.f group1/proj1 proj1]$ cd group1/proj1 proj1]$ ls rs.f proj1]$ The subroutine rs.f is where you need it for your first project!

Moving files around… moving 1.Like cp, the mv command is for manipulating files 2.The mv command eliminates the original file however Uses…moving to a new directory student]$ mv rs.f../ patrick]$ ls patrick]$ cd../ patrick]$ ls proj1 rs.f patrick]$ mv rs.f proj1 patrick]$ cd proj1 patrick]$ ls rs.f

Moving files around… moving Uses…renaming a file proj1]$ mv rs.f rs1.f proj1]$ ls rs1.f proj1]$ mv rs1.f rs.f proj1]$ ls rs.f In contrast, if we had used cp proj1]$ cp rs.f rs1.f proj1]$ ls rs1.f rs.f proj1]$

Removing files… and being careful! proj1]$ rm rs1.f rm: remove `rs1.f'?y proj1]$ ls rs.f proj1]$ If we didn’t want to be prompted… proj1]$ rm -f rs1.f proj1]$ ls rs.f proj1]$ For removing directories, they must first be empty of any other files, then use the rmdir command

IV. Introduction to vi text editor-- other options 1.The simple vi is easy to use and surprisingly powerful 2.Some people hate it so we have other options Let’s start our new computer project with rs.f as the starting point… proj1]$ cp rs.f prog1.f proj1]$ ls prog1.f rs.f proj1]$ vi prog1.f double precision function pythag(a,b) double precision a,b c c finds dsqrt(a**2+b**2) without overflow or destructive underflow Etc……

Command mode and insert mode 1.The vi editor starts in the command mode 2.Arrow keys move cursor around the file 3.Insert mode accessed by typing “i” 4.In the insert mode, text can be inserted into file 5.Return to command mode with Esc Let’s insert a couple of lines into prog.f… 1.Go to top of file prog.f, type “i” for insert 2.Use “return” to get a blank line at top of file 3.Enter program name and end statement: PROGRAM prog.f END PROGRAM prog.f 4. Return to command mode with Esc

Saving the file you edit, prog1.f… 1.From the command mode, we need to write the changes to file… :w 2. Then to quit and go back to the bash shell :q 3. We could’ve written and quit in one command :wq 4. To quit without saving changes :q!

Compiling an F90 source code… 1.Assuming we had a code to compile… which we don’t yet, we can compile and create an executable 2. The F90 compiling is invoked using… proj1]$ ifort -o prog1 prog1.f proj1]$ ls prog1 prog1.f 3. If we didn’t name the executable with the -o option, proj1]$ ifort prog1.f proj1]$ ls a.out prog1.f

To run the executable…. and redirecting output proj1]$./prog1 1. Running the executable prog1 is done with 2. If code has output to the screen, you will see the output as it comes 3. Often it is good to redirect output to a file that can be viewed or analyzed later on. To do this, proj1]$./proj1 > output 4. To view the output, we can type proj1]$ vi output

V. Basics of F90 programming PROGRAM program-name IMPLICIT NONE [specification part] [execution part] [subprogram part] END PROGRAM program-name Define variables, constants, arrays The program code! Subroutines (e.g. matrix diagonalization)

Specification part-- variables type-specifier :: list * INTEGER : the variables in list can hold integers * REAL: the variables in list can hold real numbers * COMPLEX: the variables in list can hold complex numbers * LOGICAL: the variables in list can hold logical values (i.e., true or false) * CHARACTER: the variables in list can hold character strings INTEGER :: I, j, n, ntotal, naverage REAL :: Hamil, Q, Energy, Z CHARACTER(2) :: Element Examples:

Specification part-- variable arrays type-specifier, Dimension() :: list Examples: REAL, DIMENSION(10) :: a, b, c REAL, DIMENSION(10,10) :: H In this example, everything is declared as real variables. Each of a, b, and c are one-dimensional arrays of length 10. In contrast, H is a two-dimensional array which is 10x10. In other words, a, b, and c are like vectors, and H is a matrix!