building software with ease

Similar documents
Not just Python, but the scientific stack as well:

Introduction to ACENET Accelerating Discovery with Computational Research May, 2015

Automated Testing of Installed Software

XSEDE Campus Bridging Cluster software distribution strategy and tactics

Data Management So,ware Stack Intro

Ultrascale Visualization Climate Data Analysis Tools (UV-CDAT) Final Report

icer Bioinformatics Support Fall 2011

GTk+ and GTkGLExt Build Process for Windows 32- bit

UOW High Performance Computing Cluster User s Guide

The Build Process. of (GNU Tools for ARM Embedded Processors)

The Top Six Advantages of CUDA-Ready Clusters. Ian Lumb Bright Evangelist

VPAC100: Introduction to High Performance Computing Using Linux

Caltech Center for Advanced Computing Research System Guide: MRI2 Cluster (zwicky) January 2014

Mathematical Libraries and Application Software on JUROPA and JUQUEEN

ARMSDK-VM Virtual Appliance A preconfigured Linux system

JUBE. A Flexible, Application- and Platform-Independent Environment for Benchmarking

Theorist HT Induc0on Course Lesson 1: Se6ng up your new computer (Mac OS X >= 10.6) As of 9/27/2012

CMAKE AN INTRODUCTION

Supported platforms & compilers Required software Where to download the packages Geant4 toolkit installation (release 9.6)

Continuous Integration

Working with HPC and HTC Apps. Abhinav Thota Research Technologies Indiana University

Getting Started With! CGminer/BFGminer!

Software Tools Bootcamp

latest Release 0.2.6

NEC HPC-Linux-Cluster

RHadoop and MapR. Accessing Enterprise- Grade Hadoop from R. Version 2.0 (14.March.2014)

Python and Google App Engine

Five standard procedures for building the android system. Figure1. Procedures for building android embedded systems

Overview of HPC systems and software available within

Part I Courses Syllabus

Exercise 0. Although Python(x,y) comes already with a great variety of scientic Python packages, we might have to install additional dependencies:

OHJ-1860: Software systems seminar: Used tools and mechanisms in Open Source projects

Introduction to Linux and Cluster Basics for the CCR General Computing Cluster

Parallel Visualization of Petascale Simulation Results from GROMACS, NAMD and CP2K on IBM Blue Gene/P using VisIt Visualization Toolkit

Portable Pen-testing Box

ALERT installation setup

Support ovirt on Ubuntu

Dry Dock Documentation

An Introduction to High Performance Computing in the Department

Advanced MPI. Hybrid programming, profiling and debugging of MPI applications. Hristo Iliev RZ. Rechen- und Kommunikationszentrum (RZ)

HPC Wales Skills Academy Course Catalogue 2015

C Programming Review & Productivity Tools

Introduction to Python

Getting Started with HPC

locuz.com HPC App Portal V2.0 DATASHEET

Unlocking the True Value of Hadoop with Open Data Science

Red Hat Developer Toolset 1.1

Continuous Integration/Testing and why you should assume every change breaks your code

DevKey Documentation. Release 0.1. Colm O Connor

RHadoop Installation Guide for Red Hat Enterprise Linux

Developing Embedded Linux Devices Using the Yocto Project

Developing Embedded Linux Devices Using the Yocto Project

An Introduction to Mercurial Version Control Software

Report of the LHC Computing Grid Project. Software Management Process RTAG CERN

Writing & Running Pipelines on the Open Grid Engine using QMake. Wibowo Arindrarto DTLS Focus Meeting

Using Buildroot for real projects

Sonatype CLM Enforcement Points - Continuous Integration (CI) Sonatype CLM Enforcement Points - Continuous Integration (CI)

citools Documentation

Over 30% of Official Images in Docker Hub Contain High Priority Security Vulnerabilities

Buildroot Workshop. Libre Software Meeting Thomas Petazzoni Free Electrons

Mastering CMake. Sixth Edition. Bill Martin & Hoffman. Ken. Andy Cedilnik, David Cole, Marcus Hanwell, Julien Jomier, Brad King, Robert Maynard,

Pyak47 - Performance Test Framework. Release 1.2.1

Linux From Scratch. Version 7.1. Created by Gerard Beekmans Edited by Matthew Burgess and Bruce Dubbs

Viewpoint. Choosing the right automation tool and framework is critical to project success. - Harsh Bajaj, Technical Test Lead ECSIVS, Infosys

Service Partition Specialized Linux nodes. Compute PE Login PE Network PE System PE I/O PE

SMRT Analysis Software Installation (v2.3.0)

Version Control Your Jenkins Jobs with Jenkins Job Builder

Evaluation of the CMT and SCRAM Software Configuration, Build and Release Management Tools

AuShadha Documentation

Hudson Continous Integration Server. Stefan Saasen,

Version Control with Git. Kate Hedstrom ARSC, UAF

Berkeley Research Computing. Town Hall Meeting Savio Overview

CMake/CTest/CDash OSCON 2009

Tuskar UI Documentation

1 Bull, 2011 Bull Extreme Computing

Jenkins Continuous Build System. Jesse Bowes CSCI-5828 Spring 2012

System Administration of Windchill 10.2

socketio Documentation

PLGrid Infrastructure Solutions For Computational Chemistry

Newton2 Developers Guide

The PRACE Project Applications, Benchmarks and Prototypes. Dr. Peter Michielse (NCF, Netherlands)

Version Control with Svn, Git and git-svn. Kate Hedstrom ARSC, UAF

Overview. Open source toolchains. Buildroot features. Development process

Installing OCFA on Ubuntu. Practical installation procedures, Installing The Open Computer Forensics Architecture on Ubuntu

Jenkins: The Definitive Guide

A Conceptual Map of Open Source Software for Image Processing

An Android based Quantum GIS prototype. Ramon Carrillo, Daniel Ochoa

OMNEST Installation Guide. Version 4.5

Table of Contents. Overview Features Applications Hardware requirement Card dimensions Software Installation...

Installation Guide for AmiRNA and WMD3 Release 3.1

Schneps, Leila; Colmez, Coralie. Math on Trial : How Numbers Get Used and Abused in the Courtroom. New York, NY, USA: Basic Books, p i.

LAE Enterprise Server Installation Guide

Creating a DUO MFA Service in AWS

Transcription:

HPC UGENT 1 building software with ease PyBUG meeting @ Ghent lightning talk - Oct. 1st 2013 kenneth.hoste@ugent.be easybuild@lists.ugent.be

HPC UGENT About HPC UGent: central contact for HPC at Ghent University part of central IT department (DICT) member of Flemish supercomputer centre (VSC) 1 collaboration between Flemish university associations seven Tier2 systems, one Tier1 system Top500: #119 (June 12), #163 (Nov 12), #239 (June 13) team consists of 7 FTEs tasks include system administration of HPC infrastructure, user training, user support,... 2

Building scientific software is... fun! Scientists focus on the functionality of their software, not on portability, build system,... Common issues with build procedures of scientific software: incomplete, e.g. no install step requiring human interaction heavily customised and non-standard uses hard-coded settings poor and/or outdated documentation Very time-consuming for user support teams! 3

Current tools are lacking building from source is preferred in an HPC environment performance is critical, instruction selection is key (e.g. AVX) not a lot of packaged scientific software available (RPMs,...) requires huge effort, which is duplicated across distros existing build tools are hard to maintain (e.g., bash scripts) stand-alone, no reuse of previous efforts OS-dependent (HomeBrew, *Ports,...) custom to (groups of) software packages e.g., Dorsal (DOLFIN), gmkpack (ALADIN) 4

Building software with ease a software build and installation framework written in Python developed in-house (HPC-UGent) for 2.5 years open-source (GPLv2) since April 2012 stable API since Nov. 2012 (v1.0.0) latest release: v1.7.0 (v1.8.0 due this week) continuously enhanced and extended http://hpcugent.github.com/easybuild 5

Installing EasyBuild $ easy_install --user easybuild error: option --user not recognized (only for recent setuptools) You should be using pip! $ pip install --user easybuild pip: No such file or directory (pip not installed) Just use --prefix with easy_install! $ easy_install --prefix=$home easybuild $ export PATH=$HOME/bin:$PATH $ eb --version ERROR: Failed to locate EasyBuild's main script (PYTHONPATH not set correctly) 6

Bootstrapping EasyBuild Easily install EasyBuild by bootstrapping it. https://github.com/hpcugent/easybuild/wiki/bootstrapping-easybuild $ wget http://hpcugent.github.com/easybuild/bootstrap_eb.py $ python bootstrap_eb.py $HOME This will install EasyBuild with EasyBuild, and produce a module: $ export MODULEPATH=$HOME/modules/all:$MODULEPATH $ module load EasyBuild/1.7.0 $ eb --version This is EasyBuild 1.7.0 (framework: 1.7.0, easyblocks: 1.7.0) 7

High-level design easybuild tools asyncprocess build_log config environment filetools module_generator modules ordereddict parallelbuild pbs_job repository systemtools variables version toolchain eb main.py easybuild_config.py framework toolchains compiler mpi linalg fft gcc inteliccifort goalf ictce... framework easyblock EasyBlock... extension Extension easyconfig EasyConfig... test scripts easyblocks generic configuremake ConfigureMake cmakemake CMakeMake... armadillo EB_Armadillo cp2k EB_CP2K wrf EB_WRF... 8

Step-wise install procedure build and install procedure as implemented by EasyBuild I: read easyconfig XV: test cases II: fetch sources III: check readiness IV: unpack sources V: apply patches VI: prepare VII: configure build XIV: env. module XIII: cleanup XII: sanity check XI: extensions X: install IX: test VIII: build most of these steps can be customized if required 9

Features logging and archiving entire build process is logged thoroughly, logs stored in install dir easyconfig file used for build is archived (file/svn/git repo) automatic dependency resolution software stack be built with a single command, using --robot running interactive installers autonomously by passing a Q&A Python dictionary to the run_cmd_qa function building software in parallel e.g., on a (PBS) cluster, by using --job comprehensive testing: unit tests, regression testing 10

Comprehensive testing unit tests are run automagically by Jenkins regression test results are pulled in publicly accessible: https://jenkins1.ugent.be/view/easybuild 11

List of supported software (v1.7.0) 329 different software packages (1,631 example easyconfigs) ABAQUS ABINIT ABySS ACML ALADIN ALLPATHS-LG AMOS ASE ATLAS AnalyzeFMRI Armadillo Autoconf Automake a2ps ant aria2 BFAST BLACS BLAST BLAT BWA BamTools Bash BiSearch BioPerl Biopython Bison Bonnie ++ Boost Bowtie Bowtie2 bam2fastq bbftp bbcp bbftppro beagle-lib binutils biodeps byacc bzip2 CBLAS CCfits CD- HIT CFITSIO CGAL CLHEP CMake CP2K CPLEX CRF++ CUDA CVXOPT Chapel Clang ClangGCC ClustalW2 Corkscrew Cufflinks Cython curl cairo ccache cflow cgdb cgmpich cgmpolf cgmvapich2 cgmvolf cgompi cgoolf DL_POLY_Classic DOLFIN Diffutils Docutils Doxygen ECore ELinks EMBOSS EPD ESMF ESPResSo EasyBuild Eigen expat FASTA FASTX-Toolkit FCM FFC FFTW FIAT FLUENT FRC_align FSL Ferret FreeSurfer findutils flex fmri fontconfig freeglut freetype GATE GATK GCC GDAL GDB GEOS GHC GLIMMER GLPK GLib GMP GPAW GROMACS GSL Geant4 Greenlet g2clib g2lib gawk gettext git glproto gmacml gmvapich2 gmvolf gnuplot gnutls goalf gompi google-sparsehash goolf goolfc gperf grib_api guile gzip HDF HDF5 HH-suite HMMER HPCBIOS_Bioinfo HPCBIOS_Debuggers HPCBIOS_LifeSciences HPCBIOS_Math HPCBIOS_Profilers HPL Harminv Hypre h5py h5utils horton hwloc Infernal Inspector Instant Iperf IronPython icc iccifort ictce ifort iiqmpi imkl impi iomkl ipp iqacml itac JUnit JasPer Java Jinja2 LAPACK LZO LibTIFF Libint lftp libctl libdrm libffi libgtextutils libharu libibmad libibumad libibverbs libidn libint2 libmatheval libpciaccess libpng libpthread-stubs libreadline libsmm libtool libungif libunistring libxc libxcb libxml2 libxslt libyaml likwid lxml M4 MATLAB MCL MDP MEME METIS MPFR MPICH MTL4 MUMmer MUSCLE MVAPICH2 Maple MariaDB Meep Mercurial Mesa MetaVelvet Mono Mothur MrBayes MyMediaLite make makedepend matplotlib mc molmod mpi4py mpiblast NASM NCBI-Toolkit NCL NEURON NWChem nano ncurses netcdf netcdf-c++ netcdf-fortran nettle ns numactl numexpr numpy ORCA Oases Oger OpenBLAS OpenFOAM OpenIFS OpenMPI OpenPGM OpenSSL orthomcl otcl PAML PAPI PCRE PETSc PLINK PSI ParMETIS Pasha Perl Primer3 PyYAML PyZMQ Python pandas parallel paycheck petsc4py phonopy pixman pkg-config problog pytables python-meep QLogicMPI Qt QuantumESPRESSO R RAxML RCS RNAz ROOT Rosetta SAMtools SCOOP SCOTCH SCons SHRiMP SLEPc SOAPdenovo SQLite SWIG ScaLAPACK ScientificPython Shapely Sphinx Stacks Stow SuiteSparse Szip scikit-learn scipy setuptools sympy Tar Tcl Theano TiCCutils TiMBL TinySVM Tk TopHat Tornado TotalView Trilinos Trinity tbb tclcl tcsh UDUNITS UFC UFL util-linux VSC-tools VTK VTune Valgrind Velvet ViennaRNA Viper WIEN2k WPS WRF wiki2beamer XCrySDen XML XML-LibXML XML-Simple xcb-proto xorg-macros xproto YAML-Syck YamCha Yasm yaff ZeroMQ zlib zsh zsync 12

1 HPC UGENT building software with ease Do you want to know more? website: http://hpcugent.github.com/easybuild GitHub: https://github.com/hpcugent/easybuild[-framework -easyblocks -easyconfigs] PyPi: http://pypi.python.org/pypi/easybuild[-framework -easyblocks -easyconfigs] mailing list: easybuild@lists.ugent.be Twitter: @easy_build IRC: #easybuild on freenode.net

Example use case (1/2) building and installing WRF (Weather Research and Forecasting Model) http://www.wrf-model.org complex(ish) dependency graph WRF very non-standard build procedure netcdf-fortran JasPer interactive configure script (!) netcdf Doxygen resulting configure.wrf needs work HDF5 flex Bison (hardcoding, tweaking of options,...) zlib Szip M4 compile script (wraps around make) no actual installation step ictce 14

Example use case (2/2) building and installing WRF (Weather Research and Forecasting Model) easyblock that comes with EasyBuild implements build procedure running configure script autonomously building with compile and patching configure.wrf testing build with standard included tests/benchmarks various example easyconfig files available different versions, toolchains, build options,... building and installing WRF becomes child s play, for example: eb --software=wrf,3.4 --toolchain-name=ictce --robot 15

Use case: WRF - easyblock (1/3) imports, class constructor, custom easyconfig parameter 1 import fileinput, os, re, sys 2 3 import easybuild.tools.environment as env 4 from easybuild.easyblocks.netcdf import set_netcdf_env_vars 5 from easybuild.framework.easyblock import EasyBlock 6 from easybuild.framework.easyconfig import MANDATORY 7 from easybuild.tools.filetools import patch_perl_script_autoflush, run_cmd, run_cmd_qa 8 from easybuild.tools.modules import get_software_root 9 class definition 10 class EB_WRF(EasyBlock): 11 12 def init (self, *args, **kwargs): 13 super(eb_wrf, self). init (*args, **kwargs) 14 self.build_in_installdir = True 15 16 @staticmethod 17 def extra_options(): import required functionality class constructor, specify building in installation dir 18 extra_vars = [('buildtype', [None, "Type of build (e.g., dmpar, dm+sm).", MANDATORY])] 19 return EasyBlock.extra_options(extra_vars) 20 21 def configure_step(self): 22 # prepare to configure define custom easyconfig parameters 23 set_netcdf_env_vars(self.log) 24 16

11 12 def init (self, *args, **kwargs): 13 super(eb_wrf, self). init (*args, **kwargs) 14 self.build_in_installdir = True 15 16 @staticmethod 17 def extra_options(): 18 extra_vars = [('buildtype', [None, "Type of configuration build (e.g., dmpar, (part dm+sm).", 1/2) MANDATORY])] 19 return EasyBlock.extra_options(extra_vars) 20 Use case: WRF - easyblock (2/3) configuration step function 21 def configure_step(self): 22 # prepare to configure 23 set_netcdf_env_vars(self.log) 24 25 jasper = get_software_root('jasper') 26 if jasper: 27 jasperlibdir = os.path.join(jasper, "lib") 28 env.setvar('jasperinc', os.path.join(jasper, "include")) 29 env.setvar('jasperlib', jasperlibdir) 30 31 env.setvar('wrfio_ncd_large_file_support', '1') 32 33 patch_perl_script_autoflush(os.path.join("arch", "Config_new.pl")) 34 35 known_build_types = ['serial', 'smpar', 'dmpar', 'dm+sm'] 36 self.parallel_build_types = ["dmpar", "smpar", "dm+sm"] 37 bt = self.cfg['buildtype'] 38 39 if not bt in known_build_types: set environment variables for dependencies set WRF-specific env var for build options patch configure script to run it autonomously 40 self.log.error("unknown build type: '%s' (supported: %s)" % (bt, known_build_types)) 41 42 # run configure script check whether specified 43 bt_option = "Linux x86_64 i486 i586 i686, ifort compiler with icc" build type makes sense 44 bt_question = "\s*(?p<nr>[0-9]+).\s*%s\s*\(%s\)" % (bt_option, bt) 45 17

33 patch_perl_script_autoflush(os.path.join("arch", "Config_new.pl")) 34 35 known_build_types = ['serial', 'smpar', 'dmpar', 'dm+sm'] 36 self.parallel_build_types = ["dmpar", "smpar", "dm+sm"] 37 bt = self.cfg['buildtype'] 38 39 if not bt in known_build_types: configuration (part 2/2) 40 self.log.error("unknown build type: '%s' (supported: %s)" % (bt, known_build_types)) 41 Use case: WRF - easyblock (2/3) 42 # run configure script 43 bt_option = "Linux x86_64 i486 i586 i686, ifort compiler with icc" 44 bt_question = "\s*(?p<nr>[0-9]+).\s*%s\s*\(%s\)" % (bt_option, bt) 45 46 cmd = "./configure" 47 qa = {"(1=basic, 2=preset moves, 3=vortex following) [default 1]:": "1", 48 "(0=no nesting, 1=basic, 2=preset moves, 3=vortex following) [default 0]:": "0"} 49 std_qa = {r"%s.*\n(.*\n)*enter selection\s*\[[0-9]+-[0-9]+\]\s*:" % bt_question: "%(nr)s"} 50 51 run_cmd_qa(cmd, qa, no_qa=[], std_qa=std_qa, log_all=true, simple=true) 52 53 # patch configure.wrf 54 cfgfile = 'configure.wrf' 55 56 comps = { 57 'SCC': os.getenv('cc'), 'SFC': os.getenv('f90'), 58 'CCOMP': os.getenv('cc'), 'DM_FC': os.getenv('mpif90'), 59 'DM_CC': "%s -DMPI2_SUPPORT" % os.getenv('mpicc'), 60 } 61 62 for line in fileinput.input(cfgfile, inplace=1, backup='.orig.comps'): 63 for (k, v) in comps.items(): 64 line = re.sub(r"ˆ(%s\s*=\s*).*$" % k, r"\1 %s" % v, line) 65 sys.stdout.write(line) 66 67 def build_step(self): prepare Q&A for configuring run configure script autonomously patch generated configuration file 18

54 cfgfile = 'configure.wrf' 55 56 comps = { 57 'SCC': os.getenv('cc'), 'SFC': os.getenv('f90'), 58 'CCOMP': os.getenv('cc'), 'DM_FC': os.getenv('mpif90'), 59 'DM_CC': "%s -DMPI2_SUPPORT" % os.getenv( MPICC ), 60 } 61 62 for line in fileinput.input(cfgfile, inplace=1, backup='.orig.comps'): 63 for (k, v) in comps.items(): 64 line = re.sub(r"ˆ(%s\s*=\s*).*$" % k, r"\1 %s" % v, line) Use case: WRF - easyblock (3/3) build step & skip install step (since there is none) build step function 65 sys.stdout.write(line) 66 67 def build_step(self): 68 # build WRF using the compile script 69 par = self.cfg['parallel'] 70 cmd = "./compile -j %d wrf" % par 71 run_cmd(cmd, log_all=true, simple=true, log_output=true) 72 73 # build two test cases to produce ideal.exe and real.exe 74 for test in ["em_real", "em_b_wave"]: 75 cmd = "./compile -j %d %s" % (par, test) 76 run_cmd(cmd, log_all=true, simple=true, log_output=true) 77 78 def install_step(self): 79 pass 80 no actual installation step (build in installation dir) build WRF (in parallel) build WRF utilities as well 19

Use case: installing WRF specify build details in easyconfig file (.eb) software name and version compiler toolchain specification and options custom parameter for WRF 1 name = 'WRF' 2 version = '3.4' 3 4 homepage = 'http://www.wrf-model.org' 5 description = 'Weather Research and Forecasting' 6 7 toolchain = {'name': 'ictce','version': '3.2.2.u3'} 8 toolchainopts = {'opt': False, 'optarch': False} 9 10 sources = ['%sv%s.tar.gz' % (name, version)] 11 patches = ['WRF_parallel_build_fix.patch', 12 'WRF-3.4_known_problems.patch', 13 'WRF_tests_limit-runtimes.patch', 14 'WRF_netCDF-Fortran_separate_path.patch'] 15 16 dependencies = [('JasPer', '1.900.1'), 17 ('netcdf', '4.2'), 18 ('netcdf-fortran', '4.2')] 19 20 buildtype = 'dmpar' software website and description (informative) list of source files list of patches for sources list of dependencies eb WRF-3.4-ictce-3.2.2.u3-dmpar.eb --robot 20

HPC UGENT 1 building software with ease PyBUG meeting @ Ghent lightning talk - Oct. 1st 2013 kenneth.hoste@ugent.be easybuild@lists.ugent.be