### Configure Easyblock Options Source: https://github.com/easybuilders/easybuild-framework/wiki/1st-EasyBuild-hackathon---meeting-minutes-day-1 Example of defining custom configuration and installation methods within an easyconfig file. ```python easyblock = {'configure': "git_fetch", 'install': "binary"} ``` -------------------------------- ### Install software with EasyBuild Source: https://github.com/easybuilders/easybuild-framework/wiki/Getting-started Execute the EasyBuild command to process an easyconfig file. ```bash /easybuild/eb gzip.eb ``` -------------------------------- ### Default EasyBuild configuration Source: https://github.com/easybuilders/easybuild-framework/wiki/Configuration The default configuration file used as a starting point for custom setups. ```python import os # buildPath possibly overridden by EASYBUILDBUILDPATH # installPath possibly overridden by EASYBUILDINSTALLPATH buildDir = 'build' installDir = '' sourceDir = 'sources' if os.getenv('EASYBUILDPREFIX'): prefix = os.getenv('EASYBUILDPREFIX') else: prefix = os.path.join(os.getenv('HOME'), ".local", "easybuild") if not prefix: prefix = "/tmp/easybuild" buildPath = os.path.join(prefix, buildDir) installPath = os.path.join(prefix, installDir) sourcePath = os.path.join(prefix, sourceDir) repositoryPath = os.path.join(prefix, 'ebfiles_repo') repository = FileRepository(repositoryPath) logFormat = ("easybuildlog", "easybuild-%(name)s-%(version)s-%(date)s.%(time)s.log") ``` -------------------------------- ### Specify toolkit for builds Source: https://github.com/easybuilders/easybuild-framework/wiki/Using-EasyBuild Examples for defining toolkit names and versions to control the build environment. ```bash eb --robot $EBHOME/easybuild/easyconfigs --software-name=bzip2 --toolkit-name=ictce ``` ```bash eb bzip2-1.0.6-ictce-4.0.6.eb --try-toolkit-name goalf --try-toolkit-version=1.1.0-no-OFED ``` ```bash eb --software-name=bzip2 -r $EBHOME/easybuild/easyconfigs --toolkit-version=4.0.6 # only easyconfig for ictce available ``` ```bash eb -r easybuild/easyconfigs --software-name bzip2 --toolkit=ictce,4.0.6 ``` ```bash eb bzip2-1.0.6-ictce-4.0.6.eb --try-toolkit goalf,1.1.0-no-OFED ``` -------------------------------- ### Specify software name and version Source: https://github.com/easybuilders/easybuild-framework/wiki/Using-EasyBuild Examples for using software name and version flags to locate or generate easyconfig files. ```bash eb -r $EBHOME/easybuild/easyconfigs --software-name=bzip2 ``` ```bash eb -r $EBHOME/easybuild/easyconfigs --software-name=unknown-software ``` ```bash eb -r $EBHOME/easybuild/easyconfigs --software-name bzip2 --software-version=1.0.6 ``` ```bash eb -r $EBHOME/easybuild/easyconfigs --software-name bzip2 --try-software-version=1.0.8 ``` ```bash eb bzip2-1.0.6-ictce-4.0.6.eb --try-software-version=1.0.8 ``` -------------------------------- ### Configure custom EasyBuild settings Source: https://github.com/easybuilders/easybuild-framework/wiki/Configuration Example configuration file defining paths and repository settings based on the user's home directory. ```python import os home = os.getenv('HOME') buildPath = "/tmp/easybuild" installPath = home sourcePath = os.path.join(home, "sources") repositoryPath = os.path.join(home, "ebfiles") repository = FileRepository(repositoryPath) logFormat = ("easybuildlogs", "%(name)s-%(version)s.log") ``` -------------------------------- ### Build GROMACS-GPU with CMake Source: https://github.com/easybuilders/easybuild-framework/wiki/Wishlist This example demonstrates how to build GROMACS-GPU using CMake, specifying custom installation paths and build options. Ensure you are in a separate build directory to avoid confusion. ```bash # GROMACS-GPU uses a cmake build-generator and makefiles on unix. # To avoid confusion build in separate folder export OPENMM_ROOT_DIR=path_to_custom_openmm_installation mkdir build_gromacs_gpu cd build_gromacs_gpu cmake PATH_TO_SOURCE_DIRECTORY -DGMX_OPENMM=ON -DGMX_THREADS=OFF make mdrun make install-mdrun ``` -------------------------------- ### Commit Changes Source: https://github.com/easybuilders/easybuild-framework/wiki/Contributing-back Example of staging and committing changes to the repository. ```bash git add easybuild/easyblocks/l/linuxfromscratch.py git commit -m "support for Linux From Scratch" ``` -------------------------------- ### Build and install OpenMPI Source: https://github.com/easybuilders/easybuild-framework/wiki/Step-by-step-guide Executes the EasyBuild command to build OpenMPI using the provided easyconfig. ```bash /easybuild/eb OpenMPI-1.4.5-no-OFED.eb ``` -------------------------------- ### Commit contributions Source: https://github.com/easybuilders/easybuild-framework/blob/develop/CONTRIBUTING.md Example of staging and committing changes to the repository. ```bash git add easybuild/tools/systemtools.py git commit -m "add required support for running EasyBuild on Windows" ``` -------------------------------- ### Load installed software module Source: https://github.com/easybuilders/easybuild-framework/wiki/Getting-started Use the module system to load the software package built by EasyBuild. ```bash module load gzip/1.4-myToolkit-1.2.3 ``` -------------------------------- ### Build and install GCC Source: https://github.com/easybuilders/easybuild-framework/wiki/Step-by-step-guide Executes the EasyBuild command to build GCC using the specified easyconfig file. ```bash /easybuild/eb GCC-4.6.3.eb ``` -------------------------------- ### Verify GCC installation Source: https://github.com/easybuilders/easybuild-framework/wiki/Step-by-step-guide Loads the GCC module and checks the version to confirm a successful installation. ```bash module load GCC/4.6.3 gcc --version | grep ^gcc ``` -------------------------------- ### Define Package Configuration Parameters Source: https://github.com/easybuilders/easybuild-framework/wiki/Easyconfig-files A dictionary to configure parameters for installed packages. ```python pkgcfgs = {'NumPy': {'blas_lapack_libs': ['openBLAS']}} ``` -------------------------------- ### Define sanity check command Source: https://github.com/easybuilders/easybuild-framework/wiki/Step-by-step-guide Automates the verification of the installation within the easyconfig file. ```python sanityCheckCommand = (None, '--version') ``` -------------------------------- ### EasyBuild Configuration Settings Source: https://github.com/easybuilders/easybuild-framework/wiki/Examples Defines paths for building, sources, installation, and repository, along with log formatting. These settings are typically found in easybuild_config.py. ```python buildPath = '/local/easybuild-dev/build' sourcePath = '/apps/gent/source' installPath = '/local/easybuild-dev/install' repositoryPath = ('svn+ssh://user@code.ugent.be/easybuild/trunk/easybuild/specfiles') logFormat = ("easybuild", "easybuild-%(name)s-%(version)s-%(date)s.%(time)s.log") ``` -------------------------------- ### Default log format definition Source: https://github.com/easybuilders/easybuild-framework/wiki/Configuration A standalone example of the default log format tuple using all available fields. ```python ("easybuildlog", "easybuild-%(name)s-%(version)s-%(date)s.%(time)s.log") ``` -------------------------------- ### Define Package List for Software Addons Source: https://github.com/easybuilders/easybuild-framework/wiki/Easyconfig-files List of addon packages to be added to a base installation. Each package is a `(name, version)` tuple. ```python pkglist = [('NumPy', '1.19.1'), ('SciPy', '1.5.2')] ``` -------------------------------- ### Define openssl Package with Dependencies and Conflicts Source: https://github.com/easybuilders/easybuild-framework/wiki/Wishlist This example defines the 'openssl' package, specifying its version, multiple dependencies, and a conflict with an older version of 'ssleay'. ```CUDF package: openssl version: 11 depends: libc6 >= 18, libssl0.9.8 >= 8, zlib1g >= 1 conflicts: ssleay < 1 ``` -------------------------------- ### Define repository in configuration Source: https://github.com/easybuilders/easybuild-framework/wiki/Configuration Set the repository variable within the EasyBuild configuration file to track installed easyconfigs. ```python repository = FileRepository(repositoryPath) ``` ```python repository = FileRepository(repositoryPath, subdir) ``` -------------------------------- ### Define Package Filter Command Source: https://github.com/easybuilders/easybuild-framework/wiki/Easyconfig-files Tuple with a template for a command and input to the command for filtering packages after installation. ```python pkgfilter = ('python %s/check_libs.py --prefix %s', ('name', 'version', 'src')) ``` -------------------------------- ### Extend MODULEPATH environment variable Source: https://github.com/easybuilders/easybuild-framework/wiki/Configuration Add the EasyBuild modules directory to the shell environment to ensure installed modules are discoverable. ```bash export MODULEPATH=/modules/all:$MODULEPATH ``` -------------------------------- ### Control Toolkit Module Loading Behavior Source: https://github.com/easybuilders/easybuild-framework/wiki/Easyconfig-files Specify whether the toolkit should only load environment modules or also set other variables. This allows fine-grained control over the build environment setup. ```python onlytkmod = True ``` -------------------------------- ### Define icc Package Providing Compiler Source: https://github.com/easybuilders/easybuild-framework/wiki/Wishlist This example defines the 'icc' package, similar to 'gcc', specifying that it provides the 'compiler' virtual package and conflicts with other 'compiler' providers. ```CUDF package: icc version: 10.2 provides: compiler conflicts: compiler ``` -------------------------------- ### Basic EasyBuild Usage with Easyconfig File Source: https://github.com/easybuilders/easybuild-framework/wiki/Using-EasyBuild Use this command to build software by providing a path to an easyconfig file. This is the recommended way to use EasyBuild. ```sh $EBHOME/eb example.eb ``` -------------------------------- ### Display Help and Available Options Source: https://github.com/easybuilders/easybuild-framework/wiki/Using-EasyBuild Run the `eb` script with `-h` or `--help` to display all available command-line options and usage information. This output is also shown when no .eb file is specified. ```txt Usage: build.py [options] easyconfig [..] Builds software package based on easyconfig (or parse a directory). Provide one or more easyconfigs or directories, use -h or --help more information. Options: -h, --help show this help message and exit Basic options: Basic runtime options for EasyBuild. -b BLOCKS, --only-blocks=BLOCKS Only build blocks blk[,blk2] -d, --debug log debug messages -f, --force force to rebuild software even if it's already installed (i.e. can be found as module) --job will submit the build as a job -k, --skip skip existing software (useful for installing additional packages) -l log to stdout -r PATH, --robot=PATH path to search for easyconfigs for missing dependencies --regtest enable regression test mode --regtest-online enable online regression test mode -s STOP, --stop=STOP stop the installation after certain step (valid: cfg, source, patch, prepare, configure, make, install, test, postproc, cleanup, packages) --strict=STRICT set strictness level (possible levels: ignore, warn, error) Software build options: Specify software build options (overrides settings in easyconfig). --software-name=NAME build software package with given name --software-version=VERSION build with this particular version --toolkit=NAME,VERSION build with specified toolkit (name and version) --toolkit-name=NAME build with specified toolkit name --toolkit-version=VERSION build with specified toolkit version --amend=VAR=VALUE[,VALUE2] specify additional build parameters (can be used multiple times); for example: versionprefix=foo or patches=one.patch,two.patch Override options: Override default EasyBuild behavior. -C CONFIG, --config=CONFIG path to EasyBuild config file [default: $EASYBUILDCONFIG or easybuild/easybuild_config.py] -e CLASS, --easyblock=CLASS loads the class from module to process the spec file or dump the options for [default: Application class] -p, --pretend does the build/installation in a test directory located in $HOME/easybuildinstall [default: $EASYBUILDINSTALLDIR or installPath in EasyBuild config file] -t, --skip-tests skip testing Informative options: Obtain information about EasyBuild. -a, --avail-easyconfig-params show available easyconfig parameters --dump-classes show list of available classes --search=SEARCH search for module-files in the robot-directory -v, --version show version --dep-graph=depgraph. create dependency graph ``` -------------------------------- ### EasyBuild Configuration Options Source: https://github.com/easybuilders/easybuild-framework/wiki/Easyconfig-files Overview of build process steps and file management configuration options available in EasyBuild. ```APIDOC ## Build Options ### Description Configuration options for the standard EasyBuild software build process, covering unpacking, patching, configuring, building, testing, and installation. ### Parameters #### Build Process Options - **sources** (list) - List of source-items to unpack. - **sourceURLs** (list) - List of URLs for automatic source downloading. - **unpackOptions** (string) - Extra options for unpacking source. - **patches** (list) - List of patches to apply (supports file names, [name, level], or [name, path_suffix]). - **preconfigopts** (string) - Extra options pre-passed to configure. - **configopts** (string) - Extra options passed to configure. - **premakeopts** (string) - Extra options pre-passed to make. - **makeopts** (string) - Extra options passed to make. - **parallel** (integer) - Number of build threads. - **runtest** (string) - Test command passed as 'make [runtest]'. - **installopts** (string) - Extra options for installation. - **sanityCheckPaths** (dict) - Files and directories to check after installation (format: {'files':[], 'dirs':[]}). - **sanityCheckCommand** (tuple/bool) - Command to run for sanity check. - **modextravars** (dict) - Extra environment variables for module files. - **tests** (list) - List of test-scripts to run after install. - **versionprefix** (string) - Additional prefix for software version. - **versionsuffix** (string) - Additional suffix for software version. ## File Management Options ### Description Options for managing build and installation directories. ### Parameters - **startfrom** (string) - Path to start the make process. - **cleanupoldbuild** (boolean) - Remove (True) or backup (False) previous build directory. - **cleanupoldinstall** (boolean) - Remove (True) or backup (False) previous install directory. - **dontcreateinstalldir** (boolean) - Skip creation of install directory. - **keeppreviousinstall** (boolean) - Keep previous installation with identical name. - **keepsymlinks** (boolean) - Keep symlinks during copying. ``` -------------------------------- ### Basic EasyBuild Usage with Command Line Options Source: https://github.com/easybuilders/easybuild-framework/wiki/Using-EasyBuild This command attempts to build software using only command line options. It is less recommended as it may fail if EasyBuild cannot determine build specifications. ```sh $EBHOME/eb --software-name=gzip ``` -------------------------------- ### Clone the repository Source: https://github.com/easybuilders/easybuild-framework/blob/develop/CONTRIBUTING.md Initial step to clone your fork of the easybuild-framework repository to your local workstation. ```bash git clone git@github.com:YOUR_GITHUB_LOGIN/easybuild-framework.git ``` -------------------------------- ### Define OS Dependencies in EasyBuild Source: https://github.com/easybuilders/easybuild-framework/wiki/Easyconfig-files List operating system packages required for the build, verified using RPM. Format: `(name, version)`. ```python osdependencies = [['zlib', '1.2.11']] ``` -------------------------------- ### Define Runtime Dependencies in EasyBuild Source: https://github.com/easybuilders/easybuild-framework/wiki/Easyconfig-files Specify modules that should be loaded when the package is loaded. Format: `(name, version [, versionsuffix [, True to use a dummy-toolkit]])`. ```python dependencies = [['Libint', '1.1.4']] ``` -------------------------------- ### Define an EasyBuild Toolkit Configuration Source: https://github.com/easybuilders/easybuild-framework/wiki/Compiler-toolkits This configuration file defines the ictce toolkit by specifying its dependencies on Intel compilers, MPI, and MKL. ```python easyblock="Toolkit" name='ictce' version='4.0.6' homepage='http://software.intel.com/en-us/intel-cluster-toolkit-compiler/' description="""Intel Cluster Toolkit Compiler Edition provides Intel C,C++ and fortran compilers, Intel MPI and Intel MKL""" toolkit={'name':'dummy','version':'dummy'} dependencies=[('icc','2011.6.233'), ('ifort','2011.6.233'), ('impi','4.0.2.003'), ('imkl','10.3.6.233') ] ## compiler class moduleclass='compiler' ``` -------------------------------- ### Clone EasyBuild Repository Source: https://github.com/easybuilders/easybuild-framework/wiki/Contributing-back Initial step to clone the EasyBuild fork to a local workstation. ```bash git clone git@github.com:hpcugent/easybuild.git ``` -------------------------------- ### Create easyconfig for FFTW Source: https://github.com/easybuilders/easybuild-framework/wiki/Step-by-step-guide Configuration for building the FFTW library, including MPI and OpenMP support. Specifies toolkit, sources, and configuration options. ```python name='FFTW' version='3.3.1' homepage='http://www.fftw.org' description='FFTW is a C subroutine library for computing the discrete Fourier transform (DFT) in one or more dimensions, of arbitrary input size, and of both real and complex data' toolkit={'name':'GCC','version':'4.6.3'} toolkitopts={'optarch':True, 'pic':True} sources=['%s-%s.tar.gz'%(name.lower(),version)] sourceURLs=[homepage] mpilib='OpenMPI' mpiver='1.4.5' mpisuff='-no-OFED' dependencies=[(mpilib, mpiver, mpisuff)] versionsuffix='-%s-%s%s' % (mpilib, mpiver, mpisuff) configopts="--enable-sse2 " ## the MPI opts from FFTW2 are valid options but unused until FFTW3.3 configopts+="--with-openmp --with-pic --enable-mpi " moduleclass='lib' ``` -------------------------------- ### Create easyconfig for goalf compiler toolkit Source: https://github.com/easybuilders/easybuild-framework/wiki/Step-by-step-guide Defines a compiler toolkit named 'goalf' based on GCC, including MPI, BLAS, LAPACK, FFTW, and ScaLAPACK. ```python easyblock="toolkit" name='goalf' version='1.1.0' versionsuffix='-no-OFED' homepage='(none)' description="""GNU Compiler Collection (GCC) based compiler toolkit, including OpenMPI for MPI support, ATLAS (BLAS support), LAPACK, FFTW and ScaLAPACK.""" toolkit={'name':'dummy','version':'dummy'} compname='GCC' compver='4.6.3' comp='%s-%s' % (compname, compver) mpilib='OpenMPI' mpiver='1.4.5' mpisuff='-no-OFED' blaslib='ATLAS' blasver='3.8.4' lapacklib='LAPACK' lapackver='3.4.0' ``` -------------------------------- ### Build HPL with EasyBuild Source: https://github.com/easybuilders/easybuild-framework/wiki/Quick-demo-for-the-impatient Executes the EasyBuild robot feature to build HPL and its required dependencies. ```bash export EBHOME="/easybuild" ${EBHOME}/eb --robot ${EBHOME}/easybuild/easyconfigs ${EBHOME}/easybuild/easyconfigs/h/HPL/HPL-2.0-goalf-1.1.0.eb ``` -------------------------------- ### OpenMPI easyconfig configuration Source: https://github.com/easybuilders/easybuild-framework/wiki/Step-by-step-guide Defines the build parameters, toolkit, and sanity check paths for OpenMPI. ```python name='OpenMPI' version='1.4.5' versionsuffix="-no-OFED" # no InfiniBand support, so add version suffix homepage='http://www.open-mpi.org/' description="The Open MPI Project is an open source MPI-2 implementation." toolkit={'name': 'GCC','version': '4.6.3'} sources=['%s-%s.tar.gz'%(name.lower(),version)] sourceURLs=['http://www.open-mpi.org/software/ompi/v%s/downloads' % '.'.join(version.split('.')[0:2])] configopts='--with-threads=posix --enable-shared ' moduleclass='lib' sanityCheckPaths = { 'files':["bin/%s" % binfile for binfile in ["ompi_info", "opal_wrapper", "orterun"]] + ["lib/lib%s.so" % libfile for libfile in ["mca_common_sm", "mpi_cxx", "mpi_f77" ,"mpi_f90", "mpi", "openmpi_malloc", "open-pal", "open-rte"]], 'dirs':["include/openmpi/ompi/mpi/cxx"] } ``` -------------------------------- ### Create easyconfig for ScaLAPACK Source: https://github.com/easybuilders/easybuild-framework/wiki/Step-by-step-guide Configuration for building the ScaLAPACK library, a distributed-memory parallel version of LAPACK. Includes dependencies on MPI, BLAS, LAPACK, and BLACS. ```python name='ScaLAPACK' version='1.8.0' homepage='http://www.netlib.org/scalapack/' description="The ScaLAPACK (or Scalable LAPACK) library includes a subset of LAPACK routines redesigned for distributed memory MIMD parallel computers." compname='GCC' compver='4.6.3' comp='%s-%s' % (compname, compver) toolkit={'name':compname,'version':compver} toolkitopts={'pic':True} sources=['%s-%s.tgz'%(name.lower(),version)] sourceURLs=[homepage] mpilib='OpenMPI' mpiver='1.4.5' mpisuff='-no-OFED' blaslib='ATLAS' blasver='3.8.4' lapacklib='LAPACK' lapackver='3.4.0' blacslib='BLACS' blacsver='1.1' versionsuffix="%s%s%s%s"%(mpi, blas, lapack, blacs) dependencies=[(mpilib, mpiver, mpisuff), (blaslib, blasver, lapack), (lapacklib, lapackver), (blacslib, blacsver, mpi) ] ## parallel build tends to fail, so disabling it parallel=1 moduleclass='lib' ``` -------------------------------- ### Define a gzip easyconfig file Source: https://github.com/easybuilders/easybuild-framework/wiki/Getting-started Create a .eb file to define the build parameters for the gzip software package. ```python name = 'gzip' version = '1.4' homepage = 'http://www.gnu.org/software/gzip/' description = "gzip (GNU zip) is a popular data compression program as a replacement for compress" # dummy toolkit, rely on system C compiler toolkit = {'name': 'dummy', 'version': 'dummy'} # source tarball filename sources = ['%s-%s.tar.gz'%(name,version)] # download location for source files sourceURLs = ['http://ftpmirror.gnu.org/gzip'] # make sure the gzip and gunzip binaries are available after installation sanityCheckPaths = {'files': ["bin/gunzip", "bin/gzip"], 'dirs': []} # run gzip -h after installation sanityCheckCommand = True ``` -------------------------------- ### Define Custom Software-Specific Options in EasyBuild Source: https://github.com/easybuilders/easybuild-framework/wiki/Easyconfig-files Extend the `self.cfg` dictionary in a Python class to define custom configuration options for a package. ```python self.cfg.update({ 'licensefile': [None, 'COMSOL license file'], 'comsolupdates':[[], 'List of update files for COMSOL'] }) ``` -------------------------------- ### Define EasyBuild Blocks Source: https://github.com/easybuilders/easybuild-framework/wiki/Easyconfig-files Use blocks to define multiple software variants within a single easyconfig file, with support for dependencies between variants. ```text mod="Compiler.Gcc" name="GCC" homepage='http://gcc.gnu.org/' description="The GNU Compiler Collection includes front ends for C, C++, Objective-C, Fortran, Java, and Ada, as well as libraries for these languages (libstdc++, libgcj,...)." [variant-a] # Extra settings here [variant-b] # An extension of variant-a block = "variant-a" ``` -------------------------------- ### Create easyconfig for ATLAS Source: https://github.com/easybuilders/easybuild-framework/wiki/Step-by-step-guide Defines the configuration for building the ATLAS library. Includes source information, dependencies, and build options. ```python name='ATLAS' version='3.8.4' homepage='http://math-atlas.sourceforge.net' description="""ATLAS (Automatically Tuned Linear Algebra Software) is the application of the AEOS (Automated Empirical Optimization of Software) paradigm, with the present emphasis on the Basic Linear Algebra Subprograms (BLAS), a widely used, performance-critical, linear algebra kernel library.""" toolkit={'name':'GCC','version':'4.6.3'} toolkitopts={'pic':True} sources=['%s%s.tar.bz2'%(name.lower(),version)] sourceURLs=[('http://sourceforge.net/projects/math-atlas/files/Stable/%s' % version,'download')] lapack='LAPACK' lapackver='3.4.0' dependencies=[(lapack, lapackver)] versionsuffix='-%s-%s' % (lapack, lapackver) patches=['ATLAS-3.8.4_illegal-instruction-fix.patch'] ## build full LAPACK library with supplied netlib LAPACK full_lapack=True ## fix for http://math-atlas.sourceforge.net/errata.html#sharedProbe configopts="-Ss f77lib '-L$(SOFTROOTGCC)/lib64 -lgfortran'" ## ignore check done by ATLAS for CPU throttling; ## you should set this to False (or remove it) ## and disable CPU throttling (requires root privileges) if you can ignorethrottling=True moduleclass='lib' ``` -------------------------------- ### Create easyconfig for LAPACK Source: https://github.com/easybuilders/easybuild-framework/wiki/Step-by-step-guide Defines the configuration for building the LAPACK library. Specifies version, homepage, toolkit, and source details. ```python name='LAPACK' version='3.4.0' homepage='http://www.netlib.org/lapack/' description="""LAPACK is written in Fortran90 and provides routines for solving systems of simultaneous linear equations, least-squares solutions of linear systems of equations, eigenvalue problems, and singular value problems.""" toolkit={'name':'GCC','version':'4.6.3'} toolkitopts={'pic':True} sources=['%s-%s.tgz'%(name.lower(),version)] sourceURLs=[homepage] moduleclass='lib' ``` -------------------------------- ### Define logFormat tuple Source: https://github.com/easybuilders/easybuild-framework/wiki/Configuration Sets the log directory and template string using supported fields like name, version, date, and time. ```python logFormat=("easylog","easybuild-%(name)s.log") ``` -------------------------------- ### Create a feature branch Source: https://github.com/easybuilders/easybuild-framework/blob/develop/CONTRIBUTING.md Steps to create and switch to a new feature branch based on the develop branch. ```bash git checkout develop git branch git checkout ``` -------------------------------- ### Dummy Toolkit Without Dependency Loading Source: https://github.com/easybuilders/easybuild-framework/wiki/Easyconfig-files Configure a dummy toolkit to avoid loading its dependencies. This is useful when only the toolkit name is needed without its associated modules. ```python toolkit = {'name': 'dummy', 'version':'dummy'} ``` -------------------------------- ### Define custom configuration options in Application class Source: https://github.com/easybuilders/easybuild-framework/wiki/Development-guide Use the extra_options static method to extend the configuration data structure. Access these values later using the getCfg method. ```python from easybuild.framework.easyconfig import CUSTOM from easybuild.easyblocks.application import Application def __init__(self, *args, **kwargs): Application.__init__(self, *args, **kwargs) @staticmethod def extra_options(): extra_vars = [ ('importdeps', [None, 'A list of modules to import when configuring', CUSTOM]), ('config-key', [, , CUSTOM ]), (..., [..., ..., CUSTOM]), ] return Application.extra_options(extra_vars) ``` -------------------------------- ### Use Dummy Toolkit for Non-Compiled Packages Source: https://github.com/easybuilders/easybuild-framework/wiki/Easyconfig-files Use a dummy toolkit when a compiler toolkit is not required, such as for binary or interpreted packages. This simplifies configuration for such cases. ```python toolkit = {'name': 'dummy', 'version':_} ``` -------------------------------- ### Manage Develop Branch Source: https://github.com/easybuilders/easybuild-framework/wiki/Contributing-back Commands to initialize, pull, and update the develop branch from the main repository. ```bash cd easybuild git remote add github_hpcugent git@github.com:hpcugent/easybuild.git git branch develop git checkout develop git pull github_hpcugent develop ``` ```bash git checkout develop git pull github_hpcugent develop ``` -------------------------------- ### Define Package Source File Template Source: https://github.com/easybuilders/easybuild-framework/wiki/Easyconfig-files Template for package source file names, using `%s` for name and version. ```python pkgtemplate = '%s-%s-source.tar.bz2' ``` -------------------------------- ### Configure Toolkit Options for Compiler Flags Source: https://github.com/easybuilders/easybuild-framework/wiki/Easyconfig-files Set various options for the compiler toolkit, such as enabling MPI, controlling optimization levels, or specifying C standards. These options influence the build process and resulting binary. ```python toolkitopts = { 'usempi': True, 'opt': True, 'cstd': 'c99', 'shared': True } ``` -------------------------------- ### Define Build-Time Dependencies in EasyBuild Source: https://github.com/easybuilders/easybuild-framework/wiki/Easyconfig-files Specify modules that are loaded only during the build process and not exported afterwards. Format: `(name, version [, versionsuffix [, True to use a dummy-toolkit]])`. ```python builddependencies = [['Boost', '1.70.0']] ``` -------------------------------- ### Create GCC Easyconfig Source: https://github.com/easybuilders/easybuild-framework/wiki/Step-by-step-guide Defines the configuration for building the GNU Compiler Collection (GCC) version 4.6.3. This easyconfig specifies sources, URLs, supported languages, and module class. ```python name="GCC" version='4.6.3' homepage='http://gcc.gnu.org/' description="The GNU Compiler Collection includes front ends for C, C++, Objective-C, Fortran, Java, and Ada, as well as libraries for these languages (libstdc++, libgcj,...)." toolkit={'name':'dummy', 'version': 'dummy'} sources=['%s-%s.tar.gz' % (name.lower(), version), 'gmp-5.0.4.tar.bz2', 'mpfr-3.0.1.tar.gz', 'mpc-0.9.tar.gz', ] sourceURLs=['http://ftpmirror.gnu.org/%(name)s/%(name)s-%(version)s' % {'name': name.lower(), 'version': version}, # GCC auto-resolving HTTP mirror 'http://ftpmirror.gnu.org/gmp', # idem for GMP 'http://ftpmirror.gnu.org/mpfr', # idem for MPFR 'http://www.multiprecision.org/mpc/download', # MPC official ] languages=['c','c++','fortran','lto'] moduleclass='compiler' ``` -------------------------------- ### Configure toolkit in easyconfig Source: https://github.com/easybuilders/easybuild-framework/wiki/Getting-started Update the toolkit variable in an existing .eb file to use a specific compiler toolkit. ```python toolkit = {'name':'myToolkit','version':'1.2.3'} ``` -------------------------------- ### Specify Toolkit Configuration in Easyconfig Source: https://github.com/easybuilders/easybuild-framework/wiki/Easyconfig-files Configure a specific compiler toolkit and its version within an easyconfig file. This ensures consistent build environments. ```python toolkit = {'name':'ictce', 'version':'4.0.4'} ``` -------------------------------- ### Specify additional build parameters with --try-amend Source: https://github.com/easybuilders/easybuild-framework/wiki/Using-EasyBuild Use --try-amend to override or add specific build parameters like version prefixes, suffixes, source URLs, or patch lists during the EasyBuild process. ```bash # specifying a desired version prefix eb -r $EBHOME/easybuild/easyconfigs --software-name bzip2 --try-amend versionprefix=alpha # specifying a version suffix to use eb bzip2-1.0.6-goalf-1.1.0-no-OFED.eb --software-version=1.0.4 --try-amend versionsuffix=-old-and-buggy # specifying URL for downloading source for currently unknown software eb -r $EBHOME/easybuild/easyconfigs --software-name=tar --toolkit goalf,1.1.0-no-OFED \ --software-version 1.26 --try-amend=sourceURLs=http://ftpmirror.gnu.org/tar, # specify update for list of patches eb bzip2-1.0.6-goalf-1.1.0-no-OFED.eb --try-software-version=1.0.4 --try-amend patches=fix-1.0.4.patch,backport_fixes_1.0.5.patch ``` -------------------------------- ### Define Package Patches Source: https://github.com/easybuilders/easybuild-framework/wiki/Easyconfig-files List of patches to apply to packages. Each entry is `[_package-name_, [_patch-file_, ...]]`. ```python pkgpatches = [('MyPackage', ['patch1.patch', 'patch2.patch'])] ``` -------------------------------- ### Define m4 Package with Dependencies Source: https://github.com/easybuilders/easybuild-framework/wiki/Wishlist This snippet shows how to define a package named 'm4' with a specific version and a dependency on 'libc6'. ```CUDF package: m4 version: 3 depends: libc6 >= 8 ``` -------------------------------- ### Configure Toolkit Usage in Easyconfig Source: https://github.com/easybuilders/easybuild-framework/wiki/Compiler-toolkits Set the toolkit parameter within an easyconfig file to specify the compiler suite for a package build. ```python toolkit={'name':'ictce', 'version':'4.0.6'} ``` -------------------------------- ### Define Package Module Name Mapping Source: https://github.com/easybuilders/easybuild-framework/wiki/Easyconfig-files Map package names to their real module names if they differ. ```python pkgmodulenames = {'scipy': 'SciPy-Stack'} ``` -------------------------------- ### Issue Pull Request via API Source: https://github.com/easybuilders/easybuild-framework/wiki/Contributing-back Convert an existing issue into a pull request using the GitHub API from the command line. ```bash GITHUBUSER=your_username && PASSWD=your_password && BRANCH=branch_name && ISSUE=issue_number && \ curl --user "$GITHUBUSER:$PASSWD" --request POST \ --data "{\"issue\": \"$ISSUE\", \"head\": \"$GITHUBUSER:$BRANCH\", \"base\": \"develop\"}" \ https://api.github.com/repos/hpcugent/easybuild/pulls ```