easyblock = 'SystemCompiler' supports also other setups (multiple versions etc). I wrote some doucumentation on how to use it (attached below), my understanding is that there is an open pull request to include this info into easybuild/docs at some point.
Bernd ======================== systemcompiler.txt ================================ EasyBuild Support for System Compilers ====================================== Motivation ---------- Beyond the default usage scenario of EasyBuild where it is used to build and install the complete software stack for HPC cluster system, there is another scenario in which EasyBuild is very useful: people want to easily install a complex software package or set of packages on their laptop or workstation. In that case, users are typically annoyed by the fact that EasyBuild requires them to re-install yet another version of a compiler instead of allowing them to re-use already existing compilers (either done manually by the user or by using the compiler(s) provided by the Linux distribution). This is the scenario supported by the EasyBlock "SystemCompiler". Currently Supported Compilers ----------------------------- GCC, icc, ifort Basic Usage ----------- The most simple case, where a user just wants to use the compiler provided by the Linux distribution (compiler is in $PATH), the following EasyConfig can be used: ----- GCC-system.eb ------------------------------------------------------ easyblock = 'SystemCompiler' name = 'GCC' version = 'system' homepage = 'http://gcc.gnu.org/' description = """The GNU Compiler Collection ...""" toolchain = {'name': 'dummy', 'version': 'dummy'} moduleclass = 'compiler' -------------------------------------------------------------------------- The EasyConfig parameters "homepage", "description", and "toolchain" are technically not necessary but are currently required by EasyBuild and should be provided as shown in the example. The "moduleclass" parameter is technically optional, but should also be set like shown above to ensure correct handling of the compiler inside EasyBuild. The compiler the user wants to make available to EasyBuild is specified in the parameter "name". Currently, only the values "GCC", "icc", or "ifort" are recognized and supported. If the "version" parameter is set to 'system', the SystemCompiler EasyBlock automatically derives the correct version number from the system compiler and sets internal variables accordingly. The command "eb GCC-system.eb" analog to the EasyBuild command to build and install a compiler does the necessary bookkeeping and module generation for the desired system compiler. It can then be used to install the rest of the necessary toolchain and desired packages. Advanced Usage -------------- Advanced users might have multiple versions of compilers already installed on their system and want to make them all available to EasyBuild. In that case, EasyConfigs like the following can be used: ----- GCC-4.8.3-system.eb ------------------------------------------------ easyblock = 'SystemCompiler' name = 'GCC' version = '4.8.3' versionsuffix = '-system' homepage = 'http://gcc.gnu.org/' description = """The GNU Compiler Collection ...""" toolchain = {'name': 'dummy', 'version': 'dummy'} moduleclass = 'compiler' -------------------------------------------------------------------------- Before making this compiler version available to EasyBuyild (via "eb GCC-4.8.3-system.eb") the user needs to ensure that the correct compiler version is found on $PATH (either by setting $PATH correctly or by using a self-installed module). The SystemCompiler EasyBlock does basically the same things as described under "Basic Usage" with the only difference that after automatically deriving the compiler version, it is checked whether it matches the version specified in the parameter "version", and if it does not, an error is printed and the installation is not performed. If the different versions of compiler on the system are made available through system modules, they should also be specified like in the following example (where it is assumed the system compiler is provided by the system module "GNU/4.8.3"): ----- GCC-4.8.3-system.eb ------------------------------------------------ easyblock = 'SystemCompiler' name = 'GCC' version = '4.8.3' versionsuffix = '-system' homepage = 'http://gcc.gnu.org/' description = """The GNU Compiler Collection ...""" toolchain = {'name': 'dummy', 'version': 'dummy'} dependencies = [ ('GNU/' + version, EXTERNAL_MODULE), ] moduleclass = 'compiler' -------------------------------------------------------------------------- ============================================================================ On Wed, Dec 23, 2015 at 04:01:18PM -0500, Nick Vandewiele wrote: > Thanks Jack for the hints! > > I created a new icc-system.eb easyblock with the following contents: > > easyblock = 'SystemCompiler' > name = 'icc' > version = 'system' > homepage = 'http://software.intel.com/en-us/intel-compilers/' > description = """C and C++ compiler from Intel""" > toolchain = {'name': 'dummy', 'version': 'dummy'} > moduleclass = 'compiler' > > Next, I simply ran > > eb icc-system.eb --robot > > which then lead to a newly available module icc/system. Great! > > My next question would be: > How is this re-usable: in order to create a toolchain module like "ictce" > using pre-installed components, do I need to create these "system" > easyblocks for all of the components in the toolchain (icc, ifort, mkl, > mpi)? > > Or, preferably, is there a way to use the newly created icc-system module > in lieu of an unavailable icc-XXX in an existing definition of an ictce > easyblock? > > I think my question boils down to this: > Is there a way to specify a compiler toolchain without the requirements to > specify its exact version number? The idea would be that some software is > robust enough to accept whatever version of a toolchain is available. Or is > this too unrealistic to imagine? > > Nick > > > On Tue, Dec 22, 2015 at 5:47 PM, Jack Perdue <[email protected]> wrote: > > > On 12/22/2015 04:26 PM, [email protected] wrote: > > > >> Hi, > >> > >> I am very new to easy_build, and it seems like a great tool! > >> > >> from the mailing list > >> (https://lists.ugent.be/wws/arc/easybuild/2015-09/msg00060.html), I > >> learned it > >> is non-trivial to create a toolchain from the Intel parallel studio 2016 > >> tar > >> file. Instead, I simply installed the Intel compilers through Intel's > >> wizard. > >> > >> Is there any documentation that explains how can I use these installed > >> Intel > >> components in easy_build? For example, if the toolchain "ictce" pops up > >> as a > >> dependency for software X, how can I tell easy_build to use the installed > >> Intel parallel studio instead? Or is there a way to create an ictce > >> module out > >> of the installed Parallel studio? > >> > >> Thanks in advance, > >> Nick > >> > > > > Howdy Nick, > > > > You can use the SystemCompiler easyblock to accomplish that > > fairly easily. See: > > > > > > http://www.siliconslick.com/easybuild/ebfiles_repo_cleaned/curie/xlcbase/xlcbase-13.01.0.eb > > (which is a work in progress here) > > > > and > > > > > > https://raw.githubusercontent.com/hpcugent/easybuild-easyconfigs/master/easybuild/easyconfigs/g/GCC/GCC-system.eb > > (which is the "official" EB example) > > > > For details, see: > > > > > > https://raw.githubusercontent.com/hpcugent/easybuild-easyblocks/master/easybuild/easyblocks/generic/systemcompiler.py > > > > Just make sure icc/ifort are in your PATH before you try to build. > > > > jack (who was recently enlightened on the powers of systemcompiler.py) > > > > > > -- -- Dr.-Ing. Bernd Mohr Juelich Supercomputing Centre Institute for Advanced Simulation E-Mail: [email protected] WWW: http://www.fz-juelich.de/SharedDocs/Personen/IAS/JSC/EN/staff/mohr_b.html ------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------ Forschungszentrum Juelich GmbH 52425 Juelich Sitz der Gesellschaft: Juelich Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498 Vorsitzender des Aufsichtsrats: MinDir Dr. Karl Eugen Huthmacher Geschaeftsfuehrung: Prof. Dr.-Ing. Wolfgang Marquardt (Vorsitzender), Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt, Prof. Dr. Sebastian M. Schmidt ------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------

