Pre-Conference Workshops

Size: px
Start display at page:

Download "Pre-Conference Workshops"

Transcription

1 Pre-Conference Workshops Michael Bussieck Steve Dirkse Fred Fiand Lutz Westermann GAMS Development Corp. GAMS Software GmbH

2 Outline Part I: An Introduction to GAMS Part II: Stochastic programming in GAMS Part III: The GAMS (Object-Oriented) API's Part IV: Code embedding in GAMS 2

3 3

4 Motivation Avoid Unreadable/Slow Code GAMS code for parallel assignment and equation definition is compact, elegant, and efficient GAMS uses relational data tables as a base data structure Traditional data structure are not available in GAMS No arrays, lists, dictionaries, trees, graphs, GAMS can represent such traditional data structures but GAMS code becomes quickly unreadable t(tt) = t(tt-1); // advances set element t to t+1 Performance with naïve representation is very inefficient t(tt) = ord(tt)=tcnt; // advances set element t to t+1 Writing code that executes efficiently requires deep understanding of underlying GAMS internal data structures and often results in even more unreadable code 4

5 Motivation Data Input/Transformation at Compile Time GAMS data input (ASCII) follows strict syntax Practical GAMS models get data (via ASCII input files) that is often not in a proper shape Hence GAMS code is often augmented with execution of scripts and programs to get data files into a GAMS readable shape GAMS even ships a selection of POSIX text utilities (sed, grep, awk, ) on Windows to support a somewhat standardized way of transforming text files into GAMS readable format Scripts spawned by GAMS cannot (easily) access data that is already available in GAMS GAMS has no string editing facilities to e.g. modify labels change content of compile time variables Solution : $xxx new and weird compile time constructs, e.g. $setnames, $splitoption, 5

6 Motivation Other Connecting libraries for special algorithms (e.g. graph algorithms like connected components, matrix operations like Cholesky factorization) to GAMS is not easy Current solution has issues $unload/$call/$load or execute_unload/execute/execute_load Performance: disk IO + process creation Knowledge of data API (GDX or OO-API) Remapping of relational data (plus concept of UELs) into other data structures Add compile time directives to perform a single special task (e.g. $splitoption) Introduce unreadable option or put_utility syntax to perform a single special task (e.g. option a<b;) Object Oriented API/Framework versus Embedded Code OO-API: Framework in control Embedded Code: GAMS in control 6

7 Embedded Code Support the use of external code during GAMS compile and execution time Provide support for off-line debugging of embedded code Share GAMS symbols (sets, parameters, variables, and equations) structure and content with the external code in memory Communication of the data between GAMS and the embedded code inspired by the existing interface to GDX in many ways: Records access by both labels and label indices Data in GAMS can be merged with or replaced by data from embedded code Data from embedded code can be send to GAMS database filtered or domain checked Provide automatically generated, additional source code for common tasks Allows the user to concentrate on the task at hand and not the mechanics 7

8 Example Calculate i j 4-quantiles of k numbers: Set i /... /, j /... /, k /... / Table p(i,j,k) k1 k2... i1.j i1.j ; Set q; Parameter quantiles(i,j,q); $onembeddedcode Python: import pandas as pd df = pd.dataframe(list(gams.get('p'))) q = df.groupby([0,1]).quantile([0,.25,.5,.75,1]) gams.set('quantiles', [ (*k[:-1],str(k[-1]),v[3]) for k,v in q.iterrows() ]) $offembeddedcode q<quantiles quantiles display q, quantiles; 8

9 Split Example Data Set cc / "France - Paris", "France - Lille", "France - Toulouse", "Spain - Madrid", "Spain - Cordoba", "Spain - Seville", "Spain - Bilbao", "USA - Washington DC", "USA - Houston", "USA - New York", "Germany - Berlin", "Germany - Munich", "Germany - Bonn" / country / system.empty / city / system.empty / mcccountry(cc,country) mcccity (cc,city); Hands-On embeddedsplit 9

10 Split Example Embedded Code $onembeddedcode Python: country = set() city = set() mcccountry = [] mcccity = [] for cc in gams.get("cc"): r = str.split(cc, " - ", 1) country.add(r[0]) city.add(r[1]) mcccountry.append((cc,r[0])) mcccity.append((cc,r[1])) gams.set("country",list(country)) gams.set("city",list(city)) gams.set("mcccountry",mcccountry) gams.set("mcccity",mcccity) $offembeddedcode country city mcccountry mcccity 10

11 Split Example Output Display country, city; SET country France, USA, Spain, Germany SET city Seville, Washington DC, New York, Paris Munich, Madrid, Toulouse, Berlin Bonn, Lille, Houston, Bilbao Cordoba 11

12 Sorting Example Set i / i1*i10 /; Parameter a(i) Random Data aindex(i) Sorted index of a; a(i) = uniformint(1,10*card(i)); embeddedcode Python: a = list(gams.get("a")) tmp = [r[0] for r in sorted(enumerate(a), key=lambda x:x[1][-1])] aindex = len(a)*[-1] for idx in range(len(tmp)): aindex[tmp[idx]] = (a[tmp[idx]][0], idx+1) gams.set("aindex",aindex) endembeddedcode aindex Hands-On embeddedsort 12

13 Sorting Example Output Display a, aindex; PARAMETER a Random Data , , , , , , , , , PARAMETER aindex Sorted Index of a , , , , , , , , ,

14 Exchange via Files $onembeddedcode Python: 10 f = open('i.txt', 'w') for i in range(int(gams.arguments)): f.write('i'+str(i+1)+'\n') f.close() $offembeddedcode Set i / $include i.txt /; Display i; SET i i1, i2, i3, i4, i5, i6, i7, i8, i9, i10 Hands-On exchangeviafiles 14

15 Exchange via Environment Variables Set i / i1*i5 /; Parameter b(i) / i1 2, i2 7, i3 59, i4 2, i5 47 /; Set k "from 0 to max(b)" / k0*k? /; $onembeddedcode Python: import os kmax = int(max([b[1] for b in list(gams.get("b"))])) gams.printlog('max value in b is ' + str(kmax)) os.environ["maxb"] = str(kmax) $offembeddedcode $if x%sysenv.maxb%==x $abort MAXB is not set Set k "from 0 to max(b)" / k0*k%sysenv.maxb% /; Scalar card_k; card_k = card(k); Display card_k; PARAMETER card_k = Hands-On exchangeviaenvvars 15

16 Multiple Independent Python Sessions $if not %sysenv.gmspythonmultinst%==1 $abort.noerror Set command line option pymultinst=1 Set i / i1*i3 /; Parameter h(i) ord_i / 0 /; loop(i, ord_i = ord(i); embeddedcode Python: i = int(list(gams.get("ord_i"))[0]) gams.printlog(str(i)) pauseembeddedcode h(i) = embeddedhandle; ); loop(i, continueembeddedcode h(i): gams.printlog(str(i)) endembeddedcode ); Hands-On embeddedmultiinstance 16

17 Multiple Independent Python Sessions Log --- Initialize embedded library embpycclib.dll --- Execute embedded library embpycclib.dll Initialize embedded library embpycclib.dll --- Execute embedded library embpycclib.dll Initialize embedded library embpycclib.dll --- Execute embedded library embpycclib.dll Execute embedded library embpycclib.dll Execute embedded library embpycclib.dll Execute embedded library embpycclib.dll

18 Performance Considerations Set i / i1*i50 /, p(i,i); Alias (i,ii); Parameter c(i,i); c(i,ii) = uniform(-50,50); Set iter / 1*100 /; Scalar tcost, mintcost / +inf /; loop(iter, embeddedcode Python: import random i = list(gams.get("i")) p = list(i) random.shuffle(p) for idx in range(len(i)): p[idx] = (i[idx], p[idx]) gams.set("p", p) endembeddedcode p tcost = sum(p, c(p)); if (tcost < mintcost, mintcost = tcost); ); Display mintcost; EXECUTION TIME = SECONDS Hands-On performance 18

19 Performance Considerations Set i / i1*i50 /, p(i,i); Alias (i,ii); Parameter c(i,i); c(i,ii) = uniform(-50,50); embeddedcode Python: import random pauseembeddedcode Set iter / 1*1000 /; Scalar tcost, mintcost / +inf /; loop(iter, continueembeddedcode: i = list(gams.get("i")) p = list(i) random.shuffle(p) for idx in range(len(i)): p[idx] = (i[idx], p[idx]) gams.set("p", p) pauseembeddedcode p tcost = sum(p, c(p)); if (tcost < mintcost, mintcost = tcost); ); continueembeddedcode: pass endembeddedcode Display mintcost; EXECUTION TIME = SECONDS 19

20 Performance Considerations Set i / i1*i50 /, p(i,i); Alias (i,ii); Parameter c(i,i); c(i,ii) = uniform(-50,50); embeddedcode Python: import random i = list(gams.get("i")) pauseembeddedcode Set iter / 1*1000 /; Scalar tcost, mintcost / +inf /; loop(iter, continueembeddedcode Python: p = list(i) random.shuffle(p) for idx in range(len(i)): p[idx] = (i[idx], p[idx]) gams.set("p", p) pauseembeddedcode p tcost = sum(p, c(p)); if (tcost < mintcost, mintcost = tcost); ); continueembeddedcode: pass endembeddedcode Display mintcost; EXECUTION TIME = SECONDS 20

21 Performance Considerations Set i / i1*i50 /, p(i,i); Alias (i,ii); Parameter c(i,i); c(i,ii) = uniform(-50,50); embeddedcode Python: import random i = list(gams.get("i",keytype=keytype.int)) pauseembeddedcode Set iter / 1*1000 /; Scalar tcost, mintcost / +inf /; loop(iter, continueembeddedcode Python: p = list(i) random.shuffle(p) for idx in range(len(i)): p[idx] = (i[idx], p[idx]) gams.set("p", p) pauseembeddedcode p tcost = sum(p, c(p)); if (tcost < mintcost, mintcost = tcost); ); continueembeddedcode: pass endembeddedcode Display mintcost; EXECUTION TIME = SECONDS 21

22 Syntax: GAMS Compile Time: $onembeddedcode[s V] Python: [arguments] Python code {Python code} $offembeddedcode {output symbol} $onembeddedcode[s] Python: [arguments] Starts a section with Python code Parameter substitution is activated The optional arguments can be accessed in the Python code $onembeddedcodev Python: [arguments] Same as $onembeddedcode but parameter substitution is disabled (the Python code is passed on verbatim) $offembeddedcode {output symbol} Ends a section with Python code The optional output symbol(s) get updated in the GAMS database 22

23 Syntax: GAMS Execution Time: EmbeddedCode[S V] Python: [arguments] Python code {Python code} endembeddedcode {output symbol} EmbeddedCode[S] Python: [arguments] Starts a section with Python code Parameter substitution is activated The optional arguments can be accessed in the Python code EmbeddedCodeV Python: [arguments] Same as EmbeddedCode but parameter substitution is disabled (the Python code is passed on verbatim) endembeddedcode {output symbol} Ends a section with Python code The optional output symbol(s) get updated in the GAMS database 23

24 Syntax: GAMS Execution Time: pauseembeddedcode {output symbols} continueembeddedcode[s V] [handle]: [arguments] pauseembeddedcode {output symbol} Pauses a section with Python code The optional output symbol(s) get updated in the GAMS database continueembeddedcode[s] [handle]: [arguments] Continues a previously paused section with Python code Parameter substitution is activated The optional arguments can be accessed in the Python code The optional handle (pointing to a specific paused embedded code section) could be retrieved by the function embeddedhandle. If omitted, the last section paused will be continued. continueembeddedcodev [handle]: [arguments] Same as continueembeddedcode but parameter substitution is disabled (the Python code is passed on verbatim) 24

25 Syntax: Python The Python Class ECGamsDatabase serves as interface between GAMS and Python. An instance of this class is automatically created when an embedded code section is entered and can be accessed using the identifier gams. Several methods can be used to interact with GAMS: gams.get(symbolname, [ ]) Retrieves iterable object representing the symbol symbolname Several optional parameters allow to modify format of the data gams.set(symbolname, data[, merge][, domcheck]) Sets data for the GAMS symbol symbolname Data takes a Python list of items representing records of the symbol Optional parameter merge specifies if data in a GAMS symbol is merged or replaced Optional parameter domcheck specifies if Domain Checking is applied 25

26 Syntax: Python gams.getuel(idx) Returns the label corresponding to the label index idx gams.mergeuel(label) Adds label to the GAMS universe if it was unknown and returns the corresponding label index Note: New labels cannot be added at execution time gams.getuelcount() Returns the number of labels gams.printlog(msg) Print msg to log gams.arguments Contains the arguments that were passed to the Python interpreter at start-up of the embedded code section gams.epsaszero Flag to read GAMS EPS as 0 [True] or as a small number ( E-300) [False] gams._debug Debug flag for additional output 26

27 Some Examples of Python Embedded Code Splitting of labels (compile time) Permutation Sorting Calculation of quantiles Power set Matching Parsing of specially structured ASCII input TSP subtour elimination Benders Decomposition using Message Passing Interface (MPI) on High-Performance Computing (HPC) infrastructure 27

28 Plot example Hands-On meanvarplot 28

29 Next steps More examples High Performance Libraries for specific tasks FORTRAN (Factorization of matrix) C/C++ (Expansion Planning Power Systems) Support of other popular frameworks (compiled and interpreted) C/C++ C#/.NET, Java, R, Connect of powerful libraries e.g. boost::graph, Provide a configurable build system that supports building the required libraries (for compiled languages) at GAMS compile time Provide a documented API to allow integration of individual user embedded code libraries Asynchronous/parallel use of embedded code This feature is currently in beta status. Any feedback to support@gams.com is highly appreciated. 29

30 Thank You Meet us at the GAMS booth! GAMS Development Corp. GAMS Software GmbH

Pre-Conference Workshops

Pre-Conference Workshops Pre-Conference Workshops Fred Fiand Franz Nelissen Lutz Westermann GAMS Development Corp. GAMS Software GmbH www.gams.com Outline Part I: An Introduction to GAMS Part II: Stochastic programming in GAMS

More information

Enhanced Model Deployment and Solution in GAMS

Enhanced Model Deployment and Solution in GAMS Enhanced Model Deployment and Solution in GAMS Steve Dirkse GAMS Development Corp. GAMS Software GmbH www.gams.com Introduction User interaction provided valuable feedback on: The GAMS IDE Building algorithms

More information

Pre-Conference Workshops

Pre-Conference Workshops Pre-Conference Workshops Michael Bussieck Steve Dirkse Fred Fiand Lutz Westermann GAMS Development Corp. GAMS Software GmbH www.gams.com Outline Part I: An Introduction to GAMS Part II: Stochastic programming

More information

Recent enhancements in. GAMS Software GmbH GAMS Development Corporation

Recent enhancements in. GAMS Software GmbH GAMS Development Corporation Recent enhancements in Lutz Westermann lwestermann@gams.com GAMS Software GmbH GAMS Development Corporation www.gams.com GAMS at a Glance Algebraic Modeling System Facilitates to formulate mathematical

More information

GAMS and High-Performance Computing

GAMS and High-Performance Computing GAMS and High-Performance Computing Frederik Fiand Operations Research Analyst, GAMS Software GAMS Development Corp. GAMS Software GmbH www.gams.com Motivation ... HPC standard Available Computing Resources

More information

GAMS Deployment. Michael Bussieck GAMS Software GmbH GAMS Development Corporation

GAMS Deployment. Michael Bussieck GAMS Software GmbH GAMS Development Corporation GAMS Deployment Michael Bussieck mbussieck@gams.com GAMS Software GmbH GAMS Development Corporation www.gams.com Topics for Deployment Protection of models Save/restart Secure save/restart Encryption Embedding

More information

Rapid Application Prototyping using GAMS

Rapid Application Prototyping using GAMS Rapid Application Prototyping using GAMS Steven Dirkse sdirkse@gams.com GAMS Development Corp www.gams.com 1 INFORMS Annual Meeting Seattle, November 4, 2007 Welcome/Agenda Working with GAMS A Guided Tour

More information

Solving Large-Scale Energy System Models

Solving Large-Scale Energy System Models Solving Large-Scale Energy System Models Frederik Fiand Operations Research Analyst GAMS Software GmbH GAMS Development Corp. GAMS Software GmbH www.gams.com Agenda 1. GAMS System Overview 2. BEAM-ME Background

More information

Pre Conference Workshop. GAMS Software GmbH GAMS Development Corporation

Pre Conference Workshop. GAMS Software GmbH GAMS Development Corporation Pre Conference Workshop Lutz Westermann Clemens Westphal lwestermann@gams.com cwestpahl@gams.com GAMS Software GmbH GAMS Development Corporation www.gams.com 1 I. Stochastic Programming II. Object Oriented

More information

GAMS. How can I make this work... arrgghh? GAMS Development Corporation

GAMS. How can I make this work... arrgghh? GAMS Development Corporation GAMS How can I make this work... arrgghh? Jan-H. Jagla Lutz Westermann jhjagla@gams.com lwestermann@gams.com GAMS Software GmbH GAMS Development Corporation www.gams.de www.gams.com Introduction GAMS at

More information

Design Principles that Make the Difference

Design Principles that Make the Difference Design Principles that Make the Difference Franz Nelissen: FNelissen@gams.com GAMS Development Corp. GAMS Software GmbH www.gams.com Company Background Roots: World Bank, 1976 GAMS Development Corporation

More information

Solving Scenarios in the Cloud

Solving Scenarios in the Cloud Solving Scenarios in the Cloud Franz Nelißen FNelissen@gams.com GAMS Development Corp. GAMS Software GmbH www.gams.com GAMS - History Roots: World Bank, 1976 Alex Meerausfounded GAMS Development Corp.

More information

Enhanced Model Deployment in GAMS

Enhanced Model Deployment in GAMS Enhanced Model Deployment in GAMS Using R/Shiny to deploy and visualize GAMS models in a Web Interface Lutz Westermann Frederik Proske GAMS Software GmbH GAMS Development Corp. GAMS Software GmbH www.gams.com

More information

GMO: GAMS Next-Generation Model API. GAMS Development Corporation

GMO: GAMS Next-Generation Model API. GAMS Development Corporation GMO: GAMS Next-Generation Model API Steve Dirkse sdirkse@gams.com GAMS Development Corporation www.gams.com GMO: A Team Effort Michael Bussieck Jan-Hendrik Jagla Alex Meeraus Paul van der Eijk Lutz Westermann

More information

Recent enhancements in. GAMS Development Corporation

Recent enhancements in. GAMS Development Corporation Recent enhancements in Jan-H. Jagla jhjagla@gams.com GAMS Software GmbH GAMS Development Corporation www.gams.de www.gams.com GAMS at a Glance General Algebraic Modeling System Roots: World Bank, 1976

More information

High Performance Computing with GAMS

High Performance Computing with GAMS High Performance omputing with GAMS M.Bussieck (GAMS), F. Fiand (GAMS) Octoer 2017 2017 INFORMS Annual Meeting Houston, exas Octoer 22-25 a project y 2 Outline Motivation & Project Overview Parallel Interior

More information

Outline. Introduction to Perl. Why use scripting languages? What is expressiveness. Why use Java over C

Outline. Introduction to Perl. Why use scripting languages? What is expressiveness. Why use Java over C Outline Introduction to Perl Grégory Mounié Scripting Languages Perl 2012-10-11 jeu. Basics Advanced 1 / 30 2 / 30 Why use scripting languages? What is expressiveness Why use Java over C Memory management

More information

Python Scripting for Computational Science

Python Scripting for Computational Science Hans Petter Langtangen Python Scripting for Computational Science Third Edition With 62 Figures Sprin ger Table of Contents 1 Introduction 1 1.1 Scripting versus Traditional Programming 1 1.1.1 Why Scripting

More information

challenges in domain-specific modeling raphaël mannadiar august 27, 2009

challenges in domain-specific modeling raphaël mannadiar august 27, 2009 challenges in domain-specific modeling raphaël mannadiar august 27, 2009 raphaël mannadiar challenges in domain-specific modeling 1/59 outline 1 introduction 2 approaches 3 debugging and simulation 4 differencing

More information

Decomposition Methods for Mathematical Programming Problems. GAMS Software GmbH / GAMS Development Corp.

Decomposition Methods for Mathematical Programming Problems. GAMS Software GmbH / GAMS Development Corp. Decomposition Methods for Mathematical Programming Problems Michael R. Bussieck Stefan Vigerske mbussieck@gams.com svigerske@gams.com GAMS Software GmbH / GAMS Development Corp. www.gams.com Aachen, June

More information

Python Scripting for Computational Science

Python Scripting for Computational Science Hans Petter Langtangen Python Scripting for Computational Science Third Edition With 62 Figures 43 Springer Table of Contents 1 Introduction... 1 1.1 Scripting versus Traditional Programming... 1 1.1.1

More information

Parallel processing in GAMS how it is used in CAPRI

Parallel processing in GAMS how it is used in CAPRI Parallel processing in GAMS how it is used in CAPRI - Wolfgang Britz, September 2010 - Background and motivation Since a few years, increases in CPU speed have slowed downed, while computers with several

More information

Obfuscating Transformations. What is Obfuscator? Obfuscation Library. Obfuscation vs. Deobfuscation. Summary

Obfuscating Transformations. What is Obfuscator? Obfuscation Library. Obfuscation vs. Deobfuscation. Summary ? Obfuscating Outline? 1? 2 of Obfuscating 3 Motivation: Java Virtual Machine? difference between Java and others? Most programming languages: Java: Source Code Machine Code Predefined Architecture Java

More information

sottotitolo A.A. 2016/17 Federico Reghenzani, Alessandro Barenghi

sottotitolo A.A. 2016/17 Federico Reghenzani, Alessandro Barenghi Titolo presentazione Piattaforme Software per la Rete sottotitolo BASH Scripting Milano, XX mese 20XX A.A. 2016/17, Alessandro Barenghi Outline 1) Introduction to BASH 2) Helper commands 3) Control Flow

More information

Introduction to Matlab

Introduction to Matlab Introduction to Matlab Weichung Wang 2003 NCTS-NSF Workshop on Differential Equations, Surface Theory, and Mathematical Visualization NCTS, Hsinchu, February 13, 2003 DE, ST, MV Workshop Matlab 1 Main

More information

UNIX Shell Programming

UNIX Shell Programming $!... 5:13 $$ and $!... 5:13.profile File... 7:4 /etc/bashrc... 10:13 /etc/profile... 10:12 /etc/profile File... 7:5 ~/.bash_login... 10:15 ~/.bash_logout... 10:18 ~/.bash_profile... 10:14 ~/.bashrc...

More information

INF3380: Parallel Programming for Natural Sciences

INF3380: Parallel Programming for Natural Sciences INF3380: Parallel Programming for Natural Sciences Xing Cai & Aslak Tveito Simula Research Laboratory, and Dept. of Informatics, Univ. of Oslo INF3380: Parallel Programming for Natural Sciences p. 1 Lecture

More information

GAMS Striving for Innovation and Compatibility

GAMS Striving for Innovation and Compatibility GAMS Striving for Innovation and Compatibility Michael R Bussieck mbussieck@gams.com GAMS Development Corp. www.gams.com GAMS Software GmbH www.gams.de December 1, 2011 Then 2 GAMS Users Guide (1988) and

More information

1 Introduction to MATLAB

1 Introduction to MATLAB 1 Introduction to MATLAB 1.1 General Information Quick Overview This chapter is not intended to be a comprehensive manual of MATLAB R. Our sole aim is to provide sufficient information to give you a good

More information

STEPHEN WOLFRAM MATHEMATICADO. Fourth Edition WOLFRAM MEDIA CAMBRIDGE UNIVERSITY PRESS

STEPHEN WOLFRAM MATHEMATICADO. Fourth Edition WOLFRAM MEDIA CAMBRIDGE UNIVERSITY PRESS STEPHEN WOLFRAM MATHEMATICADO OO Fourth Edition WOLFRAM MEDIA CAMBRIDGE UNIVERSITY PRESS Table of Contents XXI a section new for Version 3 a section new for Version 4 a section substantially modified for

More information

Lecture 5. Essential skills for bioinformatics: Unix/Linux

Lecture 5. Essential skills for bioinformatics: Unix/Linux Lecture 5 Essential skills for bioinformatics: Unix/Linux UNIX DATA TOOLS Text processing with awk We have illustrated two ways awk can come in handy: Filtering data using rules that can combine regular

More information

Chapter 2: Lists, Arrays and Dictionaries

Chapter 2: Lists, Arrays and Dictionaries Chapter 2: Lists, Arrays and Dictionaries 1. Higher order organization of data In the previous chapter, we have seen the concept of scalar variables that define memory space in which we store a scalar,

More information

1 Introduction to MATLAB

1 Introduction to MATLAB 1 Introduction to MATLAB 1.1 Quick Overview This chapter is not intended to be a comprehensive manual of MATLAB R. Our sole aim is to provide sufficient information to give you a good start. If you are

More information

Task-based distributed processing for radio-interferometric imaging with CASA

Task-based distributed processing for radio-interferometric imaging with CASA H2020-Astronomy ESFRI and Research Infrastructure Cluster (Grant Agreement number: 653477). Task-based distributed processing for radio-interferometric imaging with CASA BOJAN NIKOLIC 2 nd ASTERICS-OBELICS

More information

AMAχOS Abstract Machine for Xcerpt

AMAχOS Abstract Machine for Xcerpt AMAχOS Abstract Machine for Xcerpt Principles Architecture François Bry, Tim Furche, Benedikt Linse PPSWR 06, Budva, Montenegro, June 11th, 2006 Abstract Machine(s) Definition and Variants abstract machine

More information

GAMS. General Algebraic Modeling System. EURO 2009 Bonn. Michael Bussieck Jan-Hendrik Jagla

GAMS. General Algebraic Modeling System. EURO 2009 Bonn. Michael Bussieck Jan-Hendrik Jagla GAMS General Algebraic Modeling System Michael Bussieck mbussieck@gams.com Jan-Hendrik Jagla jhjagla@gams.com GAMS Software GmbH www.gams.de GAMS Development Corporation www.gams.com EURO 2009 Bonn GAMS

More information

High Performance Computing with GAMS

High Performance Computing with GAMS Supported by: ~ 1 Federal Ministry 'W for Economic Affairs and Energy on the basis of a decision by the German Bundestag High Performance Computing with GAMS F. Fiand, M. Bussieck September 7 th, 2017

More information

Language Translation, History. CS152. Chris Pollett. Sep. 3, 2008.

Language Translation, History. CS152. Chris Pollett. Sep. 3, 2008. Language Translation, History. CS152. Chris Pollett. Sep. 3, 2008. Outline. Language Definition, Translation. History of Programming Languages. Language Definition. There are several different ways one

More information

Scientific Computing Using. Atriya Sen

Scientific Computing Using. Atriya Sen Scientific Computing Using Atriya Sen Broad Outline Part I, in which I discuss several aspects of the Python programming language Part II, in which I talk about some Python modules for scientific computing

More information

Using MATLAB, SIMULINK and Control System Toolbox

Using MATLAB, SIMULINK and Control System Toolbox Using MATLAB, SIMULINK and Control System Toolbox A practical approach Alberto Cavallo Roberto Setola Francesco Vasca Prentice Hall London New York Toronto Sydney Tokyo Singapore Madrid Mexico City Munich

More information

JavaScript Context. INFO/CSE 100, Spring 2005 Fluency in Information Technology.

JavaScript Context. INFO/CSE 100, Spring 2005 Fluency in Information Technology. JavaScript Context INFO/CSE 100, Spring 2005 Fluency in Information Technology http://www.cs.washington.edu/100 fit100-17-context 2005 University of Washington 1 References Readings and References» Wikipedia

More information

Today. Operating System Evolution. CSCI 4061 Introduction to Operating Systems. Gen 1: Mono-programming ( ) OS Evolution Unix Overview

Today. Operating System Evolution. CSCI 4061 Introduction to Operating Systems. Gen 1: Mono-programming ( ) OS Evolution Unix Overview Today CSCI 4061 Introduction to s Instructor: Abhishek Chandra OS Evolution Unix Overview Unix Structure Shells and Utilities Calls and APIs 2 Evolution How did the OS evolve? Dependent on hardware and

More information

Abstract 1. Introduction

Abstract 1. Introduction Jaguar: A Distributed Computing Environment Based on Java Sheng-De Wang and Wei-Shen Wang Department of Electrical Engineering National Taiwan University Taipei, Taiwan Abstract As the development of network

More information

LAB 1 Perl I. To get the lab approved, send your code to:

LAB 1 Perl I. To get the lab approved, send your code to: LAB 1 Perl I To get the lab approved, send your code to: david.sundell@plantphys.umu.se Installation OBS: On the course computers these programs are already installed! ActivePerl: http://www.activestate.com/activeperl

More information

The Eclipse Parallel Tools Platform

The Eclipse Parallel Tools Platform May 1, 2012 Toward an Integrated Development Environment for Improved Software Engineering on Crays Agenda 1. What is the Eclipse Parallel Tools Platform (PTP) 2. Tour of features available in Eclipse/PTP

More information

Introducing a new tool set. Sean Patrick Santos. 19th Annual CESM Workshop, 2014

Introducing a new tool set. Sean Patrick Santos. 19th Annual CESM Workshop, 2014 Unit Testing in CESM Introducing a new tool set Sean Patrick Santos National Center for Atmospheric Research 19th Annual CESM Workshop, 2014 Overview Outline 1 Overview 2 Workflows Running Unit Tests Creating

More information

8/16/12. Computer Organization. Architecture. Computer Organization. Computer Basics

8/16/12. Computer Organization. Architecture. Computer Organization. Computer Basics Computer Organization Computer Basics TOPICS Computer Organization Data Representation Program Execution Computer Languages 1 2 Architecture Computer Organization n central-processing unit n performs the

More information

AMS209 Final Project

AMS209 Final Project AMS209 Final Project Xingchen Yu Department of Applied Mathematics and Statistics, University of California, Santa Cruz November 2015 1 Abstract In the project, we explore LU decomposition with or without

More information

Shell Programming. Introduction to Linux. Peter Ruprecht Research CU Boulder

Shell Programming. Introduction to Linux. Peter Ruprecht  Research CU Boulder Introduction to Linux Shell Programming Peter Ruprecht peter.ruprecht@colorado.edu www.rc.colorado.edu Downloadable Materials Slides and examples available at https://github.com/researchcomputing/ Final_Tutorials/

More information

PYTABLES & Family. Analyzing and Sharing HDF5 Data with Python. Francesc Altet. HDF Workshop November 30, December 2, Cárabos Coop. V.

PYTABLES & Family. Analyzing and Sharing HDF5 Data with Python. Francesc Altet. HDF Workshop November 30, December 2, Cárabos Coop. V. & Family Analyzing and Sharing HDF5 Data with Python Cárabos Coop. V. HDF Workshop November 30, 2005 - December 2, 2005. & Family Who are we? An Introduction to the Python Language Cárabos is the company

More information

System Administration HW3

System Administration HW3 System Administration HW3 - Happy Shell Script programming ymli Overview 3-1 Process Inspector (20%) A one-liner script to show statistics of all processes 3-2 Polyglot (25%) How many languages can you

More information

Usually, target code is semantically equivalent to source code, but not always!

Usually, target code is semantically equivalent to source code, but not always! What is a Compiler? Compiler A program that translates code in one language (source code) to code in another language (target code). Usually, target code is semantically equivalent to source code, but

More information

Programming in Python

Programming in Python COURSE DESCRIPTION This course presents both the programming interface and the techniques that can be used to write procedures in Python on Unix / Linux systems. COURSE OBJECTIVES Each participant will

More information

Parallel Programming Features in the Fortran Standard. Steve Lionel 12/4/2012

Parallel Programming Features in the Fortran Standard. Steve Lionel 12/4/2012 Parallel Programming Features in the Fortran Standard Steve Lionel 12/4/2012 Agenda Overview of popular parallelism methodologies FORALL a look back DO CONCURRENT Coarrays Fortran 2015 Q+A 12/5/2012 2

More information

Interactions between a Modeling System and Advanced Solvers. GAMS Development Corporation

Interactions between a Modeling System and Advanced Solvers. GAMS Development Corporation Interactions between a Modeling System and Advanced Solvers Jan-H. Jagla jhjagla@gams.com GAMS Software GmbH GAMS Development Corporation www.gams.de www.gams.com Agenda GAMS Fundamental concepts Different

More information

INTRODUCTION TO MATLAB, SIMULINK, AND THE COMMUNICATION TOOLBOX

INTRODUCTION TO MATLAB, SIMULINK, AND THE COMMUNICATION TOOLBOX INTRODUCTION TO MATLAB, SIMULINK, AND THE COMMUNICATION TOOLBOX 1) Objective The objective of this lab is to review how to access Matlab, Simulink, and the Communications Toolbox, and to become familiar

More information

This course is designed for anyone who needs to learn how to write programs in Python.

This course is designed for anyone who needs to learn how to write programs in Python. Python Programming COURSE OVERVIEW: This course introduces the student to the Python language. Upon completion of the course, the student will be able to write non-trivial Python programs dealing with

More information

Today. Operating System Evolution. CSCI 4061 Introduction to Operating Systems. Gen 1: Mono-programming ( ) OS Evolution Unix Overview

Today. Operating System Evolution. CSCI 4061 Introduction to Operating Systems. Gen 1: Mono-programming ( ) OS Evolution Unix Overview Today CSCI 4061 Introduction to s Instructor: Abhishek Chandra OS Evolution Unix Overview Unix Structure Shells and Utilities Calls and APIs 2 Evolution How did the OS evolve? Generation 1: Mono-programming

More information

Scripting languages work methodology. Tomasz Bold D11 pok. 107

Scripting languages work methodology. Tomasz Bold D11 pok. 107 Scripting languages work methodology Tomasz Bold tomasz.bold@fis.agh.edu.pl D11 pok. 107 1 Organisation Lectures & labs one after another Lecure 1 Elementary information: history, applications, methodology.

More information

Welcome. Modern Fortran (F77 to F90 and beyond) Virtual tutorial starts at BST

Welcome. Modern Fortran (F77 to F90 and beyond) Virtual tutorial starts at BST Welcome Modern Fortran (F77 to F90 and beyond) Virtual tutorial starts at 15.00 BST Modern Fortran: F77 to F90 and beyond Adrian Jackson adrianj@epcc.ed.ac.uk @adrianjhpc Fortran Ancient History (1967)

More information

AUTHORS: FERNANDO PEREZ BRIAN E GRANGER (IEEE 2007) PRESENTED BY: RASHMISNATA ACHARYYA

AUTHORS: FERNANDO PEREZ BRIAN E GRANGER (IEEE 2007) PRESENTED BY: RASHMISNATA ACHARYYA I A system for Interactive Scientific Computing AUTHORS: FERNANDO PEREZ BRIAN E GRANGER (IEEE 2007) PRESENTED BY: RASHMISNATA ACHARYYA Key Idea and Background What is Ipython? Why Ipython? How, when and

More information

Introduction to Matlab. Summer School CEA-EDF-INRIA 2011 of Numerical Analysis

Introduction to Matlab. Summer School CEA-EDF-INRIA 2011 of Numerical Analysis Introduction to Matlab 1 Outline What is Matlab? Matlab desktop & interface Scalar variables Vectors and matrices Exercise 1 Booleans Control structures File organization User defined functions Exercise

More information

Table of Contents EVALUATION COPY

Table of Contents EVALUATION COPY Table of Contents Introduction... 1-2 A Brief History of Python... 1-3 Python Versions... 1-4 Installing Python... 1-5 Environment Variables... 1-6 Executing Python from the Command Line... 1-7 IDLE...

More information

Lecture 17: Array Algorithms

Lecture 17: Array Algorithms Lecture 17: Array Algorithms CS178: Programming Parallel and Distributed Systems April 4, 2001 Steven P. Reiss I. Overview A. We talking about constructing parallel programs 1. Last time we discussed sorting

More information

LooPo: Automatic Loop Parallelization

LooPo: Automatic Loop Parallelization LooPo: Automatic Loop Parallelization Michael Claßen Fakultät für Informatik und Mathematik Düsseldorf, November 27 th 2008 Model-Based Loop Transformations model-based approach: map source code to an

More information

SC12 HPC Educators session: Unveiling parallelization strategies at undergraduate level

SC12 HPC Educators session: Unveiling parallelization strategies at undergraduate level SC12 HPC Educators session: Unveiling parallelization strategies at undergraduate level E. Ayguadé, R. M. Badia, D. Jiménez, J. Labarta and V. Subotic August 31, 2012 Index Index 1 1 The infrastructure:

More information

Mineração de Dados Aplicada

Mineração de Dados Aplicada sed September, 10 th 2018 DCC ICEx UFMG Outline for the next sessions Today sed; 12/09 awk s basics; 17/09 awk s array; 19/09 A few words about efficiency; 24/09 Oral presentation of your data. 2 / 17

More information

PYTHON FOR MEDICAL PHYSICISTS. Radiation Oncology Medical Physics Cancer Care Services, Royal Brisbane & Women s Hospital

PYTHON FOR MEDICAL PHYSICISTS. Radiation Oncology Medical Physics Cancer Care Services, Royal Brisbane & Women s Hospital PYTHON FOR MEDICAL PHYSICISTS Radiation Oncology Medical Physics Cancer Care Services, Royal Brisbane & Women s Hospital TUTORIAL 1: INTRODUCTION Thursday 1 st October, 2015 AGENDA 1. Reference list 2.

More information

INF3380: Parallel Programming for Scientific Problems

INF3380: Parallel Programming for Scientific Problems INF3380: Parallel Programming for Scientific Problems Xing Cai Simula Research Laboratory, and Dept. of Informatics, Univ. of Oslo INF3380: Parallel Programming for Scientific Problems p. 1 Course overview

More information

Martin Kruliš, v

Martin Kruliš, v Martin Kruliš 1 Optimizations in General Code And Compilation Memory Considerations Parallelism Profiling And Optimization Examples 2 Premature optimization is the root of all evil. -- D. Knuth Our goal

More information

Error The Process Exit Code Was 128. The Step

Error The Process Exit Code Was 128. The Step Error The Process Exit Code Was 128. The Step Failed ERROR: Fetcher failure: Fetch command failed with exit code 128, output: to be the culprit meta-clanton_v0.7.5 depends on this during bitbake process.

More information

Bash command shell language interpreter

Bash command shell language interpreter Principles of Programming Languages Bash command shell language interpreter Advanced seminar topic Louis Sugy & Baptiste Thémine Presentation on December 8th, 2017 Table of contents I. General information

More information

Methods to improve computing times in linear energy system optimization models

Methods to improve computing times in linear energy system optimization models Methods to improve computing times in linear energy system optimization models Hans Christian Gils, Karl-Kiên Cao, Manuel Wetzel, Felix Cebulla, Kai von Krbek, Benjamin Fuchs, Frieder Borggrefe DLR German

More information

Programming in Python 3

Programming in Python 3 Programming in Python 3 A Complete Introduction to the Python Language Mark Summerfield.4.Addison-Wesley Upper Saddle River, NJ Boston Indianapolis San Francisco New York Toronto Montreal London Munich

More information

Recent Enhancement in GAMS. GAMS Software GmbH GAMS Development Corp.

Recent Enhancement in GAMS. GAMS Software GmbH   GAMS Development Corp. Recent Enhancement in GAMS Jan-Hendrik Jagla Lutz Westermann jhjagla@gams.com lwestermann@gams.com GAMS Software GmbH www.gams.de GAMS Development Corp. www.gams.com Then 2 GAMS Users Guide (1988) and

More information

Combinatorics 3: Champions League draw

Combinatorics 3: Champions League draw Bachelor of Ecole Polytechnique Computational Mathematics, year 2, semester 1 Lecturer: Lucas Gerin (send mail) (mailto:lucas.gerin@polytechnique.edu) Combinatorics 3: Champions League draw Table of contents

More information

Cisco IOS Shell. Finding Feature Information. Prerequisites for Cisco IOS.sh. Last Updated: December 14, 2012

Cisco IOS Shell. Finding Feature Information. Prerequisites for Cisco IOS.sh. Last Updated: December 14, 2012 Cisco IOS Shell Last Updated: December 14, 2012 The Cisco IOS Shell (IOS.sh) feature provides shell scripting capability to the Cisco IOS command-lineinterface (CLI) environment. Cisco IOS.sh enhances

More information

tutorial : modeling synaptic plasticity

tutorial : modeling synaptic plasticity tutorial : modeling synaptic plasticity Computational Neuroscience by the Mediterranean Winter School, Jan 20th, 2016 Michael Graupner Université Paris Descartes CNRS UMR 8118, Paris, France michael.graupner@parisdescartes.fr

More information

Python Training. Complete Practical & Real-time Trainings. A Unit of SequelGate Innovative Technologies Pvt. Ltd.

Python Training. Complete Practical & Real-time Trainings. A Unit of SequelGate Innovative Technologies Pvt. Ltd. Python Training Complete Practical & Real-time Trainings A Unit of. ISO Certified Training Institute Microsoft Certified Partner Training Highlights : Complete Practical and Real-time Scenarios Session

More information

A brief introduction to coding in Python with Anatella

A brief introduction to coding in Python with Anatella A brief introduction to coding in Python with Anatella Before using the Python engine within Anatella, you must first: 1. Install & download a Python engine that support the Pandas Data Frame library.

More information

6 Initializing Abstract Models with Data Command Files Model Data The set Command Simple Sets... 68

6 Initializing Abstract Models with Data Command Files Model Data The set Command Simple Sets... 68 Contents 1 Introduction 1 1.1 Mathematical Modeling........................ 1 1.2 Modeling Languages for Optimization................ 3 1.3 Modeling Graph Coloring....................... 4 1.4 Motivating

More information

PYTHON. p ykos vtawynivis. Second eciitiovl. CO Ve, WESLEY J. CHUN

PYTHON. p ykos vtawynivis. Second eciitiovl. CO Ve, WESLEY J. CHUN CO Ve, PYTHON p ykos vtawynivis Second eciitiovl WESLEY J. CHUN. PRENTICE HALL Upper Saddle River, NJ Boston Indianapolis San Francisco New York Toronto Montreal London Munich Paris Madrid Capetown Sydney

More information

Software System Design and Implementation

Software System Design and Implementation Software System Design and Implementation Property-based Testing Gabriele Keller The University of New South Wales School of Computer Science and Engineering Sydney, Australia COMP3141 17s1 Testing in

More information

Chapter 4: Programming with MATLAB

Chapter 4: Programming with MATLAB Chapter 4: Programming with MATLAB Topics Covered: Programming Overview Relational Operators and Logical Variables Logical Operators and Functions Conditional Statements For Loops While Loops Debugging

More information

Unicode Support. Chapter 2:

Unicode Support. Chapter 2: Unicode Support Chapter 2: SYS-ED/Computer Education Techniques, Inc. Ch 2: 1 SYS-ED/Computer Education Techniques, Inc. Ch 2: 1 Objectives You will learn: Unicode features. How to use literals and data

More information

CS 301. Lecture 05 Applications of Regular Languages. Stephen Checkoway. January 31, 2018

CS 301. Lecture 05 Applications of Regular Languages. Stephen Checkoway. January 31, 2018 CS 301 Lecture 05 Applications of Regular Languages Stephen Checkoway January 31, 2018 1 / 17 Characterizing regular languages The following four statements about the language A are equivalent The language

More information

Command Interpreters. command-line (e.g. Unix shell) On Unix/Linux, bash has become defacto standard shell.

Command Interpreters. command-line (e.g. Unix shell) On Unix/Linux, bash has become defacto standard shell. Command Interpreters A command interpreter is a program that executes other programs. Aim: allow users to execute the commands provided on a computer system. Command interpreters come in two flavours:

More information

Domain Decomposition: Computational Fluid Dynamics

Domain Decomposition: Computational Fluid Dynamics Domain Decomposition: Computational Fluid Dynamics December 0, 0 Introduction and Aims This exercise takes an example from one of the most common applications of HPC resources: Fluid Dynamics. We will

More information

A Simple Mass Storage System for the SRB Data Grid

A Simple Mass Storage System for the SRB Data Grid A Simple Mass Storage System for the SRB Data Grid Michael Wan, Arcot Rajasekar, Reagan Moore, Phil Andrews San Diego Supercomputer Center SDSC/UCSD/NPACI Outline Motivations for implementing a Mass Storage

More information

Introduction to MATLAB

Introduction to MATLAB to MATLAB Spring 2019 to MATLAB Spring 2019 1 / 39 The Basics What is MATLAB? MATLAB Short for Matrix Laboratory matrix data structures are at the heart of programming in MATLAB We will consider arrays

More information

Mathematica for Scientists and Engineers

Mathematica for Scientists and Engineers Mathematica for Scientists and Engineers Thomas B. Bahder Addison-Wesley Publishing Company Reading, Massachusetts Menlo Park, California New York Don Mills, Ontario Wokingham, England Amsterdam Bonn Paris

More information

ELEC 876: Software Reengineering

ELEC 876: Software Reengineering ELEC 876: Software Reengineering () Dr. Ying Zou Department of Electrical & Computer Engineering Queen s University Compiler and Interpreter Compiler Source Code Object Compile Execute Code Results data

More information

9/21/17. Outline. Expression Evaluation and Control Flow. Arithmetic Expressions. Operators. Operators. Notation & Placement

9/21/17. Outline. Expression Evaluation and Control Flow. Arithmetic Expressions. Operators. Operators. Notation & Placement Outline Expression Evaluation and Control Flow In Text: Chapter 6 Notation Operator evaluation order Operand evaluation order Overloaded operators Type conversions Short-circuit evaluation of conditions

More information

Introduction to MATLAB

Introduction to MATLAB Introduction to MATLAB Econ 8305 Fall 2015 Hang Zhou The George Washington University Overview 1 Before Getting Started 2 Vector and Matrix Basic Scalar Calculation Matrix Arithmetic Operation Some Useful

More information

Quiz. a 1 a 2 a 3 a 4. v 1 v 2 v 3. Let a 1 = [1, 0, 1], a 2 = [2, 1, 0], a 3 = [10, 1, 2], a 4 = [0, 0, 1]. Compute the row-matrix-by-vector product

Quiz. a 1 a 2 a 3 a 4. v 1 v 2 v 3. Let a 1 = [1, 0, 1], a 2 = [2, 1, 0], a 3 = [10, 1, 2], a 4 = [0, 0, 1]. Compute the row-matrix-by-vector product Quiz Let a 1 = [1, 0, 1], a 2 = [2, 1, 0], a 3 = [10, 1, 2], a 4 = [0, 0, 1] Compute the row-matrix-by-vector product a 1 a 2 a 3 a 4 times [7, 6, 5] Let v 1 = [2, 1, 0, 1], v 2 = [4, 1, 0, 2], v 3 = [0,

More information

RAISE in Perspective

RAISE in Perspective RAISE in Perspective Klaus Havelund NASA s Jet Propulsion Laboratory, Pasadena, USA Klaus.Havelund@jpl.nasa.gov 1 The Contribution of RAISE The RAISE [6] Specification Language, RSL, originated as a development

More information

Algorithms and Data Structures

Algorithms and Data Structures Algorithms and Data Structures Optimal Search Trees; Tries Ulf Leser Content of this Lecture Optimal Search Trees Definition Construction Analysis Searching Strings: Tries Ulf Leser: Algorithms and Data

More information

Vi & Shell Scripting

Vi & Shell Scripting Vi & Shell Scripting Comp-206 : Introduction to Week 3 Joseph Vybihal Computer Science McGill University Announcements Sina Meraji's office hours Trottier 3rd floor open area Tuesday 1:30 2:30 PM Thursday

More information

Interfacing With Other Programming Languages Using Cython

Interfacing With Other Programming Languages Using Cython Lab 19 Interfacing With Other Programming Languages Using Cython Lab Objective: Learn to interface with object files using Cython. This lab should be worked through on a machine that has already been configured

More information

BASH SHELL SCRIPT 1- Introduction to Shell

BASH SHELL SCRIPT 1- Introduction to Shell BASH SHELL SCRIPT 1- Introduction to Shell What is shell Installation of shell Shell features Bash Keywords Built-in Commands Linux Commands Specialized Navigation and History Commands Shell Aliases Bash

More information