Building Software with Ease

Building Software with Ease

1 HPC UGENT building software with ease [email protected] HPC UGENT About HPC UGent: ‣ central contact for HPC at Ghent University 1 ‣ part of central IT department (DICT) ‣ member of Flemish supercomputer centre (VSC) ‣ collaboration between Flemish university associations ‣ six Tier2 systems, one Tier1 system ‣ #163 in Top500 ‣ team consists of 7 FTEs ‣ tasks include system administration of HPC infrastructure, user support, user training, ... 2 Scientific software Scientists (generally) spend their time and effort in developing (and testing) their code, not in maintaining it. Build procedures for scientific software are often: incomplete: e.g., no actual install step, only build-in-src-dir non-standard: e.g., requiring human interaction customized: custom scripts for configuration, building, ... instead of configure, cmake, make, etc. hard-coded: no configure option for libraries, compiler commands and flags, ... Very time-consuming for HPC user support teams! 3 What we need... flexibility implement any build procedure with min. effort easily switch between different compilers & libraries specify custom compiler options, install prefix, ... reproducibility easily reproduce exact same build procedure required for version updates, reinstallations, ... 4 What we need... co-existence of versions/builds scientists have conflicting requirements builds available for a long time latest and greatest version available as well different build parameters, compilers, ... e.g., build in prefix path, use environment modules 5 What we need... DOLFIN FFC SLEPc MTL4 Sphinx UFC Viper UFL Trilinos PETSc CGAL Jinja2 Instant FIAT Armadillo SuiteSparse SCOTCH MPFR setuptools Docutils SWIG Boost ScientificPython ParMETIS METIS GMP libxml2 Python CMake Hypre zlib PCRE libreadline ncurses bzip2 dependency handling hide dependency hell (e.g., DOLFIN) automate dependency resolution indispensable in any relevant build framework cfr. package managers (yum, dpkg, portage, ...) 6 What we need... sharing implementations of install procedures collaborate to tackle this ubiquitous problem enable forming of a community solve the issue once, and share the solution 7 Current tools are lacking Package managers like yum and dpkg do not provide a lot of scientific software because of this. writing .spec files is often a nightmare Existing tools are: hard to maintain (e.g., huge bash scripts) stand-alone, no reuse of previous efforts OS-dependent (e.g., HomeBrew, Portage, Arch, ...) specific to groups of software packages (e.g., Dorsal for FEniCS) 8 Building software with ease EasyBuild is a software build and installation framework written in Python. open-source (GPLv2), available via PyPi and GitHub It provides: a robust framework for implementing build procedures lots of supporting functionality extracting, patching, executing shell commands, creating module files, ... modular support for compilers, libraries (MPI, BLAS/LAPACK, ...) modular support for custom software build procedures 9 Dependencies Linux (or OS X) well tested on Red Hat-based systems (SL, Fedora) also used on Debian, some issues on OS X in v1.0.0 no plans for Windows support yet, should we? Python 2.4 or more recent 2.x no Python 3.x support yet, but planned environment modules important bug fix in upcoming 3.2.10 release system C/C++ compiler for building GCC 10 Quick demo for the impatient $ easy_install --user easybuild $ eb HPL-2.0-goalf-1.1.0-no-OFED.eb --robot downloads all required sources (best effort) builds and installs goalf compiler toolchain GCC, OpenMPI, ATLAS, LAPACK, FFTW, BLACS, ScaLAPACK builds and installs HPL benchmark (Linpack) with goalf toolchain default: everything under $HOME/.local/easybuild easy to configure differently with own config file, environment variables, ... 11 EasyBuild terminology framework supporting Python packages and Python modules provides common required functionality enables writing concise plugins (Python modules) very modular design, plug-and-play 12 EasyBuild terminology compiler toolchain compiler + a set of libraries to support software builds typically MPI, BLAS, LAPACK, FFT libraries for HPC EasyBuild takes care of: making compiler and libraries available for building setting environment variables for compiler CC, MPICC, F90, CFLAGS, CXXFLAGS, etc. setting include flags, e.g., -I/path/to/include setting linker flags, e.g., -L/path/to/LAPACK -llapack abstracts away compiler-specific stuff (toolchain options) e.g., OpenMP (-fopenmp, -openmp, ...) 13 EasyBuild terminology easyblock Python module implementing a build procedure specific to a (group of) software application(s) plugs into framework, just drop it in the Python search path example easyblock later in this talk for WRF 14 EasyBuild terminology easyconfig (file) e.g., HPL-2.0-goalf-1.1.0-no-OFED.eb simple text file (Python syntax) specifies software to build, version, build parameters, ... 1 name = 'HPL' 2 version = '2.0' 3 4 homepage = 'http://www.netlib.org/benchmark/hpl/' 5 description = "High Performance Computing Linpack Benchmark" 6 7 toolchain = {'name': 'goalf', 'version': '1.1.0-no-OFED'} 8 toolchainopts = {'optarch': True, 'usempi': True} 9 10 sources = ['%s-%s.tar.gz' % (name.lower(), version)] 11 source_urls = ['http://www.netlib.org/benchmark/%s' % name.lower()] 12 13 # fix Make dependencies, so parallel build also works 14 patches = ['HPL_parallel-make.patch'] 15 High-level design tools frameworktoolchains asyncprocess compiler mpi linalg fft build_log gcc inteliccifort config goalf ictce ... environment … filetools module_generator modules framework easyblocks ordereddict parallelbuild easyblock generic pbs_job ↳ EasyBlock configuremake repository ↳ ... ↳ ConfigureMake systemtools cmakemake variables extension ↳ CMakeMake version ↳ Extension ... toolchain easyconfig armadillo ↳ EasyConfig ↳ EB_Armadillo ↳ ... cp2k ↳ EB_CP2K wrf eb ↳ EB_WRF main.py test scripts ... easybuild_config.py 16 High-level design framework tools frameworktoolchains asyncprocess compiler mpi linalg fft build_log gcc easyblock inteliccifort config goalf ictce ... environment ↳ EasyBlock… filetools module_generator ↳ ... framework framework package modules framework easyblocks ordereddict generic parallelbuild easyblock ↳ pbs_job EasyBlock configuremake extension↳ repository ... ↳ ConfigureMake systemtools cmakemake ↳ Extensionextension core of EasyBuild variables ↳ CMakeMake version ↳ Extension ... toolchain easyconfig armadillo easyconfig↳ EasyConfig ↳ EB_Armadillo ↳ ↳ ... cp2k ‘abstract’ class Easyblock EasyConfig ↳ EB_CP2K wrf eb ↳ ... ↳ EB_WRF main.py test scripts ... easybuild_config.py should be subclassed EasyConfig class Extension class e.g., to build and install Python packages, R libraries, ... 17 High-level design tools tools frameworktoolchains asyncprocess asyncprocesscompiler mpi linalg fft build_log gcc inteliccifort config build_log goalf ictce ... environment … filetools config module_generator framework tools package modules environmentframework easyblocks ordereddict generic parallelbuild filetoolseasyblock ↳ pbs_job EasyBlock configuremake ↳ repository module_generator ... ↳ ConfigureMake systemtools cmakemake extension supporting functionality, e.g.: variables modules ↳ CMakeMake version ordereddict↳ Extension ... toolchain easyconfig armadillo parallelbuild↳ EasyConfig ↳ EB_Armadillo ↳ ... cp2k pbs_job ↳ EB_CP2K run_cmd for shell commands wrf eb repository ↳ EB_WRF main.py test scripts ... easybuild_config.pysystemtools variables run_cmd_qa for interaction version toolchain extract_file for unpacking apply_patch for patching tools.toolchain for compiler toolchains 17 High-level design tools frameworktoolchains asyncprocess compiler mpi linalg fft build_log gcc toolchains package inteliccifort config goalf ictce ... environment toolchains… filetools framework module_generator framework modules framework easyblocks support for compiler toolchains compilerordereddict linalg mpi genericfft parallelbuild easyblock ↳ gccpbs_job EasyBlock configuremake ↳ repository ... ↳ ConfigureMake inteliccifortsystemtools cmakemake relies on tools.toolchain variables extension goalf ictce ↳ CMakeMake ... …version ↳ Extension ... toolchain easyconfig armadillo ↳ EasyConfig ↳ EB_Armadillo toolchains are defined in here ↳ ... cp2k ↳ EB_CP2K wrf eb ↳ EB_WRF main.py test scripts ... organized in subpackages: easybuild_config.py toolchains.compiler toolchains.mpi toolchains.linalg (BLAS, LAPACK, ...) toolchains.fft very modular design for allowing extensibility plug in a Python module for compiler/library to extend it 17 High-level design tools tools frameworktoolchains toolchain asyncprocess compiler mpi linalg fft build_log gcc toolchains package inteliccifort config goalf ictce ... Compiler environmentMpi LinAlg… Fft filetools module_generator framework modules framework easyblocks support for compiler toolchains ordereddict generic parallelbuild easyblock ↳ pbs_job EasyBlock configuremake ↳ repository ... ↳ ConfigureMake systemtools cmakemake relies on tools.toolchain variables extension ↳ CMakeMake version ↳ Extension ... Gcc OpenMPItoolchain easyconfigAtlas armadillo Fftw ↳ EasyConfig ↳ EB_Armadillo toolchains are defined in here ↳ ... cp2k ↳ EB_CP2K wrf eb ↳ EB_WRF IntelIccIfort main.pyIntelMPI test IntelMKL IntelFFTW scripts ... organized in subpackages: easybuild_config.py compiler mpi linalg fft toolchains.compiler toolchains toolchains.mpi toolchains.linalg (BLAS, LAPACK, ...) toolchains.fft very modular design for allowing extensibility plug in a Python module for compiler/library to extend it 17 High-level design tools

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    40 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us