Interval Computations in Julia Programming Language Evgeniya Vorontsova

Total Page:16

File Type:pdf, Size:1020Kb

Interval Computations in Julia Programming Language Evgeniya Vorontsova Interval Computations in Julia programming language Evgeniya Vorontsova To cite this version: Evgeniya Vorontsova. Interval Computations in Julia programming language. Summer Workshop on Interval Methods (SWIM) 2019, ENSTA, Jul 2019, Paris, France. hal-02321950 HAL Id: hal-02321950 https://hal.archives-ouvertes.fr/hal-02321950 Submitted on 21 Oct 2019 HAL is a multi-disciplinary open access L’archive ouverte pluridisciplinaire HAL, est archive for the deposit and dissemination of sci- destinée au dépôt et à la diffusion de documents entific research documents, whether they are pub- scientifiques de niveau recherche, publiés ou non, lished or not. The documents may come from émanant des établissements d’enseignement et de teaching and research institutions in France or recherche français ou étrangers, des laboratoires abroad, or from public or private research centers. publics ou privés. Interval Computations in Julia programming language Evgeniya Vorontsova1, 2 1Far Eastern Federal University, Vladivostok, Russia 2Grenoble Alpes University, Grenoble, France Keywords: Numerical Computing; Inter- INTLAB [9], a Matlab/Octave toolbox for Re- val Arithmetic; Julia Programming Language; liable Computing. The other fundamental dif- JuliaIntervals; Octave Interval Package ference between INTLAB and GNU Octave interval package is non-conformance of INT- LAB to IEEE 1788-2015 — IEEE Standard Introduction for Interval Arithmetic [3]. On the other hand The general-purpose Julia programming lan- GNU Octave interval package’s main goal is guage [5] was designed for speed, efficiency, to be compliant with the Standard. Likewise, and high performance. It is a flexible, authors of IntervalArithmetic.jl wrote [4] that optionally-typed, and dynamic computing they were working towards having the pack- language for scientific, numerical and tech- age be conforming with the Standard. So, all nical computing applications. Julia is open calculations in these packages are performed source language with all sources free avail- using interval arithmetic: all quantities are able on GitHub. The language was developed treated as intervals. The final result is also and incubated at MIT [6]. Currently, after an interval contained the correct answer. Julia 1.0 was officially released to the pub- In next section we would like to show some lic in August 2018, the language is becoming practical examples with interval arithmetic in increasingly popular. Julia has been down- Julia. loaded more than 8.4 million times, as of May 2019 [2], and is used at more than 1,500 uni- Examples versities. So, it is very important for researchers, Getting Started working in a field of interval analysis, to have The basic object in the IntervalArithmetic.jl fast, efficient and robust publicly available package is the parameterized type Interval. software packages for performing computa- By default, Interval objects contain Float64 tions with interval arithmetic written in Julia. s. Intervals are created using the @interval macro: IntervalArithmetic.jl using IntervalArithmetic In this paper, we review and compare a re- a = @interval(1, 2) cently developed Julia package for perform- b = @interval(3, 4) ing Validated Numerics, i.e. rigorous com- print(a + b, a - b, a * b, a / b) putations with finite-precision floating-point The output of this code is arithmetic, IntervalArithmetic.jl [4], with per- [4, 6] [-3, -1] [3, 8] formance of GNU Octave interval package for [0.25, 0.666667] real-valued interval arithmetic [1]. This Oc- tave toolbox was chosen for comparison be- As you may have noticed, the package permits cause of several important reasons. First of to write quite clear and intuitive code for in- all, it is a free, open-source software, unlike terval computations. Matrix Multiplication matrix pairs and calculate the mean experi- mental time over all multiplications. The re- In this section we present the results of exper- sults of the first setting are summarized in iments comparing the IntervalArithmetic.jl li- Table 1. This experiment shows that perfor- brary with the GNU Octave interval package. mance of Julia interval package for that prob- In summary, we show that Julia interval li- lem is significantly better. brary is significantly faster than the Octave library. In our first experiment we measured the time to evaluate the interval matrix multipli- Elementary functions cation. The Julia code is: In our second experiment we compared the function MultMatr(A, B) times for evaluation of the elementary func- return A*B tions (exp, sin, cos, etc.) for random interval end arguments. The design of the experiment is n = 10 taken from [7]. M1 = 10*rand(n, n) M2 = 10*rand(n, n) Table 2: Time for 105 evaluations of the ele- iM1 = map(Interval, M1) mentary functions iM2 = map(Interval, M2) Function Julia, s Octave, s A = iM1 .± 5 exp 0.49 102.7 B = iM2 .± 5 sin 0.749 147.85 @benchmark MultMatr(A;B) cos 0.638 230.2 Here we use BenchmarkTools package by Jar- tan 0.49 126.13 rett Revels [8], a framework for writing and arcsin 0.858 119.01 running groups of benchmarks. arccos 1.132 169.02 And Octave code for MultMatr function is: arctan 1.318 127.01 pkg load interval function [t] = MultMatr(n) The results of the second setting are sum- A = infsupdec(rand(n), marized in Table 2. We may see that these 10*rand(n) + 1); calculations in Julia are almost two orders of B = infsupdec(rand(n), magnitude faster. 10*rand(n) + 1); tic C = A*B; Plotting t = toc; end In this section, we will illustrate how to vi- sualize the interval extension of a given func- Table 1: Time for interval matrix multiplica- tion over an interval. The process of splitting tions the interval into many smaller adjacent pieces Matrix size, Julia, Octave, for range evaluations of the given function is rows ms ms called mincing. 10 0.095 13.317 Figures 1- 2 show visualization of minc- 100 111.91 849.61 ing process for one function (Julia code was 1000 125870 863340 adapted from [10]). For implementation The IntervalBox type constructed from an array For Octave we create 10 random interval of Interval was used. References [1] O. Heimlich GNU Octave interval pack- age, version 3.2.0, 2015–2018, https:// octave.sourceforge.io/interval/. [2] Julia computing newsletter, May 2019. https://juliacomputing.com/blog/ 2019/05/03/may-newsletter.html, 2019. [3] IEEE Std 1788-2015 — IEEE Stan- Figure 1: Function cos(x) + 0:5 sin(2x), dard for Interval Arithmetic. IEEE: In- 10 sub-intervals. stitute of Electrical and Electronic En- gineers, IEEE Computer Society, New York, June 2015, https://ieeexplore. ieee.org/document/7140721. [4] L. Benet and D. Sanders. JuliaInter- vals.jl Package — Rigorous numerics with interval arithmetic & applications. https://github.com/JuliaIntervals/ IntervalArithmetic.jl. [5] J. Bezanson, A. Edelman, S. Karpinski, and V. Shah. Julia: A fresh approach to numerical computing. SIAM Review, Figure 2: Function cos(x) + 0:5 sin(2x), 59:1, 65–98, 2017. 50 sub-intervals. [6] J. Bezanson, S. Karpinski, V. Shah, and A. Edelman. Why we created Acknowledgement julia. https://julialang.org/blog/ 2012/02/why-we-created-julia, 2012. The work was supported by the Russian Foun- dation for Basic Research, project no. 18-29- [7] W. Mascarenhas. Moore: Interval Arith- 03071 mk. metic in Modern C++, https://arxiv. org/pdf/1611.09567.pdf. Conclusion [8] J. Revels. BenchmarkTools Julia pack- age, https://github.com/JuliaCI/ Public available Julia package for interval BenchmarkTools.jl. arithmetic has been investigated. Experimen- tal comparison of Octave and Julia packages [9] S. Rump. Intlab — interval laboratory. for interval arithmetic shows that Julia Inter- In Tibor Csendes, editor, Developments valArithmetic.jl package is significantly faster in Reliable Computing, 77–104, Kluwer then Octave interval package. In addition, the Academic Publishers, Dordrecht, 1999. implementation process of interval arithmetic [10] D. Sanders. Métodos numéricos para sis- computations in this Julia package is easy and temas dinámicos, https://github.com/ convenient, due to intuitive syntax of the lan- dpsanders/dinamica_nacional. guage and the package..
Recommended publications
  • A Comparative Evaluation of Matlab, Octave, R, and Julia on Maya 1 Introduction
    A Comparative Evaluation of Matlab, Octave, R, and Julia on Maya Sai K. Popuri and Matthias K. Gobbert* Department of Mathematics and Statistics, University of Maryland, Baltimore County *Corresponding author: [email protected], www.umbc.edu/~gobbert Technical Report HPCF{2017{3, hpcf.umbc.edu > Publications Abstract Matlab is the most popular commercial package for numerical computations in mathematics, statistics, the sciences, engineering, and other fields. Octave is a freely available software used for numerical computing. R is a popular open source freely available software often used for statistical analysis and computing. Julia is a recent open source freely available high-level programming language with a sophisticated com- piler for high-performance numerical and statistical computing. They are all available to download on the Linux, Windows, and Mac OS X operating systems. We investigate whether the three freely available software are viable alternatives to Matlab for uses in research and teaching. We compare the results on part of the equipment of the cluster maya in the UMBC High Performance Computing Facility. The equipment has 72 nodes, each with two Intel E5-2650v2 Ivy Bridge (2.6 GHz, 20 MB cache) proces- sors with 8 cores per CPU, for a total of 16 cores per node. All nodes have 64 GB of main memory and are connected by a quad-data rate InfiniBand interconnect. The tests focused on usability lead us to conclude that Octave is the most compatible with Matlab, since it uses the same syntax and has the native capability of running m-files. R was hampered by somewhat different syntax or function names and some missing functions.
    [Show full text]
  • Stan: a Probabilistic Programming Language
    JSS Journal of Statistical Software January 2017, Volume 76, Issue 1. doi: 10.18637/jss.v076.i01 Stan: A Probabilistic Programming Language Bob Carpenter Andrew Gelman Matthew D. Hoffman Columbia University Columbia University Adobe Creative Technologies Lab Daniel Lee Ben Goodrich Michael Betancourt Columbia University Columbia University Columbia University Marcus A. Brubaker Jiqiang Guo Peter Li York University NPD Group Columbia University Allen Riddell Indiana University Abstract Stan is a probabilistic programming language for specifying statistical models. A Stan program imperatively defines a log probability function over parameters conditioned on specified data and constants. As of version 2.14.0, Stan provides full Bayesian inference for continuous-variable models through Markov chain Monte Carlo methods such as the No-U-Turn sampler, an adaptive form of Hamiltonian Monte Carlo sampling. Penalized maximum likelihood estimates are calculated using optimization methods such as the limited memory Broyden-Fletcher-Goldfarb-Shanno algorithm. Stan is also a platform for computing log densities and their gradients and Hessians, which can be used in alternative algorithms such as variational Bayes, expectation propa- gation, and marginal inference using approximate integration. To this end, Stan is set up so that the densities, gradients, and Hessians, along with intermediate quantities of the algorithm such as acceptance probabilities, are easily accessible. Stan can be called from the command line using the cmdstan package, through R using the rstan package, and through Python using the pystan package. All three interfaces sup- port sampling and optimization-based inference with diagnostics and posterior analysis. rstan and pystan also provide access to log probabilities, gradients, Hessians, parameter transforms, and specialized plotting.
    [Show full text]
  • Stan: a Probabilistic Programming Language
    JSS Journal of Statistical Software MMMMMM YYYY, Volume VV, Issue II. http://www.jstatsoft.org/ Stan: A Probabilistic Programming Language Bob Carpenter Andrew Gelman Matt Hoffman Columbia University Columbia University Adobe Research Daniel Lee Ben Goodrich Michael Betancourt Columbia University Columbia University University of Warwick Marcus A. Brubaker Jiqiang Guo Peter Li University of Toronto, NPD Group Columbia University Scarborough Allen Riddell Dartmouth College Abstract Stan is a probabilistic programming language for specifying statistical models. A Stan program imperatively defines a log probability function over parameters conditioned on specified data and constants. As of version 2.2.0, Stan provides full Bayesian inference for continuous-variable models through Markov chain Monte Carlo methods such as the No-U-Turn sampler, an adaptive form of Hamiltonian Monte Carlo sampling. Penalized maximum likelihood estimates are calculated using optimization methods such as the Broyden-Fletcher-Goldfarb-Shanno algorithm. Stan is also a platform for computing log densities and their gradients and Hessians, which can be used in alternative algorithms such as variational Bayes, expectation propa- gation, and marginal inference using approximate integration. To this end, Stan is set up so that the densities, gradients, and Hessians, along with intermediate quantities of the algorithm such as acceptance probabilities, are easily accessible. Stan can be called from the command line, through R using the RStan package, or through Python using the PyStan package. All three interfaces support sampling and optimization-based inference. RStan and PyStan also provide access to log probabilities, gradients, Hessians, and data I/O. Keywords: probabilistic program, Bayesian inference, algorithmic differentiation, Stan.
    [Show full text]
  • Introduction to GNU Octave
    Introduction to GNU Octave Hubert Selhofer, revised by Marcel Oliver updated to current Octave version by Thomas L. Scofield 2008/08/16 line 1 1 0.8 0.6 0.4 0.2 0 -0.2 -0.4 8 6 4 2 -8 -6 0 -4 -2 -2 0 -4 2 4 -6 6 8 -8 Contents 1 Basics 2 1.1 What is Octave? ........................... 2 1.2 Help! . 2 1.3 Input conventions . 3 1.4 Variables and standard operations . 3 2 Vector and matrix operations 4 2.1 Vectors . 4 2.2 Matrices . 4 1 2.3 Basic matrix arithmetic . 5 2.4 Element-wise operations . 5 2.5 Indexing and slicing . 6 2.6 Solving linear systems of equations . 7 2.7 Inverses, decompositions, eigenvalues . 7 2.8 Testing for zero elements . 8 3 Control structures 8 3.1 Functions . 8 3.2 Global variables . 9 3.3 Loops . 9 3.4 Branching . 9 3.5 Functions of functions . 10 3.6 Efficiency considerations . 10 3.7 Input and output . 11 4 Graphics 11 4.1 2D graphics . 11 4.2 3D graphics: . 12 4.3 Commands for 2D and 3D graphics . 13 5 Exercises 13 5.1 Linear algebra . 13 5.2 Timing . 14 5.3 Stability functions of BDF-integrators . 14 5.4 3D plot . 15 5.5 Hilbert matrix . 15 5.6 Least square fit of a straight line . 16 5.7 Trapezoidal rule . 16 1 Basics 1.1 What is Octave? Octave is an interactive programming language specifically suited for vectoriz- able numerical calculations.
    [Show full text]
  • Advancedhmc.Jl: a Robust, Modular and Efficient Implementation of Advanced HMC Algorithms
    2nd Symposium on Advances in Approximate Bayesian Inference, 20191{10 AdvancedHMC.jl: A robust, modular and efficient implementation of advanced HMC algorithms Kai Xu [email protected] University of Edinburgh Hong Ge [email protected] University of Cambridge Will Tebbutt [email protected] University of Cambridge Mohamed Tarek [email protected] UNSW Canberra Martin Trapp [email protected] Graz University of Technology Zoubin Ghahramani [email protected] University of Cambridge & Uber AI Labs Abstract Stan's Hamilton Monte Carlo (HMC) has demonstrated remarkable sampling robustness and efficiency in a wide range of Bayesian inference problems through carefully crafted adaption schemes to the celebrated No-U-Turn sampler (NUTS) algorithm. It is challeng- ing to implement these adaption schemes robustly in practice, hindering wider adoption amongst practitioners who are not directly working with the Stan modelling language. AdvancedHMC.jl (AHMC) contributes a modular, well-tested, standalone implementation of NUTS that recovers and extends Stan's NUTS algorithm. AHMC is written in Julia, a modern high-level language for scientific computing, benefiting from optional hardware acceleration and interoperability with a wealth of existing software written in both Julia and other languages, such as Python. Efficacy is demonstrated empirically by comparison with Stan through a third-party Markov chain Monte Carlo benchmarking suite. 1. Introduction Hamiltonian Monte Carlo (HMC) is an efficient Markov chain Monte Carlo (MCMC) algo- rithm which avoids random walks by simulating Hamiltonian dynamics to make proposals (Duane et al., 1987; Neal et al., 2011). Due to the statistical efficiency of HMC, it has been widely applied to fields including physics (Duane et al., 1987), differential equations (Kramer et al., 2014), social science (Jackman, 2009) and Bayesian inference (e.g.
    [Show full text]
  • A Tutorial on Reliable Numerical Computation
    A tutorial on reliable numerical computation Paul Zimmermann Dagstuhl seminar 17481, Schloß Dagstuhl, November 2017 The IEEE 754 standard First version in 1985, first revision in 2008, another revision for 2018. Standard formats: binary32, binary64, binary128, decimal64, decimal128 Standard rounding modes (attributes): roundTowardPositive, roundTowardNegative, roundTowardZero, roundTiesToEven p Correct rounding: required for +; −; ×; ÷; ·, recommended for other mathematical functions (sin; exp; log; :::) 2 Different kinds of arithmetic in various languages fixed precision arbitrary precision real double (C) GNU MPFR (C) numbers RDF (Sage) RealField(p) (Sage) MPFI (C) Boost Interval (C++) RealIntervalField(p) (Sage) real INTLAB (Matlab, Octave) RealBallField(p) (Sage) intervals RIF (Sage) libieeep1788 (C++) RBF (Sage) Octave Interval (Octave) libieeep1788 is developed by Marco Nehmeier GNU Octave Interval is developed by Oliver Heimlich 3 An example from Siegfried Rump Reference: S.M. Rump. Gleitkommaarithmetik auf dem Prüfstand [Wie werden verifiziert(e) numerische Lösungen berechnet?]. Jahresbericht der Deutschen Mathematiker-Vereinigung, 118(3):179–226, 2016. a p(a; b) = 21b2 − 2a2 + 55b4 − 10a2b2 + 2b Evaluate p at a = 77617, b = 33096. 4 Rump’s polynomial in the C language #include <stdio.h> TYPE p (TYPE a, TYPE b) { TYPE a2 = a * a; TYPE b2 = b * b; return 21.0*b2 - 2.0*a2 + 55*b2*b2 - 10*a2*b2 + a/(2.0*b); } int main() { printf ("%.16Le\n", (long double) p (77617.0, 33096.0)); } 5 Rump’s polynomial in the C language: results $ gcc -DTYPE=float rump.c && ./a.out -4.3870930862080000e+12 $ gcc -DTYPE=double rump.c && ./a.out 1.1726039400531787e+00 $ gcc -DTYPE="long double" rump.c && ./a.out 1.1726039400531786e+00 $ gcc -DTYPE=__float128 rump.c && ./a.out -8.2739605994682137e-01 6 The MPFR library A reference implementation of IEEE 754 in (binary) arbitrary precision in the C language.
    [Show full text]
  • Maple Advanced Programming Guide
    Maple 9 Advanced Programming Guide M. B. Monagan K. O. Geddes K. M. Heal G. Labahn S. M. Vorkoetter J. McCarron P. DeMarco c Maplesoft, a division of Waterloo Maple Inc. 2003. ­ ii ¯ Maple, Maplesoft, Maplet, and OpenMaple are trademarks of Water- loo Maple Inc. c Maplesoft, a division of Waterloo Maple Inc. 2003. All rights re- ­ served. The electronic version (PDF) of this book may be downloaded and printed for personal use or stored as a copy on a personal machine. The electronic version (PDF) of this book may not be distributed. Information in this document is subject to change without notice and does not rep- resent a commitment on the part of the vendor. The software described in this document is furnished under a license agreement and may be used or copied only in accordance with the agreement. It is against the law to copy the software on any medium as specifically allowed in the agreement. Windows is a registered trademark of Microsoft Corporation. Java and all Java based marks are trademarks or registered trade- marks of Sun Microsystems, Inc. in the United States and other countries. Maplesoft is independent of Sun Microsystems, Inc. All other trademarks are the property of their respective owners. This document was produced using a special version of Maple that reads and updates LATEX files. Printed in Canada ISBN 1-894511-44-1 Contents Preface 1 Audience . 1 Worksheet Graphical Interface . 2 Manual Set . 2 Conventions . 3 Customer Feedback . 3 1 Procedures, Variables, and Extending Maple 5 Prerequisite Knowledge . 5 In This Chapter .
    [Show full text]
  • Gretl User's Guide
    Gretl User’s Guide Gnu Regression, Econometrics and Time-series Allin Cottrell Department of Economics Wake Forest university Riccardo “Jack” Lucchetti Dipartimento di Economia Università di Ancona November, 2005 Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation (see http://www.gnu.org/licenses/fdl.html). Contents 1 Introduction 1 1.1 Features at a glance ......................................... 1 1.2 Acknowledgements ......................................... 1 1.3 Installing the programs ....................................... 2 2 Getting started 4 2.1 Let’s run a regression ........................................ 4 2.2 Estimation output .......................................... 6 2.3 The main window menus ...................................... 7 2.4 The gretl toolbar ........................................... 10 3 Modes of working 12 3.1 Command scripts ........................................... 12 3.2 Saving script objects ......................................... 13 3.3 The gretl console ........................................... 14 3.4 The Session concept ......................................... 14 4 Data files 17 4.1 Native format ............................................. 17 4.2 Other data file formats ....................................... 17 4.3 Binary databases ........................................... 17 4.4 Creating a data file from scratch ................................
    [Show full text]
  • End-User Probabilistic Programming
    End-User Probabilistic Programming Judith Borghouts, Andrew D. Gordon, Advait Sarkar, and Neil Toronto Microsoft Research Abstract. Probabilistic programming aims to help users make deci- sions under uncertainty. The user writes code representing a probabilistic model, and receives outcomes as distributions or summary statistics. We consider probabilistic programming for end-users, in particular spread- sheet users, estimated to number in tens to hundreds of millions. We examine the sources of uncertainty actually encountered by spreadsheet users, and their coping mechanisms, via an interview study. We examine spreadsheet-based interfaces and technology to help reason under uncer- tainty, via probabilistic and other means. We show how uncertain values can propagate uncertainty through spreadsheets, and how sheet-defined functions can be applied to handle uncertainty. Hence, we draw conclu- sions about the promise and limitations of probabilistic programming for end-users. 1 Introduction In this paper, we discuss the potential of bringing together two rather distinct approaches to decision making under uncertainty: spreadsheets and probabilistic programming. We start by introducing these two approaches. 1.1 Background: Spreadsheets and End-User Programming The spreadsheet is the first \killer app" of the personal computer era, starting in 1979 with Dan Bricklin and Bob Frankston's VisiCalc for the Apple II [15]. The primary interface of a spreadsheet|then and now, four decades later|is the grid, a two-dimensional array of cells. Each cell may hold a literal data value, or a formula that computes a data value (and may depend on the data in other cells, which may themselves be computed by formulas).
    [Show full text]
  • An Introduction to Data Analysis Using the Pymc3 Probabilistic Programming Framework: a Case Study with Gaussian Mixture Modeling
    An introduction to data analysis using the PyMC3 probabilistic programming framework: A case study with Gaussian Mixture Modeling Shi Xian Liewa, Mohsen Afrasiabia, and Joseph L. Austerweila aDepartment of Psychology, University of Wisconsin-Madison, Madison, WI, USA August 28, 2019 Author Note Correspondence concerning this article should be addressed to: Shi Xian Liew, 1202 West Johnson Street, Madison, WI 53706. E-mail: [email protected]. This work was funded by a Vilas Life Cycle Professorship and the VCRGE at University of Wisconsin-Madison with funding from the WARF 1 RUNNING HEAD: Introduction to PyMC3 with Gaussian Mixture Models 2 Abstract Recent developments in modern probabilistic programming have offered users many practical tools of Bayesian data analysis. However, the adoption of such techniques by the general psychology community is still fairly limited. This tutorial aims to provide non-technicians with an accessible guide to PyMC3, a robust probabilistic programming language that allows for straightforward Bayesian data analysis. We focus on a series of increasingly complex Gaussian mixture models – building up from fitting basic univariate models to more complex multivariate models fit to real-world data. We also explore how PyMC3 can be configured to obtain significant increases in computational speed by taking advantage of a machine’s GPU, in addition to the conditions under which such acceleration can be expected. All example analyses are detailed with step-by-step instructions and corresponding Python code. Keywords: probabilistic programming; Bayesian data analysis; Markov chain Monte Carlo; computational modeling; Gaussian mixture modeling RUNNING HEAD: Introduction to PyMC3 with Gaussian Mixture Models 3 1 Introduction Over the last decade, there has been a shift in the norms of what counts as rigorous research in psychological science.
    [Show full text]
  • Using Octave and Sagemath on Taito
    Using Octave and SageMath on Taito Sampo Sillanpää 17 October 2017 CSC – Finnish research, education, culture and public administration ICT knowledge center Octave ● Powerful mathematics-oriented syntax with built- in plotting and visualization tools. ● Free software, runs on GNU/Linux, macOS, BSD, and Windows. ● Drop-in compatible with many Matlab scripts. ● https://www.gnu.org/software/octave/ SageMath ● SageMath is a free open-source mathematics software system licensed under the GPL. ● Builds on top of many existing open-source packages: NumPy, SciPy, matplotlib, Sympy, Maxima, GAP, FLINT, R and many more. ● http://www.sagemath.org/ Octave on Taito ● Latest version 4.2.1 module load octave-env octave Or octave --no-gui ● Interactive sessions on Taito-shell via NoMachine client https://research.csc.5/-/nomachine Octave Forge ● A central location for development of packages for GNU Octave. ● Packages can be installed on Taito module load octave-env octave --no-gui octave:> pkg install -forge package_name octave:> pkg load package_name SageMath on Taito ● installed version 7.6. module load sagemath sage ● Interactive sessions on Taito-shell via NoMachine client. ● Browser-based notebook sage: notebook() Octave Batch Jobs #!/bin/bash -l #mytest.sh #SBATCH --constraint="snb|hsw" #SBATCH -o output.out #SBATCH -e stderr.err #SBATCH -p serial #SBATCH -n 1 #SBATCH -t 00:05:00 #SBATCH --mem-per-cpu=1000 module load octave-env octave --no-gui/wrk/user_name/example.m used_slurm_resources.bash [user@taito-login1]$ sbatch mytest.sh SageMath Batch Jobs #!/bin/bash -l #mytest.sh #SBATCH --constraint="snb|hsw" #SBATCH -o output.out #SBATCH -e stderr.err #SBATCH -p serial #SBATCH -n 1 #SBATCH -t 00:05:00 #SBATCH --mem-per-cpu=1000 module load sagemath sage /wrk/user_name/example.sage used_slurm_resources.bash [user@taito-login1]$ sbatch mytest.sh Instrucons and Documentaon ● Octave – https://research.csc.5/-/octave – https://www.gnu.org/software/octave/doc/interp reter/ ● SageMath – https://research.csc.5/-/sagemath – http://doc.sagemath.org/ [email protected].
    [Show full text]
  • Architektura Dużych Projektów Bioinformatycznych Pakiety Do Obliczeń: Naukowych, Inżynierskich I Statystycznych Przegląd I Porównanie
    Architektura dużych projektów bioinformatycznych Pakiety do obliczeń: naukowych, Inżynierskich i statystycznych Przegląd i porównanie Bartek Wilczyński 9.5.2018 Plan na dziś ● Pakiety do obliczeń: przegląd zastosowań ● różnice w zapotrzebowaniu: naukowcy, inżynierowie, statystycy/medycy ● Matlab/octave/scipy ● S-Plus/SPSS/projekt R ● Mathematica/Maxima/Sage ● Pakiety komercyjne vs. Open Source ● Excel? Typowi użytkownicy pakietów obliczeniowych ● Inżynierowie i projektanci (budownictwo, lotnictwo, motoryzacja, itp.) ● Naukowcy doświadczalni (fizycy, chemicy, materiałoznawcy, itp.) ● Statystycy (zastosowania w medycynie, ekonomii, biologii molekularnej, psychologii, socjologii, ubezpieczeniach, itp.) ● Matematycy (przede wszystkim matematyka stosowana ) Obliczenia naukowe ● Komputer jako “potężniejszy kalkulator” ● W zasadzie wszystko można zaprogramować samemu, ale każdemu mogą się przydać: – Interfejs użytkownika łatwiejszy niż typowego kompilatora – Możliwość zaawansowanej grafiki – Dobrze przetestowane standardowe procedury – Interfejsy do urządzeń – Wsparcie fachowców Matlab i pakiety “inżynierskie” ● Rozwijany w latach 70'tych przeze Cleve Moler'a jako narzędzie dla studentów informatyki, aby nie musieli używać zaawansowanych bibliotek fortranu ● Firma mathworks powstaje w 1984 i wydaje pierwszą wersję Matlab'a ● Najpopularniejszy wśród inżynierów, dobre całki numeryczne, rozwiązywanie równań i wykresy (również 3d) ● Bardzo popularny także do przetwarzania sygnałów i symulacji (simulink) ● Licencja komercyjna – niedrogi dla studentów,
    [Show full text]