Techila End-User Training
Transcription
Techila End-User Training
Techila End-User Training What Is Techila Techila is a HPC middleware/ resource manager, which enables applications to harness computing capacity securely and without complexity. The content of this presentation is confidential. Using, copying, or giving any part of this presentation or its description to a third party is strictly forbidden without the prior written consent of Techila Technologies Ltd. 2 Techila Architecture End-User Researcher Using MATLAB/Python/etc. on their computer Techila Server Manages computational resources Distributes computational Jobs Techila Workers Provides computational power The content of this presentation is confidential. Using, copying, or giving any part of this presentation or its description to a third party is strictly forbidden without the prior written consent of Techila Technologies Ltd. 3 IT infrastructure The End-User working on projects, which could benefit of scalable distributed computing capacity. End-User with standard computational tools (MATLAB, R,…) The content of this presentation is confidential. Using, copying, or giving any part of this presentation or its description to a third party is strictly forbidden without the prior written consent of Techila Technologies Ltd. 4 IT infrastructure The End-User downloads Techila SDK from the Techila Extranet www.techilatechnologies.com > Extranet End-User with standard computational tools (MATLAB, R,…) and installs the SDK on their computer. The Techila SDK offers integration to standard computational tools and languages. The content of this presentation is confidential. Using, copying, or giving any part of this presentation or its description to a third party is strictly forbidden without the prior written consent of Techila Technologies Ltd. 5 Techila Worker Techila Worker Techila Worker Techila environment Techila Worker Techila Server End-User with standard computational tools (MATLAB, R,…) Techila Worker The Techila environment consists of a Techila Server and several computers providing the computing power (Workers). The content of this presentation is confidential. Using, copying, or giving any part of this presentation or its description to a third party is strictly forbidden without the prior written consent of Techila Technologies Ltd. 6 Techila environment Techila Server SSL Techila SDK connects the local tools to the Techila Server. Techila does automatic distribution of the Project. End-User with standard computational tools (MATLAB, R,…) The content of this presentation is confidential. Using, copying, or giving any part of this presentation or its description to a third party is strictly forbidden without the prior written consent of Techila Technologies Ltd. 7 Techila environment SSL SSL SSL Techila Server SSL End-User with standard computational tools (MATLAB, R,…) SSL SSL The Techila Server configures the Workers to execute the computational Project. All connections are secured and all data packages are signed. The content of this presentation is confidential. Using, copying, or giving any part of this presentation or its description to a third party is strictly forbidden without the prior written consent of Techila Technologies Ltd. 8 Techila environment SSL SSL SSL Techila Server SSL End-User with standard computational tools (MATLAB, R,…) SSL SSL Workers return their results to the Techila Server, which returns the results to the End-User’s computer. The results can be streamed as they become available or returned all at the same time or fetched from the Techila Server at a later point of time. The content of this presentation is confidential. Using, copying, or giving any part of this presentation or its description to a third party is strictly forbidden without the prior written consent of Techila Technologies Ltd. 9 Techila environment Techila Server The End-User can start analyzing the results without having to wait. End-User with standard computational tools (MATLAB, R,…) The content of this presentation is confidential. Using, copying, or giving any part of this presentation or its description to a third party is strictly forbidden without the prior written consent of Techila Technologies Ltd. 10 Automatic Worker Configuration W W W Techila Server W W W W W Techila Scheduler Overview: http://tinyurl.com/techilascheduler 11 The content of this presentation is confidential. Using, copying, or giving any part of this presentation or its description to a third party is strictly forbidden without the prior written consent of Techila Technologies Ltd. 11 DLL Peach wrapper Java peach Java API Shell / Command Prompt C# Techila layer Java Shell / Command Prompt FORTRAN C/C++/Other (supporting DLLs) Python Python peach R peach rJava R Perl peach Perl End-User layer Inline Java MATLAB peach MATLAB Techila API Support CLI Techila native layer Third party component Recommended API .NET peach CLI .NET API The content of this presentation is confidential. Using, copying, or giving any part of this presentation or its description to a third party is strictly forbidden without the prior written consent of Techila Technologies Ltd. 12 Distributed Computing Problems Parallel Problems Jobs depend on each other’s states Communication between jobs For example fluid dynamics Embarrassingly Parallel Problems Jobs are totally independent No communication between jobs For example Monte Carlo The content of this presentation is confidential. Using, copying, or giving any part of this presentation or its description to a third party is strictly forbidden without the prior written consent of Techila Technologies Ltd. 13 Techila Terminology Project Computational problem that consists of several Jobs Project parameters can be used to enable Techila features Jobs Independent computational tasks Deployed and solved on the Workers One Job is deployed on one CPU core Project Jobs Bundles The content of this presentation is confidential. Using, copying, or giving any part of this presentation or its description to a third party is strictly forbidden without the prior written consent of Techila Technologies Ltd. 14 Techila Terminology Bundles Created automatically when creating a Project Containers for data, binaries, libraries Used to transfer necessary components to Workers All required Bundles are transferred automatically to Workers Deployed from Techila Server to Workers on-demand Project Jobs Bundles The content of this presentation is confidential. Using, copying, or giving any part of this presentation or its description to a third party is strictly forbidden without the prior written consent of Techila Technologies Ltd. 15 Techila SDK Enables you to access the Techila environment Can be downloaded from the Techila Extranet: http://www.techilatechnologies.com/extranet/ Contains: Documents for getting started with Techila Examples for several programming languages, including MATLAB and Python End-User Guides for MATLAB, Python and the CLI with walkthroughs of the examples The content of this presentation is confidential. Using, copying, or giving any part of this presentation or its description to a third party is strictly forbidden without the prior written consent of Techila Technologies Ltd. 16 Techila Helper Functions Peach Name from "Parallel EACH" Can be used to execute computationally intensive functions/programs in the Techila environment Typically used for parameter sweep type computations Cloudfor Can be used to distribute computationally intensive for-loop structures Currently available for MATLAB and R The content of this presentation is confidential. Using, copying, or giving any part of this presentation or its description to a third party is strictly forbidden without the prior written consent of Techila Technologies Ltd. 17 Techila-Enabling Your Application 1. Locate the computationally intensive part of your application When available, use profiling tools included in the IDE such as the MATLAB profiler When profiling tools not available, use debug printouts with timestamps The content of this presentation is confidential. Using, copying, or giving any part of this presentation or its description to a third party is strictly forbidden without the prior written consent of Techila Technologies Ltd. 18 Techila-Enabling Your Application 2. Choose the Techila helper function and modify the code Cloudfor for distributing computationally intensive for-loops The content of this presentation is confidential. Using, copying, or giving any part of this presentation or its description to a third party is strictly forbidden without the prior written consent of Techila Technologies Ltd. 19 Techila-Enabling Your Application 2. Choose the Techila helper function and modifying the code Peach for executing functions used e.g. for parameter sweeping The content of this presentation is confidential. Using, copying, or giving any part of this presentation or its description to a third party is strictly forbidden without the prior written consent of Techila Technologies Ltd. 20 Techila-Enabling Your Application 3. Create the computational Project. The content of this presentation is confidential. Using, copying, or giving any part of this presentation or its description to a third party is strictly forbidden without the prior written consent of Techila Technologies Ltd. 21 Features: Can be used to improve efficiency and implement more complex distributions Features include: Streaming Snapshots Callback functions Job-specific input files Distributing precompiled binaries Detached Projects Iterative Projects ... The content of this presentation is confidential. Using, copying, or giving any part of this presentation or its description to a third party is strictly forbidden without the prior written consent of Techila Technologies Ltd. 22 Features: Streaming Transfer results from the Techila environment as soon as they are available Enables post-processing job results before the project is completed Saves result transfer time when the results are large With streaming Without streaming End-user Server Workers End-user Server Create project Create project Transfer jobs to workers Transfer jobs to workers Transfer result Stream result Transfer result Download results Workers Transfer result Transfer result Stream result The content of this presentation is confidential. Using, copying, or giving any part of this presentation or its description to a third party is strictly forbidden without the prior written consent of Techila Technologies Ltd. 23 Features: Callback Easy way to post-process results Each job result is delivered to the callback function Results from the callback function are optionally returned from peach() End-user Server Workers For example: Create project To plot the results in a Transfer jobs to workers continuous manner To remove parts of the result Transfer result to files and Stream result Callback return other parts from Post-processed result Transfer result Stream result peach() Callback Post-processed result To save memory To manage large result files With streaming and callback The content of this presentation is confidential. Using, copying, or giving any part of this presentation or its description to a third party is strictly forbidden without the prior written consent of Techila Technologies Ltd. 24 Features: Snapshots Saving the state of the job End-user Requires support in computation code To save the state To resume from the saved state Saves time in long runs Resuming after reboot Resuming on another Worker Optimizing transfer to a faster Worker Server Workers Create project Download results Transfer job to a worker Upload snapshot Upload snapshot Computation interrupted Transfer job to a worker Download latest snapshot Computation resumed using the latest snapshot Transfer result The content of this presentation is confidential. Using, copying, or giving any part of this presentation or its description to a third party is strictly forbidden without the prior written consent of Techila Technologies Ltd. 25 Features: Job Input Files Enables job-specific data files Other bundles are deployed to each participating Worker Job Input Bundle is transferred only to the server Individual files from the Bundle are deployed to the Workers Saves memory Can be used to load only the data required by the job Saves time and network bandwidth Only the file needed by the job is transferred from the server The content of this presentation is confidential. Using, copying, or giving any part of this presentation or its description to a third party is strictly forbidden without the prior written consent of Techila Technologies Ltd. 26 Features: Precompiled Binaries Using MATLAB/Perl/Command Line Interface as the front-end Compute with precompiled binary (Fortran, C/C++, etc.) Optionally post-process with MATLAB/Perl Easy way to execute code written in languages not having peach() (yet) Possible to execute the computation on multiple platforms Requires a precompiled binary for each of the platforms The content of this presentation is confidential. Using, copying, or giving any part of this presentation or its description to a third party is strictly forbidden without the prior written consent of Techila Technologies Ltd. 27 Features: Project Detaching No need to wait for the projects online Start the long project from laptop, turn off the laptop and have a nice weekend Fetch the results on Monday End-user Server Workers End-user Server Workers Create project Create project Transfer jobs to workers Transfer jobs to workers Transfer result Transfer result Download results Transfer result Transfer result Download request Download results Normal Convention Detached Project The content of this presentation is confidential. Using, copying, or giving any part of this presentation or its description to a third party is strictly forbidden without the prior written consent of Techila Technologies Ltd. 28 Features: Iterative Projects Technique for creating several, consecutive Projects Achieved by placing the cloudfor-loop or peach-function inside a loop structure Results of previous Projects used as input data in the next Project The content of this presentation is confidential. Using, copying, or giving any part of this presentation or its description to a third party is strictly forbidden without the prior written consent of Techila Technologies Ltd. 29 CONFIDENTIAL Feature: Interconnect Allows Jobs within the same Project to communicate with each other Interconnect communication always adds some network communication overhead Performing too frequent interconnect data transfers can impact performance The content of this presentation is confidential. Using, copying, or giving any part of this presentation or its description to a third party is strictly forbidden without the prior written consent of Techila Technologies Ltd. 30 Techila API - MATLAB Cloudfor Provides a simple way to distribute for-loop structures Should only be used on computationally intensive loops Iterations must be independent Cloudfor loops marked with 'cloudfor' and 'cloudend' keywords Nested cloudfor loops possible result=zeros(1,10); for k=1:10 result(k)=k*k; end result=zeros(10,10); for k=1:10 for j=1:10 result(k,j)=k*j; end end Cloudfor result=zeros(1,10); cloudfor k=1:10 result(k)=k*k; cloudend Cloudfor result=zeros(10,10); cloudfor k=1:10 cloudfor j=1:10 result(k,j)=k*j; cloudend cloudend The content of this presentation is confidential. Using, copying, or giving any part of this presentation or its description to a third party is strictly forbidden without the prior written consent of Techila Technologies Ltd. 31 Techila API - MATLAB Peach Simple interface for executing a computationally intensive function on Workers Peach function syntax typically defines the following parameters: The name of the function that will be deployed and executed on Workers Input arguments for the executable function List of data files that should be transferred to the Workers (optional) Number of Jobs in the Project function result = run_test() var = 5; result = peach('workerFunction',... {var,'<param>'},... {'datafile.txt'},... 1:10) end % % % % Executable function Input arguments Additional data files Number of Jobs The content of this presentation is confidential. Using, copying, or giving any part of this presentation or its description to a third party is strictly forbidden without the prior written consent of Techila Technologies Ltd. 32 Techila API - R Cloudfor Simple interface for distributing computationally intensive forloop structures Automatically detects which variables need to be transferred to Workers Computationally light iterations can be grouped to increase performance Possible to use nested cloudfor loops Iterations must be independent for (i in 1:10) { result[i] <- i*i } result <- matrix(NA,5,10) for (i in 1:10) { for (j in 1:5) { result[j,i] <- i*j } } Cloudfor library(techila) result <- cloudfor (i=1:10) %t% { i*i } Cloudfor library(techila) result <- cloudfor (i = 1:10) %to% cloudfor (j = 1:5) %t% { i*j } The content of this presentation is confidential. Using, copying, or giving any part of this presentation or its description to a third party is strictly forbidden without the prior written consent of Techila Technologies Ltd. 33 Techila API - R Peach Simple interface for executing computationally intensive functions on Workers At minimum, the peach-function syntax typically defines the following parameters: The name of the function that will be executed on Workers Input arguments for the executable function List of data files that should be transferred to the Workers Number of Jobs in the Project library(techila) var1 <- 5 jobs <- 10 # Load the Techila library result <- peach(funcname = "workerFunction", params = list(var1, "<param>"), files = list("file_dist.r"), peachvector = 1:jobs, sdkroot="C:/techila") # Path to # Executable function # Input arguments # File to be sourced # Number of Jobs the 'techila' directory The content of this presentation is confidential. Using, copying, or giving any part of this presentation or its description to a third party is strictly forbidden without the prior written consent of Techila Technologies Ltd. 34 34 Techila API - Python Peach Simple interface for executing a computationally intensive function on Workers Peach function syntax typically defines following parameters: Name of the executable function that will be executed on Workers Python-script containing executable function definitions Input arguments for the executable function List of data files that should be transferred to Workers Number of Jobs in the Project import techila var = 5 result = techila.peach(funcname = 'exec_func', # params = [var,'<vecidx>'], # files = ['ex_file.py'], # datafiles = ['datafile.txt'], peachvector = range(0, 10)) Executable function Function input arguments Function definitions # Additional data files # Job count & arguments The content of this presentation is confidential. Using, copying, or giving any part of this presentation or its description to a third party is strictly forbidden without the prior written consent of Techila Technologies Ltd. 35 Techila API - CLI Peach Simple interface for distributing computations from the command line (eg. Windows command prompt / Linux shell) At its simplest form, the peach command typically defines: The name of the executable program Input arguments for the executable program Files that will be transferred to the participating Workers Number of Jobs in the Project Name of the output file java -jar C:\techila\lib\techila.jar peach \ command="binary;osname=Linux,binary.exe;osname=Windows" \ parameters="5 %P(peachparam)" \ platform="Windows;Linux" \ outputfiles="output;file=output_1" \ peachvector="1 2 3 4 5" \ datafile1.txt datafile2.txt The content of this presentation is confidential. Using, copying, or giving any part of this presentation or its description to a third party is strictly forbidden without the prior written consent of Techila Technologies Ltd. 36 WWW.TECHILATECHNOLOGIES.COM