Information Technology Services Brett D. Estrade, LSU – High Performance Computing Phone: +1 225 578.

Slides:



Advertisements
Similar presentations
Unit 5 – User Administration Randy Marchany VA Tech Computing Center.
Advertisements

''Unix is user friendly -- It's just picky about who it's friends are...'' -- Unknown, seen in.sigs around the world.
Chapter Seven Unix Shell Environments1 System Programming UNIX Shell Environments.
More about Shells1-1 More about Shell  Shells (sh, csh, ksh) are m Command interpreters Process the commands you enter m High-level programming languages.
Linux+ Guide to Linux Certification, Second Edition
CS 497C – Introduction to UNIX Lecture 36: - Customizing the Environment Chin-Chih Chang
Guide To UNIX Using Linux Third Edition
Guide To UNIX Using Linux Third Edition
Introduction to Unix (CA263) Introduction to Shell Script Programming By Tariq Ibn Aziz.
Nic Shulver, Scripts and Batch files Scripting in Windows and Linux What is scripting? What is it for? DOS/Windows batch files.
Introduction to UNIX/Linux Exercises Dan Stanzione.
Welcome to CSE  Name: Di Cao   Classroom: DL357  Class Time: T 8:30am - 9:18am  Office.
UNIX command line. In this module you will learn: What is the computer shell What is the command line interface (or Terminal) What is the filesystem tree.
Introduction to Shell Script Programming
8 Shell Programming Mauro Jaskelioff. Introduction Environment variables –How to use and assign them –Your PATH variable Introduction to shell programming.
Week 7 Working with the BASH Shell. Objectives  Redirect the input and output of a command  Identify and manipulate common shell environment variables.
Shell Features CSCI N321 – System and Network Administration Copyright © 2000, 2005 by Scott Orr and the Trustees of Indiana University.
Introduction to Unix – CS 21 Lecture 9. Lecture Overview Shell description Shell choices History Aliases Topic review.
Session 2 Wharton Summer Tech Camp Basic Unix. Agenda Cover basic UNIX commands and useful functions.
UNIX/LINUX Shells Shell is an UNIX/LINUX command interpreter. Shell command can be internal or external. The code to execute an internal command is part.
Linux+ Guide to Linux Certification, Third Edition
Linux Operations and Administration
Linux+ Guide to Linux Certification Chapter Eight Working with the BASH Shell.
UNIX/LINUX SHELLS.  “A Unix shell is a command-line interpreter or shell that provides a traditional user interface for the Unix operating system and.
Introduction to Unix Shell & Scripting with csh/tcsh  Brief Unix History  Unix Shell & Flavor  CSH/TCSH Scripts.
HPC for Statistics Grad Students. A Cluster Not just a bunch of computers Linked CPUs managed by queuing software – Cluster – Node – CPU.
Unix/Linux cs3353. The Shell The shell is a program that acts as the interface between the user and the kernel. –The shell is fully programmable and will.
1 Applied CyberInfrastructure Concepts ISTA 420/520 Fall Nirav Merchant Bio Computing & iPlant Collaborative Eric Lyons.
Writing Scripts Hadi Otrok COEN 346.
Unix Shell Environments February 23rd, 2004 Class Meeting 6.
UNIX shell environments CS 2204 Class meeting 6 *Notes by Doug Bowman and other members of the CS faculty at Virginia Tech. Copyright
Lab 3 + Using the Terminal 1. "Under Linux there are GUIs (graphical user interfaces). where you can point and click and drag, and hopefully get work.
UNIX shell environments CS 2204 Class meeting 4 Created by Doug Bowman, 2001 Modified by Mir Farooq Ali, 2002.
Introduction to Programming Using C An Introduction to Operating Systems.
Lab 3 + Using the Terminal 1. "Under Linux there are GUIs (graphical user interfaces). where you can point and click and drag, and hopefully get work.
1 Day 18 Bash and the.files. 2 The.files ls shows you the files in your directory –Or at least most of them. –Some files are hidden. Try: ls –a –This.
Cluster Computing Applications for Bioinformatics Thurs., Sept. 20, 2007 process management shell scripting Sun Grid Engine running parallel programs.
Jozef Goetz, expanded by Jozef Goetz, 2006 Credits: Parts of the slides are based on slides created by textbook authors, Syed M. Sarwar, Robert.
Unix Advanced Shells Chapter 10. Unix Shells u Command Line Interpreter –once logged in, login gives control to a shell –it prompts for input, then parses,
Linux+ Guide to Linux Certification, Second Edition
Configuration your environment Many user-configurable Unix programs (such as your shell) read configuration files when they start up. These configuration.
Lesson 8-Specifying Instructions to the Shell. Overview An overview of shell. Execution of commands in a shell. Shell command-line expansion. Customizing.
Introduction to Parallel Computing Presented by The Division of Information Technology Computer Support Services Department Research Support Group.
NREL is a national laboratory of the U.S. Department of Energy, Office of Energy Efficiency and Renewable Energy, operated by the Alliance for Sustainable.
Linux Administration Working with the BASH Shell.
Agenda Customizing a Unix/Linux account Environment Introduction to Start-up Files (.bash_profile,.bashrc,.profile,.kshrc) Safe Methods for Changing Start-up.
INTRODUCTION TO SHELL SCRIPTING By Byamukama Frank
Introduction to the Linux Command Line Interface Research Computing Systems Bob Torgerson July 19, 2016.
Advanced Computing Facility Introduction
Unix Basics.
Development Environment Basics
Department of Computer Engineering
SUSE Linux Enterprise Desktop Administration
Introduction to Shells
Shell Features CSCI N321 – System and Network Administration
Bash Introduction (adapted from chapters 1 and 2 of bash Cookbook by Albing, Vossing, & Newham) CPTE 440 John Beckett.
CAP652 Lecture - Shell Programming
Unix Shells.
LINUX System : Lecture 5 (English-Only Lecture)
Shell Environments.
Introduction to computing
Paul Sexton CS 566 February 6, 2006
Telnet/SSH Connecting to Hosts Internet Technology.
Linux Shell Script Programming
Experience with the process automation at SORS
Unix Shell Environments
Quick Tutorial on MPICH for NIC-Cluster
Introduction to Bash Programming, part 3
Working in The IITJ HPC System
Presentation transcript:

Information Technology Services Brett D. Estrade, LSU – High Performance Computing Phone: Introduction to x86 Cluster Environment Brett D. Estrade

Information Technology Services Brett D. Estrade, LSU – High Performance Computing Phone: Objectives ● Get familiar with the shell and “environment” ● Understand the environment under the queue systems ● Learn to manipulate and control your environment ● Become familiar with the “SoftEnv” tool ● Realize that cluster environments are really no different than regular *nix environments.

Information Technology Services Brett D. Estrade, LSU – High Performance Computing Phone: Clusters ● Available: – eric.loni.org... (LSU); uses CCT/SuperMike Credentials – oliver.loni.org... (ULL); uses LONI Credentials ● In progress/testing – louie.loni.org... (Tulane); in testing phase – tezpur... (LSU HPC); no idea

Information Technology Services Brett D. Estrade, LSU – High Performance Computing Phone: Cluster Environments ● Every effort is made to maintain consistency across all clusters. ● All clusters use “SoftEnv” to manage the many available tools and libraries: – compilers (intel, pgi) – MPI implementations (MVAPICH 1&2, MPICH 1, etc) – Libraries (PETc, NetCDF, LINPACK, BLAS, etc)

Information Technology Services Brett D. Estrade, LSU – High Performance Computing Phone: Cluster Interaction ● One must login via a terminal interface to a head node: ssh ● One there, one must interact using the login shell directly. ● It is possible to get GUI apps to run from the head node and appear on your desktop, but this is an advanced feature that can be address if time permits... or in a more advanced tutorial.

Information Technology Services Brett D. Estrade, LSU – High Performance Computing Phone: What is the shell? ● The shell is a high level interface to the operating system for users ● This is “the prompt” that you get when you login ● Different shells are preferred different users, but they all provide the same access to the underlying OS /bin/bash/bin/tcsh/bin/ksh Operating System

Information Technology Services Brett D. Estrade, LSU – High Performance Computing Phone: How does it work? Command /bin/bash Low level cmd Operating System user ● User issues shell command ● The shell sends a lower level command to the OS ● The OS executes the command and returns any results back to the user via the shell

Information Technology Services Brett D. Estrade, LSU – High Performance Computing Phone: Features of the shell ● All modern, common shells provide typical language constructs (comparison, flow control, etc). ● A set of shell commands and constructs can be saved into a text file and be run as a program; these are called shell scripts. ● Shells can track global variables that are referred to as their “environment”.

Information Technology Services Brett D. Estrade, LSU – High Performance Computing Phone: What is the environment? ● The shell's environment is used to store useful system information; ● This information is stored as “environmental variables” ● Some variables are set when you first login; ● Other variables can be customized by the user using a specific set of files contained in their HOME directory

Information Technology Services Brett D. Estrade, LSU – High Performance Computing Phone: What is the environment? /bin/bash/bin/tcsh/bin/ksh Operating System PATH=/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin:/usr/java14/jre/bin:/ usr/java14/bin:/usr/ucb:/sbin:/usr/sbin:/usr/lib/instl:/usr/sbin/rsct/bin:/csm install/bin:/opt/csm/hpsnm/tools/bin:/usr/local/mgmt:/usr/lpp/LoadL/full/bin:/ usr/local/bin:/usr/opt/ifor/ls/os/aix/bin LOGIN=estrabd PWD=/home/estrabd HOME=/home/estrabd LOGNAME=estrabd..... Global Environment Local Environment Local Environment Local Environment

Information Technology Services Brett D. Estrade, LSU – High Performance Computing Phone: Viewing the environment ● View the entire environment $ env | more # common to all shells ● View a specific variable $ printenv VARNAME # common to all shells # or... $ echo ${VARNAME} # common to all shells

Information Technology Services Brett D. Estrade, LSU – High Performance Computing Phone: Notable environmental variables ● HOME – Your home directory ● PATH – List of colon delimited paths that should be searched for executables. ● LD_LIBRARY_PATH, LIBPATH (on IBM AIX) – Colon delimited list of paths to look for libraries (replaces -L when linking C or Fortran programs); Note: AIX prefers, LIBPATH ● LD_INCLUDE_PATH – Colon delimited list of paths to look for include files (- I when linking C or Fortran programs).

Information Technology Services Brett D. Estrade, LSU – High Performance Computing Phone: Not all shells are created equally ● Beware that different shells behave differently and have different commands for similar functionality ● The 2 common families – Bourne Shell: bash, ksh, zsh – C-Shell: csh, tcsh ● Bourne – Good as a login shell and as a basis for a program ● C-Shell – Good only as a login shell; avoid using it to program

Information Technology Services Brett D. Estrade, LSU – High Performance Computing Phone: Manipulating the environment ● Creating or modifying a global environmental variable: $ export VARNAME='value' # bourne shell $ setenv VARNAME 'value' # c-shell

Information Technology Services Brett D. Estrade, LSU – High Performance Computing Phone: PATH Variables ● use to store multiple paths used for automatically searching for executables, libraries, etc ● extra care must be taken when modifying these variables because in most cases you should simply add to the existing value $ export PATH=”/my/new/path:${PATH}” # bourne shell $ setenv PATH “/my/new/path:${PATH}” # c-shell

Information Technology Services Brett D. Estrade, LSU – High Performance Computing Phone: Automating environment set up ● When one logs in interactively, the system default environment is set using the following files: – /etc/profile ● for users of bash – /etc/csh.cshrc ● for users of c-shell ● These files automatically set up the default path and vital user system variables

Information Technology Services Brett D. Estrade, LSU – High Performance Computing Phone: Customizing the default environment ● /bin/bash users may create the following files in their home directory – ~/.bash_profile # run first after /etc/profile if exists** – ~/.bashrc # run after ~/.bash_profile if exists – ~/.profile # run after ~/.bashrc if exists ● /bin/bash users may also create a file that is executed when one logs out – ~/.bash_logout ** ~/.bash_profile must not produce any standard out, since it will break commands such rsync.

Information Technology Services Brett D. Estrade, LSU – High Performance Computing Phone: Customizing the default environment ● /bin/tcsh users may create the following files in their home directory ~/.cshrc # run first after /etc/csh.cshrc if exists;

Information Technology Services Brett D. Estrade, LSU – High Performance Computing Phone: Managing the environment with SoftEnv ● SoftEnv is a tool that allows one to manage the environment amid the variety of software tools and libraries offered in an HPC environment. ● Often times, these software packages might conflict with one another, so SoftEnv provides a fairly straightforward way to easily ensure that your environment is set up properly.

Information Technology Services Brett D. Estrade, LSU – High Performance Computing Phone: Using SoftEnv ● SoftEnv is automatically set up for users of all shells. ● By default, only the basic set of paths are provided; the user must customize the desired packages using his ~/.soft file.

Information Technology Services Brett D. Estrade, LSU – High Performance Computing Phone: User Environment and PBS ● Currently, SoftEnv is available under the batch environment; this means that your “~/.soft” file applies when you submit a job to the queue. ● To include the current environment in a PBS batch job, be sure the following directive is placed in the queue script: #PBS -V ● The “-V” option may also be passed in as an argument to “qsub” when submitting a queue script: %qsub -V my_batch_script.pbs

Information Technology Services Brett D. Estrade, LSU – High Performance Computing Phone: Interactive PBS ● Currently, SoftEnv is available under the batch environment; this means that your “~/.soft” file applies when you submit a job to the queue. ● To include the current environment in a PBS batch job, be sure the following directive is placed in the queue script: #PBS -V ● The “-V” option may also be passed in as an argument to “qsub” when submitting a queue script: %qsub -V my_batch_script.pbs ● And for to get an interactive PBS session with the current environment: %qsub -I -V -lnodes=2:ppn=4 -lwalltime=00:10:00

Information Technology Services Brett D. Estrade, LSU – High Performance Computing Phone: The ~/.soft file ● Used to tell SoftEnv what values to include in the environment ● The initial ~/.soft in everyone's home directory looks like the following: # # This is the.soft file. # It is used to customize your environment by setting up environment # variables such as PATH and MANPATH. # To learn what can be in this file, use 'man softenv'.

Information Technology Services Brett D. Estrade, LSU – High Performance Computing Phone: Adding packages to ~/.soft ● Determine what is available with the “softenv” command $ softenv ● Add the line, “+package_name” to the ~/.soft +package1 +package2.... ● To effect the changes, use the “resoft” command

Information Technology Services Brett D. Estrade, LSU – High Performance Computing Phone: Lab 1 1) Login to {eric,oliver,louie}.loni.org 2) Determine what shell you are using with “ps” % ps 3) View your environment with “env” % env | more 4) Note to what the variable, “PATH”, is set % printenv PATH 5) Set a global variable, “MYNEWVAR” % export MYNEWVAR=123 #bash # setenv MYNEWVAR 123 #tcsh

Information Technology Services Brett D. Estrade, LSU – High Performance Computing Phone: Lab 2 1) Run “env” under pbs % pbs -I -V -lnodes=1:ppn=4 -lwalltime=00:10:00...# let things initialize % env 2) Modify ~/.bashrc or ~/.cshrc, depending on your shell; log out and login again; determine if your changes have affected the environment

Information Technology Services Brett D. Estrade, LSU – High Performance Computing Phone: Additional resources ● ● ● ● ●

Information Technology Services Brett D. Estrade, LSU – High Performance Computing Phone: Free Windows Clients ● puTTY (interactive terminal) ● WinSCP (file transfer) ● OpenSSH via Cygwin (also facilitates X11 forwarding)

Information Technology Services Brett D. Estrade, LSU – High Performance Computing Phone: Local Resources ● ● ● Help: – –