Presentation is loading. Please wait.

Presentation is loading. Please wait.

The Cray XE6 Beagle Beagle Team Computation Institute.

Similar presentations


Presentation on theme: "The Cray XE6 Beagle Beagle Team Computation Institute."— Presentation transcript:

1 www.ci.anl.gov www.ci.uchicago.edu The Cray XE6 Beagle Beagle Team (beagle-support@ci.uchicago.edu)beagle-support@ci.uchicago.edu Computation Institute University of Chicago & Argonne National Laboratory

2 www.ci.anl.gov www.ci.uchicago.edu 2 Intro to Beagle – beagle-support@ci.uchicago.edu Outline Role of the Computation Institute Introduction to high performance computing Beagle hardware Basics about the work environment Data transfer using Globus Online Use of the compilers (C, C++, and Fortran) Launching and monitoring applications Using Matlab on Beagle Using Python on Beagle

3 www.ci.anl.gov www.ci.uchicago.edu Role of the Computation Institute Director: Ian Foster http://www.ci.uchicago.edu/ Contact: info@ci.uchicago.edu

4 www.ci.anl.gov www.ci.uchicago.edu 4 Intro to Beagle – beagle-support@ci.uchicago.edu Computation Institute Joint Argonne/Chicago institute, with ~100 Fellows (~50 UChicago faculty) and ~60 staff Primary goals: – Pursue new discoveries using multi-disciplinary collaborations and computational methods – Develop new computational methods and paradigms required to tackle these problems, and create the computational tools required for the effective application of advanced methods at the largest scales – Educate the next generation of investigators in the advanced methods and platforms required for discovery We want to provide expertise for an efficient and innovative use of Beagle in imaging We want to provide expertise for an efficient and innovative use of Beagle in imaging

5 www.ci.anl.gov www.ci.uchicago.edu 5 Intro to Beagle – beagle-support@ci.uchicago.edu How the CI supports people who use Beagle Catalyst Program Help Desk Support Training & Outreach Performance Engineering Startup assistance User administration assistance Job management services Technical support Beagle Services User campaign management Assistance with planning, reporting Collaboration within science domains Beagle point of coordination Performance engineering Application tuning Data analytics I/O tuning Workshops & seminars Customized training programs On-line content & user guides Beagle’s wiki * Beagle’s web page ** * http://www.ci.uchicago.edu/wiki/bin/view/Beagle/WebHome ** http://beagle.ci.uchicago.edu/

6 www.ci.anl.gov www.ci.uchicago.edu What the Heck is Supercomputing? Credit: Henry Neeman, Director OU Supercomputing Center for Education & Research http://www.oscer.ou.edu/education.php Contact: hneeman@ou.edu

7 www.ci.anl.gov www.ci.uchicago.edu 7 Intro to Beagle – beagle-support@ci.uchicago.edu Why Beagle?

8 www.ci.anl.gov www.ci.uchicago.edu 8 Intro to Beagle – beagle-support@ci.uchicago.edu What affects performance? Accessing data Imaging examples: 1)Too many images to fit on a local disk, use of network disks 2)Image too big to fit into memory, extensive use of swap space 3)Operations too big to fit into cache Imaging examples: 1)Too many images to fit on a local disk, use of network disks 2)Image too big to fit into memory, extensive use of swap space 3)Operations too big to fit into cache

9 www.ci.anl.gov www.ci.uchicago.edu 9 Intro to Beagle – beagle-support@ci.uchicago.edu What affects performance? Repetition Imaging examples: 1)Experiments (MRI images, CT images …) can be analyzed at the same time (if computer is large enough) 2)Each image or image set in a database can be analyzed independently 3)Slices or sub-images can be processed at the same time Imaging examples: 1)Experiments (MRI images, CT images …) can be analyzed at the same time (if computer is large enough) 2)Each image or image set in a database can be analyzed independently 3)Slices or sub-images can be processed at the same time

10 www.ci.anl.gov www.ci.uchicago.edu 10 Intro to Beagle – beagle-support@ci.uchicago.edu Imaging examples: 1)If analyzing a single image is time consuming (or images are large): slices or sub-images can be processed at the same time using different threads 2)If images are small: different threads can analyze different images Imaging examples: 1)If analyzing a single image is time consuming (or images are large): slices or sub-images can be processed at the same time using different threads 2)If images are small: different threads can analyze different images

11 www.ci.anl.gov www.ci.uchicago.edu 11 Intro to Beagle – beagle-support@ci.uchicago.edu Imaging examples: 1)Experiments (MRI images, CT images …) can be analyzed at the same time (if computer is large enough) 2)Each image or image set in a database can be analyzed independently on a distributed system Imaging examples: 1)Experiments (MRI images, CT images …) can be analyzed at the same time (if computer is large enough) 2)Each image or image set in a database can be analyzed independently on a distributed system

12 www.ci.anl.gov www.ci.uchicago.edu 12 Intro to Beagle – beagle-support@ci.uchicago.edu

13 www.ci.anl.gov www.ci.uchicago.edu 13 Intro to Beagle – beagle-support@ci.uchicago.edu

14 www.ci.anl.gov www.ci.uchicago.edu Beagle hardware PI: Ian Foster http://beagle.ci.uchicago.edu/ Contact: beagle-support@ci.uchicago.edu

15 www.ci.anl.gov www.ci.uchicago.edu 15 Intro to Beagle – beagle-support@ci.uchicago.edu Beagle: hardware overview

16 www.ci.anl.gov www.ci.uchicago.edu 16 Intro to Beagle – beagle-support@ci.uchicago.edu Beagle “under the hood”

17 www.ci.anl.gov www.ci.uchicago.edu 17 Intro to Beagle – beagle-support@ci.uchicago.edu Compute nodes 2 AMD Opteron 6100 “Magny-Cours” 12-core (24 per node) 2.1-GHz 32 GB RAM (8 GB per processor) No disk on node (mounts DVS and Lustre network filesystems) Compute nodes 2 AMD Opteron 6100 “Magny-Cours” 12-core (24 per node) 2.1-GHz 32 GB RAM (8 GB per processor) No disk on node (mounts DVS and Lustre network filesystems) To know more: http://www.ci.uchicago.edu/wiki/bin/view/Beagle/SystemSpecs#Overview To know more: http://www.ci.uchicago.edu/wiki/bin/view/Beagle/SystemSpecs#Overview

18 www.ci.anl.gov www.ci.uchicago.edu 18 Intro to Beagle – beagle-support@ci.uchicago.edu Details about the Processors (sockets) Superscalar: 3 Integer ALUs 3 Floating point ALUs (can do 4 FP per cycle) Cache hierarchy: Victim cache 64KB L1 instruction cache 64KB L1 data cache (latency 3 cycles) 512KB L2 cache per processor core (latency of 9 cycles) 12MB shared L3 cache (latency 45 cycles) To know more: http://www.ci.uchicago.edu/wiki/bin/view/Beagle/SystemSpecs To know more: http://www.ci.uchicago.edu/wiki/bin/view/Beagle/SystemSpecs

19 www.ci.anl.gov www.ci.uchicago.edu 19 Intro to Beagle – beagle-support@ci.uchicago.edu Interconnect Communication between compute nodes and with service nodes Gemini Interconnect 2 nodes per Gemini ASIC 4 x 12-cores (48 per Gemini) Gemini are arranged in a 3D torus Latency ~ 1 μs 168 GB/s bandwidth of switching capacity (20 GB injection per node) Resilient design Interconnect Communication between compute nodes and with service nodes Gemini Interconnect 2 nodes per Gemini ASIC 4 x 12-cores (48 per Gemini) Gemini are arranged in a 3D torus Latency ~ 1 μs 168 GB/s bandwidth of switching capacity (20 GB injection per node) Resilient design To know more: http://www.ci.uchicago.edu/wiki/bin/view/Beagle/SystemSpecs#Details_about_the_Interconnect To know more: http://www.ci.uchicago.edu/wiki/bin/view/Beagle/SystemSpecs#Details_about_the_Interconnect

20 www.ci.anl.gov www.ci.uchicago.edu Using Beagle PI: Ian Foster http://beagle.ci.uchicago.edu/ Contact: beagle-support@ci.uchicago.edu

21 www.ci.anl.gov www.ci.uchicago.edu 21 Intro to Beagle – beagle-support@ci.uchicago.edu Steps for computing on Beagle You need a user id on Beagle You need an active project You need to understand the basics of how the system works (check files, move files, create directories) You need to move your data to Beagle The application(s) that perform the calculations need to be installed on Beagle You need to submit and monitor your jobs to the compute nodes You need to transfer your data back to your system

22 www.ci.anl.gov www.ci.uchicago.edu 22 Intro to Beagle – beagle-support@ci.uchicago.edu What you need to get started on Beagle A CI account: if you don’t have it, get one – https://accounts.ci.uchicago.edu/ https://accounts.ci.uchicago.edu/ – You will need some person at the CI to sponsor you, this person can be: o Your PI, if he or she is part of the CI o A collaborator that is part of the CI o A catalyst you will be working with – You must upload an SSH public key to log in A CI project (for accounting) – https://www.ci.uchicago.edu/hpc/projects/ https://www.ci.uchicago.edu/hpc/projects/ o For joining an HPC project o For creating a new HPC project – This will change later this year, to let allocations committee make decisions To know more about CI account and HPC basics – http://www.ci.uchicago.edu/faq http://www.ci.uchicago.edu/faq To know more about Beagle accounts and basics – http://www.ci.uchicago.edu/wiki/bin/view/Beagle/HowToStart http://www.ci.uchicago.edu/wiki/bin/view/Beagle/HowToStart

23 www.ci.anl.gov www.ci.uchicago.edu 23 Intro to Beagle – beagle-support@ci.uchicago.edu Beagle’s operating system Cray XE6 uses Cray Linux Environment v3 (CLE3) SuSE Linux-based Compute nodes use Compute Node Linux (CNL) Login and sandbox nodes use a more standard Linux The two are different. Compute nodes can operate in – ESM (extreme scalability mode) to optimize performance to large multi-node calculations – CCM (cluster compatibility mode) for out-of-the-box compatibility with Linux/ x86 versions of software – without recompilation or relinking! To know more: http://www.ci.uchicago.edu/wiki/bin/view/Beagle/ComputeOnBeagle#Basics_about_the_work_environmen To know more: http://www.ci.uchicago.edu/wiki/bin/view/Beagle/ComputeOnBeagle#Basics_about_the_work_environmen

24 www.ci.anl.gov www.ci.uchicago.edu 24 Intro to Beagle – beagle-support@ci.uchicago.edu Beagle’s filesystems /lustre/beagle: local Lustre filesystem (read- write) -- this is where images should be kept for computation and where output files should be written, BUT NO BACKUP! /gpfs/pads: PADS GPFS (read-write) – for storing permanently images and results /home: CI home directories, largely useless To know more: http://www.ci.uchicago.edu/wiki/bin/view/Beagle/ComputeOnBeagle#How_to_work_on_the_filesystem To know more: http://www.ci.uchicago.edu/wiki/bin/view/Beagle/ComputeOnBeagle#How_to_work_on_the_filesystem

25 www.ci.anl.gov www.ci.uchicago.edu Handling data on Beagle http://beagle.ci.uchicago.edu/ Contact: beagle-support@ci.uchicago.edu

26 www.ci.anl.gov www.ci.uchicago.edu 26 Intro to Beagle – beagle-support@ci.uchicago.edu How to move data to and from Beagle Beagle is not HIPAA-compliant — no PHI data on Beagle Example of factors for choosing a data movement tool: – how many files, how large the files are … – how much fault tolerance is desired, – performance – security requirements, and – the overhead needed for software setup. Recommended tools: – scp/sftp can be OK for moving a few small files o pros: quick to initiate o cons: slow and not scalable – For optimal speed and reliability we recommend Globus Online : o high-performance (e.g., fast) o reliable and easy to use o easy to use from either a command line or web browser, o provides fault tolerant, fire-and-forget transfers. If you know you'll be moving a lot of data or find scp is too slow/unreliable we recommend To know more: http://www.ci.uchicago.edu/wiki/bin/view/Beagle/ComputeOnBeagle#How_to_move_data_to_and_from_Bea To know more: http://www.ci.uchicago.edu/wiki/bin/view/Beagle/ComputeOnBeagle#How_to_move_data_to_and_from_Bea

27 www.ci.anl.gov www.ci.uchicago.edu 27 Intro to Beagle – beagle-support@ci.uchicago.edu Trivial, right? 27 “I need my data over there – at my _____” (supercomputing center, campus server, etc.) Data Source Data Destination Getting data to the right place…

28 www.ci.anl.gov www.ci.uchicago.edu 28 Intro to Beagle – beagle-support@ci.uchicago.edu Reality: it is tedious and time-consuming 28 Data Source Data Destination “GAAAH! %&@#&” What’s the big deal?

29 www.ci.anl.gov www.ci.uchicago.edu How It Works 29 Data Source Data Source Data Destination Data Destination User initiates transfer request 1 1 Globus Online moves files 2 2 Globus Online notifies user 3 3 How It Works

30 www.ci.anl.gov www.ci.uchicago.edu How It Works 30 Getting Started (2 easy steps) 1.Sign up: Visit www.globusonline.org to create an accountwww.globusonline.org

31 www.ci.anl.gov www.ci.uchicago.edu How It Works 31 Getting Started (2 easy steps) 2.Start moving files: Pick your data and where you want to move it, then click to transfer

32 www.ci.anl.gov www.ci.uchicago.edu How It Works 32 File Movement Options We strive to make Globus Online broadly accessible… You can just move files using the Web GUI To automate workflows you use the Command Line Interface (CLI) To know more: (quickstart, tutorials, FAQs …) https://www.globusonline.org/resources/ To know more: (quickstart, tutorials, FAQs …) https://www.globusonline.org/resources/

33 www.ci.anl.gov www.ci.uchicago.edu 33 Intro to Beagle – beagle-support@ci.uchicago.edu Steps for computing on Beagle You need a user id on Beagle You need an active project You need to understand the basics of how the system works (check files, move files, create directories) You need to move your data to Beagle The application(s) that perform the calculations need to be installed on Beagle You need to submit and monitor your jobs to the compute nodes You need to transfer your data back to your system ✔ ✔ ✔ ✔ ✔

34 www.ci.anl.gov www.ci.uchicago.edu Working with applications on Beagle PI: Ian Foster http://beagle.ci.uchicago.edu/ Contact: beagle-support@ci.uchicago.edu

35 www.ci.anl.gov www.ci.uchicago.edu 35 Intro to Beagle – beagle-support@ci.uchicago.edu Applications on Beagle Applications on Beagle are (mostly) run from the command line, e.g.: aprun –n 17664 myMPIapp & this.log How do I know if an application is on Beagle? – http://beagle.ci.uchicago.edu/software/ http://beagle.ci.uchicago.edu/software/ – http://www.ci.uchicago.edu/wiki/bin/view/Beagle/SoftwareOnBeagle http://www.ci.uchicago.edu/wiki/bin/view/Beagle/SoftwareOnBeagle – On Beagle, use module avail, e.g.: lpesce@login2:~> module avail 2>&1 | grep –i matlab Matlab/7.13(default) What if it isn’t there? What if I want to use my own application?

36 www.ci.anl.gov www.ci.uchicago.edu 36 Intro to Beagle – beagle-support@ci.uchicago.edu In passing … Modules and work environment Modules sets the environment necessary to use a specific to applications, collection of applications, or libraries A module dynamically modifies the user environment The module command provides a number of capabilities including: – Rendering an application accessible: (module load) – unloading a module (module unload) – Changing a version of an application or an enviroment, i.e., unloading a module and loading another (module swap) – listing which modules are currently loaded (module list) – determining which modules are available and could be loaded (module avail)

37 www.ci.anl.gov www.ci.uchicago.edu 37 Intro to Beagle – beagle-support@ci.uchicago.edu If you want a tool that isn’t on Beagle For any specific requirements, submit a ticket to beagle-support@ci.uchicago.edu beagle-support@ci.uchicago.edu with the following information: Research project, group and/or PI Name(s) of software packages(s) Intended use and/or purpose Licensing requirements (if applicable) Specific instructions or preferences (specific release/version/vendor, associated packages, URLs for download, etc.)

38 www.ci.anl.gov www.ci.uchicago.edu 38 Intro to Beagle – beagle-support@ci.uchicago.edu If you want to port your own application lpesce@login2:~> module avail PrgEnv lpesce@login2:~> module avail 2>&1 | grep PrgEnv PrgEnv-cray/1.0.2 PrgEnv-cray/3.1.49A PrgEnv-cray/3.1.61(default) PrgEnv-gnu/3.1.49A PrgEnv-gnu/3.1.61(default) PrgEnv-pgi/3.1.49A PrgEnv-pgi/3.1.61(default) Cray compilers -Excellent Fortran -CAF and UPC Cray compilers -Excellent Fortran -CAF and UPC Gnu compilers -Excellent C - Standard Gnu compilers -Excellent C - Standard PGI compilers -Excellent Fortran -Reliable PGI compilers -Excellent Fortran -Reliable You’ll need a compiler which is part of a programming environment You’ll need a compiler which is part of a programming environment

39 www.ci.anl.gov www.ci.uchicago.edu 39 Intro to Beagle – beagle-support@ci.uchicago.edu User’s guides and man pages PGI: – http://www.pgroup.com/resources/docs.htm – Or type man pgf90, man pgcc, man pgCC GCC: – http://gcc.gnu.org/onlinedocs/ – Or type man gfortran, man gcc, man g++ Cray: under “Programming Environment” – http://docs.cray.com/cgi-bin/craydoc.cgi?mode=SiteMap;f=xe_sitemap – Or type man crayftn, man craycc, man crayc++

40 www.ci.anl.gov www.ci.uchicago.edu 40 Intro to Beagle – beagle-support@ci.uchicago.edu Compiling on Beagle: environment set up Native, optimized versions of many numerical libraries are available for the Cray XE6 http://docs.cray.com/cgi-bin/craydoc.cgi?mode=SiteMap;f=xe_sitemap under “Math and Science Libraries” – For a list of all libraries installed on Beagle use: module avail 2>&1 | less Libraries are simple to use, via the module command e.g., FFTW, via module load fftw

41 www.ci.anl.gov www.ci.uchicago.edu 41 Intro to Beagle – beagle-support@ci.uchicago.edu Compiling on Beagle: libraries & docs AMD Core Math Library (ACML) manual SuperLU Users' Guide LAPACK man pages ScaLAPACK man pages BLACS and BLAS man pages Fast_mv man pages PETSc man pages Trilinos man page Introduction to Iterative Refinement Toolkit (IRT) man pages Introduction to Cray LibSci FFT man pages Introduction to FFTW 3.2.x man page Introduction to FFTW 2.1.5 man page

42 www.ci.anl.gov www.ci.uchicago.edu 42 Intro to Beagle – beagle-support@ci.uchicago.edu More details about the environment Beagle can use both statically and dynamically linked (shared) libraries http://www.ci.uchicago.edu/wiki/bin/view/Beagle/DevelopOnBeagle#Static_vs_Dynamic_linking All compilers on Beagle support: – MPI (Message Passing Interface, standard for distributed computing) and – OpenMP (standard for shared memory computing). Note: flags activating openMP pragmas or directives might be different among compilers, see man pages. Some compilers support also PGAS languages (e.g., CAF or UPC), for example the Cray compilers

43 www.ci.anl.gov www.ci.uchicago.edu 43 Intro to Beagle – beagle-support@ci.uchicago.edu Steps for computing on Beagle You need a user id on Beagle You need an active project You need to understand the basics of how the system works (check files, move files, create directories) You need to move your data to Beagle The application(s) that perform the calculations need to be installed on Beagle You need to submit and monitor your jobs to the compute nodes You need to transfer your data back to your system ✔ ✔ ✔ ✔ ✔ ✔

44 www.ci.anl.gov www.ci.uchicago.edu 44 Intro to Beagle – beagle-support@ci.uchicago.edu On running jobs on compute nodes The system operates through a resource manager (Torque) and a scheduler (Moab) and it is based on PBS scripts Beagle CLE (Cray Linux Environment) supports both interactive and batch computations When running applications on the compute nodes, it is best to work from the login nodes (as opposed to the sandbox node, which is better used to develop) It is not possible to log in on the compute nodes

45 www.ci.anl.gov www.ci.uchicago.edu 45 Intro to Beagle – beagle-support@ci.uchicago.edu Launching an application on compute nodes They are all usually part of a PBS (Portable Batch System) script: The first step is to obtain resources which utilizes the qsub command The second step is to set the appropriate environment to run the calculations The third step is to move input files, personal libraries and applications to the Lustre file system The fourth step is to run the application on the compute nodes using the application launcher ( aprun ) The final step is to move files back to /home or /gpfs/pads/projects

46 www.ci.anl.gov www.ci.uchicago.edu 46 Intro to Beagle – beagle-support@ci.uchicago.edu First step: request resources with qsub Users cannot access compute nodes without a resource request managed by Torque/Moab That is, you will always need to use qsub Typical calls to qsub are: – For an interactive job qsub -I -l walltime=00:10:00,mppwidth=24 – for a batch job qsub my_script.pbs

47 www.ci.anl.gov www.ci.uchicago.edu 47 Intro to Beagle – beagle-support@ci.uchicago.edu Interactive When you run interactive jobs you will see a qsub prologue: lpesce@login2:~> qsub -I –l walltime=00:10:00,mppwidth=24 qsub: waiting for job 190339.sdb to start qsub: job 190339.sdb ready ############################# Beagle Job Start ################## # Job ID: 190339 Project: CI-CCR000070 # # Start time: Tue Jul 26 12:23:14 CDT 2011 # # Resources: walltime=00:10:00 # ############################################################## After you receive a prompt, you can run your jobs via aprun: aprun –n 24 myjob.exe & my_log lpesce@login2:~> aprun –n 24 myjob2.exe & my_log2 lpesce@login2:~> Good for debugging and small tests Limited to one node (24 cores) Good for debugging and small tests Limited to one node (24 cores)

48 www.ci.anl.gov www.ci.uchicago.edu 48 Intro to Beagle – beagle-support@ci.uchicago.edu Batch scripts Batch scheduling is usually done with a PBS script Scripts can be very complex Note: the script is executed on the login node! Only what follows the aprun command is run on the compute nodes We’ll look into simple scripts To know more: http://www.ci.uchicago.edu/wiki/bin/view/Beagle/ComputeOnBeagle#How_to_submit_jobs To know more: http://www.ci.uchicago.edu/wiki/bin/view/Beagle/ComputeOnBeagle#How_to_submit_jobs

49 www.ci.anl.gov www.ci.uchicago.edu 49 Intro to Beagle – beagle-support@ci.uchicago.edu Example of an MPI script !/bin/bash #PBS -N MyMPITest #PBS -l walltime=1:00:00 #PBS -l mppwidth=240 #PBS -j oe #Move to the directory where the script was submitted -- by the qsub command cd $PBS_O_WORKDIR # Define and create a directory on /lustre/beagle where to run the job LUSTREDIR=/lustre/beagle/`whoami`/MyMPITest/${PBS_JOBID} echo $LUSTREDIR mkdir -p $LUSTREDIR # Copy the input file and executable to /lustre/beagle cp /home/lpesce/tests/openMPTest/src/hello_smp hello.in $LUSTREDIR # Move to /lustre/beagle cd $LUSTREDIR # Note that here I was running hello_smp on 240 cores, i.e., using 240 PEs (by using -n 240) # each with 1 thread -- i.e., just itself (default by not using -d) aprun -n 240 hello_smp hello.out3 Set shell (I use bash) Give a name to the job Set wall time to 1 hr (hh:mm:ss) Ask to merge err and output from the scheduler Set shell (I use bash) Give a name to the job Set wall time to 1 hr (hh:mm:ss) Ask to merge err and output from the scheduler $PBS_O_WORKDIR: directory from where the script was submitted Name, output and make a directory on lustre $PBS_O_WORKDIR: directory from where the script was submitted Name, output and make a directory on lustre Move all the files that will be used to lustre Go to lustre Move all the files that will be used to lustre Go to lustre Use aprun to send the computation to the compute nodes -n 240 asks for 240 MPI processor elements (“cores,” essentially) Use aprun to send the computation to the compute nodes -n 240 asks for 240 MPI processor elements (“cores,” essentially)

50 www.ci.anl.gov www.ci.uchicago.edu 50 Intro to Beagle – beagle-support@ci.uchicago.edu Example of an openMP script #!/bin/bash #PBS -N MyOMPTest #PBS -l walltime=48:00:00 #PBS -l mppwidth=24 #PBS -j oe #Move to the directory where the script was submitted -- by the qsub command cd $PBS_O_WORKDIR # Define and create a directory on /lustre/beagle where to run the job LUSTREDIR=/lustre/beagle/`whoami`/MyTest/${PBS_JOBID} echo $LUSTREDIR mkdir -p $LUSTREDIR # Copy the input file and executable to /lustre/beagle, these have to be user and project specific cp /home/lpesce/tests/openMPTest/src/hello_smp hello.in $LUSTREDIR # Move to /lustre/beagle cd $LUSTREDIR # Note that here I was running one PE (by using -n 1) # each with 24 threads (by using -d 24) # Notice the setting of the environmental variable OMP_NUM_THREADS for openMP # if other multi-threading approaches are used they might need to be handled differently OMP_NUM_THREADS=24 aprun -n 1 -d 24./hello_smp hello.out4 Set shell (I use bash) Give a name to the job Set wall time to max: 48 hrs (hh:mm:ss) Ask to merge err and output from the scheduler Set shell (I use bash) Give a name to the job Set wall time to max: 48 hrs (hh:mm:ss) Ask to merge err and output from the scheduler $PBS_O_WORKDIR: directory from where the script was submitted Name, output and make a directory on lustre $PBS_O_WORKDIR: directory from where the script was submitted Name, output and make a directory on lustre Move all the files that will be used to lustre Go to lustre Move all the files that will be used to lustre Go to lustre Use aprun to send the computation to the compute nodes First set environmental variable OMP_NUM_THREADS to desired value (24 is rarely optimal!) -d 24 asks for 24 OMP processes per MPI process -n 1 asks for only one MPI process Use aprun to send the computation to the compute nodes First set environmental variable OMP_NUM_THREADS to desired value (24 is rarely optimal!) -d 24 asks for 24 OMP processes per MPI process -n 1 asks for only one MPI process

51 www.ci.anl.gov www.ci.uchicago.edu 51 Intro to Beagle – beagle-support@ci.uchicago.edu Queue Name Max Walltime Max # nodes Default # nodes Max # jobs in queue Total # Reserved nodes Interactive 4 hour1118 development 30 min31216 scalability 30 min1014 batch 2 days 7401none N/A Recommended as second step, after the code compiles and runs using the interactive queue on one node To test parallelism on a small scale Up to 3 nodes.. Provides dedicated resources to efficiently optimize and test parallelism Recommended as second step, after the code compiles and runs using the interactive queue on one node To test parallelism on a small scale Up to 3 nodes.. Provides dedicated resources to efficiently optimize and test parallelism Default queue, to run all the rest Recap of queues available on Beagle Recommended as first step in porting applications to Beagle To test and debug code in real time. On one node. Provides dedicated resources to run continuous refinement sessions Recommended as first step in porting applications to Beagle To test and debug code in real time. On one node. Provides dedicated resources to run continuous refinement sessions Recommended as third step after parallelism was tested on a small scale Up to 10 nodes.. Provides dedicated resources to efficiently test and refine scalability Recommended as third step after parallelism was tested on a small scale Up to 10 nodes.. Provides dedicated resources to efficiently test and refine scalability To know more: http://www.ci.uchicago.edu/wiki/bin/view/Beagle/SchedulingPolicy To know more: http://www.ci.uchicago.edu/wiki/bin/view/Beagle/SchedulingPolicy

52 www.ci.anl.gov www.ci.uchicago.edu 52 Intro to Beagle – beagle-support@ci.uchicago.edu More about aprun The number of processors, both for MPI and openMP, is determined at launch time by the aprun command (more or less that is) The aprun application launcher handles stdin, stdout and strerr for the user’s application To know more: http://www.ci.uchicago.edu/wiki/bin/view/Beagle/ComputeOnBeagle#Aprun Or type man aprun To know more: http://www.ci.uchicago.edu/wiki/bin/view/Beagle/ComputeOnBeagle#Aprun Or type man aprun

53 www.ci.anl.gov www.ci.uchicago.edu 53 Intro to Beagle – beagle-support@ci.uchicago.edu To monitor applications and queues qsub batch jobs are submitted using the qsub command qdel is used to delete a job qstat shows the jobs the resource manager, Torque, knows about (i.e., all those submitted using qsub). – qstat -a show all jobs in submit order – qstat -a -u username show all jobs of a specific user in submit order – qstat -f job_id receive a detailed report on the job status – qstat -n job_id what nodes is a job running on – qstat -q gives the list of the queues available on Beagle showq show all jobs in priority order. showq tells which jobs Moab, the scheduler, is considering eligible to run or is running showres showres show all the reservations currently in place or that have been scheduled To know more: http://www.ci.uchicago.edu/wiki/bin/view/Beagle/ComputeOnBeagle#commands_for_submitting_and_inqu To know more: http://www.ci.uchicago.edu/wiki/bin/view/Beagle/ComputeOnBeagle#commands_for_submitting_and_inqu

54 www.ci.anl.gov www.ci.uchicago.edu Applications on Beagle http://www.ci.uchicago.edu/wiki/bin/view/Beagle/WebHome Contact: beagle-support@ci.uchicago.edu

55 www.ci.anl.gov www.ci.uchicago.edu 55 Intro to Beagle – beagle-support@ci.uchicago.edu Applications on Beagle GUIs are in general not supported Licensing is similar to any other uchicago.edu machine – Some vendors charge by number of cores, which can be expensive on Beagle – Most applications which have a campus license can be simply installed and used on Beagle All software which is available at no chance can in principle be installed on Beagle even if porting might not be trivial (e.g., Octave)

56 www.ci.anl.gov www.ci.uchicago.edu Matlab http://www.ci.uchicago.edu/wiki/bin/view/Beagle/MATLAB http://beagle.ci.uchicago.edu/ Contact: beagle-support@ci.uchicago.edu

57 www.ci.anl.gov www.ci.uchicago.edu 57 Intro to Beagle – beagle-support@ci.uchicago.edu Using Matlab on Beagle: basics The Matlab GUI is not supported and most likely will not be in the future: – According to our experience Matlab is not very effective in exploiting massively parallel supercomputers such as Beagle – If you have reasons to believe otherwise speak up now. Compiled executables from Matlab code can be easily run on Beagle: – MATLAB programs should be compiled using mcc (Matlab compiler) and run as command line executables with MCR (Matlab Compiler Runtime). – In our experience, Matlab has shown very limited ability in exploiting effectively multi-core processors. – Therefore, to exploit parallelism, the resulting executables, should be run in parallel using a scripting language such as a Bash script or a Swift script.

58 www.ci.anl.gov www.ci.uchicago.edu 58 Intro to Beagle – beagle-support@ci.uchicago.edu Using Matlab on Beagle: mcc and MCR The Matlab compiler produces executables that in order to run require the Matlab Compiler Runtime (MCR), a set of shared libraries that enables the execution of Matlab files without an installed version of Matlab. Currently MCR is available as /soft/matlab/7.13/ /soft/mcr/v714/ (if you require other versions let us know). The mcr compiler is loaded with the command module load matlab See also http://www.mathworks.com/help/toolbox/compiler

59 www.ci.anl.gov www.ci.uchicago.edu 59 Intro to Beagle – beagle-support@ci.uchicago.edu Using Matlab on Beagle: Matlab code Any Matlab function of the form foofunc(x1,x2,...,xn) can be turned into an executable using the MATLAB compiler -- some black magic required, see http://www.ci.uchicago.edu/wiki/bin/view/Beagle/MATLAB#MATLAB_functions_that_can_be_com Matlab functions can call other Matlab functions from other files, usually leaving them in the compilation directory will be sufficient Matlab seems to have problems running multi- threaded programs efficiently, compile single- threaded, e.g.: mcc -R -singleCompThread -R -nojvm -R -nodisplay -mv myapp.m -o my_app

60 www.ci.anl.gov www.ci.uchicago.edu 60 Intro to Beagle – beagle-support@ci.uchicago.edu Using MATLAB on Beagle: mcc output After the compilation, a number of files will be generated: – mccExcludedFiles.log : don’t worry about this one – my_app: the executable you will need to copy to Beagle – readme.txt : contains information, for example where is the version of MCRInstaller.bin for your specific MATLAB, which you will need if different from the ones available on Beagle – run_my_app.sh : a shell script that can is used to run each copy of my_app. We recommend that you use it to avoid having to take care of too many variables in your PBS scripts. However, you will need to modify those scripts when using them on Beagle (details on web site).

61 www.ci.anl.gov www.ci.uchicago.edu 61 Intro to Beagle – beagle-support@ci.uchicago.edu Using Matlab on Beagle: note Run multiple copies of single-threaded run_my_app.sh using a scripting language: – Bash shell – Swift In general Matlab compiled executables do not use Beagle very efficiently (both in terms of CPU and memory) and this should be considered carefully when planning large calculations. Let us know if we can help.

62 www.ci.anl.gov www.ci.uchicago.edu Python http://www.ci.uchicago.edu/wiki/bin/view/Beagle/PYTHON http://beagle.ci.uchicago.edu/ Contact: beagle-support@ci.uchicago.edu

63 www.ci.anl.gov www.ci.uchicago.edu 63 Intro to Beagle – beagle-support@ci.uchicago.edu Using Python on Beagle: basics Python version 2.6 is the default. Python version 2.7.1 is also available and can be used instead ( by typing module load python). Also Numpy and Scipy are available. Pil is also available Computations that involve inlined C code can use the Weave module, which is part of Scipy Computations that involve Fortran or C shared libraries can use f2c, which is part of Scipy. These calculations appear to be capable of using OpenMP effectively (we did not try MPI). Other packages and versions can be installed if users request them.

64 www.ci.anl.gov www.ci.uchicago.edu 64 Intro to Beagle – beagle-support@ci.uchicago.edu Python on Beagle: Parallel shared memory We used the multiprocessing package because it side-steps the Global Interpreter Lock that renders the threading module unable to run multiple threads concurrently. (Can also run in distributed memory.) Semaphore and barrier functionalities appear to be working properly on Beagle

65 www.ci.anl.gov www.ci.uchicago.edu 65 Intro to Beagle – beagle-support@ci.uchicago.edu Python on Beagle: distributed memory The multiprocessing can also run in distributed memory, but we haven’t used it yet. We are planning to test global arrays bindings for Python Mpi4py should be installed and tested soon Distributed memory was utilized so far by running multiple instances of the same python code on different inputs on different nodes via a script

66 www.ci.anl.gov www.ci.uchicago.edu Can you suggest other applications we should include? Write to beagle-support@ci.uchicago.edu

67 www.ci.anl.gov www.ci.uchicago.edu 67 Intro to Beagle – beagle-support@ci.uchicago.edu Acknowledgments BSD for funding most of the operational costs of Beagle A lot of the images and the content has been taken or learned from Cray documentation or their staff Globus for providing us with many slides and support; special thanks to Mary Bass, manager for communications and outreach at the CI. NERSC and its personnel provided us with both material and direct instruction; special thanks to Katie Antypas, group leader of the User Services Group at NERSC All the people at the CI who supported our work, from administrating the facilities to taking pictures of Beagle Beagle users who helped with the content about using Matlab and Python

68 www.ci.anl.gov www.ci.uchicago.edu Thanks! We look forward to working with you. Questions? (or later: beagle-support@ci.uchicago.edu)


Download ppt "The Cray XE6 Beagle Beagle Team Computation Institute."

Similar presentations


Ads by Google