NEEShub Simulation Capabilities February 17, 2012 Webinar George E Brown, JR. Network for Earthquake Engineering Simulation.

Slides:



Advertisements
Similar presentations
Utilizing the GDB debugger to analyze programs Background and application.
Advertisements

Getting Started: Ansoft HFSS 8.0
High Volume Batch Submission System for Earthquake Engineering ( Batchsubmit ) By Anup Thomas Hacker Gregory Rodgers.
JUAN M. CAICEDO UNIVERSITY OF SOUTH CAROLINA USING SAP2000 ON NEESHUB 1.
ISG We build general capability Job Submission on the Olympus Cluster J. DePasse; S. Brown, PhD; T. Maiden Pittsburgh Supercomputing Center Public Health.
CS Lecture 03 Outline Sed and awk from previous lecture Writing simple bash script Assignment 1 discussion 1CS 311 Operating SystemsLecture 03.
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.
Sun Grid Engine Grid Computing Assignment – Fall 2005 James Ruff Senior Department of Mathematics and Computer Science Western Carolina University.
Guide To UNIX Using Linux Third Edition
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.
Snippet Management The following screens demonstrate how to: 1. Access and view snippets 2. Create a local standard snippet, or a local class snippet 3.
Using Macs and Unix Nancy Griffeth January 6, 2014 Funding for this workshop was provided by the program “Computational Modeling and Analysis of Complex.
Shell Programming, or Scripting Shirley Moore CPS 5401 Fall August 29,
Introduction to UNIX/Linux Exercises Dan Stanzione.
COMP1070/2002/lec4/H.Melikian COMP1070 Lecture #5  Files and directories in UNIX  Various types of files  File attributes  Notion of pathname  Commands.
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”
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.
Lesson 7-Creating and Changing Directories. Overview Using directories to create order. Managing files in directories. Using pathnames to manage files.
WorkPlace Pro Utilities.
Introduction to Shell Script Programming
Objectives Understand what MATLAB is and why it is widely used in engineering and science Start the MATLAB program and solve simple problems in the command.
Chapter Four UNIX File Processing. 2 Lesson A Extracting Information from Files.
– Introduction to the Shell 10/1/2015 Introduction to the Shell – Session Introduction to the Shell – Session 2 · Permissions · Users.
Copyright © 2007, Oracle. All rights reserved. Managing Concurrent Requests.
Bigben Pittsburgh Supercomputing Center J. Ray Scott
9 Chapter Nine Compiled Web Server Programs. 9 Chapter Objectives Learn about Common Gateway Interface (CGI) Create CGI programs that generate dynamic.
Introduction to Unix – CS 21 Lecture 9. Lecture Overview Shell description Shell choices History Aliases Topic review.
OpenSees on NEEShub Frank McKenna UC Berkeley. Bell’s Law Bell's Law of Computer Class formation was discovered about It states that technology.
Page 1 Simulation in NEEShub NEES & MCEER Annual Meeting 2011 Session #11: High Performance Computing and Simulation Gregory P. Rodgers Ph.D. NEESComm.
Shell Script Programming. 2 Using UNIX Shell Scripts Unlike high-level language programs, shell scripts do not have to be converted into machine language.
Session 2 Wharton Summer Tech Camp Basic Unix. Agenda Cover basic UNIX commands and useful functions.
Linux Operations and Administration
CS465 - UNIX The Bourne Shell.
Write-through Cache System Policies discussion and A introduction to the system.
Agenda Link of the week Use of Virtual Machine Review week one lab assignment This week’s expected outcomes Review next lab assignments Break Out Problems.
Lesson 2-Touring Essential Programs. Overview Development of UNIX and Linux. Commands to execute utilities. Communicating instructions to the shell. Navigating.
Chapter 3 MATLAB Fundamentals Introduction to MATLAB Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Chapter Five Advanced File Processing. 2 Lesson A Selecting, Manipulating, and Formatting Information.
NEES Cyberinfrastructure Center at the San Diego Supercomputer Center, UCSD George E. Brown, Jr. Network for Earthquake Engineering Simulation NEES TeraGrid.
Introduction to Programming Using C An Introduction to Operating Systems.
Lesson 3-Touring Utilities and System Features. Overview Employing fundamental utilities. Linux terminal sessions. Managing input and output. Using special.
Linux Commands C151 Multi-User Operating Systems.
Trinity College Dublin, The University of Dublin GE3M25: Computer Programming for Biologists Python Karsten Hokamp, PhD Genetics TCD, 03/11/2015.
CS 245 – Part 1 Using Operating Systems and Networks for Programmers Jiang Guo Dept. of Computer Science California State University Los Angeles.
Introducing Dreamweaver. Dreamweaver The web development application used to create web pages Part of the Adobe creative suite.
Lecture 02 File and File system. Topics Describe the layout of a Linux file system Display and set paths Describe the most important files, including.
HUBbub 2013: Developing hub tools that submit HPC jobs Rob Campbell Purdue University Thursday, September 5, 2013.
1 Introduction to Unix. 2 What is UNIX?  UNIX is an Operating System (OS).  An operating system is a control program that helps the user communicate.
Lesson 6-Using Utilities to Accomplish Complex Tasks.
Advanced topics Cluster Training Center for Simulation and Modeling September 4, 2015.
Linux Tutorial Lesson Two *Getting Help in Linux *Data movement and manipulation *Relative and Absolute path *Processes Note: see chapter 1,2,3 from Linux.
Active-HDL Server Farm Course 11. All materials updated on: September 30, 2004 Outline 1.Introduction 2.Advantages 3.Requirements 4.Installation 5.Architecture.
CS 120 Extra: The CS1 Server Tarik Booker CS 120.
Linux Administration Working with the BASH Shell.
Introduction to Scripting Workshop February 23, 2016.
FILES AND EXCEPTIONS Topics Introduction to File Input and Output Using Loops to Process Files Processing Records Exceptions.
Assignprelim.1 Assignment Preliminaries © 2012 B. Wilkinson/Clayton Ferner. Modification date: Jan 16a, 2014.
Advanced Computing Facility Introduction
GRID COMPUTING.
Chapter 11 Command-Line Master Class
SQL and SQL*Plus Interaction
Andy Wang Object Oriented Programming in C++ COP 3330
The Linux Operating System
INTRODUCTION TO UNIX: The Shell Command Interface
Printer Admin Print Job Manager
Andy Wang Object Oriented Programming in C++ COP 3330
Linux Shell Script Programming
CSE 303 Concepts and Tools for Software Development
Presentation transcript:

NEEShub Simulation Capabilities February 17, 2012 Webinar George E Brown, JR. Network for Earthquake Engineering Simulation Gregory Rodgers Ph.D. NEESComm IT Purdue University, West Lafayette, IN Post-webinar updates

Webinar Introduction Audience Simulation tool developers and NEES power users who: have a very large simulations or many simulations in excess of 30 minutes run time. need to script parameter sweeps run a structure analysis with a large suite of ground motions. Prerequisite An understanding of command line interfaces such as Linux bash Summary This webinar will introduce advanced users to new NEEShub capabilities in the area of simulation and batch processing. Power users often write a script to orchestrate a set of simulation runs to cover many different test cases. Recent batch processing services have been added to NEEShub to make this easy and to provide access to large scratch space. Upon completion of this webinar, a user will be able to write scripts to submit one or more jobs to multiple execution venues to utilize high performance computing resources available to NEES

Agenda HOUR 1 How Simulation fits into the NEES CyberInfrastructure Introduction to the linux workspace tool on NEEShub Manual execution (command line) of applications. Manual execution (command line) of the opensees simulator Use of the new batchsubmit command to run opensees Use of batchsubmit to run other applications The batchstatus command Demonstration of how HOME directory space is linked to scratch space. Advanced batchsubmit options and scripting the execution of batchsubmit. HOUR 2 (advanced) How to build a bash command file including editors available on Linux Simple parallel execution (The --ncpus argument to batchsubmit) Parallel opensees (how to modify sequential input to be parallel input) How to use batchsubmit for other venues. Overview of various NEES execution High Performance Computing (HPC) venues: They are local hub execution, osg, hansen, steele, kraken, and ranger, How does the openseeslab user interface use batchsubmit Advanced batchsubmit options review Scratch cleanup algorithm

NEES Cyber Infrastructure Web Browser Purdue Hansen Open Science Grid NSF Xsede A.Site Operations Tools B. NEESHub Web Server E. EOT F. Spreadsheet DBs Scratch Space NE Group Space Personal Space Hub Tool Sessions C. Cloud / Simulation Environment Synchronees site/personal data NEES Web Services Server PEN Custom WS tools Experiment Data Project Editor Resources Collaboration D. The NEES Project Warehouse

Introduction to the linux workspace tool on NEEShub. Start a workspace from this page Click “Launch” You must be part of a special group. If you are not in this group, open a ticket stating that you need workspace access, provide justification, and we will add you to the group. The window can be resized and popped out of the browser. Multiple terminals can be opened in the same window. A workspace session is persistent. You can leave the browser and you can get back to existing workspace from myneeshub page at any time. This session can also be shared with other users or administrators.

Execution of Applications from the command line Simple utilities datePrint the date envList environment variables ls (and ls –l) Show list of files (long list) cdChange working directory pwdShow working directory mkdirmake a directory rm (rmdir)Remove a file (directory) cat Write contents of file on the screen cpCopy a file man Show help about a command (man pages) exitTeminate your session Use Arrow keys get previous commands

Putting commands in a script file A list of commands can be put into a script – Avoid retyping – Loop through commands – To make executable use command: chmod important scripting languages to consider bash linux commands, also csh Tcl/Tk The language for opensees Python Advanced high performance language

Manual Execution of OpenSees Opensees tcl prompt verses Linux command prompt Start opensees with a tcl prompt (no argument) Start opensees to execute a file of tcl commands. ( one argument) The binary OpenSees verses the wrapper shell called opensees opensees The spelling of the OpenSees binary is OpenSees, but opensees is a wrapper to call OpenSees that sets up the environment correctly.

High Volume Batch on NEEShub Consistent and asynchronous submission to multiple venues: local, osg, steele, hansen, kraken. The last three are part of the new xsede system that replaces Teragrid. Asynchronous: job is submitted without waiting for job to complete before returning control to submitter. Your run directories in $HOME/scratch will be symbolic links to a large (>30TB) shared space. Runs will be compressed or purged with a cleanup algorithm as needed. Only user will have access to run directories

batchsubmit The batchsubmit command is a wrapper around any command to execute an asynchronous batch job. batchsubmit command batchsubmitoptions begin with a double dash. batchsubmit prints one line of output: the name of the newly created directory where BOTH job input is located and output will be found. The help for batchsubmit gives an example of how to run opensees batchsubmit –h batchsubmit –h | more batchsubmit date batchsubmit opensees /apps/demo/sine/sine.tcl batchsubmit –appdir /apps/openseesbuild/osg OpenSees /apps/demo/sine/sine.tcl batchsubmit –jo btype sine –onlyinfile opensees /apps/demo/sine/sine.tcl

Input Processing Default: The first argument after the application command is considered an input file. All files from this directory are copied to the scratch run directory. Two other options: --onlyinfile Only copy the input file --rcopyindir Recursive copy all files and directories from the same directory as the inputfile. Note: input file not allowed to be home directory unless –onlyinfile specified.  You should create a directory for your opensees tcl file. Recommend a dir for each simulation. What if you have an application where the first argument is NOT the input file (unlike opensees)? --infilearg Indicates which argument is the input file --infile Use this file as an input file where this file is implied by application command hence not one of its arguments.

Job input exists in new scratch directory upon completion of the batchsubmit command. One scratch directory for each batchsubmit command (each job). The directory name has this template. $HOME/scratch/ / / Job output exists when the job is completed. –You will get an when job starts and when job completes unless you specify – nonotify Review the various output files generated in a job run directory.stdout Standard output. What would be printed to screen.stderr Standard error. The run directory Same directory name where the input file was found. Note: your input file is in this joblogInteresting info about the environment job was run.logStatistics recorded about this job.born_on_dateUsed for scratch cleanup. batchsubmit files/dirs

Job lifecycle System uses the to store the job status. States: Presubmit – only for remote venues Submitted – Waiting to start. Only for remote venues. Started – application is running. Remote venues will actually update this file Completed – All results are returned. Deleted – Job has been removed from the shared scratch space but your scratch directory still shows it. Saved – Job was moved to your HOME directory. Symbolic link to shared scratch space is gone. Job is taking up your quota when it is saved.

batchstatus and batchcancel Other batchsubmit utilities batchstatus – shows the status of each of your jobs. batchcancel – Cancel a job. This command is not released yet. batchsave – Remove a job from scratch space and save it to your HOME directory space.

NEEShub Disk Space NEEShub data locations: HOME space Groups Space Scratch space Warehouse Use of synchronees to upload and download between your workstation and NEEShub spaces Advice: Use relative names for input and output files so your job can run on venues other than “local” Scratch Space NE Group Space HOME Space batchsubmit Synchronees workstation data webdav /home/neeshub/ /data/groups/ $HOME/scratch /nees/home/

Advance batchsubmit options --wait Only for venues local and osg. This option will hold the completion of batchsubmit until the job is COMPLETED. Standard output and standard error will be printed on the screen. --appdir A Directory containing the application with bin and lib subdirs. The app_command must be in appdir/bin subdirectory. Both bin and lib directories are sent to execution machine for every run. So be careful not to specify a large installed application directory. This option eliminates need to install apps on venues other than local. See your application provider. --envars List of environment variables separated by commas. Only specify names here, values must be set before calling the batchsubmit command thus allowing special characters. For local execution, all environment variables are commuted.

HOUR 2 Agenda Simple parallel execution (The --ncpus argument to batchsubmit) Parallel opensees (how to modify sequential input to be parallel input) How to use batchsubmit for other venues. Overview of various NEES execution High Performance Computing (HPC) venues: Local Use for testing small jobs less than 4 hours ncpus<16 osgUse for many moderate size jobs. ncpus=1 hansen Use for large parallel jobsncpus<=48 SteeleUse for many parallel jobsncpus<=8 kraken and ranger (pending) Advanced batchsubmit options and scripting the execution of batchsubmit. Building bash scripts to save typing. Scratch cleanup algorithm

Simple Parallel Execution --ncpus The above options will cause your application command to execute times in parallel. Example: batchsubmit –ncpus 4 date What good is it to run the same thing ncpus times? None, unless your application is aware that it is running in parallel. A parallel aware application will only do 1 Nth the amount of work, knowing that the other processors will do the other parts of the work. It is not hard to make your application become parallel aware especially with a scripting language like TCL.

Simple Parallel Execution Example: Run the same model through 27 ground motions. We want to divide the ground motions among 8 processors, PID = 0..7 P0P1P2P3P4P5P6P /* If PID is processor number, then this can be run on all 8 processors */ For count = 0 to 26 if (count % 8) == PID then /* % gets remainder from division */ Do analysis for ground motion #count. else skip end

set pid [getPID] set numP [getNP] set count 0; source ReadRecord.tcl set g foreach scaleFactor { } { foreach gMotion [glob -nocomplain -directory GM *.AT2] { if {[expr $count % $numP] == $pid} { source model.tcl source analysis.tcl set ok [doGravity] loadConst -time 0.0 if {$ok == 0} { set gMotionName [string range $gMotion 0 end-4 ] ReadRecord./$gMotionName.AT2./$gMotionName$scaleFactor.dat dT nPts timeSeries Path 1 -filePath $gMotionName$scaleFactor.dat -dt $dT -factor [expr $g*$scaleFactor] if {$nPts != 0} { recorder EnvelopeNode -file $gMotionName$scaleFactor.out -node 3 4 -dof disp doDynamic $dT $nPts file delete $gMotionName$scaleFactor.dat if {$ok == 0} { puts "$gMotionName with factor: $scaleFactor OK" } else { puts "$gMotionName with factor: $scaleFActor FAILED" } } else { puts "$gMotion - NO RECORD" } wipe } incr count 1; } Yellow highlighted code is possible in OpenSeesMP You can remove the yellow and run in OpenSees But it will take much longer. The value of numP will be the –ncpus value provided to batchsubmit

How to use batchsubmit for other execution venues --venue hansen | steele | osg Future values will include kraken and ranger. Note: The batchsubmit options --nn and --ppn are not yet functional. In the future, this will allow extremely large values of --ncpus. -- ncpus will be the product of --nn and --ppn. --mpiargs This option specifies additional arguments to mpirun. Wrap these arguments in single quotes. Typically no additional arguments mpi agruments are needed.

Sample parallel jobs To save typing, I created the following scripts /apps/demo/bin/ex1 /apps/demo/bin/ex2 The above will just print the batchsubmit examles but not run them. The following scripts will print and run the commands /apps/demo/bin/ex1.sh /apps/demo/bin/ex2.sh Lets take time to study these examples.

Venue guidelines VenueGuidance--ncpus local Use for testing small jobs less than 4 hours --ncpus<16 osgUse for many moderate size jobs. --ncpus=1 hansen Use for large parallel jobs--ncpus<=48 steeleUse for many parallel jobs--ncpus<=8 Future venues to include kraken and ranger. Xsede (formerly teragrid) venues are steele, kraken, and ranger. Xsede and hansen use PBS for job submission. PBS jobs submission is automated by batchsubmit. This batchsubmit option can change the pbs queue --xdqueue The default queue for steele is "standby". The default queue for hansen is "nees".

--jnpref Job name prefix, default is "job". Blanks not allowed Environment variable JNPREF will also override this. Try "export JNPREF="run_" before batchsubmit. --jobname Specify jobname and override autoincrement generated jobname. Recommend not to use this to avoid jobname collisions. However, if a collision occurs with an existing scratch dir, batchsubmit will create a new directory. --xdqueue Queue for xsede machines (steele or hansen) The default queue is "standby". The default queue for hansen is "nees". Advanced batchsubmit options

Building bash scripts Commands can be stored in a file and these files can be executed File can be “ sourced” or executed. Recommend you store your personal scripts in $HOME/bin Text Editors available on NEEShub gedit nano vi

Scratch Cleanup Algorithm 1. IF used < 75% THEN EXIT report no activity required 2.Delete all jobs > 1yr old, log action 3. FOR ACTION = compress, archive (phase1, phase2) 4. | FOR T=6m, 5m,4m,3m,2m,4w,3w (pass 1, pass 2, …) 5. | | FOR X= 5,10,20,40,ALL 6. ||| Calculate set of top X users of scratch space 7. ||| FOR SIZE=128G,32G,8G,2G,512M,128M,32M 8. |||| FOREACH rundirectory 9. | ||| | IF rundirectory size>SIZE AND 10. || || | rundirectory is owned by X AND 11. |||| | rundirectory lifetime >T 12. |||| | THEN ACTION rundirectory, log action 13. | | || IF used < 50% THEN 14. |||| EXIT report SIZE,X,T,A thresholds 15. IF used > 50% THEN report policy failure and revise policy Values in red are policy parameters that can be revised by management as needed

GC Algorithm Lemmas No jobs < 3 weeks old will ever be deleted or compressed without a policy change. Very small jobs < 32MB compressed will be never be deleted by the system. – Worst case: 500,000 32MB jobs would consume 50% of a 32TB scratch. Process largest to smallest jobs for a fixed set of users and older than a specific age (inner loop) Process sets of large users with jobs older than a specific age (middle loop) Outer loop – Pass 1 Process jobs > 6months – Pass 2 Process jobs > 5 months … No jobs are deleted until all jobs >3 weeks old and > 32MB have been compressed. Compression is phase 1, deletion is phase 2. Example report stream: – Day1 : No activity, 74% used – Day2 : >2GB,Top 10 users, >3 months old, compressed 50% used – Day3 : >32MB, All users, > 3 weeks old, compressed 50% used (closest call to deletion) – Day4 : > 32GB, Top 5 users, >2 months old, deleted 45% used – Day5 : No activity, 65% used – Day X-1 : >2GB, All users, > 3 weeks old, deleted 50% used (close to policy failure) – DayX : >32M, All users, > 3 weeks old deleted, 60% used, POLICY FAILURE  Policy parameters need adjustment

Topics Not covered in this webinar Use of batchsubmit to build User Interface Use of pegasus for workflow management – This is in development and test. A single pegaus job can submit many jobs that have inter-job dependencies. Creation of appdir for portable applications. Only functional appdir today is /app/openseesbuild/osg Modification of OpenSees source to create personal copy of OpenSees with custom materials and models. – Process in development with Prof. Elwood’s graduate student.