Building and Using Libraries CISC/QCSE 810. Libraries libraries exist for many common scientific tasks linear algebra – BLAS/ATLAS, LAPACK optimization.

Slides:



Advertisements
Similar presentations
Lecture 3 Getting Started with ITK!. Goals for this lecture Learn how to use Cmake Build ITK Example programs that use ITK.
Advertisements

MC365 Ant. Today We Will Cover: Overview of Ant Installing Ant Using the Ant command line tool Various Ant commands available Using Ant in Eclipse.
Systems Dev. Tutorial II: Make, utilities, & scripting Recitation Wednesday, Sept 13 th, 2006.
Software installation Chapter 7. Software installation Numerous software options Usually free Open source Several sources Installation CD Websites sourceforge.net.
Linux+ Guide to Linux Certification Chapter 12 Compression, System Backup, and Software Installation.
UNIX. find command ● The find command is used to locate files on a Unix or Linux system. find will search any set of directories you specify for files.
13 C H A P T E R © 2001 The McGraw-Hill Companies, Inc. All Rights Reserved1 Downloading from the Internet The graphical user interface has made it so.
How to install CGAL Yuanzhen Wang. What is CGAL Computational Geometry Algorithms Library “Provide easy access to efficient and reliable geometric algorithms.
Packaging Java software. What the problem is zAn executable program often consists of a very large number of files zIt's a nuisance to manage lots of.
A presentation created by David C.
Introduction to The Linaro Toolchain Embedded Processors Training Multicore Software Applications Literature Number: SPRPXXX 1.
1 Introduction to Tool chains. 2 Tool chain for the Sitara Family (but it is true for other ARM based devices as well) A tool chain is a collection of.
Module 10 – Linux Installations. Wikipedia: Red Hat Package Manager or RPM Package Manager (RPM) is a package management system. The name RPM variously.
MCB Lecture #3 Sept 2/14 Intro to UNIX terminal.
Linux+ Guide to Linux Certification
Offline File Storage. Module 12 Offline File Storage ♦ Introduction Backup is usually done by first collecting all the data in a single archive file,
Donald Stark National Center for Atmospheric Research (NCAR) The Developmental Testbed Center (DTC) Wednesday 29 June, 2011 GSI Fundamentals (1): Setup.
Joshua Alexander University of Oklahoma – IT/OSCER ACI-REF Virtual Residency Workshop Monday June 1, 2015 Deploying Community Codes.
LINUX System : Lecture 3 Vmware, Cygwin, LINUX installation Bong-Soo Sohn Assistant Professor School of Computer Science and Engineering Chung-Ang University.
Apache, MySQL and PHP Installation and Configuration Chapter 4 XAMPP Installation and Configuration.
Linux Operations and Administration
Makefiles CISC/QCSE 810. BeamApp and Tests in C++ 5 source code files After any modification, changed source needs to be recompiled all object files need.
H.Melikian Introduction on C C is a high-level programming language that forms the basis to other programming languages such as C++, Perl and Java. It.
Apache Web Server v. 2.2 Reference Manual Chapter 1 Compiling and Installing.
Installing Apache Axis Setting up your Tomcat server to use Web Services.
The Structure of a C++ Program. Outline 1. Separate Compilation 2. The # Preprocessor 3. Declarations and Definitions 4. Organizing Decls & Defs into.
Linux+ Guide to Linux Certification Chapter Thirteen Compression, System Back-Up, and Software Installation.
Day 7 Installing Software RPM tar, mtools make, ssh.
Booting Ubuntu Linux Live CSCI 130 – Fall 2008 Action Lab Dr. W. Jones.
Navigation and Ancillary Information Facility NIF Preparing for Programming Using the SPICE Toolkit March 2010.
1 Lecture 5 Additional useful commands COP 3353 Introduction to UNIX.
Editing & Compiling: UNIX vs. IDE and an Intro to Architecture.
240-Current Research Easily Extensible Systems, Octave, Input Formats, SOA.
Ant & Jar Ant – Java-based build tool Jar – pkzip archive, that contains metadata (a manifest file) that the JRE understands.
Installation of packages Objectives –Using software packaging tools Contents –Application delivered as –Where to get commonly used rpm’s –Autofs on! –Getting.
Basic Unix Commands CGS 3460, Lecture 6 Jan 23, 2006 Zhen Yang.
This document gives one example of how one might be able to “fix” a meteorological file, if one finds that there may be problems with the file. There are.
1 Getting Started with C++ Part 1 Windows. 2 Objective You will be able to create, compile, and run a very simple C++ program on Windows, using Microsoft.
CS116 COMPILER ERRORS George Koutsogiannakis 1. How to work with compiler Errors The Compiler provide error messages to help you debug your code. The.
Chapter Linux Basics. Acknowledgements This presentation was prepared by – Banyat Settapanich – Bahran Madaen This presentation will be updated later.
Software Management Linux Software Package File Extensions Extension File.rpm Software package created with the Red Hat Software Package Manager, used.
Hank Childs, University of Oregon April 7 th, 2016 CIS 330: _ _ _ _ ______ _ _____ / / / /___ (_) __ ____ _____ ____/ / / ____/ _/_/ ____/__ __ / / / /
Hank Childs, University of Oregon April 13 th, 2016 CIS 330: _ _ _ _ ______ _ _____ / / / /___ (_) __ ____ _____ ____/ / / ____/ _/_/ ____/__ __ / / /
Building programs LinuxChix-KE. What happens in your CPU? ● It executes a small set of instructions called "machine code" ● Each instruction is just a.
CSE 374 Programming Concepts & Tools Hal Perkins Fall 2015 Lecture 18 – Linking and Libraries.
Installing from Sources CHUGALUG Meeting Lachele Foley.
Cygwin: getting the setup tool
Topic 2: Hardware and Software
CSE 303 Lecture 17 Makefiles reading: Programming in C Ch. 15
Installing Software Part 3
IGCSE 6 Cambridge Effectiveness of algorithms Computer Science
Chapter 7 Installing Program &Backup Tool
Product Retrieval Statistics Canada / Statistique Canada Title page
CS1010 Programming Methodology
Getting started in Eclipse
Lab: ssh, scp, gdb, valgrind
Instructor: Prasun Dewan (FB 150,
Operation System Program 4
Lab: ssh, scp, gdb, valgrind
College of Engineering
JavaTeaching and Importing a github repository
Lecture 5 Additional useful commands COP 3353 Introduction to UNIX 1.
SCIENTIFIC THINKING in K-12
COP 4343 Unix System Administration
Office 365.
Prepared by, Mr. Satish Pise
Cygwin: getting the setup tool
Lecture 5 Additional useful commands COP 3353 Introduction to UNIX 1.
Outline Announcements Loading BLAS Loading LAPACK Add/drop by Monday
* Web Servers/Clients * The HTTP Protocol
Presentation transcript:

Building and Using Libraries CISC/QCSE 810

Libraries libraries exist for many common scientific tasks linear algebra – BLAS/ATLAS, LAPACK optimization – OPT++, TAO Fourier transforms – FFTW, FFTPACK image processing - Imagemagick data management – MySQL programming aids – Boost GUIs – Microsoft, Xwindows Tons more in C, or C++, or Java…

How you would use a library

Example: Imagemagick combination of library and executables contains routines for image processing

Obtaining the Source Libraries are binary files Not transferable from OS to OS Not necessarily optimized for a particular system Typical to need to recompile on most Unix-based Look for "source" or "tarball" ".tar.gz"

TAR files TAR (Tape ARchive) files are most common Unix-based way to pass around directories of source code Think "zip", but for unix Unix utility with staggering number of options

Common TAR scenarios Unpacking a gzipped tar file (.tar.gz) tar xvzf x – extract, v – verbose, z – gzipped, f – file to act on List files in a gzipped tar file tar tvf Create a tar file tar cvf mfile.tar

Imagemagick Located at Find the file ImageMagick.tar.gz Download it to your local drive move to a directory without spaces in Cygwin e.g. /cygdrive/c Untar tar xvzf ImageMagick.tar.gz

Read the Readme! There are standard steps many libraries use for building./configure make make test make install but that may not be the case for yours always look for installation instructions

This will take awhile… Configuring and compiling libraries can be a process of minutes to hours to overnight (hopefully not longer!) Have something else to do…

Assuming it worked If you successfully compiled and installed the library, you should now have header file(s) (.h) somewhere accessible a library file (.a) somewhere accessible Those extensions are for C, C++ libraries in Unix

Next Step: building a program You now want to try to link your own source files to the library Start with a worked example from the library writers! If that doesn't work, you know it's a configuration/linking problem

Imagemagick Comes with a thumbnail-generating program as a model Save as wand.c

Compiling against a library Look for –I flags in gcc command these add a search directory for "include" files your source will have to "#include " before you can use a library function ImageMagick 'make install' puts header files in /usr/include and subdirectories

Linking against a library Next step to is link the objects into an executable Look for flags -L: add a search directory for library files -l: adds a library to the executable  -lpng links code to libpng.a library file Most libraries found in /usr/lib or /usr/local/lib

Library Realities Building a library can be one of the most frustrating computer experiences you didn't write it whoever did may not have had your system at hand (or in mind) problems will tend to be at most esoteric level (compiler, OS, make, etc. behaving slightly differently than expected) Library writers are experienced C coders, while you may not be

Hope is not lost Google is your best friend search for the exact error message  someone else has probably had it search for your OS in the library's web site  most problems are often due to OS-specific issues Be patient a library could save you weeks to months of coding and testing; a few days to install isn't too much to ask

Your next task Find a library that might be of use to you (FFT, image processing, genetic algorithms, optimization), and build their example code OR Build some source code and link it into MATLAB (or Java)